Node.js module for working with the Accela REST API.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
lib
samples
.gitignore
.npmignore
LICENSE.md
README.md
config.sample.js
package.json

README.md

Node.js module for the Accela API (v4)

Installation

npm install accela-construct

Provisioning an API test token:

  1. Go to the API v3 reference page.
  2. On the lower left, click on Get an API Test Token.
  3. Enter the agency name (Islandton for testing).
  4. Enter the scope for the test token - this is a space delimited list of scope identifiers from the API reference page.
  5. 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.