Skip to content

dxtaner/BookStore-WepAPI

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

97 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Book Application Web API

This C# Web API application is designed to manage records for books, authors, genres, and users.

API Usage

To access the API, you must send HTTP requests using the main API URL. For example, to list books, you need to send a GET request:

GET https://localhost:5001/api/books 

To add a book, you need to send a POST request:

POST https://localhost:5001/api/books Content-Type: application/json
{ "title": "Harry Potter and the Philosopher's Stone", "author": "J.K. Rowling", "genre": 1 } 

To update a book, you need to send a PUT request:

PUT https://localhost:5001/api/books/1 Content-Type: application/json
{ "title": "Harry Potter and the Sorcerer's Stone", "author": "J.K. Rowling", "genre": 2 } 

To delete a book, you need to send a DELETE request:

DELETE https://localhost:5001/api/books/1 

You can send similar requests for other record types (author, genre, user).

API Documentation

The API documentation provides detailed information about how to use the API, including its features and examples.

To access the API documentation, append "/swagger" to the main API URL. For example, "https://localhost:5001/swagger" will direct you to the API documentation.

API License

The API license provides information on how the API can be used. The license outlines the terms under which users can utilize the API.

The license is included in the API documentation. Users should read and accept the license before using the API.

Setup

Follow these steps to run the application:

  1. Clone this repository.
  2. Install the .NET Core 6 SDK.
  3. Open the project files using Visual Studio or a text editor.
  4. Use the NuGet Package Manager to install the required dependencies for the application.
  5. Run the application using the "IIS Express" or "localhost" server.
  6. Send HTTP requests using the appropriate URLs to access the API.

Contributors

This project is open source and has been developed by contributors. All kinds of contributions, suggestions, and feedback are welcome.

Those interested in contributing can fork the project, improve it, and particularly help with debugging, documentation, and testing.

Please read the CONTRIBUTING.md file before contributing and share your questions or suggestions in the GitHub Issues section.

License

This project is licensed under the MIT License. For more information, see the LICENSE file.