Module: Strava::V2::SegmentsRequest
- Included in:
- Connection
- Defined in:
- lib/strava/v2/segments_request.rb
Instance Method Summary collapse
- #segments_and_efforts_for_ride(ride_id) ⇒ Object
- #segments_and_efforts_for_ride_path(ride_id) ⇒ Object
Instance Method Details
#segments_and_efforts_for_ride(ride_id) ⇒ Object
10 11 12 13 14 15 16 17 |
# File 'lib/strava/v2/segments_request.rb', line 10 def segments_and_efforts_for_ride(ride_id) all_json = self.fetch(segments_and_efforts_for_ride_path(ride_id), {}) all_segments = [] all_json["efforts"].each { |effort_json| all_segments.push(Segment.new(effort_json["segment"], [effort_json["effort"]])) } all_segments end |
#segments_and_efforts_for_ride_path(ride_id) ⇒ Object
6 7 8 |
# File 'lib/strava/v2/segments_request.rb', line 6 def segments_and_efforts_for_ride_path(ride_id) "rides/#{ride_id}/efforts" end |