Skip to content

Commit

Permalink
fix documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
ha0ye committed Nov 21, 2023
1 parent 5821d62 commit ed51fe9
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
7 changes: 5 additions & 2 deletions R/api-functions.R
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,18 @@ do_auth <- function()
#' This function expects that there is an encrypted file in RDS format with an
#' OAuth token, and an environmental variable with the key to decrypt the token.
#'
#' @param token_file filepath to the encrypted token file
#' @param decrypt_env_var name of the environmental variable that is the decryption key
#'
#' @return an OAuth token
#' @export
decrypt_gdrive_token <- function(token_RDS = ".secrets/gdrive-token.rds",
decrypt_gdrive_token <- function(token_file = ".secrets/gdrive-token.rds",
decrypt_env_var = "GDRIVE_KEY")
{
token <- NULL
if (gargle::secret_has_key(decrypt_env_var))
{
token <- gargle::secret_read_rds(token_RDS,
token <- gargle::secret_read_rds(token_file,
key = decrypt_env_var)
}

Expand Down
7 changes: 6 additions & 1 deletion man/decrypt_gdrive_token.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit ed51fe9

Please sign in to comment.