revolut-sdk
Version:
SDK for Revolut API
13 lines (12 loc) • 758 B
TypeScript
import { AxiosError, AxiosInstance, AxiosRequestConfig } from 'axios';
import { Option } from 'fp-ts/lib/Option';
import { TaskEither } from 'fp-ts/lib/TaskEither';
export default class API {
private client;
constructor(client: AxiosInstance);
protected fetch: <T>(url: string, config?: AxiosRequestConfig | undefined) => TaskEither<AxiosError, Option<T>>;
protected post: <T>(url: string, data?: object | undefined) => TaskEither<AxiosError, Option<T>>;
protected put: <T>(url: string, data?: any, axiosReqConfig?: AxiosRequestConfig | undefined) => TaskEither<AxiosError, Option<T>>;
protected delete: (url: string, axiosReqConfig?: AxiosRequestConfig | undefined) => TaskEither<AxiosError, Option<any>>;
private handleError;
}