Class: Client

Client

new Client(appId, appPassword) → {Client}

Parameters:
Name Type Description
appId string
appPassword string
Properties:
Name Type Description
apiEndPoint string 'live' for live environment, 'stage' for staging
Source:
Returns:
Client instance
Type
Client

Methods

getApiEndPoint() → {string}

Source:
Returns:
current used api endpoint
Type
string

request(body) → {Promise}

Builds a JSON string representing the request data. Executes the API request.
Parameters:
Name Type Description
body string the queries as json string
Source:
Returns:
promise response object
Type
Promise

setApiEndpoint(apiEndPoint)

Parameters:
Name Type Description
apiEndPoint string the endpoint can be the string 'stage' or 'live', then the default endpoints will be used or an absolute url
Source:

setAppCredentials(appId, appPassword)

Parameters:
Name Type Description
appId string the app id for client authentication
appPassword string the app password/token for client authentication.
Source: