Skip to content
Unofficial npm package for accessing the Active911 API. Active911 enables 🚒 and 🚑 agencies to quickly access real-time incident information.
JavaScript
Branch: master
Clone or download
Latest commit 09d62f9 Sep 12, 2016
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
examples Begin rewrite for new OAuth API Dec 15, 2015
lib Add support for alert_days and alert_minutes parameters Jan 12, 2016
tests Add support for alert_days and alert_minutes parameters Jan 12, 2016
.editorconfig
.gitignore
.npmignore Begin rewrite for new OAuth API Dec 15, 2015
.travis.yml
LICENSE.md Update license with the year 2016 Sep 12, 2016
README.md Add support for alert_days and alert_minutes parameters Jan 12, 2016
package.json Bump package version Jan 12, 2016

README.md

Active911 for Node.js

Build Status npm version

by Ben Burwell ben@benburwell.com

Installation

Installation is simple: npm install --save active911.

Basic Usage

var Active911 = require('active911');
var client = new Active911.RefreshClient('YOUR REFRESH TOKEN');

client.getAgency().then(function(agency) {
  console.log(agency.name);
}).catch(function(err) {
  console.log('Problem getting Agency details:', err);
});

API Methods

The following public API methods are available:

  • getAgency()
  • getDevice(device_id)
  • getAlerts({ alert_days: 1, alert_minutes: 30 }), where the object parameter is optional. You should not use both keys; if alert_minutes is provided, it will override alert_days as documented on the wiki.
  • getDeviceAlerts(device_id)
  • getAlert(alert_id)
  • getLocations()
  • getLocation(location_id)
  • getResource(resource_id)

Each method returns a promise for a result, which will resolve as either an object or an array, depending on the cardinality (e.g. getAlerts resolves as an array, while getAlert resolves as an object).

For details on the format of the result, please see the Active911 API wiki.

Contributing

Contributions are encouraged. For a list of open issues, see https://github.com/benburwell/active911/issues.

More Information

More information about the API is available on the Active911 wiki.

You can’t perform that action at this time.