aboutsummaryrefslogtreecommitdiff
path: root/lib/Device.js
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 /lib/Device.js
parentc2d82325318085b89d255e84384651db680c0c97 (diff)
Begin rewrite for new API
Diffstat (limited to 'lib/Device.js')
-rw-r--r--lib/Device.js12
1 files changed, 12 insertions, 0 deletions
diff --git a/lib/Device.js b/lib/Device.js
new file mode 100644
index 0000000..bfc4d34
--- /dev/null
+++ b/lib/Device.js
@@ -0,0 +1,12 @@
+var _util = require('./util');
+
+module.exports.Device = function(options) {
+ this._id = options.id;
+ this._name = options.name;
+ this._latitude = options.latitude;
+ this._longitude = options.longitude;
+ this._position_accuracy = options.position_accuracy;
+ this._position_timestamp = options.position_timestamp;
+ this._agencies = options.agencies;
+ this._uri = options.uri || _util.API_BASE + '/devices/' + options.id;
+};