get_streams | R Documentation |
Retrieve a Strava data stream for a single activity.
Internally called by get_activity_streams
.
get_streams(
stoken,
id,
request = "activities",
types = NULL,
resolution = NULL,
series_type = NULL
)
stoken |
A |
id |
character for id of the request |
request |
chr string defining the stream type, must be "activities", "segment_efforts", "segments" |
types |
list of chr strings with any combination of "time" (seconds), "latlng", "distance" (meters), "altitude" (meters), "velocity_smooth" (meters per second), "heartrate" (bpm), "cadence" (rpm), "watts", "temp" (degrees Celsius), "moving" (boolean), or "grade_smooth" (percent) |
resolution |
chr string for the data resolution to retrieve, can be "low", "medium", "high", defaults to all |
series_type |
chr string for merging the data if |
Requires authentication stoken using the strava_oauth
function and a user-created API on the strava website. From the API documentation, 'streams' is the Strava term for the raw data associated with an activity.
Data from an API request.
## Not run:
# create authentication token
# requires user created app name, id, and secret from Strava website
stoken <- httr::config(token = strava_oauth(app_name, app_client_id,
app_secret, cache = TRUE))
get_streams(stoken, id = '351217692', types = list('distance', 'latlng'))
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.