get_pages: Get several pages of one type of request

View source: R/get_pages.R

get_pagesR 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 config object created using the strava_oauth function

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)

rStrava documentation built on Oct. 23, 2024, 5:06 p.m.

Related to get_pages in rStrava...