Skip to content

Welcome to the Quotes API project! This project is designed to showcase the creation of a simple API for managing quotes using Spring Boot.

Notifications You must be signed in to change notification settings

elkhiari/quotes-spring_boot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Quotes API using Spring Boot

Welcome to the Quotes API project! This project is designed to showcase the creation of a simple API for managing quotes using Spring Boot.

Table of Contents

Description

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.

Features

  • Retrieve a list of all quotes.
  • Create a new quote.
  • Update an existing quote.
  • Delete a quote.
  • Retrieve a random quote.

Endpoints

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

Database Table

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)

Getting Started

  1. Clone the repository.
  2. Configure your database settings in application.properties.
  3. Build and run the project using your preferred IDE or command line.
  4. Access the API using the provided endpoints.

Usage

  1. Retrieve a list of all quotes: GET /api/quotes
  2. Retrieve a specific quote: GET /api/quotes/{id}
  3. Create a new quote: POST /api/quotes
  4. Update an existing quote: PUT /api/quotes/{id}
  5. Delete a quote: DELETE /api/quotes/{id}
  6. Retrieve a random quote: GET /api/quotes/random

Contributing

Contributions are welcome! If you'd like to contribute to this project, feel free to open an issue or submit a pull request.

License

This project is licensed under the MIT License.

About

Welcome to the Quotes API project! This project is designed to showcase the creation of a simple API for managing quotes using Spring Boot.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages