aboutsummaryrefslogtreecommitdiff
path: root/examples/sample_app.js
blob: a08b03926494f5b6808be1ef248e69d5ff9d1251 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
var Active911 = require('../lib/active911').Active911;

var oauth_id = '12345';
var oauth_secret = 'asdf';
var oauth_scope = 'read_agency read_alert read_device';

var api = new Active911(oauth_id, oauth_secret, oauth_scope);
var uri = api.getAuthorizationUri();
console.log('Please go to ' + uri + ' to authenticate.');

api.ready(function() {
    console.log('OAuth workflow complete');
    
});