Create a Google API package
gar_create_package( api_json, directory, rstudio = TRUE, check = FALSE, github = FALSE, format = TRUE, overwrite = TRUE )
api_json
: json from gar_discovery_apidirectory
: Where to build the packagerstudio
: Passed to create_package , creates RStudio project filecheck
: Perform a check on the package once donegithub
: If TRUE will upload package to your githubformat
: If TRUE will use tidy_eval on contentoverwrite
: Whether to overwrite an existing directory if it existsIf check is TRUE, the results of the CRAN check, else FALSE
For github upload to work you need to have your github PAT setup. See use_github .
Uses usethis to create a package structure then gar_create_api_skeleton and gar_create_api_objects to create starting files for a Google API package.
https://developers.google.com/discovery/v1/reference/apis/list
A Github repository with 154 R packages examples generated by this function.
Other Google Discovery API functions: gar_create_api_objects()
, gar_create_api_skeleton()
, gar_discovery_api()
, gar_discovery_apis_list()
Useful links