import { Observable } from 'rxjs/Observable'; import { AxiosInstance } from 'axios'; import { NamedData, TemporalPage } from '../types'; export declare class LayerClient { private host; private ax; private cityId; constructor(host: string, axiosInstance: AxiosInstance, cityId: string); /** * Get layer data of the requested metric. * @param metric Metric of the data for the layer */ getLayer(metric: string): IDataLayer; } /** * Methods for retrieving data Layers */ export interface IDataLayer { /** * Returns data for the hour in which the timestamp falls. * @param hourTS The UTC timestamp of single hour * @see Util.Time.timestampOf to easily create a UTC timestamp */ getHour: (hourTS: number) => Observable; /** * Returns data for a range of hours, as requested. * @param fromTS The UTC timestamp of a single hour to start the range from * @param toTS The UTC timestamp of a single hour to end the range with * @see Util.Time.timestampOf to easily create a UTC timestamp */ getHourRange: (fromTS: number, toTS: number) => Observable; /** * Returns data for a recap of the given range of hours. * A recap treats the total range as if it were one hour (weighted mean). * @param fromTS The UTC timestamp of a single hour to start the range from * @param toTS The UTC timestamp of a single hour to end the range with * @see Util.Time.timestampOf to easily create a UTC timestamp */ getHourRecap: (fromTS: number, toTS: number) => Observable; /** * Returns data for a recap of the given hour timestamps. * A recap treats the total range as if it were one hour (weighted mean). * @param hourTS All timestamps representing the hours to get a recap from * @see Util.Time.timestampOf to easily create a UTC timestamp */ getHourRecapOf: (...hourTS: number[]) => Observable; /** * Returns data for the day in which the timestamp falls. * @param dayTS The UTC timestamp of single day * @see Util.Time.timestampOf to easily create a UTC timestamp */ getDay: (dayTS: number) => Observable; /** * Returns data for a range of days, as requested. * @param fromTS The UTC timestamp of a single day to start the range from * @param toTS The UTC timestamp of a single day to end the range with * @see Util.Time.timestampOf to easily create a UTC timestamp */ getDayRange: (fromTS: number, toTS: number) => Observable; /** * Returns data for a recap of the given range of days. * A recap treats the total range as if it were one dat (weighted mean). * @param fromTS The UTC timestamp of a single day to start the range from * @param toTS The UTC timestamp of a single day to end the range with * @see Util.Time.timestampOf to easily create a UTC timestamp */ getDayRecap: (fromTS: number, toTS: number) => Observable; /** * Returns data for a recap of the given day timestamps. * A recap treats the total range as if it were one day (weighted mean). * @param dayTS All timestamps representing the days to get a recap from * @see Util.Time.timestampOf to easily create a UTC timestamp */ getDayRecapOf: (...dayTS: number[]) => Observable; }