Sha256: 8ba8a672520976c65e2f70a03b4d7f0cfb20ee51251428b4a75a43d9fde7372c

Contents?: true

Size: 1.09 KB

Versions: 6

Compression:

Stored size: 1.09 KB

Contents

# frozen_string_literal: true

module Strava
  module Models
    class SegmentEffort < Strava::Models::Response
      include Mixins::Distance
      include Mixins::Time
      include Mixins::StartDateLocal

      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_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

6 entries across 6 versions & 1 rubygems

Version Path
strava-ruby-client-2.2.0 lib/strava/models/segment_effort.rb
strava-ruby-client-2.1.0 lib/strava/models/segment_effort.rb
strava-ruby-client-2.0.0 lib/strava/models/segment_effort.rb
strava-ruby-client-1.1.0 lib/strava/models/segment_effort.rb
strava-ruby-client-1.0.1 lib/strava/models/segment_effort.rb
strava-ruby-client-1.0.0 lib/strava/models/segment_effort.rb