Methods
Objects
SDK Installation Guide
How to install the CALLR NodeJS SDK
Summary
The installation and usage of the nodejs-sdk requires the following:
npm init initialises the project with package.json, which contains meta data about your project or app, including modules needed for it to run.
// create your project
$ mkdir myproject
$ cd myproject
$ npm init myproject/
...
About to write to /working/myproject:
{
"name": "myproject",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "",
"license": "ISC"
}
Is this ok? (yes)
$ npm install --save callr
myproject@1.0.0 /working/myproject
`-- callr@x.0.0
npm WARN myproject@1.0.0 No description
npm WARN myproject@1.0.0 No repository field.
var callr = require('callr');
var api = new callr.api(callr.loginPasswordAuth('login', 'password'));
api.call('system.get_timestamp').success(function(response) {
// success callback
}).error(function(error) {
// error callback
});