UNPKG

@trivia-api/fetch

Version:

Functions to fetch data from The Trivia API.

20 lines (19 loc) 710 B
import { V2Quiz } from "@trivia-api/models"; export interface GetQuizParams { apiKey?: string; id: string; language?: string; } /** * Creates a quiz, allowing you to group questions together and present the same * set of questions to multiple users. * * @param params - Parameters for creating a quiz * @param params.apiKey - API key with access to sessions * @param params.title - Title of the quiz * @param params.questionIds - IDs of the questions to include in the quiz * @param host - Optional parameter to send to a different API host * * @returns ID of the created quiz */ export declare const getQuiz: ({ apiKey, id, language }: GetQuizParams, host?: string) => Promise<V2Quiz>;