node-wialon
A NodeJS wrapper implementation for Wialon Remote API
Installation
$ npm install --save wialon
Usage
Node: From 1st of October 2015 you will need to use the new token login method. Use this link
to generate an access token.
Initialising a session:
var wialon = require( 'wialon' );
var session = wialon().session;
session.start( { token : '<access token>' }, function ( err, data ) {
console.log( data );
} );
var opts = {
authz : {
token : '<access token>',
operateAs : 'username'
}
};
var session = wialon( opts ).session;
Send API requests using session object:
session.request( 'core/search_items', params, function ( err, data ) {
console.log( data );
} );
session.end( function ( err, data ) {
console.log( data );
} );
Using search helpers:
var search = wialon( opts ).search();
search.units( '*', function ( err, data ) {
console.log( data );
} );
API Documentation
JSDoc generated API documentation can be found at http://nukedzn.github.io/node-wialon/docs/.
Contributing
Contributions are welcome through GitHub pull requests (using fork & pull model).