Class: Strava::Models::SummarySegment
- Inherits:
-
Response
- Object
- Hashie::Trash
- Strava::Model
- Response
- Strava::Models::SummarySegment
- Includes:
- Mixins::Distance
- Defined in:
- lib/strava/models/summary_segment.rb
Overview
Represents summary information about a segment.
A segment is a specific section of road or trail that athletes can compete on. This summary version contains key information about the segment including location, elevation, and the athlete's personal stats on it.
Instance Method Summary collapse
-
#activity_type ⇒ String
Activity type this segment is for ("Ride" or "Run").
-
#athlete_pr_effort ⇒ SummaryPRSegmentEffort?
Athlete's personal record on this segment.
-
#athlete_segment_stats ⇒ SummarySegmentEffort?
Athlete's statistics for this segment.
-
#average_grade ⇒ Float
Average grade/incline as a percentage.
-
#city ⇒ String?
City where the segment is located.
-
#climb_category ⇒ Integer
Climb category (0=uncategorized, 5=easiest, 1=hardest, HC=hors catégorie).
-
#country ⇒ String?
Country where the segment is located.
-
#elevation_high ⇒ Float
Highest elevation point on the segment in meters.
-
#elevation_low ⇒ Float
Lowest elevation point on the segment in meters.
-
#elevation_profile ⇒ String?
URL or path to elevation profile visualization.
-
#elevation_profiles ⇒ Array?
Array of elevation profile data.
-
#end_latlng ⇒ LatLng
GPS coordinates of segment end point.
-
#hazardous ⇒ Boolean?
Whether this segment has been flagged as hazardous.
-
#id ⇒ Integer
Unique identifier for this segment.
-
#maximum_grade ⇒ Float
Maximum grade/incline as a percentage.
-
#name ⇒ String
Name of the segment.
-
#pr_time ⇒ Integer?
Athlete's PR time on this segment in seconds.
-
#private ⇒ Boolean
Whether this is a private segment.
-
#resource_state ⇒ Integer
Resource state indicator.
-
#starred ⇒ Boolean?
Whether the current athlete has starred this segment.
-
#starred_date ⇒ Time?
Date when the athlete starred this segment.
-
#start_latlng ⇒ LatLng
GPS coordinates of segment start point.
-
#state ⇒ String?
State/province where the segment is located.
Methods included from Mixins::Distance
#distance_in_feet, #distance_in_kilometers, #distance_in_kilometers_s, #distance_in_meters, #distance_in_meters_s, #distance_in_miles, #distance_in_miles_s, #distance_in_yards, #distance_in_yards_s, #distance_s
Instance Method Details
#activity_type ⇒ String
Returns Activity type this segment is for ("Ride" or "Run").
39 |
# File 'lib/strava/models/summary_segment.rb', line 39 property 'activity_type' |
#athlete_pr_effort ⇒ SummaryPRSegmentEffort?
Returns Athlete's personal record on this segment.
78 |
# File 'lib/strava/models/summary_segment.rb', line 78 property 'athlete_pr_effort', transform_with: ->(v) { Strava::Models::SummaryPRSegmentEffort.new(v) } |
#athlete_segment_stats ⇒ SummarySegmentEffort?
Returns Athlete's statistics for this segment.
81 |
# File 'lib/strava/models/summary_segment.rb', line 81 property 'athlete_segment_stats', transform_with: ->(v) { Strava::Models::SummarySegmentEffort.new(v) } |
#average_grade ⇒ Float
Returns Average grade/incline as a percentage.
45 |
# File 'lib/strava/models/summary_segment.rb', line 45 property 'average_grade' |
#city ⇒ String?
Returns City where the segment is located.
66 |
# File 'lib/strava/models/summary_segment.rb', line 66 property 'city' |
#climb_category ⇒ Integer
Returns Climb category (0=uncategorized, 5=easiest, 1=hardest, HC=hors catégorie).
63 |
# File 'lib/strava/models/summary_segment.rb', line 63 property 'climb_category' |
#country ⇒ String?
Returns Country where the segment is located.
72 |
# File 'lib/strava/models/summary_segment.rb', line 72 property 'country' |
#elevation_high ⇒ Float
Returns Highest elevation point on the segment in meters.
51 |
# File 'lib/strava/models/summary_segment.rb', line 51 property 'elevation_high' |
#elevation_low ⇒ Float
Returns Lowest elevation point on the segment in meters.
54 |
# File 'lib/strava/models/summary_segment.rb', line 54 property 'elevation_low' |
#elevation_profile ⇒ String?
Not documented by Strava API
Returns URL or path to elevation profile visualization.
89 |
# File 'lib/strava/models/summary_segment.rb', line 89 property 'elevation_profile' |
#elevation_profiles ⇒ Array?
Not documented by Strava API
Returns Array of elevation profile data.
93 |
# File 'lib/strava/models/summary_segment.rb', line 93 property 'elevation_profiles' |
#end_latlng ⇒ LatLng
Returns GPS coordinates of segment end point.
60 |
# File 'lib/strava/models/summary_segment.rb', line 60 property 'end_latlng', transform_with: ->(v) { Strava::Models::LatLng.new(v) } |
#hazardous ⇒ Boolean?
Not documented by Strava API
Returns Whether this segment has been flagged as hazardous.
97 |
# File 'lib/strava/models/summary_segment.rb', line 97 property 'hazardous' |
#id ⇒ Integer
Returns Unique identifier for this segment.
33 |
# File 'lib/strava/models/summary_segment.rb', line 33 property 'id' |
#maximum_grade ⇒ Float
Returns Maximum grade/incline as a percentage.
48 |
# File 'lib/strava/models/summary_segment.rb', line 48 property 'maximum_grade' |
#name ⇒ String
Returns Name of the segment.
36 |
# File 'lib/strava/models/summary_segment.rb', line 36 property 'name' |
#pr_time ⇒ Integer?
Not documented by Strava API
Returns Athlete's PR time on this segment in seconds.
109 |
# File 'lib/strava/models/summary_segment.rb', line 109 property 'pr_time' |
#private ⇒ Boolean
Returns Whether this is a private segment.
75 |
# File 'lib/strava/models/summary_segment.rb', line 75 property 'private' |
#resource_state ⇒ Integer
Not documented by Strava API
Returns Resource state indicator.
85 |
# File 'lib/strava/models/summary_segment.rb', line 85 property 'resource_state' |
#starred ⇒ Boolean?
Not documented by Strava API
Returns Whether the current athlete has starred this segment.
101 |
# File 'lib/strava/models/summary_segment.rb', line 101 property 'starred' |
#starred_date ⇒ Time?
Not documented by Strava API
Returns Date when the athlete starred this segment.
105 |
# File 'lib/strava/models/summary_segment.rb', line 105 property 'starred_date', transform_with: ->(v) { Time.parse(v) } |
#start_latlng ⇒ LatLng
Returns GPS coordinates of segment start point.
57 |
# File 'lib/strava/models/summary_segment.rb', line 57 property 'start_latlng', transform_with: ->(v) { Strava::Models::LatLng.new(v) } |
#state ⇒ String?
Returns State/province where the segment is located.
69 |
# File 'lib/strava/models/summary_segment.rb', line 69 property 'state' |