client.get_activities returning None for activity.laps, but there are laps #494
Replies: 2 comments
-
hey there @blairjbass 👋 i'm just responding here to let you know that we've seen this post and will try to get back to you soon. work life has been busy! |
Beta Was this translation helpful? Give feedback.
-
Hi, when you call client.get_activities(), Strava will respond with a list of SummaryActivity objects (see https://developers.strava.com/docs/reference/#api-Activities-getLoggedInAthleteActivities). These don't have a laps property. Unfortunately, there's no other way to retrieve laps than separately for each activity (which indeed uses a lot of requests). We can improve our (stravalib) API by being more specific about the response types (e.g., SummaryActivity vs DetailedActivity). We're currently working on a major upgrade with breaking changes and might add this improvement as well. |
Beta Was this translation helpful? Give feedback.
-
Hi all,
I am new to playing around with the strava api and stravalib.
I have noticed when I call client.get_activities() that I get None for the laps field for every single activity. However, if I explicitly call client.get_activity_laps(), I get the laps.
I am quickly reaching my short term limits having to call client.get_activity_laps() for every single activity.
I am just wondering if anyone else has run into this issue.
Here's is sample code to illustrate the issue:
Ouput:
Beta Was this translation helpful? Give feedback.
All reactions