calendar_token: Produce configured token

Description Usage Value See Also Examples

View source: R/gcalendr_auth.R

Description

For internal use or for those programming around the Calendar API. Returns a token pre-processed with httr::config(). Most users do not need to handle tokens "by hand" or, even if they need some control, calendar_auth() is what they need. If there is no current token, calendar_auth() is called to either load from cache or initiate OAuth2.0 flow. If auth has been deactivated via calendar_deauth(), calendar_token() returns NULL.

Usage

1

Value

A request object (an S3 class provided by httr).

See Also

Other low-level API functions: request_generate()

Examples

1
2
3
4
5
6
7
8
9
## Not run: 
req <- request_generate(
  "drive.files.get",
  list(fileId = "abc"),
  token = calendar_token()
)
req

## End(Not run)

andrie/gcalendr documentation built on March 8, 2020, 2:36 a.m.