Skip to content

Latest commit

 

History

History
92 lines (78 loc) · 2.19 KB

File metadata and controls

92 lines (78 loc) · 2.19 KB

Bookself API

Bookself api is an api project that can store books containing name, year, author, publisher, number of pages, pages read, and whether the book has been read or not

Prerequisites

dependencies :

Installation :

  1. Clone this project
  2. Run npm install in your terminal
  3. Run npm run start in your terminal
  4. open your postman

How To Use :

#Add Some book

  • Method : POST
  • URL : /books
  • Body Request :
{
    "name": string,
    "year": number,
    "author": string,
    "summary": string,
    "publisher": string,
    "pageCount": number,
    "readPage": number,
    "reading": boolean
}

add new book

#Get all book

  • Method : GET
  • URL : /books

get all books

if there is no book you gonna get response body

{
    "status": "success",
    "data": {
        "books": []
    }
}

#Get detail book

  • Method : GET
  • URL : /books/{Bookid}

get detailed books

# Update book

  • Method : PUT
  • URL : /books/{Bookid}
  • Request Body :
{
    "name": string,
    "year": number,
    "author": string,
    "summary": string,
    "publisher": string,
    "pageCount": number,
    "readPage": number,
    "reading": boolean
}

update books

# Delete Book

  • Method : DELETE
  • URL : /books/{Bookid}

delete books

Need To Improve :

  • Integrated with database
  • ui