UNPKG

@trivia-api/fetch

Version:

Functions to fetch data from The Trivia API.

15 lines (14 loc) 563 B
import { TranslatedLanguage, V2Question } from "@trivia-api/models"; export type GetQuestionByIdParams = { id: V2Question["id"]; apiKey?: string; language?: TranslatedLanguage; }; /** * Get a question by its ID * @param params * @param params.id - ID of the question to get * @param params.apiKey - API key to use for the request * @param params.language - Language to receive the question in. Defaults to English. */ export declare const getQuestionById: ({ apiKey, id, language }: GetQuestionByIdParams, host?: string) => Promise<V2Question>;