amv-trafficsoft-rest-js is a JavaScript client library for accessing the AMV TrafficSoft® API. Please note that this software is considered experimental until v1.0.0 is reached.
$ bower install amvnetworks/amv-trafficsoft-rest-js#${version} --save
var amvTrafficsoftRestJs = require('amv-trafficsoft-rest-js');
Get a factory for creating trafficsoft rest clients
- String
baseUrl
The base api endpoint - Object
options
An options object containing the following fields:- Integer
contractId
The id of the contract in which's context to execute the request - Object
auth
- String
username
Basic auth username - String
password
Basic auth password
- String
- Integer
- Object - A factory for creating trafficsoft rest clients
var baseUrl = ...
var options = {
contractId: ...
auth: {
username: ...
password: ...
}
};
var amvTrafficsoftRestJs = require('amv-trafficsoft-rest-js');
var amvTrafficsoftClientFactory = amvTrafficsoftRestJs(baseUrl, options);
var xfcdClient = amvTrafficsoftClientFactory.xfcd();
var contractClient = amvTrafficsoftClientFactory.contract();
// ...
npm run build
- Build task that generates both minified and non-minified scripts;npm run test-server
- Run Mocha tests once;npm run test-browser
- Run Mocha tests in the browser using Karma once;npm run test
- Shortcut fornpm run test-server && npm run test-browser
;npm run tdd
- Run Mocha tests & watch files for changes;npm run tdd-browser
- Run Karma (w/ Mocha) tests & watch files for changes;npm run coverage
- Run Isparta, a code coverage tool;
The project is licensed under the Apache License. See LICENSE for details.