-
-
Notifications
You must be signed in to change notification settings - Fork 24
Expand file tree
/
Copy pathachievement.rb
More file actions
39 lines (36 loc) · 1.33 KB
/
achievement.rb
File metadata and controls
39 lines (36 loc) · 1.33 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
33
34
35
36
37
38
39
# frozen_string_literal: true
module Strava
module Models
#
# Represents an achievement earned during a segment effort.
#
# Achievements include overall rank on a segment, yearly/monthly/weekly records,
# and PR (personal record) designations. This model is not documented in the
# official Strava API reference.
#
# @note This model is not documented by Strava API documentation. Properties
# are inferred from API responses.
#
# @see Strava::Models::DetailedSegmentEffort
#
# @example Accessing achievements from a segment effort
# activity = client.activity(1234567890)
# activity.segment_efforts.each do |effort|
# effort.achievements.each do |achievement|
# puts "#{achievement.type}: Rank #{achievement.rank}"
# end
# end
#
class Achievement < Strava::Models::Response
# @return [Integer, nil] Rank or position for this achievement (e.g., 1 for first place)
# @note Not documented by Strava API
property 'rank'
# @return [String, nil] Type of achievement (e.g., "overall", "pr", "year_pr")
# @note Not documented by Strava API
property 'type'
# @return [Integer, nil] Numeric identifier for the achievement type
# @note Not documented by Strava API
property 'type_id'
end
end
end