Class: Strava::Models::ActivityZone
- Inherits:
-
Response
- Object
- Hashie::Trash
- Strava::Model
- Response
- Strava::Models::ActivityZone
- Defined in:
- lib/strava/models/activity_zone.rb
Overview
Represents time spent in heart rate or power zones during an activity.
Activity zones show how much time was spent at different intensity levels, which helps analyze training load and effort distribution. Each zone bucket contains the time spent in that zone range.
Instance Method Summary collapse
-
#custom_zones ⇒ Boolean
Whether custom zones are being used.
-
#distribution_buckets ⇒ Array<TimedZoneRange>
Array of time spent in each zone bucket.
-
#max ⇒ Integer?
Maximum value recorded (e.g., max heart rate in bpm).
-
#points ⇒ Integer?
Points or score accumulated in this zone.
-
#resource_state ⇒ Integer
Resource state indicator.
-
#score ⇒ Integer?
Relative effort score for this activity.
-
#sensor_based ⇒ Boolean
Whether data comes from a sensor (vs. estimated).
-
#type ⇒ String
Type of zone data ("heartrate" or "power").
Instance Method Details
#custom_zones ⇒ Boolean
Returns Whether custom zones are being used.
45 |
# File 'lib/strava/models/activity_zone.rb', line 45 property 'custom_zones' |
#distribution_buckets ⇒ Array<TimedZoneRange>
Returns Array of time spent in each zone bucket.
33 |
# File 'lib/strava/models/activity_zone.rb', line 33 property 'distribution_buckets', transform_with: ->(v) { v.map { |r| Strava::Models::TimedZoneRange.new(r) } } |
#max ⇒ Integer?
Returns Maximum value recorded (e.g., max heart rate in bpm).
48 |
# File 'lib/strava/models/activity_zone.rb', line 48 property 'max' |
#points ⇒ Integer?
Returns Points or score accumulated in this zone.
42 |
# File 'lib/strava/models/activity_zone.rb', line 42 property 'points' |
#resource_state ⇒ Integer
Not documented by Strava API
Returns Resource state indicator.
52 |
# File 'lib/strava/models/activity_zone.rb', line 52 property 'resource_state' |
#score ⇒ Integer?
Returns Relative effort score for this activity.
30 |
# File 'lib/strava/models/activity_zone.rb', line 30 property 'score' |
#sensor_based ⇒ Boolean
Returns Whether data comes from a sensor (vs. estimated).
39 |
# File 'lib/strava/models/activity_zone.rb', line 39 property 'sensor_based' |
#type ⇒ String
Returns Type of zone data ("heartrate" or "power").
36 |
# File 'lib/strava/models/activity_zone.rb', line 36 property 'type' |