node-hue-api
Version:
Philips Hue API Library for Node.js
27 lines (26 loc) • 1.46 kB
TypeScript
import { Api } from '../Api';
import { HueApiRateLimits } from '../HueApiRateLimits';
export declare class LocalBootstrap {
readonly baseUrl: URL;
readonly hostname: string;
readonly rateLimits: HueApiRateLimits;
/**
* Create a Local Network Bootstrap for connecting to the Hue Bridge. The connection is ALWAYS over TLS/HTTPS.
*
* @param {String} hostname The hostname or ip address of the hue bridge on the local network.
* @param {number=} port The port number for the connections, defaults to 443 and should not need to be specified in the majority of use cases.
*/
constructor(hostname: string, rateLimits: HueApiRateLimits, port?: number);
/**
* Connects to the Hue Bridge using the local network.
*
* The connection will perform checks on the Hue Bridge TLS Certificate to verify it is correct before sending any
* sensitive information.
*
* @param {String=} username The username to use when connecting, can be null, but will severely limit the endpoints that you can call/access
* @param {String=} clientkey The clientkey for the user, used by the entertainment API, can be null
* @param {Number=} timeout The timeout for requests sent to the Hue Bridge. If not set will default to 20 seconds.
* @returns {Promise<Api>} The API for interacting with the hue bridge.
*/
connect(username?: string, clientkey?: string, timeout?: number): Promise<Api>;
}