Creates a connection to RStudio Connect using the server URL and an api key. Validates the connection and checks that the version of the server is compatible with the current version of the package.

connect(
  server = Sys.getenv(paste0(prefix, "_SERVER"), NA_character_),
  api_key = Sys.getenv(paste0(prefix, "_API_KEY"), NA_character_),
  prefix = "CONNECT",
  ...,
  .check_is_fatal = TRUE
)

Arguments

server

The URL for accessing RStudio Connect. Defaults to environment variable CONNECT_SERVER

api_key

The API Key to authenticate to RStudio Connect with. Defaults to environment variable CONNECT_API_KEY

prefix

The prefix used to determine environment variables

...

Additional arguments. Not used at present

.check_is_fatal

Whether to fail if "check" requests fail. Useful in rare cases where more http request customization is needed for requests to succeed.

Value

An RStudio Connect R6 object that can be passed along to methods

Examples

if (FALSE) {
connect()
}