Module: Strava::Api::Endpoints::Routes
- Included in:
- Client
- Defined in:
- lib/strava/api/endpoints/routes.rb
Instance Method Summary collapse
-
#athlete_routes(id_or_options, options = {}, &block) ⇒ Object
Returns a list of the routes created by the authenticated athlete using their athlete ID.
-
#export_route_gpx(id_or_options, options = {}) ⇒ Object
Returns a GPX file of the route.
-
#export_route_tcx(id_or_options, options = {}) ⇒ Object
Returns a TCS file of the route.
-
#route(id_or_options, options = {}) ⇒ Object
Returns a route using its identifier.
Instance Method Details
#athlete_routes(id_or_options, options = {}, &block) ⇒ Object
Returns a list of the routes created by the authenticated athlete using their athlete ID.
48 49 50 51 |
# File 'lib/strava/api/endpoints/routes.rb', line 48 def athlete_routes(, = {}, &block) id, = parse_args(, ) paginate "athletes/#{id}/routes", , Strava::Models::Route, &block end |
#export_route_gpx(id_or_options, options = {}) ⇒ Object
Returns a GPX file of the route.
11 12 13 14 |
# File 'lib/strava/api/endpoints/routes.rb', line 11 def export_route_gpx(, = {}) id, = parse_args(, ) get "routes/#{id}/export_gpx", end |
#export_route_tcx(id_or_options, options = {}) ⇒ Object
Returns a TCS file of the route.
22 23 24 25 |
# File 'lib/strava/api/endpoints/routes.rb', line 22 def export_route_tcx(, = {}) id, = parse_args(, ) get "routes/#{id}/export_tcx", end |