From 05337261ffb4abfb0fbbb9c775ccad0e28645692 Mon Sep 17 00:00:00 2001 From: Ben Burwell Date: Wed, 22 Oct 2014 08:35:44 -0400 Subject: Begin rewrite for new API --- lib/Device.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 lib/Device.js (limited to 'lib/Device.js') 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; +}; -- cgit v1.2.3