accela-construct
v0.1.7
Published
A Node.js module for working with the Accela Construct API.
Downloads
103
Keywords
Readme
Node.js module for the Accela API (v4)
Installation
npm install accela-construct
Provisioning an API test token:
- Go to the API v3 reference page.
- On the lower left, click on Get an API Test Token.
- Enter the agency name (Islandton for testing).
- Enter the scope for the test token - this is a space delimited list of scope identifiers from the API reference page.
- Put the generated token in your config file.
Example
var accela = require('accela-construct');
var config = require('./path/to/config').config;
accela.setup(config);
accela.owners.getOwners({fullName: 'Smith'}, function (response, error) {
if(!error) {
for (var i = 0; i < response.result.length; i++) {
console.log(response.result[i].fullName);
}
}
else {
console.log('An error ocurred: ' + error);
}
});
Additional examples available in the samples directory.