Constructor
new ScanController()
Create a scan controller.
- Source:
Methods
(async) byId(id) → {Promise:.<object:>}
Get an scan by id.
Parameters:
| Name | Type | Description |
|---|---|---|
id |
number |
- Source:
Returns:
(async) byUser(userId) → {Promise:.<Array:.<object:>>}
Get scans by user.
Parameters:
| Name | Type | Description |
|---|---|---|
userId |
number |
- Source:
Returns:
(async) changeBooksIdentified(scanId, amount) → {Promise:.<void:>}
Change the amount of books identified by a certain amount.
Parameters:
| Name | Type | Description |
|---|---|---|
scanId |
number | |
amount |
number |
- Source:
Returns:
(async) changeImagePath(scanId, imagePath) → {Promise:.<void:>}
Change the image path of a scan.
Parameters:
| Name | Type | Description |
|---|---|---|
scanId |
number | |
imagePath |
string |
- Source:
Returns:
(async) changeSpinesSegmentedBy(scanId, amount) → {Promise:.<void:>}
Change the amount of spines segmented by a certain amount.
Parameters:
| Name | Type | Description |
|---|---|---|
scanId |
number | |
amount |
number |
- Source:
Returns:
(async) delete(scanId) → {Promise:.<void:>}
Delete a scan.
Parameters:
| Name | Type | Description |
|---|---|---|
scanId |
number |
- Source:
Returns:
(async) getResultsAndData(scanId) → {Promise:.<Array:.<object:>>}
Get the results of a scan including books and authors.
Parameters:
| Name | Type | Description |
|---|---|---|
scanId |
number |
- Source:
Returns:
(async) insert(userId) → {Promise:.<object:>}
Insert a new scan.
Parameters:
| Name | Type | Description |
|---|---|---|
userId |
number |
- Source:
Returns:
(async) insertResult(scanId, bookId, segmentJson) → {Promise:.<void:>}
Insert scan result.
Parameters:
| Name | Type | Description |
|---|---|---|
scanId |
number | |
bookId |
number | |
segmentJson |
object |
- Source:
Returns:
(async) insertWithLocation(userId, latitude, longitude) → {Promise:.<void:>}
Insert a new scan with a location.
Parameters:
| Name | Type | Description |
|---|---|---|
userId |
number | |
latitude |
number | |
longitude |
number |
- Source:
Returns:
(async) updateStatus(scanId, status) → {Promise:.<void:>}
Update the status of a scan.
Parameters:
| Name | Type | Description |
|---|---|---|
scanId |
number | |
status |
string |
- Source: