connect: Create EMS Connection Object

View source: R/connection.R

connectR Documentation

Create EMS Connection Object

Description

connect Creates a connection object to an EMS server for use in FltQuery objects.

Usage

connect(
  usr,
  pwd,
  proxies = NULL,
  server = c("prod", "cluster", "stable", "beta", "nightly", "ctc"),
  server_url = NULL
)

Arguments

usr

A string, FOQA username (like firstname.lastname)

pwd

A string, FOQA password

proxies

A list containing the system proxy information, with attributes "url", "port", "usr", "pwd"

server

A string. Lets you choose an API server. Should be one of 'prod', 'cluster', 'stable', 'beta', 'nightly', or 'ctc'.

server_url

An optional string. If this is passed, it will be used instead of the internal server definitions matched by the 'server' argument.

Details

This function creates a connection object, including an authentication token. These can be passed into a fltquery or tsquery function to start the process of retrieving data. These functions take unmasked usernames and passwords - it is recommended that you either store your credentials securely, or wrap this function in something like rstudioapi::askForPassword() to avoid disclosing your credentials.

Value

a Connection object to be used in FltQuery.

Examples

# connect in a standard way, using no proxy and connecting to prod by default.
## Not run: 
con <- connect("joe.bloggs", "mypassword")
qry <- flt_query(conn = con, ems_name = "my-ems", data_file = "file.db")

## End(Not run)
# connect using the beta build, and a proxy
## Not run: 
con <- connect("joe.bloggs", "mypassword",
              proxies = list(url = "http://myproxy.com", port = 8080,
              usr = "joebloggs", pwd = "mypassword"),
              server = 'beta')

## End(Not run)


ge-flight-analytics/Rems documentation built on May 17, 2023, 8:02 a.m.