UNPKG

sv443-joke-api

Version:
21 lines (20 loc) 641 B
import { Response } from "node-fetch"; import { LanguageCode, ResponseFormat } from "../types"; export interface BaseRequestOptions { /** * Type of the response */ format?: ResponseFormat; /** * Language to use in the response */ lang?: LanguageCode; } /** * Makes a request to the API * * @param {string} routeName Route of the request * @param {object} params Parameters to pass in the request */ export declare function makeRequestToApi(routeName: string, params?: object): Promise<object | Response>; export declare function handleResponseInternally(request: Promise<Response>): Promise<object>;