UNPKG

camstreamerlib

Version:

Helper library for CamStreamer ACAP applications.

16 lines (15 loc) 1.26 kB
import { THttpRequestOptions, TProxyParams } from '../types/common'; import { ProxyClient } from './ProxyClient'; import { IClient, TBlobResponse, TParameters, TResponse } from './types'; export declare class BasicAPI<Client extends IClient<TResponse, any>> { protected client: Client; constructor(client: Client); getClient(proxyParams?: TProxyParams): Client | ProxyClient<Client>; protected _getJson(path: string, parameters?: TParameters, options?: THttpRequestOptions): Promise<any>; protected _getText(path: string, parameters?: TParameters, options?: THttpRequestOptions): Promise<string>; protected _getBlob(path: string, parameters?: TParameters, options?: THttpRequestOptions): Promise<TBlobResponse<Client>>; private parseBlobResponse; protected _post(path: string, data: string | Parameters<Client['post']>[0]['data'], parameters?: TParameters, options?: THttpRequestOptions, headers?: Record<string, string>): Promise<any>; protected _postJsonEncoded(path: string, data: string | Parameters<Client['post']>[0]['data'], parameters?: TParameters, options?: THttpRequestOptions): Promise<TResponse>; protected _postUrlEncoded(path: string, data: TParameters, options?: THttpRequestOptions): Promise<TResponse>; }