Sha256: 3f68036ced61d551cc74ba5f58fc6034f87c836492b55ead62da135b70f8ffaa
Contents?: true
Size: 1.14 KB
Versions: 7
Compression:
Stored size: 1.14 KB
Contents
# frozen_string_literal: true module Strava module Api module Endpoints module SegmentEfforts # # Returns a segment effort from an activity that is owned by the authenticated athlete. # # @option options [String] :id # The identifier of the segment effort. # def segment_effort(id_or_options, options = {}) id, options = parse_args(id_or_options, options) Strava::Models::SegmentEffort.new(get("segment_efforts/#{id}", options)) end # # Returns a set of the authenticated athlete's segment efforts for a given segment. # # @option options [Integer] :id # The identifier of the segment. # @option options [Integer] :page # Page number. # @option options [Integer] :per_page # Number of items per page. Defaults to 30. # def segment_efforts(id_or_options, options = {}, &block) id, options = parse_args(id_or_options, options) paginate "segments/#{id}/all_efforts", options, Strava::Models::SegmentEffort, &block end end end end end
Version data entries
7 entries across 7 versions & 1 rubygems