Write a short description
Extension to get trivia quiz data from Open Trivia DB API, a free to use, user-contributed trivia question database.
Add a picture of all the blocks
Write instructions to use your extension
Get Trivia Quiz data by specified number of questions, category, difficulty and type. Use property blocks to set category, difficulty, type and token. Token is optional. If you want to API not to repeat the questions then use token so that for your token it will not repeat the responses.
Use get token block to generate a unique token.
You can set category 0 to get response from random category
Set difficulty and type as empty string to get random D & T
Set token as empty string to get response without token
If API reached end of responses for your token then you can either reset the existing token or generate a new token.
You can get the available categories and category IDs by using this block. Category ID is required to get data from respective category while using block GetTriviaQuiz.
GotTriviaQuiz will return list of questions, correct answers and incorrect answers. It also returns the original JSON response.
ErrorOccurred event will raise response code if any error occurres.
Following are the response codes and respective error message from Open Trivia DB.
Download
TriviaQuiz.aix (16.0 KB)
Test.aia (17.5 KB)