https://github.com/shishirshekhar/books-api
This is book library api
https://github.com/shishirshekhar/books-api
api book-api expressjs expressjs-api expressjs-server mongodb mongodb-database mongoose nodejs nodejs-api
Last synced: about 2 months ago
JSON representation
This is book library api
- Host: GitHub
- URL: https://github.com/shishirshekhar/books-api
- Owner: ShishirShekhar
- Created: 2021-08-14T08:21:54.000Z (almost 5 years ago)
- Default Branch: main
- Last Pushed: 2022-11-16T10:52:54.000Z (over 3 years ago)
- Last Synced: 2025-07-02T06:06:00.654Z (11 months ago)
- Topics: api, book-api, expressjs, expressjs-api, expressjs-server, mongodb, mongodb-database, mongoose, nodejs, nodejs-api
- Language: JavaScript
- Homepage: https://books-api-beta.vercel.app/
- Size: 40 KB
- Stars: 0
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Books-API
<------------------------ DataBase Details -------------------------->
Book
- ISBN - String
- Title - String
- Author - [Numbers]
- Language - String
- Publications - Numbers
- NumOfPages - Numbers
- Categories - [String]
Author
- Id - Number
- Name - String
- Books - [Strings]
Publication
- Id - Number
- Name - String
- Books - [Strings]
<--------------------------- APIs ----------------------------->
Book
- GET
- to get all books
- to get specific book
- to get a list of books based on category
- to get a list of books based on author
- POST
- to add new books
- PUT
- update book details
- to update/add new author
- DELETE
- delete a book
- delete an author from the book
Author
- GET
- to get all authors
- to get specific author
- to get list of author based on a book
- POST
- to add new author
- PUT
- update author details
- DELETE
- delete an author
Publication
- GET
- to get all publication
- to get specific publication
- to get a list of publication based on a book.
- POST
- Add a new publication
- PUT
- update publication
- to update/add new book
- DELETE
- delete a publication
- delete a book from publication
<--------------------------- APIs Details ----------------------------->
/* ------------------------ GET APIs -------------------------- */
Book
Route - /book
Des - to get all books
Access - Public
Method - GET
Params - none
Body - none
Route - /book/:BookID
Des - to get specific book
Access - Public
Method - GET
Params - bookID
Body - none
Route - /book/cat/category
Des - to get a list of books based on category
Access - Public
Method - GET
Params - category
Body - none
Route - /book/aut/author
Des - to get a list of books based on author
Access - Public
Method - GET
Params - author
Body - none
Author
Route - /author
Des - to get all authors
Access - Public
Method - GET
Params - none
Body - none
Route - /author/aut/:author_
Des - to get specific author
Access - Public
Method - GET
Params - author
Body - none
Route - /author/book/:book
Des - to get list of author based on a book
Access - Public
Method - GET
Params - author
Body - none
Publication
Route - /publication
Des - to get all publication
Access - Public
Method - GET
Params - none
Body - none
Route - /publication/pub/:pub_
Des - to get specific publication
Access - Public
Method - GET
Params - publication
Body - none
Route - /publication/book/:book_
Des - to get a list of publication based on a book
Access - Public
Method - GET
Params - book
Body - none
/* ------------------------ POST APIs -------------------------- */
Book
Route - /book/new
Des - to add new books
Access - Public
Method - POST
Params - none
Body - none
Author
Route - /author/new
Des - to add new author
Access - Public
Method - POST
Params - none
Body - none
Publication
Route - /publication/new
Des - to add new publication
Access - Public
Method - POST
Params - none
Body - none
/* ------------------------ PUT APIs -------------------------- */
Book
Route - /book/update/:isbn
Des - update book title
Access - Public
Method - PUT
Params - isbn
Body - { title: newTtile }
Route - /book/updateAuthour/:isbn
Des - to update/add new author
Access - Public
Method - PUT
Params - isbn
Body - { "newAuthor": id }
Author
Route - /author/update/:id
Des - update author details
Access - Public
Method - PUT
Params - id
Body - { "name": { newName } }
Publication
Route - /publication/update/:id
Des - update publication
Access - Public
Method - PUT
Params - id
Body - { "name": { newName } }
Route - /publication/updateBook/:id
Des - to update/add new book
Access - Public
Method - PUT
Params - id
Body - { "book": ISBN }
/* ------------------------ DELETE APIs -------------------------- */
Book
Route - /book/deleteBook/:BookID
Des - to get specific book
Access - Public
Method - DELETE
Params - bookID
Body - none
Route - /book/deleteAuthor/:BookID/:authorID
Des - delete an author from the book
Access - Public
Method - DELETE
Params - bookID, authorID
Body - none
Author
Route - /author/delete/:authorID
Des - delete an author
Access - Public
Method - DELETE
Params - authorID
Body - none
Publication
Route - /publication/delete/:publicationId
Des - delete a publication
Access - Public
Method - DELETE
Params - publicationID
Body - none
Route - /publication/deleteBook/:publicationId/:bookId
Des - delete a book from publication
Access - Public
Method - DELETE
Params - publicationID, bookID
Body - none