Class: Strava::Models::DetailedAthlete
- Inherits:
-
Response
- Object
- Hashie::Trash
- Strava::Model
- Response
- Strava::Models::DetailedAthlete
- Defined in:
- lib/strava/models/detailed_athlete.rb
Overview
Represents detailed information about a Strava athlete.
Contains comprehensive profile information including personal details, preferences, gear, clubs, and social connections. This model is typically returned when accessing the authenticated athlete's own profile.
Instance Method Summary collapse
-
#athlete_type ⇒ Integer?
Athlete type identifier (0 = Cyclist, 1 = Runner).
-
#badge_type_id ⇒ Integer?
Badge type identifier.
-
#bikes ⇒ Array<SummaryGear>
Bikes registered to this athlete.
-
#bio ⇒ String?
Athlete bio/description.
-
#blocked ⇒ Boolean?
Whether this athlete is blocked by the authenticated athlete.
-
#can_follow ⇒ Boolean?
Whether the authenticated athlete can follow this athlete.
-
#city ⇒ String?
City.
-
#clubs ⇒ Array<SummaryClub>
Clubs the athlete belongs to.
-
#country ⇒ String?
Country.
-
#created_at ⇒ Time
When the athlete account was created.
-
#date_preference ⇒ String?
Preferred date format.
-
#firstname ⇒ String
First name.
-
#follower ⇒ String?
Follower relationship status.
-
#follower_count ⇒ Integer
Number of followers.
-
#friend ⇒ String?
Relationship status with authenticated athlete ('pending', 'accepted', 'blocked', or nil).
-
#friend_count ⇒ Integer
Number of friends (mutual follows).
-
#ftp ⇒ Integer?
Functional Threshold Power in watts.
-
#id ⇒ Integer
Athlete ID.
-
#lastname ⇒ String
Last name.
-
#measurement_preference ⇒ String
Preferred measurement system ('feet' or 'meters').
-
#mutual_friend_count ⇒ Integer?
Number of mutual friends with the authenticated athlete.
-
#name ⇒ String?
Returns the athlete's full name.
-
#postable_clubs_count ⇒ Integer?
Number of clubs where athlete can post.
-
#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).
-
#shoes ⇒ Array<SummaryGear>
Shoes registered to this athlete.
-
#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.
-
#username ⇒ String?
Username/vanity URL.
-
#weight ⇒ Float?
Weight in kilograms.
Instance Method Details
#athlete_type ⇒ Integer?
Undocumented in official API
Returns Athlete type identifier (0 = Cyclist, 1 = Runner).
124 |
# File 'lib/strava/models/detailed_athlete.rb', line 124 property 'athlete_type' |
#badge_type_id ⇒ Integer?
Undocumented in official API
Returns Badge type identifier.
100 |
# File 'lib/strava/models/detailed_athlete.rb', line 100 property 'badge_type_id' |
#bikes ⇒ Array<SummaryGear>
Returns Bikes registered to this athlete.
85 |
# File 'lib/strava/models/detailed_athlete.rb', line 85 property 'bikes', transform_with: ->(v) { v.map { |r| Strava::Models::SummaryGear.new(r) } } |
#bio ⇒ String?
Undocumented in official API
Returns Athlete bio/description.
96 |
# File 'lib/strava/models/detailed_athlete.rb', line 96 property 'bio' |
#blocked ⇒ Boolean?
Undocumented in official API
Returns Whether this athlete is blocked by the authenticated athlete.
112 |
# File 'lib/strava/models/detailed_athlete.rb', line 112 property 'blocked' |
#can_follow ⇒ Boolean?
Undocumented in official API
Returns Whether the authenticated athlete can follow this athlete.
116 |
# File 'lib/strava/models/detailed_athlete.rb', line 116 property 'can_follow' |
#city ⇒ String?
Returns City.
43 |
# File 'lib/strava/models/detailed_athlete.rb', line 43 property 'city' |
#clubs ⇒ Array<SummaryClub>
Returns Clubs the athlete belongs to.
82 |
# File 'lib/strava/models/detailed_athlete.rb', line 82 property 'clubs', transform_with: ->(v) { v.map { |r| Strava::Models::SummaryClub.new(r) } } |
#country ⇒ String?
Returns Country.
49 |
# File 'lib/strava/models/detailed_athlete.rb', line 49 property 'country' |
#created_at ⇒ Time
Returns When the athlete account was created.
61 |
# File 'lib/strava/models/detailed_athlete.rb', line 61 property 'created_at', transform_with: ->(v) { Time.parse(v) } |
#date_preference ⇒ String?
Undocumented in official API
Returns Preferred date format.
128 |
# File 'lib/strava/models/detailed_athlete.rb', line 128 property 'date_preference' |
#firstname ⇒ String
Returns First name.
31 |
# File 'lib/strava/models/detailed_athlete.rb', line 31 property 'firstname' |
#follower ⇒ String?
Undocumented in official API
Returns Follower relationship status.
108 |
# File 'lib/strava/models/detailed_athlete.rb', line 108 property 'follower' |
#follower_count ⇒ Integer
Returns Number of followers.
67 |
# File 'lib/strava/models/detailed_athlete.rb', line 67 property 'follower_count' |
#friend ⇒ String?
Undocumented in official API
Returns Relationship status with authenticated athlete ('pending', 'accepted', 'blocked', or nil).
104 |
# File 'lib/strava/models/detailed_athlete.rb', line 104 property 'friend' |
#friend_count ⇒ Integer
Returns Number of friends (mutual follows).
70 |
# File 'lib/strava/models/detailed_athlete.rb', line 70 property 'friend_count' |
#ftp ⇒ Integer?
Returns Functional Threshold Power in watts.
76 |
# File 'lib/strava/models/detailed_athlete.rb', line 76 property 'ftp' |
#id ⇒ Integer
Returns Athlete ID.
25 |
# File 'lib/strava/models/detailed_athlete.rb', line 25 property 'id' |
#lastname ⇒ String
Returns Last name.
34 |
# File 'lib/strava/models/detailed_athlete.rb', line 34 property 'lastname' |
#measurement_preference ⇒ String
Returns Preferred measurement system ('feet' or 'meters').
73 |
# File 'lib/strava/models/detailed_athlete.rb', line 73 property 'measurement_preference' |
#mutual_friend_count ⇒ Integer?
Undocumented in official API
Returns Number of mutual friends with the authenticated athlete.
120 |
# File 'lib/strava/models/detailed_athlete.rb', line 120 property 'mutual_friend_count' |
#name ⇒ String?
Returns the athlete's full name.
139 140 141 |
# File 'lib/strava/models/detailed_athlete.rb', line 139 def name [firstname, lastname].compact.join(' ') if firstname || lastname end |
#postable_clubs_count ⇒ Integer?
Undocumented in official API
Returns Number of clubs where athlete can post.
132 |
# File 'lib/strava/models/detailed_athlete.rb', line 132 property 'postable_clubs_count' |
#premium ⇒ Boolean
Returns Whether the athlete has a premium subscription.
55 |
# File 'lib/strava/models/detailed_athlete.rb', line 55 property 'premium' |
#profile ⇒ String?
Returns URL to full-sized profile picture.
40 |
# File 'lib/strava/models/detailed_athlete.rb', line 40 property 'profile' |
#profile_medium ⇒ String?
Returns URL to medium-sized profile picture.
37 |
# File 'lib/strava/models/detailed_athlete.rb', line 37 property 'profile_medium' |
#resource_state ⇒ Integer
Returns Resource state indicator.
28 |
# File 'lib/strava/models/detailed_athlete.rb', line 28 property 'resource_state' |
#sex ⇒ String
Returns Sex ('M' for male, 'F' for female).
52 |
# File 'lib/strava/models/detailed_athlete.rb', line 52 property 'sex' |
#shoes ⇒ Array<SummaryGear>
Returns Shoes registered to this athlete.
88 |
# File 'lib/strava/models/detailed_athlete.rb', line 88 property 'shoes', transform_with: ->(v) { v.map { |r| Strava::Models::SummaryGear.new(r) } } |
#state ⇒ String?
Returns State or province.
46 |
# File 'lib/strava/models/detailed_athlete.rb', line 46 property 'state' |
#strava_url ⇒ String
Returns the Strava web URL for this athlete's profile.
148 149 150 |
# File 'lib/strava/models/detailed_athlete.rb', line 148 def strava_url "https://www.strava.com/athletes/#{username || id}" end |
#summit ⇒ Boolean
Returns Whether the athlete has a Summit subscription.
58 |
# File 'lib/strava/models/detailed_athlete.rb', line 58 property 'summit' |
#updated_at ⇒ Time
Returns When the athlete account was last updated.
64 |
# File 'lib/strava/models/detailed_athlete.rb', line 64 property 'updated_at', transform_with: ->(v) { Time.parse(v) } |
#username ⇒ String?
Undocumented in official API
Returns Username/vanity URL.
92 |
# File 'lib/strava/models/detailed_athlete.rb', line 92 property 'username' |
#weight ⇒ Float?
Returns Weight in kilograms.
79 |
# File 'lib/strava/models/detailed_athlete.rb', line 79 property 'weight' |