You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
activity=client.athlete_activities.lastactivity.class=>Strava::Models::Activityactivity.id=>2957731094activity.name=>"Morning Run"# This is actually a SummaryActivity (see here https://developers.strava.com/docs/reference/#api-models-SummaryActivity) and so its missing certain fields like descriptionactivity.description=>nil
activity=client.activity(2957731094)activity.class=>Strava::Models::Activityactivity.id=>2957731094activity.name=>"Morning Run"# This is actually a DetailedActivity (see here https://developers.strava.com/docs/reference/#api-models-DetailedActivity) and so it contains data for fields like description=>"What a beautiful day for a run"
But I think it would be much clearer if client.athlete_activities returned [Strava::Models::SummaryActivity] and client.activity returned a Strava::Models::DetailedActivity.
What do you think?
The text was updated successfully, but these errors were encountered:
There's a lot of summary/detail situations in Strava API and for whatever reason I had chosen not to rebuild that hierarchy in this client. I would be open to refactoring that, possibly inheriting DetailedActivity from SummaryActivity or including it and delegating. Give it a shot.
This is easiest to explain by example:
My work around for this API weirdness is:
But I think it would be much clearer if
client.athlete_activities
returned[Strava::Models::SummaryActivity]
andclient.activity
returned aStrava::Models::DetailedActivity
.What do you think?
The text was updated successfully, but these errors were encountered: