trem_client_new: Create a new Tremendous API Client

Description Usage Arguments Value Examples

View source: R/func_client.R

Description

Create a new Tremendous API Client

Usage

1
trem_client_new(api_key = NULL, sandbox = TRUE)

Arguments

api_key

API key from tremendous.com. Can either pass in here as a character string or set for repeated use with trem_set_api_key.

sandbox

Logical: TRUE and any API requests are performed within the Tremendous sandbox environment, a free and fully-featured environment for application developing and testing. FALSE and the API requests are performed within the Tremendous production environment. This will involve sending actual money, so be certain you wish to do this!

Value

An object of class 'tremClient' that contains the API Key and Environment information for easily performing Tremendous API requests.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
## Not run: 

# Create a client for testing API calls within the Sandbox environment.
test_client <- trem_client_new(api_key = "TEST_YOUR-KEY-HERE",
                                  sandbox = TRUE)

# Create a client for performing API calls within a production environment.
# This client will be able to send actual money!
prod_client <- trem_client_new(api_key = "PROD_YOUR-KEY-HERE",
                               sandbox = FALSE)


## End(Not run)

tremendousr documentation built on Sept. 30, 2021, 5:09 p.m.