return results, maxEndTime, nil
}
-func (c *Client) SetHeartRate(ctx context.Context, totalDurations []fitbit.HeartRateZone, startOfDay time.Time) error {
+func (c *Client) SetHeartRate(ctx context.Context, totalDurations []fitbit.HeartRateZone, restingHeartRate int, startOfDay time.Time) error {
dataSource := &fitness.DataSource{
Application: Application(ctx),
DataType: &fitness.DataType{
return fmt.Errorf("gfitClient.SetCalories(%d) = %v", summary.Summary.CaloriesOut, err)
}
- if err := gfitClient.SetHeartRate(ctx, summary.Summary.HeartRateZones, tm); err != nil {
+ if err := gfitClient.SetHeartRate(ctx, summary.Summary.HeartRateZones, summary.Summary.RestingHeartRate, tm); err != nil {
return fmt.Errorf("gfitClient.SetHeartRate() = %v", err)
}