Members
(inner, constant) api :object
Container object for API call methods
Type:
- object
Properties:
| Name | Type | Description |
|---|---|---|
get |
module:api~apiCall |
|
post |
module:api~apiCall |
|
patch |
module:api~apiCall |
|
delete |
module:api~apiCall |
|
Methods
(protected, inner) apiCall(httpMethod, options, callback)
Makes a call to the RewardOps API
Parameters:
| Name | Type | Description | ||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
httpMethod |
string | The name of the HTTP method |
||||||||||||||||
options |
object | API request options. Properties
|
||||||||||||||||
callback |
module:api~requestCallback | Callback that handles the response |
Type Definitions
requestCallback(error, responseBody, response, reqopt)
Callbacks follow the Node.js error-first callback pattern.
Parameters:
| Name | Type | Attributes | Description |
|---|---|---|---|
error |
Error | null | Either an |
|
responseBody |
object | The 'result' object from the API response body |
|
response |
object | The full body of the response from the API. This includes pagination details, if present |
|
req |
object |
<optional> |
The full request object from the request library. |