Module: Strava::Api::Endpoints::RunningRaces

Included in:
Client
Defined in:
lib/strava/api/endpoints/running_races.rb

Instance Method Summary collapse

Instance Method Details

#running_race(id_or_options, options = {}) ⇒ Object

Returns a running race for a given identifier.

Parameters:

  • options (Hash) (defaults to: {})

    a customizable set of options

Options Hash (options):

  • :id (String)

    The identifier of the running race.



11
12
13
14
# File 'lib/strava/api/endpoints/running_races.rb', line 11

def running_race(id_or_options, options = {})
  id, options = parse_args(id_or_options, options)
  Strava::Models::RunningRace.new(get("running_races/#{id}", options))
end

#running_races(options = {}) ⇒ Object

Returns a list running races based on a set of search criteria.

Parameters:

  • options (Hash) (defaults to: {})

    a customizable set of options

Options Hash (options):

  • :year (Integer)

    Filters the list by a given year.



22
23
24
25
26
# File 'lib/strava/api/endpoints/running_races.rb', line 22

def running_races(options = {})
  get('running_races', options).map do |row|
    Strava::Models::RunningRace.new(row)
  end
end