Collection

Collection

Collection class, access image collections with this.

Constructor

# new Collection(id, token)

Parameters:
Name Type Description
id String The id of the collection.
token String The very private collection token.

Methods

# (static) createNewCollection(params) → {Promise.<(Collection|Error)>}

creates a new image collection.
Parameters:
Name Type Description
params NewCollection of course the new collection parameters. See NewCollection
Returns:
Type
Promise.<(Collection|Error)>

# editCollection(params)

Edits the collection.
Parameters:
Name Type Description
params EditCollection The parameters for the collection edit. See EditCollection.

# fetchMeta() → {Promise.<(CollectionMeta|Error)>}

Fetches the meta data of the collection.
Returns:
An instance of CollectionMeta class.
Type
Promise.<(CollectionMeta|Error)>

# getId() → {String}

Get the ID of the collection.
Returns:
ID of the collection.
Type
String

# getToken() → {String|null}

Get the token of the collection (if any).
Returns:
The token of the collection, if none returns null.
Type
String | null