Strava v0.4.0 Strava.Activity View Source

Activities are the base object for Strava runs, rides, swims etc.

More info: https://strava.github.io/api/v3/activities/

Link to this section Summary

Functions

Retrieve a list of activities for the authenticated user. Pagination is supported

Parse the athlete, dates, photos and segment efforts in the activity

Retrieve details about a specific activity

Link to this section Types

Link to this type t() View Source
t() :: %Strava.Activity{description: String.t, gear_id: String.t, trainer: boolean, average_heartrate: float, flagged: boolean, id: integer, has_kudoed: boolean, total_photo_count: integer, resource_state: integer, commute: boolean, map: map, end_latlng: [number], average_watts: float, segment_efforts: [Strava.SegmentEffort.t] | nil, average_temp: float, device_name: String.t, kudos_count: integer, athlete: Strava.Athlete.Meta.t, upload_id: integer, timezone: String.t, achievement_count: integer, start_latlng: [number], max_speed: float, max_heartrate: integer, elapsed_time: integer, average_cadence: float, photos: Strava.Activity.Photo.Summary.t | nil, elev_low: float, suffer_score: integer, start_date: NaiveDateTime.t | String.t, average_speed: float, best_efforts: [map], weighted_average_watts: integer, private: boolean, distance: float, splits_standard: [map], splits_metric: [map], embed_token: String.t, athlete_count: integer, external_id: String.t, workout_type: integer, has_heartrate: boolean, calories: float, device_watts: boolean, comment_count: integer, max_watts: integer, photo_count: integer, gear: map, total_elevation_gain: float, manual: boolean, name: String.t, moving_time: integer, kilojoules: float, type: String.t, start_date_local: NaiveDateTime.t | String.t, elev_high: float}

Link to this section Functions

Link to this function list_athlete_activities(pagination, filters \\ %{}, client \\ Strava.Client.new()) View Source
list_athlete_activities(Strava.Pagination.t, map, Strava.Client.t) :: [Strava.Activity.t]

Retrieve a list of activities for the authenticated user. Pagination is supported.

Example

activities = Strava.Activity.list_athlete_activities(%Strava.Pagination{per_page: 200, page: 1})
activities = Strava.Activity.list_athlete_activities(%Strava.Pagination{per_page: 200, page: 1}, Strava.Client.new("<access_token>>"))
activities = Strava.Activity.list_athlete_activities(%Strava.Pagination{per_page: 200, page: 1}, {before: "2017-04-20T00:00:12Z"})

More info: https://strava.github.io/api/v3/activities/#get-activities

Parse the athlete, dates, photos and segment efforts in the activity

Link to this function retrieve(id, client \\ Strava.Client.new()) View Source

Retrieve details about a specific activity.

Example

Strava.Activity.retrieve(746805584)

More info: https://strava.github.io/api/v3/activities/#get-details