Active911 for Node.js
by Ben Burwell ben@benburwell.com
Installation
Installation is simple: npm install --save active911
.
Basic Usage
var Active911 = ;var client = 'YOUR REFRESH TOKEN'; client;
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; ifalert_minutes
is provided, it will overridealert_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.