UNPKG

@rpidanny/nepse.js

Version:

Fetch stock data from Nepal Stock Exchange

20 lines (19 loc) 978 B
import { Got, HTTPAlias, OptionsOfJSONResponseBody, RequiredRetryOptions, Response } from 'got'; import { Delays } from 'got/dist/source/core/utils/timed-out'; import { IGenericClient } from './interfaces'; export declare abstract class GenericClient implements IGenericClient { private got; protected abstract readonly endpoint: string; private gotInstance; private gotInstanceWithAuth; constructor(got: Got); private getBaseGotConfig; protected getAuthHeader(): Promise<string>; private addAuthorizationHeader; getGotInstance(): Promise<Got>; getGotInstanceWithAuth(): Promise<Got>; call<T>(method: HTTPAlias, url: string, options?: OptionsOfJSONResponseBody): Promise<Response<T>>; callWithAuth<T>(method: HTTPAlias, url: string, options?: OptionsOfJSONResponseBody): Promise<Response<T>>; protected getTimeoutConfig(): Delays | number; protected getRetryConfig(): undefined | Partial<RequiredRetryOptions> | number; }