From 5b5593634cb68f1817ffbc5c13e032a27709c81a Mon Sep 17 00:00:00 2001 From: andres Date: Sun, 17 Dec 2023 11:21:59 -0500 Subject: [PATCH] Adds Imports and Suggests to DESCRIPTION file --- DESCRIPTION | 12 ++++++++++++ R/auth.R | 1 + R/utils.R | 2 +- man/get_token_field.Rd | 2 ++ 4 files changed, 16 insertions(+), 1 deletion(-) diff --git a/DESCRIPTION b/DESCRIPTION index a379b3d..51fcc9a 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -15,3 +15,15 @@ License: MIT + file LICENSE Encoding: UTF-8 Roxygen: list(markdown = TRUE) RoxygenNote: 7.2.3 +Imports: + httr2, + stringr, + jose, + purrr, + promises, + curl, + glue, + lubridate, + stats +Suggests: + shiny diff --git a/R/auth.R b/R/auth.R index d55f133..d4d9c14 100644 --- a/R/auth.R +++ b/R/auth.R @@ -133,6 +133,7 @@ expires_at <- function(token) { #' @description Gets the issued at time of an access token #' #' @param token An access_token object +#' @param field The field to get from the token #' #' @return A POSIXct object containing the date and time the token was issued #' @export diff --git a/R/utils.R b/R/utils.R index 37e200d..3480061 100644 --- a/R/utils.R +++ b/R/utils.R @@ -28,7 +28,7 @@ parse_cookies <- function(x) { cookie_pairs <- purrr::map(cookie_pairs, ~ stringr::str_split(.x, "=", n = 2))[[1]] cookie_pairs <- purrr::map(cookie_pairs, function(.x) { .x[2] <- curl::curl_unescape(.x[2]) - setNames(.x[2], .x[1]) + stats::setNames(.x[2], .x[1]) }) cookie_pairs <- purrr::flatten(cookie_pairs) return(cookie_pairs) diff --git a/man/get_token_field.Rd b/man/get_token_field.Rd index b7f2523..c01da36 100644 --- a/man/get_token_field.Rd +++ b/man/get_token_field.Rd @@ -8,6 +8,8 @@ get_token_field(token, field) } \arguments{ \item{token}{An access_token object} + +\item{field}{The field to get from the token} } \value{ A POSIXct object containing the date and time the token was issued