class Strava::Gear
Gear
represents both shoes and bikes. These are returned as part of the athlete summary.
@see strava.github.io/api/v3/gear/ Strava
Gear
API Docs
Public Instance Methods
get_details()
click to toggle source
Retrieve full details for Gear
object. Sets all data attributes on self.
@return [Hash] raw API response
# File lib/strava/gear.rb, line 23 def get_details return self if detailed? res = client.get(path_base).to_h update(res) res end
update(data, **opts)
click to toggle source
Updates gear with passed data attributes.
@param data [Hash] data hash containing gear data @return [self]
# File lib/strava/gear.rb, line 12 def update(data, **opts) @response = data @id = data['id'] @resource_state = data['resource_state'] self end
Private Instance Methods
path_base()
click to toggle source
URL path for Gear
object.
@return [String] URL path
# File lib/strava/gear.rb, line 33 def path_base "gear/#{id}" end