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

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