Wants

Wants

Want list endpoints

Constructor

new Wants(api)

Main constructor

Source:
Parameters:
Name Type Description
api MkmApi

Parent api to make the calls

Methods

(async) addItems(idList, items) → {Promise}

Add items to the want list

Source:
Parameters:
Name Type Description
idList Number

Id of the want list

items Array.<Object>

Products or metaproducts to add

Returns:
Type:
Promise

Operation result

(async) changeName(idList, name) → {Promise}

Change the name of a want list

Source:
Parameters:
Name Type Description
idList Number

Id of the want list

name String

New name for the want list

Returns:
Type:
Promise

Operation result

(async) createList(name, idGameopt) → {Promise}

Creates a new want list

Source:
Parameters:
Name Type Attributes Default Description
name String

Name of the new want list

idGame Number <optional>
1

Id of the game associated to the want list (default Magic)

Returns:
Type:
Promise

Operation result

(async) deleteList(idList) → {Promise}

Delete a whole want list

Source:
Parameters:
Name Type Description
idList Number

If of the want list

Returns:
Type:
Promise

Operation result

(async) deleteWants(idList, wants) → {Promise}

Delete wants from a want list

Source:
Parameters:
Name Type Description
idList Number

Id of the want list

wants Array.<Object>

List of wants to delete

Returns:
Type:
Promise

Operation result

(async) editWants(idList, wants) → {Promise}

Modify already stored wants

Source:
Parameters:
Name Type Description
idList Number

Id of the want list

wants Array.<Object>

Changed wants

Returns:
Type:
Promise

Operation result

(async) getLists() → {Promise}

Get all want lists

Source:
Returns:
Type:
Promise

Lists with all the want lists of the user

(async) getProducts(idList) → {Promise}

Get all products and metaproducts of the want list

Source:
Parameters:
Name Type Description
idList Number

Id of the list

Returns:
Type:
Promise

List of wants in the want list