JTrivia is a trivia API that provides trivia questions, categories, and other related data. Data is populated with the help of jService API.
Clone the repository:
git clone https://github.com/JD499/jtrivia.git
Navigate to the project directory:
cd jtrivia
Install the required dependencies:
./gradlew build
Run the application:
./gradlew bootRun
Fetch trivia clues based on various parameters.
Parameters:
value
(int): The value of the clue in dollars.category
(int): The ID of the category you want to return.min_date
(date): Earliest date to show, based on original air date.max_date
(date): Latest date to show, based on original air date.offset
(int): Offsets the returned clues. Useful for pagination.
Retrieve random trivia clues.
Parameters:
count
(int): Amount of clues to return. Limited to 100 at a time.
Fetch random final jeopardy questions. Note: All final jeopardy questions have a null value.
Parameters:
count
(int): Amount of clues to return. Limited to 100 at a time.
Get a list of trivia categories.
Parameters:
count
(int): Amount of categories to return. Limited to 100 at a time.offset
(int): Offsets the starting ID of categories returned. Useful for pagination.
Retrieve a specific category by its ID, along with its associated clues.
Parameters:
id
(int): The ID of the category to return. This parameter is required.
To configure the application for different environments, modify the application.properties
file. Ensure sensitive data like database credentials are stored securely using environment variables or other secure methods.
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.