diff --git a/HISTORY.md b/HISTORY.md index e6e8013..cbf0648 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -1,3 +1,7 @@ +1.0.2 / 2016-11-10 +================== + * Added `collection().getReleaseInstances()` + 1.0.1 / 2016-11-03 ================== * Fixed issue with `database().search()` when using a `Promise` diff --git a/lib/collection.js b/lib/collection.js index 2b1ccd0..20bd81d 100644 --- a/lib/collection.js +++ b/lib/collection.js @@ -99,6 +99,18 @@ module.exports = function(client){ } }; + /** + * Get the instances of a release in a user's collection + * @param {string} user - The user name + * @param {(number|string)} release - The release ID + * @param {function} [callback] - The callback + * @returns {DiscogsClient|Promise} + */ + + collection.getReleaseInstances = function(user, release, callback){ + return client.get('/users/'+util.escape(user)+'/collection/releases/'+release, callback); + }; + /** * Add a release instance to the (optionally) given collection folder * @param {string} user - The user name diff --git a/package.json b/package.json index dbfa92a..9c34b5c 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "disconnect", "description": "A full featured Discogs API v2.0 client library", - "version": "1.0.1", + "version": "1.0.2", "keywords": ["discogs", "api", "client", "oauth"], "homepage": "https://github.com/bartve/disconnect", "bugs": "https://github.com/bartve/disconnect/issues",