get_pages {rStrava} | R Documentation |
Get several pages of one type of request
Description
Get several pages of one type of request to the API
Usage
get_pages(
url_,
stoken,
per_page = 30,
page_id = 1,
page_max = 1,
before = NULL,
after = NULL,
queries = NULL,
All = FALSE
)
Arguments
url_ |
string of url for the request to the API |
stoken |
A |
per_page |
numeric indicating number of items retrieved per page (maximum 200) |
page_id |
numeric indicating page id |
page_max |
numeric indicating maximum number of pages to return |
before |
date object for filtering activities before the indicated date |
after |
date object for filtering activities after the indicated date |
queries |
list of additional queries to pass to the API |
All |
logical if you want all possible pages within the ratelimit constraint |
Details
Requires authentication stoken using the strava_oauth
function and a user-created API on the strava website.
Value
Data from an API request.
Examples
## 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 basic user info
# returns 30 activities
get_pages('https://strava.com/api/v3/activities', stoken)
## End(Not run)
[Package rStrava version 1.3.1 Index]