Comparing version 0.0.5 to 0.0.6
@@ -8,4 +8,5 @@ var request = require('request'), | ||
this.getUsers = function (done) { | ||
request.get({ | ||
url: client.apiUrl + '/connections/' + this._id + '/users', | ||
url: client.apiUrl + '/connections/' + this.name + '/users', | ||
qs: { access_token: accessToken } | ||
@@ -15,2 +16,6 @@ }, function (err, r, body) { | ||
if (r.statusCode === 404) { | ||
return done(null, null); | ||
} | ||
if (r.statusCode.toString().substr(0, 1) !== '2'){ | ||
@@ -17,0 +22,0 @@ return done(new Error(body)); |
{ | ||
"name": "auth0", | ||
"version": "0.0.5", | ||
"version": "0.0.6", | ||
"description": "Client library for the Auth0 platform", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
@@ -47,8 +47,19 @@ Node.js client library for the Auth0 platform. | ||
### getConnection(id, callback) | ||
### getConnection(name, callback) | ||
~~~js | ||
client.getConnection(function (err, connection){ | ||
client.getConnection('my-connection', function (err, connection){ | ||
//..... | ||
}); | ||
~~~ | ||
### connection.getUsers (callback) | ||
~~~js | ||
client.getConnection('my-connection', function (err, connection){ | ||
connection.getUsers(function (err, users) { | ||
//.... | ||
}); | ||
}); | ||
~~~ |
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
5353
127
64