Skip to content

Instantly share code, notes, and snippets.

@bfatemi
Created August 18, 2019 01:07
Show Gist options
  • Save bfatemi/dcdf59b703322b3460c6c48b15aebd34 to your computer and use it in GitHub Desktop.
Save bfatemi/dcdf59b703322b3460c6c48b15aebd34 to your computer and use it in GitHub Desktop.
require("googleAuthR")
require("formatR")
secret_file <- "/My Project 94698-b17961ee0d57.json"
Sys.setenv("GAR_AUTH_FILE"=secret_file)
tk <- googleAuthR::gar_auth_service(
json_file = Sys.getenv("GAR_AUTH_FILE")
)
outfile <- "gmail_client.R"
gobj <- googleAuthR::gar_discovery_api("gmail", "v1")
googleAuthR::gar_create_api_objects(outfile, gobj)
rstudioapi::navigateToFile(outfile)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment