Node.JS author book api
author-book.herokuapp.com
HTTP | Route | Parameters | Description |
---|---|---|---|
POST |
/register | username, password | Create a new user. |
POST |
/authenticate | username, password | Generate a token. |
HTTP | Route | Parameters | Description |
---|---|---|---|
GET |
/api/author | - | List all authors. |
GET |
/api/author/author_id | - | Get a author. |
POST |
/api/author | name, bio | Create a new author. |
PUT |
/api/author/author_id | name, bio | Update a author with new info. |
DELETE |
/api/author/author_id | - | Delete a author. |
HTTP | Route | Parameters | Description |
---|---|---|---|
GET |
/api/book | - | List all books. |
GET |
/api/book/book_id | - | Get a book. |
POST |
/api/book | author_id, title, category, year, lang | Create a new book. |
PUT |
/api/book/book_id | author_id, title, category, year, lang | Update a book with new info. |
DELETE |
/api/book/book_id | - | Delete a book. |
GET |
/api/book/news | - | List new books. |
GET |
/api/book/search/start_year/end_year | - | Books search in two dates. |