Welcome to CoffeeShop WebAPI! This is a RESTful API built using C# .NetCore designed to manage products in a coffee shop. Whether you're fetching details of the products, adding a new item, updating, or deleting them, this API has got you covered.
Below is a screenshot from Swagger UI showing the available endpoints in this API:
- .NET Core SDK
- A preferred IDE or code editor (I like Visual Studio or Visual Studio Code)
- Clone the repository:
git clone https://github.com/[Your_GitHub_Username]/CoffeeShopWebAPI.git
- Navigate to the project directory:
cd CoffeeShopWebAPI
- Restore the required packages:
dotnet restore
- Run the application:
dotnet run
1. Get All Products
[GET] /api/products
Returns a list of all available products.
2. Get Specific Product
[GET] /api/products/{id}
Returns a specific product by its ID.
3. Add New Product
[POST] /api/products
Add a new product. Body must contain product details.
4. Update a Product
[PUT] /api/products/{id}
Update details of a product by its ID. Body must contain updated product details.
5. Delete a Product
[DELETE] /api/products/{id}
Remove a specific product by its ID.
6. Delete Multiple Products
[POST] /api/products/Delete
Remove multiple products. Query must contain an array of product IDs. For example: /api/products/Delete?ids=1&ids=2&ids=3
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change. Ensure to update tests as appropriate.
This project is licensed under the MIT License - see the LICENSE.md file for details.
Happy coding! ☕️