node-hue-api
Version:
Philips Hue API Library for Node.js
64 lines (63 loc) • 2.27 kB
TypeScript
import { Remote } from './Remote';
import { Cache } from './Cache';
import { ConfigParameters, HueApiConfig } from './HueApiConfig';
import { RemoteApi } from './http/RemoteApi';
import { Transport } from './http/Transport';
import { Capabilities } from './Capabilities';
import { Configuration } from './Configuration';
import { Groups } from './Groups';
import { Lights } from './Lights';
import { ResourceLinks } from './ResourceLinks';
import { Rules } from './Rules';
import { Scenes } from './Scenes';
import { Schedules } from './Schedules';
import { Sensors } from './Sensors';
import { Users } from './Users';
import { model } from '@peter-murray/hue-bridge-model';
import { HueApiRateLimits } from './HueApiRateLimits';
type Light = model.Light;
export declare class Api {
private readonly _config;
readonly rateLimitConfig: HueApiRateLimits;
private _api;
private _syncPromise?;
private _lastSyncTime;
private _state?;
constructor(config: ConfigParameters, transport: Transport, rateLimits: HueApiRateLimits, remote?: RemoteApi);
get capabilities(): Capabilities;
get configuration(): Configuration;
get lights(): Lights;
get groups(): Groups;
get sensors(): Sensors;
get schedules(): Schedules;
get scenes(): Scenes;
get users(): Users;
get rules(): Rules;
get resourceLinks(): ResourceLinks;
/**
* Obtains the remote API endpoints, this will only be present if you have a remote connection established.
*/
get remote(): Remote | undefined;
/**
* Obtains the previously cached state that was obtained from the bridge.
*/
getCachedState(): Promise<Cache | undefined>;
/**
* Checks to see if the API is still syncing with the Hue bridge.
*/
isSyncing(): boolean;
/**
* The timestamp of the last sync for the cached state.
*/
getLastSyncTime(): number;
/**
* Performs an async synchronization activity with the hue bridge to cache the state of things like lights, etc...
*/
syncWithBridge(): void;
getLightDefinition(id: number | string): Promise<Light | undefined>;
get name(): string;
_getConfig(): HueApiConfig;
_getTransport(): Transport;
_getRemote(): RemoteApi;
}
export {};