Skip to content

Commit

Permalink
Merge pull request #72 from mdrehan369/Library-Api
Browse files Browse the repository at this point in the history
Added New API - Library API
  • Loading branch information
dishamodi0910 authored May 14, 2024
2 parents c1a3788 + 700219d commit ce16bf5
Show file tree
Hide file tree
Showing 5 changed files with 916 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 ce16bf5

Please sign in to comment.