Class: Strava::Models::ActivityStats
- Inherits:
-
Response
- Object
- Hashie::Trash
- Strava::Model
- Response
- Strava::Models::ActivityStats
- Defined in:
- lib/strava/models/activity_stats.rb
Overview
Represents aggregated activity statistics for an athlete.
Contains totals broken down by activity type (ride, run, swim) and time period (recent, year-to-date, all-time). Recent totals cover the last 4 weeks.
Instance Method Summary collapse
-
#all_ride_totals ⇒ ActivityTotal
All-time ride totals.
-
#all_run_totals ⇒ ActivityTotal
All-time run totals.
-
#all_swim_totals ⇒ ActivityTotal
All-time swim totals.
-
#biggest_climb_elevation_gain ⇒ Float
Most elevation gain in a single activity (meters).
-
#biggest_ride_distance ⇒ Float
Longest ride distance in meters.
-
#recent_ride_totals ⇒ ActivityTotal
Recent ride totals (last 4 weeks).
-
#recent_run_totals ⇒ ActivityTotal
Recent run totals (last 4 weeks).
-
#recent_swim_totals ⇒ ActivityTotal
Recent swim totals (last 4 weeks).
-
#ytd_ride_totals ⇒ ActivityTotal
Year-to-date ride totals.
-
#ytd_run_totals ⇒ ActivityTotal
Year-to-date run totals.
-
#ytd_swim_totals ⇒ ActivityTotal
Year-to-date swim totals.
Instance Method Details
#all_ride_totals ⇒ ActivityTotal
Returns All-time ride totals.
57 |
# File 'lib/strava/models/activity_stats.rb', line 57 property 'all_ride_totals', transform_with: ->(v) { Strava::Models::ActivityTotal.new(v) } |
#all_run_totals ⇒ ActivityTotal
Returns All-time run totals.
60 |
# File 'lib/strava/models/activity_stats.rb', line 60 property 'all_run_totals', transform_with: ->(v) { Strava::Models::ActivityTotal.new(v) } |
#all_swim_totals ⇒ ActivityTotal
Returns All-time swim totals.
63 |
# File 'lib/strava/models/activity_stats.rb', line 63 property 'all_swim_totals', transform_with: ->(v) { Strava::Models::ActivityTotal.new(v) } |
#biggest_climb_elevation_gain ⇒ Float
Returns Most elevation gain in a single activity (meters).
36 |
# File 'lib/strava/models/activity_stats.rb', line 36 property 'biggest_climb_elevation_gain' |
#biggest_ride_distance ⇒ Float
Returns Longest ride distance in meters.
33 |
# File 'lib/strava/models/activity_stats.rb', line 33 property 'biggest_ride_distance' |
#recent_ride_totals ⇒ ActivityTotal
Returns Recent ride totals (last 4 weeks).
39 |
# File 'lib/strava/models/activity_stats.rb', line 39 property 'recent_ride_totals', transform_with: ->(v) { Strava::Models::ActivityTotal.new(v) } |
#recent_run_totals ⇒ ActivityTotal
Returns Recent run totals (last 4 weeks).
42 |
# File 'lib/strava/models/activity_stats.rb', line 42 property 'recent_run_totals', transform_with: ->(v) { Strava::Models::ActivityTotal.new(v) } |
#recent_swim_totals ⇒ ActivityTotal
Returns Recent swim totals (last 4 weeks).
45 |
# File 'lib/strava/models/activity_stats.rb', line 45 property 'recent_swim_totals', transform_with: ->(v) { Strava::Models::ActivityTotal.new(v) } |
#ytd_ride_totals ⇒ ActivityTotal
Returns Year-to-date ride totals.
48 |
# File 'lib/strava/models/activity_stats.rb', line 48 property 'ytd_ride_totals', transform_with: ->(v) { Strava::Models::ActivityTotal.new(v) } |
#ytd_run_totals ⇒ ActivityTotal
Returns Year-to-date run totals.
51 |
# File 'lib/strava/models/activity_stats.rb', line 51 property 'ytd_run_totals', transform_with: ->(v) { Strava::Models::ActivityTotal.new(v) } |
#ytd_swim_totals ⇒ ActivityTotal
Returns Year-to-date swim totals.
54 |
# File 'lib/strava/models/activity_stats.rb', line 54 property 'ytd_swim_totals', transform_with: ->(v) { Strava::Models::ActivityTotal.new(v) } |