Table of Contents

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

id long

The unique identifier of the route to export.

cancellationToken CancellationToken

A 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

id long

The unique identifier of the route to export.

cancellationToken CancellationToken

A 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

id long

The identifier of the route.

cancellationToken CancellationToken

A 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

athleteId long

The unique identifier of the athlete whose routes are to be retrieved.

page int?

The page number of results to retrieve. If null, the first page is returned.

perPage int?

The maximum number of routes to return per page. If null, the default page size is used.

cancellationToken CancellationToken

A cancellation token that can be used to cancel the asynchronous operation.

Returns

Task<ApiResult<List<Route>>>

A task that represents the asynchronous operation. The task result contains an ApiResult with a list of Route objects created by the athlete. The list will be empty if the athlete has no routes.