Class: Strava::Models::ExplorerSegment
- Inherits:
-
Response
- Object
- Hashie::Trash
- Strava::Model
- Response
- Strava::Models::ExplorerSegment
- Includes:
- Mixins::Distance
- Defined in:
- lib/strava/models/explorer_segment.rb
Overview
Represents a segment found via segment exploration.
Used when searching for segments in a geographic area. Contains basic segment information including location, elevation, and difficulty category.
Instance Method Summary collapse
-
#avg_grade ⇒ Float
Average grade/incline as a percentage.
-
#climb_category ⇒ Integer
Climb category (0=uncategorized, 5=easiest, 1=hardest, HC=hors catégorie).
-
#climb_category_desc ⇒ String
Human-readable description of climb category (e.g., "NC", "4", "3", "2", "1", "HC").
-
#elev_difference ⇒ Float
Net elevation difference in meters (positive for climbs, negative for descents).
-
#elevation_profile ⇒ String?
URL or path to elevation profile visualization.
-
#end_latlng ⇒ LatLng
GPS coordinates of segment end point.
-
#id ⇒ Integer
Unique identifier for this segment.
-
#local_legend_enabled ⇒ Boolean?
Whether local legend feature is enabled for this segment.
-
#name ⇒ String
Name of the segment.
-
#points ⇒ String?
Encoded polyline of the segment path.
-
#resource_state ⇒ Integer
Resource state indicator.
-
#starred ⇒ Boolean?
Whether the current athlete has starred this segment.
-
#start_latlng ⇒ LatLng
GPS coordinates of segment start point.
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
#avg_grade ⇒ Float
Returns Average grade/incline as a percentage.
43 |
# File 'lib/strava/models/explorer_segment.rb', line 43 property 'avg_grade' |
#climb_category ⇒ Integer
Returns Climb category (0=uncategorized, 5=easiest, 1=hardest, HC=hors catégorie).
37 |
# File 'lib/strava/models/explorer_segment.rb', line 37 property 'climb_category' |
#climb_category_desc ⇒ String
Returns Human-readable description of climb category (e.g., "NC", "4", "3", "2", "1", "HC").
40 |
# File 'lib/strava/models/explorer_segment.rb', line 40 property 'climb_category_desc' |
#elev_difference ⇒ Float
Returns Net elevation difference in meters (positive for climbs, negative for descents).
52 |
# File 'lib/strava/models/explorer_segment.rb', line 52 property 'elev_difference' |
#elevation_profile ⇒ String?
Not documented by Strava API
Returns URL or path to elevation profile visualization.
70 |
# File 'lib/strava/models/explorer_segment.rb', line 70 property 'elevation_profile' |
#end_latlng ⇒ LatLng
Returns GPS coordinates of segment end point.
49 |
# File 'lib/strava/models/explorer_segment.rb', line 49 property 'end_latlng', transform_with: ->(v) { Strava::Models::LatLng.new(v) } |
#id ⇒ Integer
Returns Unique identifier for this segment.
31 |
# File 'lib/strava/models/explorer_segment.rb', line 31 property 'id' |
#local_legend_enabled ⇒ Boolean?
Not documented by Strava API
Returns Whether local legend feature is enabled for this segment.
74 |
# File 'lib/strava/models/explorer_segment.rb', line 74 property 'local_legend_enabled' |
#name ⇒ String
Returns Name of the segment.
34 |
# File 'lib/strava/models/explorer_segment.rb', line 34 property 'name' |
#points ⇒ String?
Returns Encoded polyline of the segment path.
58 |
# File 'lib/strava/models/explorer_segment.rb', line 58 property 'points' |
#resource_state ⇒ Integer
Not documented by Strava API
Returns Resource state indicator.
62 |
# File 'lib/strava/models/explorer_segment.rb', line 62 property 'resource_state' |
#starred ⇒ Boolean?
Not documented by Strava API
Returns Whether the current athlete has starred this segment.
66 |
# File 'lib/strava/models/explorer_segment.rb', line 66 property 'starred' |