Skip to content

Commit

Permalink
Merge pull request #812 from DyfanJones/main
Browse files Browse the repository at this point in the history
typo
  • Loading branch information
DyfanJones authored Jul 22, 2024
2 parents 2b86e39 + 1473ed5 commit f04e086
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 40 deletions.
2 changes: 1 addition & 1 deletion make.paws/inst/templates/service_parameter_helper.R
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#' @description
#' Help functions for setting the parameters for services
#'
#' @param credentials \code{credentials()} or \code{list} is same format.
#' @param credentials \code{credentials()} or \code{list} in same format.
#' \itemize{
#' \item{\strong{creds}: \code{creds()} or \code{list} in same format.
#' \itemize{
Expand Down
62 changes: 29 additions & 33 deletions paws.common/R/service_parameter_helper.R
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#' @description
#' Help functions for setting the parameters for services
#'
#' @param credentials \code{credentials()} or \code{list} is same format.
#' @param credentials \code{credentials()} or \code{list} in same format.
#' \itemize{
#' \item{\strong{creds}: \code{creds()} or \code{list} in same format.
#' \itemize{
Expand Down Expand Up @@ -64,49 +64,45 @@
#'
#' # set service parameter access_key_id and secret_access_key using using lists
#' config(
#' credentials = list(
#' creds = list(
#' access_key_id = "dummy",
#' secret_access_key = "secret"
#' credentials = list(
#' creds = list(
#' access_key_id = "dummy",
#' secret_access_key = "secret"
#' )
#' )
#' )
#' )
#'
#' @name set_service_parameter
#' @export
config <- function(
credentials = list(creds = list(
access_key_id = "",
secret_access_key = "", session_token = "", access_token = "",
expiration = Inf
), profile = "", anonymous = FALSE), endpoint = "",
region = "", close_connection = FALSE, max_retries = 3, connect_timeout = 60,
s3_force_path_style = FALSE, sts_regional_endpoint = "",
signature_version = "") {
.args <- as.list(environment(), all.names = TRUE)
class(.args) <- "struct"
return(.args)
config <- function (credentials = list(creds = list(access_key_id = "",
secret_access_key = "", session_token = "", access_token = "",
expiration = Inf), profile = "", anonymous = FALSE), endpoint = "",
region = "", close_connection = FALSE, max_retries = 3, connect_timeout = 60,
s3_force_path_style = FALSE, sts_regional_endpoint = "",
signature_version = "")
{
.args <- as.list(environment(), all.names = TRUE)
class(.args) <- "struct"
return(.args)
}

#' @rdname set_service_parameter
#' @export
credentials <- function(
creds = list(
access_key_id = "", secret_access_key = "",
session_token = "", access_token = "", expiration = Inf
),
profile = "", anonymous = FALSE) {
.args <- as.list(environment(), all.names = TRUE)
class(.args) <- "struct"
return(.args)
credentials <- function (creds = list(access_key_id = "", secret_access_key = "",
session_token = "", access_token = "", expiration = Inf),
profile = "", anonymous = FALSE)
{
.args <- as.list(environment(), all.names = TRUE)
class(.args) <- "struct"
return(.args)
}

#' @rdname set_service_parameter
#' @export
creds <- function(
access_key_id = "", secret_access_key = "", session_token = "",
access_token = "", expiration = Inf) {
.args <- as.list(environment(), all.names = TRUE)
class(.args) <- "struct"
return(.args)
creds <- function (access_key_id = "", secret_access_key = "", session_token = "",
access_token = "", expiration = Inf)
{
.args <- as.list(environment(), all.names = TRUE)
class(.args) <- "struct"
return(.args)
}
12 changes: 6 additions & 6 deletions paws.common/man/set_service_parameter.Rd

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

0 comments on commit f04e086

Please sign in to comment.