Comparing version 1.0.5 to 1.1.0
@@ -47,3 +47,3 @@ import { Observable } from 'rxjs/Observable'; | ||
/** | ||
* Returns data form a given source. | ||
* Returns one page of data from a given source. | ||
* No **from** and **to** parameters: latest data *TemporalPage* is returned. | ||
@@ -56,4 +56,9 @@ * If **from** and/or **to** specified: from *TemporalPage* is returned (*last link* will be present if **to** is also specified). | ||
*/ | ||
getData(sourceId: string, from?: number, to?: number): Observable<TemporalPage>; | ||
/** | ||
* Continuously poll for the latest data of a *Source*. | ||
* @param sourceId The sourceId of the *Source* to poll from. | ||
* @param period The period in milliseconds of the polling. | ||
*/ | ||
pollLatestData(sourceId: string, period: number): Observable<TemporalPage>; | ||
/** | ||
* Return a complete interval TemporalPageData, per TemporalPage | ||
@@ -67,10 +72,8 @@ * @param sourceId {string} The id of the source to get the data form. | ||
/** | ||
* Return data from the sources belonging to the given type in the given location. | ||
* @param geohash {string} The geohash describing the location | ||
* @param typeId {string} The id of the type to return data of | ||
* @param from {number=} Timestamp (UNIX UTC) from which to start the requested interval | ||
* @param to {number=} Timestamp (UNIX UTC) used to fill the *last link* in the *TemporalPage*. | ||
* @returns An Observable containing a *TemporalPage* object. | ||
* Continuously poll for the latest data in a location. | ||
* @param geohash The geohash defining the location. | ||
* @param typeId The typeId of the *Type* of data to get. | ||
* @param period The period in milliseconds of the polling. | ||
*/ | ||
getDataIn(geohash: string, typeId: string, from?: number, to?: number): Observable<TemporalPage>; | ||
pollLatestDataIn(geohash: string, typeId: string, period: number): Observable<TemporalPage>; | ||
/** | ||
@@ -77,0 +80,0 @@ * Return a complete interval TemporalPageData, per TemporalPage, for the |
@@ -67,3 +67,3 @@ "use strict"; | ||
/** | ||
* Returns data form a given source. | ||
* Returns one page of data from a given source. | ||
* No **from** and **to** parameters: latest data *TemporalPage* is returned. | ||
@@ -76,12 +76,23 @@ * If **from** and/or **to** specified: from *TemporalPage* is returned (*last link* will be present if **to** is also specified). | ||
*/ | ||
getData(sourceId, from, to) { | ||
let query = ''; | ||
if (from) { | ||
query += '?from=' + from; | ||
} | ||
if (to) { | ||
query += '&to=' + to; | ||
} | ||
let url = this.host + '/sources/' + sourceId + '/events' + query; | ||
return internal_utils_1.InternalUtils.getAsTemporalPage(url); | ||
// getData(sourceId: string, from?: number, to?: number): Observable<TemporalPage> { | ||
// let query = ''; | ||
// if (from) { | ||
// query += '?from=' + from; | ||
// } | ||
// if (to) { | ||
// query += '&to=' + to; | ||
// } | ||
// let url = this.host + '/sources/' + sourceId + '/events' + query; | ||
// return _utils.getAsTemporalPage(url); | ||
// } | ||
/** | ||
* Continuously poll for the latest data of a *Source*. | ||
* @param sourceId The sourceId of the *Source* to poll from. | ||
* @param period The period in milliseconds of the polling. | ||
*/ | ||
pollLatestData(sourceId, period) { | ||
let url = this.host + '/sources/' + sourceId + '/events'; | ||
return internal_utils_1.InternalUtils.getAsTemporalPage(url) | ||
.switchMap(tpage => internal_utils_1.InternalUtils.getAsTemporalPage(tpage.link.next)) | ||
.sampleTime(period); | ||
} | ||
@@ -102,20 +113,32 @@ /** | ||
} | ||
// /** | ||
// * Return data from the sources belonging to the given type in the given location. | ||
// * @param geohash {string} The geohash describing the location | ||
// * @param typeId {string} The id of the type to return data of | ||
// * @param from {number=} Timestamp (UNIX UTC) from which to start the requested interval | ||
// * @param to {number=} Timestamp (UNIX UTC) used to fill the *last link* in the *TemporalPage*. | ||
// * @returns An Observable containing a *TemporalPage* object. | ||
// */ | ||
// getDataIn(geohash: string, typeId: string, from?: number, to?: number): Observable<TemporalPage> { | ||
// let query = ''; | ||
// if (from) { | ||
// query += '?from=' + from; | ||
// } | ||
// if (to) { | ||
// query += '&to=' + to; | ||
// } | ||
// let url = this.host + '/locations/' + geohash + '/' + typeId + '/events' + query; | ||
// return _utils.getAsTemporalPage(url); | ||
// } | ||
/** | ||
* Return data from the sources belonging to the given type in the given location. | ||
* @param geohash {string} The geohash describing the location | ||
* @param typeId {string} The id of the type to return data of | ||
* @param from {number=} Timestamp (UNIX UTC) from which to start the requested interval | ||
* @param to {number=} Timestamp (UNIX UTC) used to fill the *last link* in the *TemporalPage*. | ||
* @returns An Observable containing a *TemporalPage* object. | ||
* Continuously poll for the latest data in a location. | ||
* @param geohash The geohash defining the location. | ||
* @param typeId The typeId of the *Type* of data to get. | ||
* @param period The period in milliseconds of the polling. | ||
*/ | ||
getDataIn(geohash, typeId, from, to) { | ||
let query = ''; | ||
if (from) { | ||
query += '?from=' + from; | ||
} | ||
if (to) { | ||
query += '&to=' + to; | ||
} | ||
let url = this.host + '/locations/' + geohash + '/' + typeId + '/events' + query; | ||
return internal_utils_1.InternalUtils.getAsTemporalPage(url); | ||
pollLatestDataIn(geohash, typeId, period) { | ||
let url = this.host + '/locations/' + geohash + '/' + typeId + '/events'; | ||
return internal_utils_1.InternalUtils.getAsTemporalPage(url) | ||
.switchMap(tpage => internal_utils_1.InternalUtils.getAsTemporalPage(tpage.link.next)) | ||
.sampleTime(period); | ||
} | ||
@@ -159,2 +182,2 @@ /** | ||
exports.CotClient = CotClient; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY290LWNsaWVudC5qcyIsInNvdXJjZVJvb3QiOiJDOi9Vc2Vycy90ZHVwb250L1dvcmtzcGFjZXMvY290LWxpYi9saWIvIiwic291cmNlcyI6WyJjbGllbnRzL2NvdC1jbGllbnQudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7QUFBQSxnREFBNkM7QUFDN0MsMkNBQXlDO0FBQ3pDLGtDQUErQjtBQUMvQixtQ0FBZ0M7QUFDaEMsaUNBQStCO0FBQy9CLGlDQUE2QztBQUU3QyxxREFBaUQ7QUFDakQseURBQXFEO0FBQ3JELHNEQUE0RDtBQUs1RDtJQUdJOzs7T0FHRztJQUNILFlBQVksSUFBWTtRQUNwQixFQUFFLENBQUMsQ0FBQyxJQUFJLENBQUMsUUFBUSxDQUFDLEdBQUcsQ0FBQyxDQUFDLENBQUMsQ0FBQztZQUNyQixJQUFJLE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sSUFBWSxFQUFFLEVBQVU7UUFDdkUsSUFBSSxLQUFLLEdBQUcsUUFBUSxHQUFHLElBQUksR0FBRyxNQUFNLEdBQUcsRUFBRSxDQUFDO1FBQzFDLElBQUksR0FBRyxHQUFHLElBQUksQ0FBQyxJQUFJLEdBQUcsYUFBYSxHQUFHLE9BQU8sR0FBRyxHQUFHLEdBQUcsTUFBTSxHQUFHLFNBQVMsR0FBRyxLQUFLLENBQUM7UUFDakYsTUFBTSxDQUFDLDhCQUFNLENBQUMsbUJBQW1CLENBQUMsR0FBRyxDQUFDO2FBQ2pDLE1BQU0sQ0FBQyxJQUFJLElBQUksTUFBTSxDQUFDLElBQUksQ0FBQyxJQUFJLENBQUMsSUFBSSxDQUFDLENBQUMsTUFBTSxHQUFHLENBQUMsQ0FBQzthQUNqRCxHQUFHLENBQUMsSUFBSSxJQUFJLElBQUksQ0FBQyxJQUFJLENBQUMsQ0FBQztJQUNoQyxDQUFDO0lBRUQsNkJBQTZCO0lBRTdCOzs7OztPQUtHO0lBQ0gsbUJBQW1CLENBQUMsR0FBRyxTQUFtQjtRQUN0QyxNQUFNLENBQUMsSUFBSSw4QkFBYSxDQUFDLElBQUksQ0FBQyxJQUFJLEVBQUUsR0FBRyxTQUFTLENBQUMsQ0FBQztJQUN0RCxDQUFDO0lBRUQ7Ozs7O09BS0c7SUFDSCxxQkFBcUIsQ0FBQyxHQUFHLFNBQW1CO1FBQ3hDLE1BQU0sQ0FBQyxJQUFJLGtDQUFlLENBQUMsSUFBSSxDQUFDLElBQUksRUFBRSxHQUFHLFNBQVMsQ0FBQyxDQUFDO0lBQ3hELENBQUM7Q0FDSjtBQXRMRCw4QkFzTEMifQ== |
@@ -1,6 +0,10 @@ | ||
import { Observable } from 'rxjs/Rx'; | ||
import { Observable } from 'rxjs/Observable'; | ||
import 'rxjs/add/observable/fromPromise'; | ||
import 'rxjs/add/observable/merge'; | ||
import 'rxjs/add/observable/of'; | ||
import 'rxjs/add/operator/catch'; | ||
import 'rxjs/add/operator/filter'; | ||
import 'rxjs/add/operator/map'; | ||
import 'rxjs/add/operator/sampleTime'; | ||
import 'rxjs/add/operator/switchMap'; | ||
import { TemporalPage, TemporalPageData } from '../types/temporal-page'; | ||
@@ -18,9 +22,7 @@ export declare class LocationsClient { | ||
/** | ||
* Returns latest data within the assinged areas as an array of *TemporalPage* objects | ||
* @param typeId {string} The typeId of the Type to find source data of. | ||
* @param from {number=} Timestamp (UNIX UTC) from which to start the requested interval | ||
* @param to {number=} Timestamp (UNIX UTC) used to fill the *last link* in the *TemporalPage*. | ||
* @returns An Observable containing a *TemporalPage* object. | ||
* Poll for the latest data of each location defined in the client. Every update will be sent through, hence it is mandatory to check the data for the key. | ||
* @param typeId The typeId of the *Type* of data to get. | ||
* @param period The period in milliseconds of the polling. | ||
*/ | ||
getData(typeId: string, from?: number, to?: number): Observable<TemporalPage[]>; | ||
pollLatestData(typeId: string, period: number): Observable<TemporalPage>; | ||
/** | ||
@@ -27,0 +29,0 @@ * Returns data within the assigned areas as a single array of TemporalPageData objects. |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
const Rx_1 = require("rxjs/Rx"); | ||
const Observable_1 = require("rxjs/Observable"); | ||
require("rxjs/add/observable/fromPromise"); | ||
require("rxjs/add/observable/merge"); | ||
require("rxjs/add/observable/of"); | ||
require("rxjs/add/operator/catch"); | ||
require("rxjs/add/operator/filter"); | ||
require("rxjs/add/operator/map"); | ||
require("rxjs/add/operator/sampleTime"); | ||
require("rxjs/add/operator/switchMap"); | ||
const internal_utils_1 = require("../internal-utils"); | ||
@@ -20,20 +24,32 @@ class LocationsClient { | ||
} | ||
// /** | ||
// * Returns latest data within the assinged areas as an array of *TemporalPage* objects | ||
// * @param typeId {string} The typeId of the Type to find source data of. | ||
// * @param from {number=} Timestamp (UNIX UTC) from which to start the requested interval | ||
// * @param to {number=} Timestamp (UNIX UTC) used to fill the *last link* in the *TemporalPage*. | ||
// * @returns An Observable containing a *TemporalPage* object. | ||
// */ | ||
// getData(typeId: string, from?: number, to?: number): Observable<TemporalPage[]> { | ||
// let query = ''; | ||
// if (from) { | ||
// query += '?from=' + from; | ||
// } | ||
// if (to) { | ||
// query += '&to=' + to; | ||
// } | ||
// let urls = this.geohashes.map(hash => this.host + '/locations/' + hash + '/' + typeId + '/events' + query); | ||
// return Observable | ||
// .forkJoin(...urls.map(url => _utils.getAsTemporalPage(url))); | ||
// } | ||
/** | ||
* Returns latest data within the assinged areas as an array of *TemporalPage* objects | ||
* @param typeId {string} The typeId of the Type to find source data of. | ||
* @param from {number=} Timestamp (UNIX UTC) from which to start the requested interval | ||
* @param to {number=} Timestamp (UNIX UTC) used to fill the *last link* in the *TemporalPage*. | ||
* @returns An Observable containing a *TemporalPage* object. | ||
* Poll for the latest data of each location defined in the client. Every update will be sent through, hence it is mandatory to check the data for the key. | ||
* @param typeId The typeId of the *Type* of data to get. | ||
* @param period The period in milliseconds of the polling. | ||
*/ | ||
getData(typeId, from, to) { | ||
let query = ''; | ||
if (from) { | ||
query += '?from=' + from; | ||
} | ||
if (to) { | ||
query += '&to=' + to; | ||
} | ||
let urls = this.geohashes.map(hash => this.host + '/locations/' + hash + '/' + typeId + '/events' + query); | ||
return Rx_1.Observable | ||
.forkJoin(...urls.map(url => internal_utils_1.InternalUtils.getAsTemporalPage(url))); | ||
pollLatestData(typeId, period) { | ||
let urls = this.geohashes.map(hash => this.host + '/locations/' + hash + '/' + typeId + '/events'); | ||
return Observable_1.Observable | ||
.merge(...urls.map(url => internal_utils_1.InternalUtils.getAsTemporalPage(url) | ||
.switchMap(tpage => internal_utils_1.InternalUtils.getAsTemporalPage(tpage.link.next)) | ||
.sampleTime(period))); | ||
} | ||
@@ -50,3 +66,3 @@ /** | ||
let urls = this.geohashes.map(hash => this.host + '/locations/' + hash + '/' + typeId + '/events' + query); | ||
return Rx_1.Observable | ||
return Observable_1.Observable | ||
.merge(...urls.map(url => internal_utils_1.InternalUtils.getCompleteInterval(url))) | ||
@@ -58,2 +74,2 @@ .filter(page => Object.keys(page.data).length > 0) | ||
exports.LocationsClient = LocationsClient; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibG9jYXRpb25zLWNsaWVudC5qcyIsInNvdXJjZVJvb3QiOiJDOi9Vc2Vycy90ZHVwb250L1dvcmtzcGFjZXMvY290LWxpYi9saWIvIiwic291cmNlcyI6WyJjbGllbnRzL2xvY2F0aW9ucy1jbGllbnQudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7QUFBQSxnQ0FBcUM7QUFDckMsMkNBQXlDO0FBQ3pDLGtDQUErQjtBQUMvQixtQ0FBZ0M7QUFDaEMsaUNBQStCO0FBSS9CLHNEQUE0RDtBQUk1RDtJQUlJOzs7OztPQUtHO0lBQ0gsWUFBWSxJQUFZLEVBQUUsR0FBRyxTQUFtQjtRQUM1QyxJQUFJLENBQUMsSUFBSSxHQUFHLElBQUksQ0FBQztRQUNqQixJQUFJLENBQUMsU0FBUyxHQUFHLFNBQVMsQ0FBQztJQUMvQixDQUFDO0lBRUQ7Ozs7OztPQU1HO0lBQ0gsT0FBTyxDQUFDLE1BQWMsRUFBRSxJQUFhLEVBQUUsRUFBVztRQUM5QyxJQUFJLEtBQUssR0FBRyxFQUFFLENBQUM7UUFDZixFQUFFLENBQUMsQ0FBQyxJQUFJLENBQUMsQ0FBQyxDQUFDO1lBQ1AsS0FBSyxJQUFJLFFBQVEsR0FBRyxJQUFJLENBQUM7UUFDN0IsQ0FBQztRQUNELEVBQUUsQ0FBQyxDQUFDLEVBQUUsQ0FBQyxDQUFDLENBQUM7WUFDTCxLQUFLLElBQUksTUFBTSxHQUFHLEVBQUUsQ0FBQztRQUN6QixDQUFDO1FBQ0QsSUFBSSxJQUFJLEdBQUcsSUFBSSxDQUFDLFNBQVMsQ0FBQyxHQUFHLENBQUMsSUFBSSxJQUFJLElBQUksQ0FBQyxJQUFJLEdBQUcsYUFBYSxHQUFHLElBQUksR0FBR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9 |
@@ -1,6 +0,10 @@ | ||
import { Observable } from 'rxjs/Rx'; | ||
import { Observable } from 'rxjs/Observable'; | ||
import 'rxjs/add/observable/fromPromise'; | ||
import 'rxjs/add/observable/merge'; | ||
import 'rxjs/add/observable/of'; | ||
import 'rxjs/add/operator/catch'; | ||
import 'rxjs/add/operator/filter'; | ||
import 'rxjs/add/operator/map'; | ||
import 'rxjs/add/operator/sampleTime'; | ||
import 'rxjs/add/operator/switchMap'; | ||
import { TemporalPage, TemporalPageData } from '../types/temporal-page'; | ||
@@ -18,8 +22,7 @@ export declare class SourcesClient { | ||
/** | ||
* Returns latest data as an array of *TemporalPage* objects. | ||
* @param from {number=} Timestamp (UNIX UTC) from which to start the requested interval | ||
* @param to {number=} Timestamp (UNIX UTC) used to fill the *last link* in the *TemporalPage*. | ||
* @returns An Observable containing a *TemporalPage* object. | ||
* Poll for the latest data of each *Source* defined in the client. Every update will will immediatly | ||
* be sent through, hence it is mandatory to check the incoming data for the key. | ||
* @param period The period in milliseconds of the polling. | ||
*/ | ||
getData(from?: number, to?: number): Observable<TemporalPage[]>; | ||
pollLatestData(period: number): Observable<TemporalPage>; | ||
/** | ||
@@ -26,0 +29,0 @@ * Returns data as a single array of TemporalPageData objects. |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
const Rx_1 = require("rxjs/Rx"); | ||
const Observable_1 = require("rxjs/Observable"); | ||
require("rxjs/add/observable/fromPromise"); | ||
require("rxjs/add/observable/merge"); | ||
require("rxjs/add/observable/of"); | ||
require("rxjs/add/operator/catch"); | ||
require("rxjs/add/operator/filter"); | ||
require("rxjs/add/operator/map"); | ||
require("rxjs/add/operator/sampleTime"); | ||
require("rxjs/add/operator/switchMap"); | ||
const internal_utils_1 = require("../internal-utils"); | ||
@@ -20,19 +24,31 @@ class SourcesClient { | ||
} | ||
// /** | ||
// * Returns latest data as an array of *TemporalPage* objects. | ||
// * @param from {number=} Timestamp (UNIX UTC) from which to start the requested interval | ||
// * @param to {number=} Timestamp (UNIX UTC) used to fill the *last link* in the *TemporalPage*. | ||
// * @returns An Observable containing a *TemporalPage* object. | ||
// */ | ||
// getData(from?: number, to?: number): Observable<TemporalPage[]> { | ||
// let query = ''; | ||
// if (from) { | ||
// query += '?from=' + from; | ||
// } | ||
// if (to) { | ||
// query += '&to=' + to; | ||
// } | ||
// let urls = this.sourceIds.map(id => this.host + '/sources/' + id + '/events' + query); | ||
// return Observable | ||
// .forkJoin(...urls.map(url => _utils.getAsTemporalPage(url))); | ||
// } | ||
/** | ||
* Returns latest data as an array of *TemporalPage* objects. | ||
* @param from {number=} Timestamp (UNIX UTC) from which to start the requested interval | ||
* @param to {number=} Timestamp (UNIX UTC) used to fill the *last link* in the *TemporalPage*. | ||
* @returns An Observable containing a *TemporalPage* object. | ||
* Poll for the latest data of each *Source* defined in the client. Every update will will immediatly | ||
* be sent through, hence it is mandatory to check the incoming data for the key. | ||
* @param period The period in milliseconds of the polling. | ||
*/ | ||
getData(from, to) { | ||
let query = ''; | ||
if (from) { | ||
query += '?from=' + from; | ||
} | ||
if (to) { | ||
query += '&to=' + to; | ||
} | ||
let urls = this.sourceIds.map(id => this.host + '/sources/' + id + '/events' + query); | ||
return Rx_1.Observable | ||
.forkJoin(...urls.map(url => internal_utils_1.InternalUtils.getAsTemporalPage(url))); | ||
pollLatestData(period) { | ||
let urls = this.sourceIds.map(id => this.host + '/sources/' + id + '/events'); | ||
return Observable_1.Observable | ||
.merge(...urls.map(url => internal_utils_1.InternalUtils.getAsTemporalPage(url) | ||
.switchMap(tpage => internal_utils_1.InternalUtils.getAsTemporalPage(tpage.link.next)) | ||
.sampleTime(period))); | ||
} | ||
@@ -48,3 +64,3 @@ /** | ||
let urls = this.sourceIds.map(id => this.host + '/sources/' + id + '/events' + query); | ||
return Rx_1.Observable | ||
return Observable_1.Observable | ||
.merge(...urls.map(url => internal_utils_1.InternalUtils.getCompleteInterval(url))) | ||
@@ -56,2 +72,2 @@ .filter(page => Object.keys(page.data).length > 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LEtBQUssSUFBSSw4QkFBTSxDQUFDLGlCQUFpQixDQUFDLEtBQUssQ0FBQyxJQUFJLENBQUMsSUFBSSxDQUFDLENBQUM7YUFDN0QsVUFBVSxDQUFDLE1BQU0sQ0FBQyxDQUFDLENBQ3ZCLENBQUM7SUFDVixDQUFDO0lBRUQ7Ozs7O09BS0c7SUFDSCxlQUFlLENBQUMsSUFBWSxFQUFFLEVBQVU7UUFDcEMsSUFBSSxLQUFLLEdBQUcsUUFBUSxHQUFHLElBQUksR0FBRyxNQUFNLEdBQUcsRUFBRSxDQUFDO1FBQzFDLElBQUksSUFBSSxHQUFHLElBQUksQ0FBQyxTQUFTLENBQUMsR0FBRyxDQUFDLEVBQUUsSUFBSSxJQUFJLENBQUMsSUFBSSxHQUFHLFdBQVcsR0FBRyxFQUFFLEdBQUcsU0FBUyxHQUFHLEtBQUssQ0FBQyxDQUFDO1FBQ3RGLE1BQU0sQ0FBQyx1QkFBVTthQUNaLEtBQUssQ0FBQyxHQUFHLElBQUksQ0FBQyxHQUFHLENBQUMsR0FBRyxJQUFJLDhCQUFNLENBQUMsbUJBQW1CLENBQUMsR0FBRyxDQUFDLENBQUMsQ0FBQzthQUMxRCxNQUFNLENBQUMsSUFBSSxJQUFJLE1BQU0sQ0FBQyxJQUFJLENBQUMsSUFBSSxDQUFDLElBQUksQ0FBQyxDQUFDLE1BQU0sR0FBRyxDQUFDLENBQUM7YUFDakQsR0FBRyxDQUFDLElBQUksSUFBSSxJQUFJLENBQUMsSUFBSSxDQUFDLENBQUM7SUFDaEMsQ0FBQztDQUVKO0FBakVELHNDQWlFQyJ9 |
import { AxiosResponse } from 'axios'; | ||
import { Observable } from 'rxjs/Observable'; | ||
import 'rxjs/add/operator/do'; | ||
import 'rxjs/add/operator/expand'; | ||
import 'rxjs/add/operator/takeWhile'; | ||
import { TemporalPage, TemporalPageLink } from './types/temporal-page'; | ||
@@ -4,0 +7,0 @@ export declare class InternalUtils { |
@@ -5,2 +5,5 @@ "use strict"; | ||
const Observable_1 = require("rxjs/Observable"); | ||
require("rxjs/add/operator/do"); | ||
require("rxjs/add/operator/expand"); | ||
require("rxjs/add/operator/takeWhile"); | ||
class InternalUtils { | ||
@@ -89,2 +92,2 @@ /** | ||
exports.InternalUtils = InternalUtils; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW50ZXJuYWwtdXRpbHMuanMiLCJzb3VyY2VSb290IjoiQzovVXNlcnMvdGR1cG9udC9Xb3Jrc3BhY2VzL2NvdC1saWIvbGliLyIsInNvdXJjZXMiOlsiaW50ZXJuYWwtdXRpbHMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7QUFBQSxpQ0FBMEI7QUFFMUIsZ0RBQTZDO0FBSTdDO0lBQ0k7Ozs7O09BS0c7SUFDSCxNQUFNLENBQUMsaUJBQWlCLENBQUMsUUFBdUI7UUFDNUMsRUFBRSxDQUFDLENBQUMsUUFBUSxDQUFDLE9BQU8sQ0FBQyxJQUFJLENBQUMsQ0FBQyxDQUFDO1lBRXhCLE1BQU0sQ0FBQztnQkFDSCxJQUFJLEVBQUUsUUFBUSxDQUFDLElBQUk7Z0JBQ25CLElBQUksRUFBRSxJQUFJLENBQUMsZUFBZSxDQUFDLFFBQVEsQ0FBQyxPQUFPLENBQUMsSUFBSSxDQUFDO2FBQ3BELENBQUE7UUFDTCxDQUFDO1FBQ0QsSUFBSSxDQUFDLENBQUM7WUFDRixNQUFNLElBQUksS0FBSyxDQUFDLGlGQUFpRixDQUFDLENBQUM7UUFDdkcsQ0FBQztJQUNMLENBQUM7SUFHRDs7OztPQUlHO0lBQ0gsTUFBTSxDQUFDLGVBQWUsQ0FBQyxLQUFhO1FBQ2hDLElBQUksS0FBSyxHQUFRLEVBQUUsQ0FBQztRQUNwQixLQUFLLENBQUMsS0FBSyxDQUFDLEdBQUcsQ0FBQyxDQUFDLE9BQU8sQ0FBQyxJQUFJO1lBQ3pCLElBQUksS0FBSyxH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NDLE1BQU0sQ0FBQyxJQUFJLENBQUMsaUJBQWlCLENBQUMsSUFBSSxHQUFDLElBQUksQ0FBQyxDQUFDO1FBQzdDLENBQUM7UUFDRCxJQUFJLENBQUMsQ0FBQztZQUNGLE1BQU0sQ0FBQyxJQUFJLENBQUMsaUJBQWlCLENBQUMsSUFBSSxHQUFDLEtBQUssQ0FBQyxJQUFJLENBQUMsTUFBTSxDQUFDLENBQUMsQ0FBQztRQUMzRCxDQUFDO0lBQ0wsQ0FBQztDQUNKO0FBdkZELHNDQXVGQyJ9 |
@@ -28,3 +28,3 @@ import { Observable } from 'rxjs/Observable'; | ||
*/ | ||
static collectOne(observable: Observable<TemporalPageData>, callback: (data: TemporalPageData) => any, error?: (error: Error) => any): void; | ||
static collectOne(observable: Observable<TemporalPageData>, callback: (data: TemporalPageData) => void, error?: (error: Error) => any): void; | ||
/** | ||
@@ -43,3 +43,3 @@ * This utility method will subscribe to an *Observable\<TemporalPageData>* and collect the results | ||
*/ | ||
static collectMany(observable: Observable<TemporalPageData>, callback: (data: TemporalPageData[]) => any, error?: (error: Error) => any): void; | ||
static collectMany(observable: Observable<TemporalPageData>, callback: (data: TemporalPageData[]) => void, error?: (error: Error) => any): void; | ||
/** | ||
@@ -46,0 +46,0 @@ * Encodes a latitude-longitude point as a geohash with the given precision. |
@@ -88,2 +88,22 @@ "use strict"; | ||
} | ||
// /** | ||
// * This utility method will subscribe to an *Observable\<TemporalPageData>* and send every update to the handler method. | ||
// * An optional *error* handler is called with the Error object, if one occurs. | ||
// * @param observable The observable to subscribe to. | ||
// * @param handler The handler function to be called on each update. | ||
// * @param error The callback function to call when an error occurs. | ||
// */ | ||
// static pollAsPromise(observable: Observable<TemporalPage>, handler: (data: TemporalPage) => void, error?: (error: Error) => void): void { | ||
// observable.subscribe( | ||
// next => handler(next), | ||
// err => { | ||
// if (error) { | ||
// error(err); | ||
// } | ||
// else { | ||
// console.error(err); | ||
// } | ||
// } | ||
// ); | ||
// } | ||
/* Geohash ut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sTUFBTSxDQUFDLE9BQU8sQ0FBQyxDQUFDO0lBQ3BDLENBQUM7Q0FFSjtBQXhJRCxvQkF3SUMifQ== |
{ | ||
"name": "cot-lib", | ||
"version": "1.0.5", | ||
"version": "1.1.0", | ||
"description": "Easily consume the City of Things platform data", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
@@ -224,2 +224,3 @@ The City of Things client library will help you to connect to the City of Things backend. It uses the Web Linking RFC 5988 and interprets the Link header for you. This way you can let the library follow the next/prev/last pages for you. | ||
<!-- | ||
### cotClient.getData(sourceId: *string*, from?: *number*, to?: *number*): *Observable\<TemporalPage>* | ||
@@ -229,5 +230,9 @@ Returns an Observable containing a *TemporalPage* object with data from a **Source** defined by a given sourceId. Results vary according to parameters: | ||
* If **from** and/or **to** specified: from *TemporalPage* is returned (*last link* will be present if **to** is also specified). | ||
*The arguments **from** and **to** are UNIX (UTC) timestamps.* | ||
--> | ||
### cotClient.pollLatestData(sourceId: *string*, period: *number*): *Observable\<TemporalPage>* | ||
Continuously poll for the latest data from a *Source* defined by a given **sourcId**. The **period** field is the time in milliseconds in between polling for new values. | ||
### cotClient.getDataInterval(sourceId: *string*, from: *number*, to: *number*): *Observable\<TemporalPageData>* | ||
@@ -240,2 +245,3 @@ Returns an Observable containing a *TemporalPageData* object with data from a **Source** defined by a given sourceId. The *TemporalPageData* contains the aggregated interval. This method automatically calls the necessary subsequent requests. On every response, the Observable calls its *next handler* with the newly received data. It is up to the developer to listen for this incoming data and update the already received data. | ||
<!-- | ||
### cotClient.getDataIn(geohash: *string*, typeId: *string*, from?: *number*, to?: *number*): *Observable\<TemporalPage>* | ||
@@ -247,3 +253,7 @@ Returns an Observable containing a *TemporalPage* object with data from **Sources** belonging to a given typeId, within the given geohash. Results vary according to parameters: | ||
*The arguments **from** and **to** are UNIX (UTC) timestamps.* | ||
--> | ||
### cotClient.pollLatestDataIn(geohash: *string*, typeId: *string*, period: *number*): *Observable\<TemporalPage>* | ||
Continuously poll for the latest data in a location, defined by the **geohash** and belonging to a given **typeId**. The **period** field is the time in milliseconds in between polling for new values. | ||
### cotClient.getDataIntervalIn(geohash *string*, typeId: *string*, from: *number*, to: *number*): *Observable\<TemporalPageData>* | ||
@@ -269,2 +279,3 @@ Returns an Observable containing a *TemporalPageData* object with data from **Sources** belonging to a given typeId, within the given geohash. The *TemporalPageData* contains the aggregated interval. This method automatically calls the necessary subsequent requests. On every response, the Observable calls its *next handler* with the newly received data. | ||
<!-- | ||
### sourcesClient.getData(from?: *number*, to?: *number*): *Observable\<TemporalPage[]>* | ||
@@ -276,3 +287,7 @@ Returns an Observable containing an array of *TemporalPage* objects, each with data from a **Source** defined by the registered sourceIds of this sourceClient. Results vary according to parameters: | ||
*The arguments **from** and **to** are UNIX (UTC) timestamps.* | ||
--> | ||
### sourcesClient.pollLatestData(period: *number*): *Observable\<TemporalPage>* | ||
Poll for the latest data of each *Source* defined in the client. The **period** field is the time in milliseconds in between polling for new values. Every update will immediatly be sent through, hence it is mandatory to check the incoming data for the key. | ||
### sourcesClient.getDataInterval(sourceId: *string*, from: *number*, to: *number*): *Observable\<TemporalPageData>* | ||
@@ -292,2 +307,3 @@ Returns an Observable containing a *TemporalPageData* object with data from all **Source** defined by the registered sourceIds of this sourcesClient. The *TemporalPageData* contains the aggregated interval. This method automatically calls the necessary subsequent requests. On every response, the Observable calls its *next handler* with the newly received data. | ||
<!-- | ||
### locationsClient.getData(typeId: *string*, from?: *number*, to?: *number*): *Observable\<TemporalPage[]>* | ||
@@ -299,4 +315,9 @@ Returns an Observable containing an array of *TemporalPage* objects, each with data from a location defined by the registered geohashes of this locationsClient. Because of the sheer amount of data, a typeId must be given to limit the results to *Sources* from this *Type*. Results vary according to parameters: | ||
*The arguments **from** and **to** are UNIX (UTC) timestamps.* | ||
--> | ||
### locationsClient.getDataInterval(sourceId: *string*, from: *number*, to: *number*): *Observable\<TemporalPageData>* | ||
### locationsClient.pollLatestData(typeId: *string* period: *number*): *Observable\<TemporalPage>* | ||
Poll for the latest data from each location, defined in the client by geohashes, filtered by the *Type* given by the **typeId** arugment. The **period** field is the time in milliseconds in between polling for new values. Every update will immediatly be sent through, hence it is mandatory to check the incoming data for the key. | ||
### locationsClient.getDataInterval(typeId: *string*, from: *number*, to: *number*): *Observable\<TemporalPageData>* | ||
Returns an Observable containing a *TemporalPageData* object with data from all locations defined by the registered geohashes of this locationsClient. Because of the sheer amount of data, a typeId must be given to limit the results to *Sources* from this *Type*. The *TemporalPageData* contains the aggregated interval. This method automatically calls the necessary subsequent requests. On every response, the Observable calls its *next handler* with the newly received data. | ||
@@ -339,3 +360,3 @@ | ||
### Util.collectOne(observable: *Observable\<TemporalPageData>*, callback: *(data: TemporalPageData) => any*, error?: (error: Error) => any*): *void* | ||
### Util.collectOne(observable: *Observable\<TemporalPageData>*, callback: *(data: TemporalPageData) => void*, error?: *(error: Error) => void*): *void* | ||
This utility method will subscribe to an *Observable\<TemporalPageData>* and collect the results that are sent through on each update of the next handler. Once it is complete, the *callback* handler will be called with the complete collected data as an argument. An optional *error* handler is called with the Error object, if one occurs. | ||
@@ -361,3 +382,3 @@ | ||
### Util.collectMany(observable: *Observable\<TemporalPageData>*, callback: *(data: TemporalPageData[]) => any*, error?: (error: Error) => any*): *void* | ||
### Util.collectMany(observable: *Observable\<TemporalPageData>*, callback: *(data: TemporalPageData[]) => void*, *error?: (error: Error) => void*): *void* | ||
This utility method will subscribe to an *Observable\<TemporalPageData>* and collect the results that are sent through on each update of the next handler for each endpoint. It will send these updates as an array of *TemporalPageData* objects. Once it is complete, the *callback* handler will be called with the complete collected data as an argument, this is again an array of *TemporalPageData* objects, as many as there are registered sourceIds for a *SourcesClient* or geohashes for a *LocationsClient*. An optional *error* handler is called with the Error object, if one occurs. | ||
@@ -364,0 +385,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
122551
1512
393