-
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
Streams API no longer accepts resolution="all" #233
Comments
hey there @djcunningham0 👋 i'm going through some of our older issues and cleaning things up. here is where the new streams method is defined in our current API. and in the strava docs it does show that a resolution is returned which is also represented in our strava_model.py does the "high" option not work for you? What gets returned when you try that? a filtered version of the activity? Please let us know if this is still an issue. if i don't hear from you in a week i will close this. but if it's an ongoing issue i'm happy to test it out one some longer activities just to see what happens. I know i have been able to download the streams for long activities but i never looked closely at the point density / resolution. |
It looks like this is no longer an issue. The solution is to not a value for the "resolution" parameter. If I don't specify resolution, it returns every single data point in the stream. (For comparison, if I specify resolution="high", then it trims condenses long activities down to ~8500 data points.) I don't know if the functionality changed since I opened the original issue or if I didn't notice the solution at the time, but that doesn't really matter going forward. Some functionality and documentation could be improved (described below), but I'd consider it low priority. This issue could be closed since there's a way to get full resolution detail and it only affects very long activities anyway. Inconsistencies: (I'm testing with activity 7595268894, for reference.) When I hit the API endpoint at /activities/{activity_id}/streams and specify the parameter resolution="high", the response object has the following attributes:
When instead I hit the same endpoint (/activities/{activity_id}/streams) but I don't specify the resolution parameter, the response object has the following attributes:
Suggestions:
|
hey @djcunningham0 👋 Thanks for coming back to this (old!) issue. This is unexpected behavior. Perhaps the way strava treats resolution is that you either want filtered data (filtered at whatever low, medium high thresholds they use) or not filtered (ie None / no filtering). i also see in our code that this parameter is actually deprecated with a note about it being undocumented and thus actually unstable. Would a statement in the docstring about how this works (noting that it is technically unsupported by Strava) above be helpful ? Our code is typed in a way that suggests the values low, medium, high and None are acceptable for this request.
But it isn't clear what Would you be interested in submitting a small docstring clarification? Maybe something like: resolution : str, optional
Indicates desired number of data points. 'low' (100), 'medium'
(1000) or 'high' (10000). A value of None will return full resolution data.
.. deprecated::
This param is not officially supported by the Strava API and
may be removed in the future. |
"all" is not recognized as a valid value for the "resolution" parameter in the Streams API. When I make a request with resolution=all I get a 400 error. It still works for values of "high", "medium", and "low" (high seems to be the default now).
For what it's worth, the "resolution" parameter has been removed from the official docs, so maybe it will be completely removed in the future.
The loss of this parameter means it's impossible to get full resolution streams for long activities. Does anyone know if there's another way of getting that data?
https://github.com/hozn/stravalib/blob/b8d1181e32248c6570f0adfa995cb6c7adfccf62/stravalib/client.py#L1190-L1191
The text was updated successfully, but these errors were encountered: