Module: Strava::Api::Endpoints::Gears

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

Overview

API endpoints for Strava gears.

Gears (also known as equipment) represent bikes and shoes used by athletes in their activities. Gears track usage statistics like total distance and can be associated with specific activities.

Instance Method Summary collapse

Instance Method Details

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

Returns an equipment using its identifier.

Parameters:

  • id_or_options (String, Integer, Hash)

    Either a gear ID or a hash of options including :id

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

    Additional options (if first parameter is an ID)



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

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