No description
Find a file
2023-11-04 14:08:29 +11:00
.github/workflows Docs are now built via CI 2023-11-04 14:08:29 +11:00
src Cleaned up docs 2022-07-04 10:49:05 +10:00
config.nims More idomatic (now that I am less idiotic) 2021-12-19 21:29:01 +11:00
LICENSE fixed wipe 2020-08-22 12:28:02 +10:00
opentdb.nimble Cleaned up docs 2022-07-04 10:49:05 +10:00
readme.md Docs are now built via CI 2023-11-04 14:08:29 +11:00

This is a simple sync/async wrapper around The Open Trivia Database which is an api to get trivia questions from a variety of categories in multiple choice or true/false fashion

Docs available here

install through nimble

nimble install opentdb

Example

import opentrivadb

let client = newHttpClient()
echo client.getQuestions() # Gets 10 questions and prints them out

let asyncClient = newAsyncHttpClient()
let questions = waitFor client.getQuestions()
for question in questions:
  echo question.question

make sure to enable ssl when running