aboutsummaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorBen Burwell <bburwell1@gmail.com>2014-10-22 08:35:44 -0400
committerBen Burwell <bburwell1@gmail.com>2014-10-22 08:35:44 -0400
commit05337261ffb4abfb0fbbb9c775ccad0e28645692 (patch)
tree973f24e72570cc4d721957e70adf51387c13598b /examples
parentc2d82325318085b89d255e84384651db680c0c97 (diff)
Begin rewrite for new API
Diffstat (limited to 'examples')
-rw-r--r--examples/sample_app.js14
1 files changed, 14 insertions, 0 deletions
diff --git a/examples/sample_app.js b/examples/sample_app.js
new file mode 100644
index 0000000..a08b039
--- /dev/null
+++ b/examples/sample_app.js
@@ -0,0 +1,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');
+
+});