2.0.2 • Published 8 years ago

wialon v2.0.2

Weekly downloads
10
License
ISC
Repository
github
Last release
8 years ago

node-wialon

npm version Build Status Coverage Status Dependency Status devDependency Status

A NodeJS wrapper implementation for Wialon Remote API

Installation

$ npm install --save wialon

Usage

Note: 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' );

// using session.start()
var session = wialon().session;
session.start( { token : '<access token>' } )
	.then( function ( data ) {
		console.log( data );
	} )
	.catch( function ( err ) {
		console.log( err );
	} );


// auto-initialise a session by passing in authorization parameters to the factory method
var opts = {
	// authz params
	authz : {
		token : '<access token>',
		operateAs : 'username'
	}
};

var session = wialon( opts ).session;

Send API requests using session object:

session.request( 'core/search_items', params )
	.then( function ( data ) {
		console.log( data );
	} )
	.catch( function ( err ) {
		console.log( err );
	} );

Using search helpers:

// grab a new search instance
var search = wialon( opts ).search();

// search for units
search.units( '*' )
	.then( function ( data ) {
		console.log( data );
	} )
	.catch( function ( err ) {
		console.log( err )
	} );

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).

2.0.2

8 years ago

2.0.1

9 years ago

2.0.0

9 years ago

1.1.1

9 years ago

1.1.0

9 years ago

1.0.0

9 years ago

0.0.8

9 years ago

0.0.7

9 years ago

0.0.6

9 years ago

0.0.5

9 years ago

0.0.4

9 years ago

0.0.3

9 years ago

0.0.2

9 years ago

0.0.1

9 years ago