Giter Site home page Giter Site logo

it810 / book-lib-rest-service Goto Github PK

View Code? Open in Web Editor NEW

This project forked from vishnu-saini/book-lib-rest-service

0.0 0.0 0.0 106 KB

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

Java 100.00%

book-lib-rest-service's Introduction

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

book-lib-rest-service's People

Contributors

vishnu-saini avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.