Class: Strava::Models::TimedZoneRange

Inherits:
Response show all
Defined in:
lib/strava/models/timed_zone_range.rb

Overview

Represents a training zone range with time spent in that zone.

Used in activity zone distributions to show how much time was spent at different intensity levels during an activity.

Examples:

Viewing time distribution across zones

zones = client.activity_zones(1234567890)
hr_zone = zones.find { |z| z.type == 'heartrate' }

hr_zone.distribution_buckets.each_with_index do |bucket, i|
  minutes = bucket.time / 60
  puts "Zone #{i + 1} (#{bucket.min}-#{bucket.max} bpm): #{minutes} minutes"
end

See Also:

Instance Method Summary collapse

Instance Method Details

#maxInteger

Returns Maximum value for this zone (e.g., maximum heart rate or power).

Returns:

  • (Integer)

    Maximum value for this zone (e.g., maximum heart rate or power)



26
# File 'lib/strava/models/timed_zone_range.rb', line 26

property 'max'

#minInteger

Returns Minimum value for this zone (e.g., minimum heart rate or power).

Returns:

  • (Integer)

    Minimum value for this zone (e.g., minimum heart rate or power)



29
# File 'lib/strava/models/timed_zone_range.rb', line 29

property 'min'

#timeInteger

Returns Time spent in this zone in seconds.

Returns:

  • (Integer)

    Time spent in this zone in seconds



32
# File 'lib/strava/models/timed_zone_range.rb', line 32

property 'time'