@trivia-api/models
Version:
Models for The Trivia API.
40 lines (39 loc) • 1.26 kB
TypeScript
import { V1Category } from "./Category";
/**
* The base question type that all V1 questions extend from.
*/
export type BaseV1Question = {
/**
* The primary category of the questions
*/
category: V1Category;
/**
* Unique identifier for the question
*/
id: string;
/**
* Secondary categories for the question. More freeform than
* category (can take any value), and can have multiple tags
* per question.
*/
tags: string[];
/**
* How difficult the question is perceived to be by the moderators of the API.
*/
difficulty: "easy" | "medium" | "hard";
/**
* If the question is regional (i.e. only reasonable to ask people
* from a particular set of countries), then the ISO 3166-1 alpha-2 country
* codes for those countries are specified here.
*
* https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements
*
* If there is no region set then this question will be returned for all regions.
*/
regions?: string[];
/**
* Will be true if the question is a niche question, i.e. if it is considered too difficult to
* return unless the tag is specifically requested.
*/
isNiche: boolean;
};