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 bodystring the queries as json string - Source:
Returns:
promise response object- Type
- Promise
-
setApiEndpoint(apiEndPoint)
-
Parameters:
Name Type Description apiEndPointstring 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 appIdstring the app id for client authentication appPasswordstring the app password/token for client authentication. - Source: