@mega-yfue/eufy-sdk / tuya / sendApiRequest
Function: sendApiRequest()
ts
function sendApiRequest<T>(params, opts?): Promise<TuyaEnvelope<T>>;Form-encode a param map and POST it to api.json, returning the parsed TuyaEnvelope. The body is application/x-www-form-urlencoded (Tuya rejects JSON here).
Type Parameters
T
T = unknown
Parameters
params
Record<string, string>
opts?
SendOptions = {}
Returns
Promise<TuyaEnvelope<T>>