UNPKG

@evolvejs/core

Version:

An advanced Discord API wrapper with TS and JS support

24 lines (23 loc) 743 B
import { EvolveClient } from "../.."; /** * RestAPIHandler * A promise based queued rest api handler * @param client Your EvolveClient * @param endpoint The endpoint from which to fetch */ export declare class RestAPIHandler { private _cooldown; private _queue; private _endpoint; private _client; constructor(client: EvolveClient, endpoint: string); get active(): boolean; get<T>(id?: string): Promise<T>; put<T>(json: object | string, id?: string): Promise<T>; delete(id?: string): Promise<void>; post<T>(json: object | string, id?: string): Promise<T>; patch<T>(json: object | string, id?: string): Promise<T>; private _fetch; dequeueAll(): void; static globalTimeout: number; }