******************** BookVerse API ********************
- Ismail ELABDELLAOUI
- +212 6 23 07 24 49
- ismailelabdellaoui340@gmail.com
BookVerse API is a RESTful API for managing a collection of books and their authors. The API provides endpoints for CRUD operations on books and authors, with additional features like book rating and ISBN lookup.
- Book Management (main features)
- Add new books
- Update book information
- Delete books
- Get book by ID
- Get book by name
- Calculate book rating based on publication date and author
- Get authors of a list of book (by IDs)
- External API Integration (main features)
- Lookup books by ISBN using OpenLibrary API
- Author Management (additional needed features)
- add new author
- Delete new author
- Clone the repository
- git clone
- cd bookverse-api
- Install dependencies
- npm install
- Create a .env file in the root directory (made a .env.example, you can copy it)
- npm start
- npm test
*********** API Documentation ***********
All API requests headers must include : - api-key: aedz-151-ftyh-554
POST /api/books
Request body: { title: 'testyy book', author: existingAuthor_id, publicationDate: new Date('2018-01-01'), type: 'action' }
PUT /api/books/:id
Request body: { title: 'macha book', author: existingAuthor_id, publicationDate: new Date('2018-01-01'), type: 'cartoons' }
DELETE /api/books/:id
GET /api/books/:id
GET /api/books/search?title=Book Title
GET /api/books/:id/rating
POST /api/books/authors
Request body: { "bookIds": ["id1", "id2", "id3"] }
GET /api/books/isbn/:isbn
POST /api/authors/create
Request body: { name: 'Guillaume Musso', age: 45, followersNumber: 159 }
- Node.js
- MongoDB