Skip to content

1eam/Trivia_API

Repository files navigation

Trivia API

The Last Trivia API, Ever

drawing

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

Usage:

  • 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 ✨

Run

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

About Application

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

License

none

Free Software :D

Releases

No releases published

Packages

No packages published

Languages