UNPKG

node-groupme

Version:

The only GroupMe API library that isn't a million years old.

29 lines 891 B
import { Response } from 'node-fetch'; import type { Client } from '..'; declare type HttpMethod = 'GET' | 'POST' | 'DELETE'; declare type RequestOptions = { query?: Record<string, unknown>; body?: unknown; }; export default class RESTManager { static URLS: { v4: string; v3: string; v2: string; }; client: Client; private generator; constructor(client: Client); api<T>(method: HttpMethod, path: string, data?: RequestOptions, options?: { version: keyof typeof RESTManager.URLS; }): Promise<T>; api(method: HttpMethod, path: string, data: RequestOptions, options: { skipJsonParse: true; }): Promise<Response>; api<T>(method: HttpMethod, path: string, data: RequestOptions, options: { allowNull: true; }): Promise<T | null>; guid(): string; } export {}; //# sourceMappingURL=rest.d.ts.map