TriviaAPI is a RESTApi that provides 5 trivia's from OpenTriviaDB client. And in addition prevents the corrects answer from being exposed in the JSON response
- send request to /questions endpoint
- receive 5 trivias
- post submitted answer to /getanswer in the following JSON structure:
{
"question": "What year is it?",
"submitted_answer": "2021"
}
- receive back answer result & correct answer:
{
"correct_answer": "2021",
"answered_correct": true
}
- ✨Magic ✨
Standalone
- git checkout 7b794dbffe62d4ac8f2273bb69c7d280f311ab6d
- Navigate to pom.xml
- Execute
mvn spring-boot:run
*Note that the endpoints in this commithash are http://localhost:8080/questions & http://localhost:8080/getanswer
For the entire application to run including an API Gateway & a discovery service
- First run the DescoveryService
- Then the API Gateway
- And lastly The TriviaAPI server
This API is part of a bigger project which includes the frontend (which is still in development) For frontend documentation visit https://github.com/1eam/TriviaAPI_Frontend
none
Free Software :D