UNPKG

@marceloclp/monzojs

Version:

Unofficial wrapper for the Monzo API written in TypeScript.

20 lines (19 loc) 702 B
import { StringifiableRecord } from 'query-string'; export declare class Fetcher { private headers; private body?; private query?; constructor(accessToken: string); static buildUrl(path: string, query?: StringifiableRecord): string; withFormData<P extends {} = Object>(data: P): this; withJSON(data: Object): this; withQuery(query: StringifiableRecord): this; private fetch; get<R>(path: string): Promise<R>; post<R>(path: string): Promise<R>; put<R>(path: string): Promise<R>; patch<R>(path: string): Promise<R>; delete<R>(path: string): Promise<R>; } declare const createRequest: (accessToken: string) => Fetcher; export default createRequest;