Strava v1.0.0 Strava.Routes View Source
API calls for all endpoints tagged Routes.
Link to this section Summary
Functions
Export Route GPX Returns a GPX file of the route. Requires read_all scope for private routes
Export Route TCX Returns a TCX file of the route. Requires read_all scope for private routes
Get Route Returns a route using its identifier. Requires read_all scope for private routes
List Athlete Routes Returns a list of the routes created by the authenticated athlete using their athlete ID. Private routes are filtered out unless requested by a token with read_all scope
Link to this section Functions
get_route_as_gpx(client, id, opts \\ [])
View Source
get_route_as_gpx(Tesla.Env.client(), integer(), keyword()) ::
{:ok, nil} | {:error, Tesla.Env.t()}
get_route_as_gpx(Tesla.Env.client(), integer(), keyword()) :: {:ok, nil} | {:error, Tesla.Env.t()}
Export Route GPX Returns a GPX file of the route. Requires read_all scope for private routes.
Parameters
- client (Strava.Client): Client to make authenticated requests
- id (integer()): The identifier of the route.
- opts (KeywordList): [optional] Optional parameters
Returns
{:ok, %{}} on success {:error, info} on failure
get_route_as_tcx(client, id, opts \\ [])
View Source
get_route_as_tcx(Tesla.Env.client(), integer(), keyword()) ::
{:ok, nil} | {:error, Tesla.Env.t()}
get_route_as_tcx(Tesla.Env.client(), integer(), keyword()) :: {:ok, nil} | {:error, Tesla.Env.t()}
Export Route TCX Returns a TCX file of the route. Requires read_all scope for private routes.
Parameters
- client (Strava.Client): Client to make authenticated requests
- id (integer()): The identifier of the route.
- opts (KeywordList): [optional] Optional parameters
Returns
{:ok, %{}} on success {:error, info} on failure
get_route_by_id(client, id, opts \\ [])
View Source
get_route_by_id(Tesla.Env.client(), integer(), keyword()) ::
{:ok, Strava.Route.t()} | {:error, Tesla.Env.t()}
get_route_by_id(Tesla.Env.client(), integer(), keyword()) :: {:ok, Strava.Route.t()} | {:error, Tesla.Env.t()}
Get Route Returns a route using its identifier. Requires read_all scope for private routes.
Parameters
- client (Strava.Client): Client to make authenticated requests
- id (integer()): The identifier of the route.
- opts (KeywordList): [optional] Optional parameters
Returns
{:ok, %Strava.Route{}} on success {:error, info} on failure
get_routes_by_athlete_id(client, id, opts \\ [])
View Source
get_routes_by_athlete_id(Tesla.Env.client(), integer(), keyword()) ::
{:ok, [Strava.Route.t()]} | {:error, Tesla.Env.t()}
get_routes_by_athlete_id(Tesla.Env.client(), integer(), keyword()) :: {:ok, [Strava.Route.t()]} | {:error, Tesla.Env.t()}
List Athlete Routes Returns a list of the routes created by the authenticated athlete using their athlete ID. Private routes are filtered out unless requested by a token with read_all scope.
Parameters
- client (Strava.Client): Client to make authenticated requests
- id (integer()): The identifier of the athlete.
opts (KeywordList): [optional] Optional parameters
- :page (integer()): Page number.
- :per_page (integer()): Number of items per page. Defaults to 30.
Returns
{:ok, [%Route{}, ...]} on success {:error, info} on failure