Constructor
new SpineImageController()
Create a spine image controller.
Methods
(async) byCrowdApproved(amount, approved) → {Promise:.<Array:.<object:>>}
Get spine images that have been crowd approved.
Parameters:
| Name | Type | Default | Description |
|---|---|---|---|
amount |
number | 5 | |
approved |
boolean | true |
Returns:
(async) byEdition(editionId) → {Promise:.<Array:.<object:>>}
Get spine images by edition.
Parameters:
| Name | Type | Description |
|---|---|---|
editionId |
number |
Returns:
(async) byId(id) → {Promise:.<object:>}
Get a spine image by id.
Parameters:
| Name | Type | Description |
|---|---|---|
id |
number |
Returns:
(async) delete(id) → {Promise:.<void:>}
Delete a spine image.
Parameters:
| Name | Type | Description |
|---|---|---|
id |
number |
Returns:
(async) getMeta(imageId, name) → {Promise:.<any:>}
Get a meta value for a spine image.
Parameters:
| Name | Type | Description |
|---|---|---|
imageId |
number | |
name |
string |
Returns:
(async) insert(editionId, filepath) → {Promise:.<object:>}
Insert a spine image.
Parameters:
| Name | Type | Description |
|---|---|---|
editionId |
number | |
filepath |
string |
Returns:
(async) setMeta(imageId, name, value) → {Promise:.<void:>}
Set a meta value for a spine image.
Parameters:
| Name | Type | Description |
|---|---|---|
imageId |
number | |
name |
string | |
value |
any |