waterbase
Version:
SDK for waterbase-server
44 lines (43 loc) • 957 B
TypeScript
import { WaterbaseConfig } from './models/Config';
declare class Client {
endpoint: String;
headers: any;
constructor(config: WaterbaseConfig);
/**
* Set secret key
*
* @param string value
*
* @return self
*/
setKey(value: string): this;
/**
* Set the endpoint
*
* @param endpoint
*
* @return this
*/
setEndpoint(endpoint: string): this;
/**
* Adds a header for the http request
*
* @param key string
*
* @param value string
*/
addHeader(key: string, value: string): this;
/**
* Makes the call to the server a lot easier
*
* @param method string
*
* @param path string
*
* @param headers object
*
* @param params object
*/
call(method: string, path?: string, headers?: object, params?: {}): Promise<any>;
}
export default Client;