Sha256: 151d20be6304493ec6fe1bae8a250ee208fa44e99bd3eb2ce71e027f880e0e9d

Contents?: true

Size: 1.08 KB

Versions: 5

Compression:

Stored size: 1.08 KB

Contents

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

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
strava-ruby-client-0.4.2 lib/strava/models/segment_effort.rb
strava-ruby-client-0.4.1 lib/strava/models/segment_effort.rb
strava-ruby-client-0.4.0 lib/strava/models/segment_effort.rb
strava-ruby-client-0.3.2 lib/strava/models/segment_effort.rb
strava-ruby-client-0.3.1 lib/strava/models/segment_effort.rb