Skip to content
This repository has been archived by the owner on Feb 14, 2023. It is now read-only.

Add workout type & fix typo #32

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion activities.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ type ActivitySummary struct {
ElapsedTime int `json:"elapsed_time"`
TotalElevationGain float64 `json:"total_elevation_gain"`
Type ActivityType `json:"type"`
WorkoutType int `json:"workout_type"`

StartDate time.Time `json:"start_date"`
StartDateLocal time.Time `json:"start_date_local"`
Expand Down Expand Up @@ -55,7 +56,7 @@ type ActivitySummary struct {
Flagged bool `json:"flagged"`
GearId string `json:"gear_id"` // bike or pair of shoes
AverageSpeed float64 `json:"average_speed"`
MaximunSpeed float64 `json:"max_speed"`
MaximumSpeed float64 `json:"max_speed"`
AverageCadence float64 `json:"average_cadence"`
AverageTemperature float64 `json:"average_temp"`
AveragePower float64 `json:"average_watts"`
Expand Down
4 changes: 2 additions & 2 deletions activities_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ func TestActivitiesGet(t *testing.T) {
expected.Gear.Distance = 536292

expected.AverageSpeed = 7.313
expected.MaximunSpeed = 13.7
expected.MaximumSpeed = 13.7
expected.AverageCadence = 73.2
expected.AverageTemperature = 27.0
expected.AveragePower = 140.2
Expand Down Expand Up @@ -496,7 +496,7 @@ func TestActivitiesListLaps(t *testing.T) {

expected.TotalElevationGain = 90
expected.AverageSpeed = 4
expected.MaximunSpeed = 8.9
expected.MaximumSpeed = 8.9
expected.AveragePower = 70
expected.LapIndex = 1

Expand Down
2 changes: 1 addition & 1 deletion lap_efforts.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ type LapEffortSummary struct {
EffortSummary
TotalElevationGain float64 `json:"total_elevation_gain"`
AverageSpeed float64 `json:"average_speed"`
MaximunSpeed float64 `json:"max_speed"`
MaximumSpeed float64 `json:"max_speed"`
AverageCadence float64 `json:"average_cadence"`
AveragePower float64 `json:"average_watts"`
AverageHeartrate float64 `json:"average_heartrate"`
Expand Down