Trivia API Fetch Client
Functions to fetch data from The Trivia API.
Installation
Install with npm install @trivia-api/fetch
.
Usage
Functions
getQuestions
import { getQuestions } from "@trivia-api/fetch";
getQuestions({ limit: 5 }).then((questions) => {
});
searchQuestions
import { searchQuestions } from "@trivia-api/fetch";
searchQuestions({ freetext: "france" }).then((questions) => {
});
getMetadata
import { getMetadata } from "@trivia-api/fetch";
getMetadata().then((metadata) => {
});
getTags
import { getTags } from "@trivia-api/fetch";
getTags().then((tags) => {
});