mirror of
https://github.com/ire4ever1190/nim-opentmdb
synced 2026-01-14 19:21:32 +00:00
No description
| .github/workflows | ||
| src | ||
| config.nims | ||
| LICENSE | ||
| opentdb.nimble | ||
| readme.md | ||
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
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