Closed fkoh111 closed 4 years ago
As an s3 object that are the being instatiated in every function body
A proposal is something like this:
.zz_endpoints <- function() {
prod <- list(
post <- c("https://api.zamzar.com/v1/jobs"),
get <- c("https://api.zamzar.com/v1/files/")
)
dev <- list (
post <- c("https://sandbox.zamzar.com/v1/jobs"),
get <- c("https://sandbox.zamzar.com/v1/files/")
)
format <- list(
format <- c("https://sandbox.zamzar.com/v1/formats")
)
conf <- list(prod = prod, dev = dev, format = format)
invisible(structure(conf, class = "zz_config"))
}
endpoints <- zz_endpoints()
endpoints$prod[[1]]
endpoints$prod[[2]]
endpoints$dev[[1]]
endpoints$dev[[2]]
endpoints$format[[1]]
Make a proper object with build urls, methods, decent printing etc. for auxiliary object in utils.R