raas
v2.3.0
Published
With this RESTful API you can integrate a global reward or incentive program into your app or platform. If you have any questions or if you'd like to receive your own credentials, please contact us at [email protected].
Downloads
209
Readme
Raas
This API SDK was automatically generated by APIMATIC Code Generator.
Installation
The SDK relies on Node Package Manager (NPM) being available to resolve dependencies.
Once published you will need copy the folder raas
in to your node_modules
folder.
Usage
The following shows how import and use the controller:
Import the module:
var raas = require('raas');
Configure any authentication parameters. For example:
var config = raas.configuration; config.apikey = a_secret_key;
Access various controllers by:
var controller = raas.XYZ; controller.getItems(id, callback);
Test Execution
These tests use Mocha framework for testing, coupled with Chai for assertions. These dependencies need to be installed for tests to run. Tests can be run in a number of ways:
Run All Tests
- Navigate to the root directory from command prompt. (/Node/)
- Type
mocha --recursive
to run all the tests.
Run All Tests (alternate)
- Navigate to the
../test/Controllers/
directory from command prompt. - Type
mocha *
to run all the tests (from all the controller files).
Run for a Particular Resource
- Navigate to the
../test/Controllers/
directory from command prompt. - Type
mocha XYZControllerTest
to run all the tests in that controller file.
To increase mocha's default timeout, you can change the TESTTIMEOUT
parameter's value in Configuration.js
.
NOTE: Changing default timeout is available for only Binary/File type endpoint tests