forked from dblock/strava-ruby-client
-
Notifications
You must be signed in to change notification settings - Fork 0
/
segment_effort.rb
29 lines (28 loc) · 1.08 KB
/
segment_effort.rb
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
module Strava
module Models
class SegmentEffort < Model
include Mixins::Distance
include Mixins::Time
property 'id'
property 'resource_state'
property 'name'
property 'activity', transform_with: ->(v) { Strava::Models::Activity.new(v) }
property 'athlete', transform_with: ->(v) { Strava::Models::Athlete.new(v) }
property 'start_date', transform_with: ->(v) { Time.parse(v) }
property 'start_date_local', transform_with: ->(v) { Time.parse(v) }
property 'start_index'
property 'end_index'
property 'average_heartrate'
property 'max_heartrate'
property 'segment', transform_with: ->(v) { Strava::Models::Segment.new(v) }
property 'achievements', transform_with: ->(v) { v.map { |r| Strava::Models::Achievement.new(r) } }
property 'hidden'
property 'pr_rank'
property 'average_cadence'
property 'device_watts'
property 'average_watts'
property 'athlete_segment_stats', transform_with: ->(v) { Strava::Models::SegmentStats.new(v) }
property 'is_kom'
end
end
end