Description Usage Arguments Value See Also Examples
View source: R/generate_request.R
Build a request, using knowledge of the Calendar v3 API from its Discovery Document. Most users should, instead, use higher-level wrappers that facilitate common tasks, such as reading calendar lists or calendar entries. The functions here are intended for internal use and for programming around the Calendar API.
request_generate()
lets you provide the bare minimum of input.
It takes a nickname for an endpoint and:
Uses the API spec to look up the path
, method
, and base URL.
Checks params
for validity and completeness with respect to the
endpoint. Separates parameters into those destined for the body, the query,
and URL endpoint substitution (which is also enacted).
1 2 3 4 5 | request_generate(
endpoint = character(),
params = list(),
token = calendar_token()
)
|
endpoint |
Character. Nickname for one of the selected Calendar v3 API
endpoints built into |
params |
Named list. Parameters destined for endpoint URL substitution, the query, or the body. |
token |
Calendar token. |
list()
Components are method
, path
, query
, body
,
token
, and url
, suitable as input for request_make()
.
gargle::request_develop()
, gargle::request_build()
Other low-level API functions:
calendar_token()
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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.