API
- Copyright:
- 2015–2020 RewardOps Inc.
Members
object
# inner constant api
Container object for API call methods
Properties:
Name | Type | Description |
---|---|---|
get |
module:api~apiCall
|
|
post |
module:api~apiCall
|
|
patch |
module:api~apiCall
|
|
delete |
module:api~apiCall
|
|
- See:
-
HTTP_METHODS
for more information
Methods
# protected inner apiCall(httpMethod, options, callback)
Makes a call to the RewardOps API
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
httpMethod |
string
|
The name of the HTTP method |
|
options |
object
|
API request options. |
|
path |
string
|
The relative path to the API endpoint. |
|
config |
object
|
The config object to use in the API request (usually the result of |
|
params |
object
|
<optional> |
A params object to send with the API request.
For |
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. |