Skip to content

It is a sample book library api. Contains module like, assigning books, generating assigned reports, adding students, fetching books by pagination etc

Notifications You must be signed in to change notification settings

vishnu-saini/book-lib-rest-service

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

BookLibrary-Rest-Webservice

..* To set up project, follow below step

  1. Import library_database.sql in mysql database.
  2. Change database configuration in "src/main/resources/db.properties" file.

..* Database Diagram

alt text

..* Resourse URL's to use this web service

  1. add student : POST – http://localhost:8080/booklib/api/student { "firstName" : "Anuj", "lastName" : "Gupta", "phoneNubmer" : "1234567890", "email" : "[email protected]", "password" : "password" }

  2. Student authentication : POST - http://localhost:8080/booklib/api/student/authenticate { "email" : "[email protected]", "password" : "password" }

  3. Get all book publishers: GET - http://localhost:8080/booklib/api/bookPublisher

  4. Add publisher : POST - http://localhost:8080/booklib/api/bookPublisher { "name": "Demo publisher" }

  5. Update publisher: PUT - http://localhost:8080/booklib/api/bookPublisher/{publisherid} { "name": "Demo publisher updated1" }

  6. Get all book categories: GET - http://localhost:8080/booklib/api/bookCategory

  7. Add Category : POST - http://localhost:8080/booklib/api/bookCategory { "name": "biography" }

  8. Update Category: PUT - http://localhost:8080/booklib/api/bookCategory/{categoryid} { "name": "updated category name" }

  9. Get books by page: http://localhost:8080/booklib/api/book?page=1&limit=5&authorid=1 Here page, limit and author id are parameters.

  10. Add book : POST - http://localhost:8080/booklib/api/book { "name": "Game of throns", "edision": "3", "numberOfBookAvailable": "10", "category": { "id" : "10" }, "author" : { "id" : "2" },

    "publisher" : {
    	"id" : "2"
    }
    

    }

  11. Issue a book to a student : - POST - http://localhost:8080/booklib/api/loan { "bookId" : 13, "studentId" : 3 }

  12. Get the assigned book (loan detail) detail in a report : - http://localhost:8080/booklib/api/loan/report

  13. Deposit a book for student : PUT - Issue a book to a student : - POST - http://localhost:8080/booklib/api/loan { "bookId" : 13, "studentId" : 3 }

  14. Get book assigned to student : GET - http://localhost:8080/booklib/api/loan?studentId=2

About

It is a sample book library api. Contains module like, assigning books, generating assigned reports, adding students, fetching books by pagination etc

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages