Giter Club home page Giter Club logo

books-api's Introduction

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

books-api's People

Contributors

shishirshekhar avatar

Watchers

 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.