-
Notifications
You must be signed in to change notification settings - Fork 202
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Paginated response handling #249
Comments
I agree that this would be an improvement. If that is the only parameter that Strava API supports, I think just adding this to those methods directly makes sense. If it is anticipated that there would be other parameters that would be part of the specification on how results are returned (e.g. other systems might include things like sort field, sort direction, etc.) then probably some sort of PatinationInfo object/dataclass would make sense. (But from memory and this ticket description, that is probably overkill for this API.) |
I think we should consider that many users run |
Yeah, I think adding a new optional parameter would be fine (not breaking), but agree that we should be careful about not breaking API if the version is not changing major version numbers. |
hi @jsamoocha - this is an older issue but still has some activity. Is this an ongoing issue or did you address this @jsamoocha with the big API restructure? Just lemme know as with the other issues . i can organize things we want to do vs closing older things that have been already addressed as it makes sense! |
This is not fixed yet. |
There are many methods in
Client
(e.g.,get_activities()
) that return aBatchedResultsIterator
instance. The Strava API parameter that manages how many results are returned per page isper_page
(which, BTW, has a deprecation warning in the swagger.json but not in the published API docs).However, none of the
stravalib
client methods support theper_page
orpage
parameters that allow paginated results. To better match the Strava API and allow developers to customize paginated responses, wouldn't it be better if the client methods would have theseper_page
andpage
parameters as well?In the short term, a quick-n-dirty workaround is to manually set these attributes on the
BatchedResultsIterator
instance returned by the client method.The text was updated successfully, but these errors were encountered: