Class: Strava::Models::SummaryAthlete
- Inherits:
-
Response
- Object
- Hashie::Trash
- Strava::Model
- Response
- Strava::Models::SummaryAthlete
- Defined in:
- lib/strava/models/summary_athlete.rb
Overview
Represents summary information about a Strava athlete.
Contains basic profile information about an athlete. This is typically returned when listing kudoers, commenters, or other athletes associated with activities, rather than the full DetailedAthlete information.
Instance Method Summary collapse
-
#city ⇒ String?
City.
-
#country ⇒ String?
Country.
-
#created_at ⇒ Time
When the athlete account was created.
-
#firstname ⇒ String
First name.
-
#id ⇒ Integer
Athlete ID.
-
#lastname ⇒ String
Last name.
-
#name ⇒ String?
Returns the athlete's full name.
-
#premium ⇒ Boolean
Whether the athlete has a premium subscription.
-
#profile ⇒ String?
URL to full-sized profile picture.
-
#profile_medium ⇒ String?
URL to medium-sized profile picture.
-
#resource_state ⇒ Integer
Resource state indicator.
-
#sex ⇒ String
Sex ('M' for male, 'F' for female).
-
#state ⇒ String?
State or province.
-
#strava_url ⇒ String
Returns the Strava web URL for this athlete's profile.
-
#summit ⇒ Boolean
Whether the athlete has a Summit subscription.
-
#updated_at ⇒ Time
When the athlete account was last updated.
Instance Method Details
#city ⇒ String?
Returns City.
42 |
# File 'lib/strava/models/summary_athlete.rb', line 42 property 'city' |
#country ⇒ String?
Returns Country.
48 |
# File 'lib/strava/models/summary_athlete.rb', line 48 property 'country' |
#created_at ⇒ Time
Returns When the athlete account was created.
60 |
# File 'lib/strava/models/summary_athlete.rb', line 60 property 'created_at', transform_with: ->(v) { Time.parse(v) } |
#firstname ⇒ String
Returns First name.
30 |
# File 'lib/strava/models/summary_athlete.rb', line 30 property 'firstname' |
#id ⇒ Integer
Returns Athlete ID.
24 |
# File 'lib/strava/models/summary_athlete.rb', line 24 property 'id' |
#lastname ⇒ String
Returns Last name.
33 |
# File 'lib/strava/models/summary_athlete.rb', line 33 property 'lastname' |
#name ⇒ String?
Returns the athlete's full name.
70 71 72 |
# File 'lib/strava/models/summary_athlete.rb', line 70 def name [firstname, lastname].compact.join(' ') if firstname || lastname end |
#premium ⇒ Boolean
Returns Whether the athlete has a premium subscription.
54 |
# File 'lib/strava/models/summary_athlete.rb', line 54 property 'premium' |
#profile ⇒ String?
Returns URL to full-sized profile picture.
39 |
# File 'lib/strava/models/summary_athlete.rb', line 39 property 'profile' |
#profile_medium ⇒ String?
Returns URL to medium-sized profile picture.
36 |
# File 'lib/strava/models/summary_athlete.rb', line 36 property 'profile_medium' |
#resource_state ⇒ Integer
Returns Resource state indicator.
27 |
# File 'lib/strava/models/summary_athlete.rb', line 27 property 'resource_state' |
#sex ⇒ String
Returns Sex ('M' for male, 'F' for female).
51 |
# File 'lib/strava/models/summary_athlete.rb', line 51 property 'sex' |
#state ⇒ String?
Returns State or province.
45 |
# File 'lib/strava/models/summary_athlete.rb', line 45 property 'state' |
#strava_url ⇒ String
Returns the Strava web URL for this athlete's profile.
79 80 81 |
# File 'lib/strava/models/summary_athlete.rb', line 79 def strava_url "https://www.strava.com/athletes/#{id}" end |
#summit ⇒ Boolean
Returns Whether the athlete has a Summit subscription.
57 |
# File 'lib/strava/models/summary_athlete.rb', line 57 property 'summit' |
#updated_at ⇒ Time
Returns When the athlete account was last updated.
63 |
# File 'lib/strava/models/summary_athlete.rb', line 63 property 'updated_at', transform_with: ->(v) { Time.parse(v) } |