module Strava::Api::Endpoints::Routes

Public Instance Methods

athlete_routes(id_or_options, options = {}, &block) click to toggle source

Returns a list of the routes created by the authenticated athlete using their athlete ID.

@option options [Integer] :id

The identifier of the athlete.

@option options [Integer] :page

Page number.

@option options [Integer] :per_page

Number of items per page. Defaults to 30
# File lib/strava/api/endpoints/routes.rb, line 48
def athlete_routes(id_or_options, options = {}, &block)
  id, options = parse_args(id_or_options, options)
  paginate "athletes/#{id}/routes", options, Strava::Models::Route, &block
end
export_route_gpx(id_or_options, options = {}) click to toggle source

Returns a GPX file of the route.

@option options [String] :id

Route id.
# File lib/strava/api/endpoints/routes.rb, line 11
def export_route_gpx(id_or_options, options = {})
  id, options = parse_args(id_or_options, options)
  get "routes/#{id}/export_gpx", options
end
export_route_tcx(id_or_options, options = {}) click to toggle source

Returns a TCS file of the route.

@option options [String] :id

Route id.
# File lib/strava/api/endpoints/routes.rb, line 22
def export_route_tcx(id_or_options, options = {})
  id, options = parse_args(id_or_options, options)
  get "routes/#{id}/export_tcx", options
end
route(id_or_options, options = {}) click to toggle source

Returns a route using its identifier.

@option options [String] :id

Route id.
# File lib/strava/api/endpoints/routes.rb, line 33
def route(id_or_options, options = {})
  id, options = parse_args(id_or_options, options)
  Strava::Models::Route.new(get("routes/#{id}", options))
end