Comparing version 0.1.0 to 0.1.1
@@ -31,2 +31,11 @@ var request = require('request'), | ||
api.getSocialUsers = function (accessToken, options, done) { | ||
if(typeof options === 'function'){ | ||
done = options; | ||
options = {}; | ||
} | ||
options = xtend({social: true}, options); | ||
return api.getUsers.bind(this)(accessToken, options, done); | ||
}; | ||
api.getUsers = function(accessToken, options, done) { | ||
@@ -57,6 +66,11 @@ var nextPageLink, req, connection; | ||
}else { | ||
req = { | ||
url: this.apiUrl + (connection ? '/connections/' + connection : '') + '/users', | ||
qs: xtend({ access_token: accessToken }, options) | ||
}; | ||
req = { qs: xtend({ access_token: accessToken }, options) }; | ||
if (connection) { | ||
req.url = this.apiUrl + '/connections/' + connection + '/users'; | ||
} else if (options.social) { | ||
req.url = this.apiUrl + '/socialconnections/users'; | ||
delete options.social; | ||
} else { | ||
req.url = this.apiUrl + '/users'; | ||
} | ||
} | ||
@@ -63,0 +77,0 @@ |
{ | ||
"name": "auth0", | ||
"version": "0.1.0", | ||
"version": "0.1.1", | ||
"description": "Client library for the Auth0 platform", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
@@ -73,2 +73,6 @@ Node.js client library for the Auth0 platform. | ||
### client.getSocialUsers({[per_page: 10]}, callback) | ||
The same than ```getUsers``` but this method returns users for all social connections, ie: not enterprise connections. | ||
### client.getConnection(name, callback) | ||
@@ -75,0 +79,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
8309
176
83