bmw-js
Version:
BMW javascript REST client for the BMW i3 hackathon.
85 lines (71 loc) • 2.24 kB
JavaScript
// Generated by CoffeeScript 1.8.0
(function() {
var Event, MojioModel,
__hasProp = {}.hasOwnProperty,
__extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };
MojioModel = require('./MojioModel');
module.exports = Event = (function(_super) {
__extends(Event, _super);
Event.prototype._schema = {
"Type": "Integer",
"MojioId": "String",
"VehicleId": "String",
"OwnerId": "String",
"EventType": "Integer",
"Time": "String",
"Location": "Object",
"TimeIsApprox": "Boolean",
"BatteryVoltage": "Float",
"ConnectionLost": "Boolean",
"_id": "String",
"_deleted": "Boolean",
"Accelerometer": "Object",
"TripId": "String",
"Altitude": "Float",
"Heading": "Float",
"Distance": "Float",
"FuelLevel": "Float",
"FuelEfficiency": "Float",
"Speed": "Float",
"Acceleration": "Float",
"Deceleration": "Float",
"Odometer": "Float",
"RPM": "Integer",
"DTCs": "Array",
"MilStatus": "Boolean",
"Force": "Float",
"MaxSpeed": "Float",
"AverageSpeed": "Float",
"MovingTime": "Float",
"IdleTime": "Float",
"StopTime": "Float",
"MaxRPM": "Float",
"EventTypes": "Array",
"Timing": "Integer",
"Name": "String",
"ObserverType": "Integer",
"AppId": "String",
"Parent": "String",
"ParentId": "String",
"Subject": "String",
"SubjectId": "String",
"Transports": "Integer",
"Status": "Integer",
"Tokens": "Array"
};
Event.prototype._resource = 'Events';
Event.prototype._model = 'Event';
function Event(json) {
Event.__super__.constructor.call(this, json);
}
Event._resource = 'Events';
Event._model = 'Event';
Event.resource = function() {
return Event._resource;
};
Event.model = function() {
return Event._model;
};
return Event;
})(MojioModel);
}).call(this);