Welcome to the Quotes API project! This project is designed to showcase the creation of a simple API for managing quotes using Spring Boot.
This project demonstrates the creation of a RESTful API for managing quotes. The API is built using Spring Boot and utilizes an SQL database to store quotes. It provides endpoints to retrieve, create, update, delete, and even retrieve random quotes.
- Retrieve a list of all quotes.
- Create a new quote.
- Update an existing quote.
- Delete a quote.
- Retrieve a random quote.
- GET /api/quotes: Retrieve a list of all quotes.
- GET /api/quotes/{id}: Retrieve a specific quote by ID.
- POST /api/quotes: Create a new quote.
- PUT /api/quotes/{id}: Update an existing quote.
- DELETE /api/quotes/{id}: Delete a quote.
- GET /api/quotes/random: Retrieve a random quote.
The quotes are stored in an SQL table named quotes
. Here is the conceptual structure of the quotes
table:
id
(Primary Key)author
(String)text
(String)source
(String, optional)dateCreation
(Date/Time)dateUpdate
(Date/Time)
- Clone the repository.
- Configure your database settings in
application.properties
. - Build and run the project using your preferred IDE or command line.
- Access the API using the provided endpoints.
- Retrieve a list of all quotes:
GET /api/quotes
- Retrieve a specific quote:
GET /api/quotes/{id}
- Create a new quote:
POST /api/quotes
- Update an existing quote:
PUT /api/quotes/{id}
- Delete a quote:
DELETE /api/quotes/{id}
- Retrieve a random quote:
GET /api/quotes/random
Contributions are welcome! If you'd like to contribute to this project, feel free to open an issue or submit a pull request.
This project is licensed under the MIT License.