Interface IRoutesApi
- Namespace
- Tudormobile.Strava.Api
- Assembly
- Tudormobile.Strava.dll
Strava V3 Routes API Interface.
public interface IRoutesApi
Methods
ExportRouteGPXAsync(long, CancellationToken)
Asynchronously exports the specified route as a GPX document.
Task<ApiResult<GpxDocument>> ExportRouteGPXAsync(long id, CancellationToken cancellationToken = default)
Parameters
idlongThe unique identifier of the route to export.
cancellationTokenCancellationTokenA cancellation token that can be used to cancel the export operation.
Returns
- Task<ApiResult<GpxDocument>>
A task that represents the asynchronous operation. The task result contains an ApiResult<T> with the exported GPX document if the operation succeeds.
ExportRouteTCXAsync(long, CancellationToken)
Asynchronously exports the specified route as a TCX (Training Center XML) document.
Task<ApiResult<TcxDocument>> ExportRouteTCXAsync(long id, CancellationToken cancellationToken = default)
Parameters
idlongThe unique identifier of the route to export.
cancellationTokenCancellationTokenA cancellation token that can be used to cancel the export operation.
Returns
- Task<ApiResult<TcxDocument>>
A task that represents the asynchronous operation. The task result contains an ApiResult<T> with the exported TCX document for the specified route.
GetRouteAsync(long, CancellationToken)
Retrieves detailed information about a specific route by its identifier.
Task<ApiResult<Route>> GetRouteAsync(long id, CancellationToken cancellationToken = default)
Parameters
idlongThe identifier of the route.
cancellationTokenCancellationTokenA token to cancel the operation.
Returns
- Task<ApiResult<Route>>
An ApiResult<T> containing the detailed route information.
ListAthleteRoutesAsync(long, int?, int?, CancellationToken)
Asynchronously retrieves a paginated list of routes created by the specified athlete.
Task<ApiResult<List<Route>>> ListAthleteRoutesAsync(long athleteId, int? page = null, int? perPage = null, CancellationToken cancellationToken = default)
Parameters
athleteIdlongThe unique identifier of the athlete whose routes are to be retrieved.
pageint?The page number of results to retrieve. If null, the first page is returned.
perPageint?The maximum number of routes to return per page. If null, the default page size is used.
cancellationTokenCancellationTokenA cancellation token that can be used to cancel the asynchronous operation.