disconnect
Advanced tools
Comparing version 0.3.3 to 0.3.4
@@ -0,1 +1,5 @@ | ||
0.3.4 / 2014-07-30 | ||
================== | ||
* Added `user().contributions()` and `user().submissions()` for the newly implemented endpoints | ||
0.3.3 / 2014-07-08 | ||
@@ -2,0 +6,0 @@ ================== |
@@ -36,3 +36,3 @@ var http = require('http'), | ||
'Accept-Encoding': 'gzip,deflate', | ||
'User-Agent': 'DisConnectClient/'+package.version | ||
'User-Agent': 'DisConnectClient/'+package.version+' +'+package.homepage | ||
} | ||
@@ -39,0 +39,0 @@ }; |
@@ -58,4 +58,35 @@ var util = require('./util.js'); | ||
/** | ||
* Get the contributions for the given user | ||
* @param {String} user - The user name | ||
* @param {Object} [params] - Optional pagination params | ||
* @param {Function} [callback] - The callback | ||
*/ | ||
user.contributions = function(user, params, callback){ | ||
var path = '/users/'+util.escape(user)+'/contributions'; | ||
if((arguments.length === 2) && (typeof params === 'function')){ | ||
callback = params; | ||
}else{ // Add paging params when present | ||
path = util.addParams(path, params); | ||
} | ||
client.get(path, callback); | ||
}; | ||
/** | ||
* Get the submissions for the given user | ||
* @param {String} user - The user name | ||
* @param {Object} [params] - Optional pagination params | ||
* @param {Function} [callback] - The callback | ||
*/ | ||
user.submissions = function(user, params, callback){ | ||
var path = '/users/'+util.escape(user)+'/submissions'; | ||
if((arguments.length === 2) && (typeof params === 'function')){ | ||
callback = params; | ||
}else{ // Add paging params when present | ||
path = util.addParams(path, params); | ||
} | ||
client.get(path, callback); | ||
}; | ||
return user; | ||
}; | ||
}; |
{ | ||
"name": "disconnect", | ||
"description": "An easy to use client library to connect with the discogs.com API v2.0", | ||
"version": "0.3.3", | ||
"version": "0.3.4", | ||
"keywords": ["discogs", "api", "client", "oauth"], | ||
@@ -6,0 +6,0 @@ "homepage": "https://github.com/bartve/disconnect", |
44602
1089