Class: SpineImageController

controllers~SpineImageController()

Class representing a spine image controller.

Constructor

new SpineImageController()

Create a spine image controller.
Source:

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
Source:
Returns:
Type
Promise:.<Array:.<object:>>

(async) byEdition(editionId) → {Promise:.<Array:.<object:>>}

Get spine images by edition.
Parameters:
Name Type Description
editionId number
Source:
Returns:
Type
Promise:.<Array:.<object:>>

(async) byId(id) → {Promise:.<object:>}

Get a spine image by id.
Parameters:
Name Type Description
id number
Source:
Returns:
Type
Promise:.<object:>

(async) delete(id) → {Promise:.<void:>}

Delete a spine image.
Parameters:
Name Type Description
id number
Source:
Returns:
Type
Promise:.<void:>

(async) getMeta(imageId, name) → {Promise:.<any:>}

Get a meta value for a spine image.
Parameters:
Name Type Description
imageId number
name string
Source:
Returns:
Type
Promise:.<any:>

(async) insert(editionId, filepath) → {Promise:.<object:>}

Insert a spine image.
Parameters:
Name Type Description
editionId number
filepath string
Source:
Returns:
Type
Promise:.<object:>

(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
Source:
Returns:
Type
Promise:.<void:>