Constructor
new BookController()
Create a book controller.
- Source:
Methods
(async) byAuthor(authorId) → {Promise:.<Array:.<object:>>}
Get books by author.
Parameters:
| Name | Type | Description |
|---|---|---|
authorId |
number |
- Source:
Returns:
(async) byId(id) → {Promise:.<object:>}
Get a book by id.
Parameters:
| Name | Type | Description |
|---|---|---|
id |
number |
- Source:
Returns:
(async) byTerm(termId) → {Promise:.<Array:.<object:>>}
Get books by term.
Parameters:
| Name | Type | Description |
|---|---|---|
termId |
number |
- Source:
Returns:
(async) byTitle(title) → {Promise:.<object:>}
Get a book by title.
Parameters:
| Name | Type | Description |
|---|---|---|
title |
string |
- Source:
Returns:
(async) getCoverURL(id) → {Promise:.<(string:|null:)>}
Get the cover URL of a book.
Parameters:
| Name | Type | Description |
|---|---|---|
id |
number |
- Source:
Returns:
(async) insert(title, subtitle, publicationDate) → {Promise:.<object:>}
Insert a book.
Parameters:
| Name | Type | Description |
|---|---|---|
title |
string | |
subtitle |
string | |
publicationDate |
date |
- Source:
Returns:
(async) searchByOCRElements(ocrElements) → {Promise:.<Array:.<object:>>}
Search books using OCR elements.
Parameters:
| Name | Type | Description |
|---|---|---|
ocrElements |
Array:.<string:> |
- Source:
Returns:
(async) searchByTitle(title, amount) → {Promise:.<Array:.<object:>>}
Search books by title.
Parameters:
| Name | Type | Description |
|---|---|---|
title |
string | |
amount |
number |
- Source:
Returns:
(async) searchByTitleAndAuthorName(title, authorName) → {Promise:.<Array:.<object:>>}
Search books by title and author name.
Parameters:
| Name | Type | Description |
|---|---|---|
title |
string | |
authorName |
string |
- Source:
Returns:
(async) searchByTitleNatural(title, amount) → {Promise:.<Array:.<object:>>}
Search books by title using natural language mode.
Parameters:
| Name | Type | Description |
|---|---|---|
title |
string | |
amount |
number |
- Source: