Skip to content

Commit

Permalink
Added New API - Library API
Browse files Browse the repository at this point in the history
  • Loading branch information
mdrehan369 committed May 12, 2024
1 parent 816a5e8 commit 3257209
Show file tree
Hide file tree
Showing 5 changed files with 902 additions and 0 deletions.
1 change: 1 addition & 0 deletions New_APIs/LibraryApi/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
node_modules
26 changes: 26 additions & 0 deletions New_APIs/LibraryApi/Readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Description
It is a library API which can be use to manage library data and library management.

# Installation
First of all clone the repository and navigate to this directory. Then run the following commands
```
npm i
cd src
node index.js
```

# End Points
### GET /api/v1/books
Returns the list of all books present in the library
### POST /api/v1/books
Add books to the library and it takes body parameters
### GET /api/v1/borrowers
Returns the list of all borrowers and their details
### POST /api/v1/borrowers
Add a borrower with details
### GET /api/v1/return/:id
Deletes a borrowers record when he/she had returned it
### GET /api/v1/search
Searches for the given book in the library

This can be use in real time also if we use Mongo DB
Loading

0 comments on commit 3257209

Please sign in to comment.