stravalib.client.Client.get_activity_streams#

Client.get_activity_streams(activity_id: int, types: list[str] | None = None, resolution: Literal['low', 'medium', 'high'] | None = None, series_type: Literal['time', 'distance'] | None = None) dict[str, Stream][source]#

Returns a stream for an activity.

https://developers.strava.com/docs/reference/#api-Streams-getActivityStreams

Streams represent the raw spatial data for the uploaded file. External applications may only access this information for activities owned by the authenticated athlete.

Streams are available in 11 different types. If the stream is not available for a particular activity it will be left out of the request results.

Streams types are: time, latlng, distance, altitude, velocity_smooth,

heartrate, cadence, watts, temp, moving, grade_smooth

Parameters:
  • activity_id (int) – The ID of activity.

  • types (list[str], optional, default=None) – A list of the types of streams to fetch.

  • resolution (str, optional) –

    Indicates desired number of data points. ‘low’ (100), ‘medium’ (1000) or ‘high’ (10000). .. deprecated:

    This param is not officially supported by the Strava API and
    may be removed in the future.
    

  • series_type (str, optional) –

    Relevant only if using resolution either ‘time’ or ‘distance’. Used to index the streams if the stream is being reduced. .. deprecated:

    This param is not officially supported by the Strava API and may be
    removed in the future.
    

Returns:

A dictionary of stravalib.model.Stream from the activity

Return type:

dict