Learn R Programming

rStrava (version 1.0.0)

get_segment: Retrieve details about a specific segment

Description

Retreive details about a specific segment

Usage

get_segment(stoken, id = NULL, request = NULL)

Arguments

stoken

A config object created using the strava_oauth function

id

numeric for id of the segment

request

chr string, must be "starred", "all_efforts", "leaderboard", "explore" or NULL for segment details

Value

Data from an API request.

Details

Requires authentication stoken using the strava_oauth function and a user-created API on the strava website.

Examples

Run this code
# 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_segment(stoken, id = 229781)
get_segment(stoken, id = 229781, request = 'leaderboard')
# }

Run the code above in your browser using DataLab