From 06a5f92c6fabedcdf77283846f0837f99053b767 Mon Sep 17 00:00:00 2001 From: Paul Mach Date: Tue, 19 May 2015 22:58:41 -0700 Subject: [PATCH] Weight to athlete detail --- athletes.go | 1 + cassettes/current_athlete_get.body | 2 +- current_athlete_test.go | 2 ++ 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/athletes.go b/athletes.go index b275286..4877a5c 100644 --- a/athletes.go +++ b/athletes.go @@ -15,6 +15,7 @@ type AthleteDetailed struct { DatePreference string `json:"date_preference"` MeasurementPreference string `json:"measurement_preference"` FTP int `json:"ftp"` + Weight float64 `json:"weight"` // kilograms Clubs []*ClubSummary `json:"clubs"` Bikes []*GearSummary `json:"bikes"` Shoes []*GearSummary `json:"shoes"` diff --git a/cassettes/current_athlete_get.body b/cassettes/current_athlete_get.body index 413e94f..a1ee865 100644 --- a/cassettes/current_athlete_get.body +++ b/cassettes/current_athlete_get.body @@ -1 +1 @@ -{"id":227615,"resource_state":3,"firstname":"John","lastname":"Applestrava","profile_medium":"http://dgalywyr863hv.cloudfront.net/pictures/athletes/227615/41555/3/medium.jpg","profile":"http://dgalywyr863hv.cloudfront.net/pictures/athletes/227615/41555/3/large.jpg","city":"San Francisco","state":"CA","country":"United States","sex":"M","friend":null,"follower":null,"premium":true,"created_at":"2012-01-18T18:20:37Z","updated_at":"2014-01-21T06:23:32Z","follower_count":1,"friend_count":35,"mutual_friend_count":0,"date_preference":"%m/%d/%Y","measurement_preference":"feet","email":"mobiledemo@strava.com","ftp":null,"clubs":[{"id":45255,"resource_state":2,"name":"Test Club","profile_medium":"avatar/club/medium.png","profile":"avatar/club/large.png"}],"bikes":[{"id":"b77076","primary":false,"name":"burrito burner","resource_state":2,"distance":536292.3}],"shoes":[{"id":"g5697","primary":true,"name":"ASICS Kayano","resource_state":2,"distance":17224.6}]} \ No newline at end of file +{"id":227615,"resource_state":3,"firstname":"John","lastname":"Applestrava","profile_medium":"http://dgalywyr863hv.cloudfront.net/pictures/athletes/227615/41555/3/medium.jpg","profile":"http://dgalywyr863hv.cloudfront.net/pictures/athletes/227615/41555/3/large.jpg","city":"San Francisco","state":"CA","country":"United States","sex":"M","friend":null,"follower":null,"premium":true,"created_at":"2012-01-18T18:20:37Z","updated_at":"2014-01-21T06:23:32Z","follower_count":1,"friend_count":35,"mutual_friend_count":0,"date_preference":"%m/%d/%Y","measurement_preference":"feet","email":"mobiledemo@strava.com","ftp":200,"weight":70.1,"clubs":[{"id":45255,"resource_state":2,"name":"Test Club","profile_medium":"avatar/club/medium.png","profile":"avatar/club/large.png"}],"bikes":[{"id":"b77076","primary":false,"name":"burrito burner","resource_state":2,"distance":536292.3}],"shoes":[{"id":"g5697","primary":true,"name":"ASICS Kayano","resource_state":2,"distance":17224.6}]} \ No newline at end of file diff --git a/current_athlete_test.go b/current_athlete_test.go index 03f6db5..0e71541 100644 --- a/current_athlete_test.go +++ b/current_athlete_test.go @@ -34,6 +34,8 @@ func TestCurrentAthleteGet(t *testing.T) { expected.MutualFriendCount = 0 expected.DatePreference = "%m/%d/%Y" expected.MeasurementPreference = "feet" + expected.FTP = 200 + expected.Weight = 70.1 expected.Email = "mobiledemo@strava.com" expected.Clubs = make([]*ClubSummary, 1)