return nil
}
- dataStreamID := DataStreamID(&fitness.DataSource{
+ dataStreamID, err := c.DataSourceCreate(ctx, &fitness.DataSource{
+ Application: Application(ctx),
DataType: &fitness.DataType{
+ Field: []*fitness.DataTypeField{
+ &fitness.DataTypeField{
+ Name: "activity",
+ Format: "integer",
+ },
+ },
Name: dataTypeNameActivitySegment,
},
Type: "raw",
})
+ if err != nil {
+ return err
+ }
endOfDay := startOfDay.Add(24 * time.Hour).Add(-1 * time.Nanosecond)