Interface IStreamsApi
- Namespace
- Tudormobile.Strava.Api
- Assembly
- Tudormobile.Strava.dll
Strava V3 Streams API Interface.
public interface IStreamsApi
Methods
GetActivityStreamsAsync(long, IEnumerable<string>, bool, CancellationToken)
Asynchronously retrieves a list of activity streams for the specified resource and activity types.
Task<ApiResult<List<ActivityStream>>> GetActivityStreamsAsync(long id, IEnumerable<string> types, bool keysByType = true, CancellationToken cancellationToken = default)
Parameters
idlongThe unique identifier of the resource for which to retrieve activity streams.
typesIEnumerable<string>A collection of activity stream types to include in the result. Each type specifies a category of activity data to retrieve. Cannot be null or empty.
keysByTypebooltrue to group the returned activity streams by type; otherwise, false to return a flat list.
cancellationTokenCancellationTokenA cancellation token that can be used to cancel the asynchronous operation.
Returns
- Task<ApiResult<List<ActivityStream>>>
A task that represents the asynchronous operation. The task result contains an ApiResult with a list of ActivityStream objects matching the specified types. The list may be empty if no streams are found.
GetRouteStreamsAsync(long, CancellationToken)
Asynchronously retrieves all route streams associated with the specified route identifier.
Task<ApiResult<List<RouteStream>>> GetRouteStreamsAsync(long id, CancellationToken cancellationToken = default)
Parameters
idlongThe unique identifier of the route for which to retrieve streams.
cancellationTokenCancellationTokenA cancellation token that can be used to cancel the asynchronous operation.
Returns
- Task<ApiResult<List<RouteStream>>>
A task that represents the asynchronous operation. The task result contains an ApiResult<T> with a list of RouteStream objects for the specified route. If no streams are found, the list will be empty.
GetSegmentEffortStreamsAsync(long, IEnumerable<string>, bool, CancellationToken)
Asynchronously retrieves the requested data streams for a specific segment effort.
Task<ApiResult<List<SegmentEffortStream>>> GetSegmentEffortStreamsAsync(long id, IEnumerable<string> types, bool keysByType = true, CancellationToken cancellationToken = default)
Parameters
idlongThe identifier of the segment effort for which to retrieve streams.
typesIEnumerable<string>A collection of stream types to retrieve. Each type specifies a particular data stream, such as time, distance, or heart rate.
keysByTypebooltrue to return the result as a dictionary keyed by stream type; otherwise, false to return a list of streams in the order requested.
cancellationTokenCancellationTokenA cancellation token that can be used to cancel the asynchronous operation.
Returns
- Task<ApiResult<List<SegmentEffortStream>>>
A task that represents the asynchronous operation. The task result contains an ApiResult with a list of SegmentEffortStream objects corresponding to the requested stream types.
Remarks
If a requested stream type is not available for the specified segment effort, it will be omitted from the result. The method supports cancellation via the provided token.
GetSegmentStreamsAsync(long, IEnumerable<string>, bool, CancellationToken)
Asynchronously retrieves a list of segment streams for the specified segment and stream types.
Task<ApiResult<SegmentStreamCollection>> GetSegmentStreamsAsync(long id, IEnumerable<string> types, bool keysByType = true, CancellationToken cancellationToken = default)
Parameters
idlongThe unique identifier of the segment for which to retrieve streams.
typesIEnumerable<string>A collection of stream type names to filter the results. Only streams matching these types are returned.
keysByTypebooltrue to group the returned streams by type; otherwise, false to return a flat list.
cancellationTokenCancellationTokenA cancellation token that can be used to cancel the asynchronous operation.
Returns
- Task<ApiResult<SegmentStreamCollection>>
A task that represents the asynchronous operation. The task result contains an ApiResult with a list of SegmentStream objects matching the specified criteria.