get_workouts_data: Makes a request against the 'api/workout/workout_id' endpoint

Description Usage Arguments Examples

View source: R/queries.R

Description

Returns data about individual workouts. A vectorized function, so accepts multiple workoutIDs at once.

Usage

1
2
3
4
5
6
7
8
get_workouts_data(
  workout_ids,
  dictionary = list(numeric = c("v2_total_video_watch_time_seconds",
    "v2_total_video_buffering_seconds", "leaderboard_rank"), list =
    c("achievement_templates")),
  parse_dates = TRUE,
  ...
)

Arguments

workout_ids

WorkoutIDs

dictionary

A named list. Maps a data-type to a column name. If NULL then no parsing is done

parse_dates

Whether to try and guess which columns are dates and convert

...

Other arguments passed on to methods

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
## Not run: 
get_workouts_data(
  workout_ids = workout_ids,
  dictionary = list(
    "numeric" = c(
      "v2_total_video_watch_time_seconds", "v2_total_video_buffering_seconds",
      "v2_total_video_watch_time_seconds", "leaderboard_rank"
    ),
    "list" = c("achievement_templates")
  )
)

## End(Not run)

bweiher/pelotonR documentation built on Jan. 9, 2021, 1:36 a.m.