UNPKG

baasic-sdk-javascript

Version:

JavaScript SDK provides core functionality for building web and mobile applications on [Baasic](http://www.baasic.com/).

37 lines (36 loc) 1.72 kB
/** * @module lookupClient * @description Lookup Client provides an easy way to consume Lookup REST API end-points. In order to obtain needed routes `lookupClient` uses `lookupRoute`. */ import { IGetRequestOptions } from '../../common/contracts'; import { ILookup } from './contracts'; import { LookupRoute } from './'; import { ApiClient, IHttpResponse } from '../../httpApi'; export declare class LookupClient { protected lookupRoute: LookupRoute; protected apiClient: ApiClient; private utility; readonly routeDefinition: LookupRoute; constructor(lookupRoute: LookupRoute, apiClient: ApiClient); private getResponseData; /** * Returns a promise that is resolved once the get action has been performed. Success response returns the lookup resources. * @method * @param options Options object that contains comma separated list of related resources to be contained within the current representation. * @returns A promise that is resolved once the get action has been performed. * @example lookupClient.get() .then(function (data) { // perform success action here }, function (response, status, headers, config) { // perform error handling here }); **/ get(options?: IGetRequestOptions): PromiseLike<IHttpResponse<ILookup>>; } /** * @overview ***Notes:** - Refer to the [Baasic REST API](http://dev.baasic.com/api/reference/home) for detailed information about available Baasic REST API end-points. - All end-point objects are transformed by the associated route service. */