Description Usage Arguments Examples
Lists requested number of workouts for a user, along with some metadata.
1 2 3 4 5 6 7 8 9 | get_all_workouts(
userid = Sys.getenv("PELOTON_USERID"),
num_workouts = 20,
joins = "",
dictionary = list(numeric = c("v2_total_video_buffering_seconds",
"v2_total_video_watch_time_seconds")),
parse_dates = TRUE,
...
)
|
userid |
userID |
num_workouts |
num_workouts |
joins |
additional joins to make on the data (e.g. 'ride' or 'ride.instructor', concatenated as a single string. Results in many additional columns being added to the data.frame) |
dictionary |
A named list. Maps a data-type to a column name. If |
parse_dates |
Whether to try and guess which columns are dates and convert |
... |
Other arguments passed on to methods |
1 2 3 4 5 6 7 8 9 10 11 12 13 | ## Not run:
peloton_auth()
get_all_workouts()
get_all_workouts(joins = "ride,ride.instructor")
# if you run into parsing errors, sometimes helpful to manual override
workouts <- get_all_workouts(user_id,
dictionary = list(
"numeric" =
c("v2_total_video_buffering_seconds", "v2_total_video_watch_time_seconds")
)
)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.