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.
50 51 52 53 |
# File 'lib/strava/api/endpoints/routes.rb', line 50 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.
13 14 15 16 |
# File 'lib/strava/api/endpoints/routes.rb', line 13 def export_route_gpx(, = {}) id, = parse_args(, ) get("routes/#{id}/export_gpx", ).response end |
#export_route_tcx(id_or_options, options = {}) ⇒ Object
Returns a TCS file of the route.
24 25 26 27 |
# File 'lib/strava/api/endpoints/routes.rb', line 24 def export_route_tcx(, = {}) id, = parse_args(, ) get("routes/#{id}/export_tcx", ).response end |