mpclarkson / StravaSwift

A Swift wrapper for the Strava API v3
MIT License
102 stars 45 forks source link

How to get the full details of athlete. #22

Open mohdzakir786 opened 4 years ago

mohdzakir786 commented 4 years ago

Not able to get list of bike , shoes and clubs I have implement the StravaSwift but not getting details of athlete.

[id: Optional(2808157108) resourceState: Optional(Dirtlej.ResourceState.summary) externalId: nil uploadId: nil athlete: Optional(id: Optional(47192250) resourceState: Optional(Dirtlej.ResourceState.meta) firstname: nil lastname: nil profileMedium: nil profile: nil city: nil state: nil country: nil sex: nil friend: nil follower: nil premium: nil createdAt: nil updatedAt: nil friendCount: nil followerCount: nil mutualFriendCount: nil datePreference: nil measurementPreference: nil email: nil FTP: nil weight: nil clubs: Optional([]) bikes: Optional([]) shoes: Optional([]) )

FleetPhil commented 4 years ago

What call are you making to get this response? The resourceState indicates that this is a meta state for the athlete which only shows the Athlete ID (see Object representations in the Strava API documentation). If you want detailed Athlete data you need to make a call to athlete

KurtisPayne commented 4 years ago

I am also having this issue - when making the call to 'athlete' the [Bike] field returns as empty optional array. Is there any further insights as to how to get past this issue?