UNPKG

@iotile/iotile-cloud

Version:

A typescript library for interfacing with the IOTile Cloud API

47 lines 1.7 kB
"use strict"; var __extends = (this && this.__extends) || (function () { var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; })(); Object.defineProperty(exports, "__esModule", { value: true }); var page_1 = require("./page"); var EventPage = /** @class */ (function (_super) { __extends(EventPage, _super); function EventPage(url, thisPage, pageCount) { var _this = _super.call(this, url, thisPage, pageCount) || this; _this.data = []; return _this; } return EventPage; }(page_1.Page)); exports.EventPage = EventPage; var EventPoint = /** @class */ (function () { function EventPoint(data) { if (data === void 0) { data = {}; } this.id = data.id; this.timestamp = new Date(data.timestamp); this.ext = data.ext; if ('stream' in data) { // Only getData returns a stream slug this.stream = data.stream; } if ('streamer_local_id' in data) { this.incrementalId = data.streamer_local_id; } if ('dirty_ts' in data) { this.dirtyTimestamp = data.dirty_ts; } if ('extra_data' in data) { this.summaryData = data.extra_data; } } return EventPoint; }()); exports.EventPoint = EventPoint; //# sourceMappingURL=eventpoint.js.map