-
-
Notifications
You must be signed in to change notification settings - Fork 24
Expand file tree
/
Copy pathpower_zone_ranges.rb
More file actions
32 lines (31 loc) · 1.04 KB
/
power_zone_ranges.rb
File metadata and controls
32 lines (31 loc) · 1.04 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# frozen_string_literal: true
module Strava
module Models
#
# Represents an athlete's power zone configuration.
#
# Power zones define intensity levels based on watts output. These are
# typically used for cycling training and are often based on FTP
# (Functional Threshold Power).
#
# @see https://developers.strava.com/docs/reference/#api-models-PowerZoneRanges Strava API PowerZoneRanges reference
# @see Strava::Models::ZoneRange
# @see Strava::Models::Zones
#
# @example Accessing power zones
# zones = client.athlete_zones
#
# if zones.power
# zones.power.zones.each_with_index do |zone, i|
# puts "Power Zone #{i + 1}: #{zone.min}-#{zone.max}W"
# end
# else
# puts "No power zones configured"
# end
#
class PowerZoneRanges < Strava::Models::Response
# @return [Array<ZoneRange>] Array of power zone ranges in watts
property 'zones', transform_with: ->(v) { v.map { |r| Strava::Models::ZoneRange.new(r) } }
end
end
end