fitbit_GET: Make a GET request on <URL: https://api.fitbit.com>.

Description Usage Arguments Details Value Examples

Description

This is the main building block of this package. It is a wrapper for the GET function.

Usage

1
fitbit_GET(path, token, ...)

Arguments

path

Character scalar specifying the requested address from https://api.fitbit.com/.

token

Fitbit API token generated with get_fitbit_token.

...

Additional arguments passed to get_fitbit_token.

Details

This function has one side effect: if updates the "rate_limit" attribute in the token according to the returned request header.

Value

Response object of class "response", as returned by the GET function. Use fitbit_parse to get the body of the output.

Examples

1
2
3
4
5
## Not run: 
resp <- fitbit_GET("1/user/-/sleep/date/2015-12-12.json", token = fitbit_token )
ret <- fitbit_parse(resp)

## End(Not run)

Avsecz/fitbitr documentation built on May 5, 2019, 9:22 a.m.