UNPKG

@viguza/homebridge-ezviz

Version:

A short description about what your plugin does.

13 lines (12 loc) 686 B
import { Method } from 'axios'; import { EZVIZConfig } from '../types/config.js'; /** * Send a generic api request * @param {EZVIZConfig} config The config used to authenticate request * @param {string} hostname The base uri to send the request * @param {string} endpoint The endpoint to send the request * @param {Method} method Usually 'GET' or 'POST' * @param {ResponseType} type The type of return object (Usually 'json') * @param {object} data The body of the request or null if a 'GET' */ export declare function sendRequest<T>(config: EZVIZConfig, hostname: string, endpoint: string, method: Method, data?: string, retries?: number): Promise<T>;