Comparing version 3.0.1 to 3.1.0
@@ -24,3 +24,3 @@ var extend = require('extend'); | ||
User.fetch = function(accessToken) { | ||
return client.authGet('user', accessToken).then(function(resp) { | ||
return client.get('auth', 'users/_current').then(function(resp) { | ||
return new User(resp.user, accessToken); | ||
@@ -35,2 +35,2 @@ }); | ||
return User; | ||
}; | ||
}; |
{ | ||
"name": "vinli", | ||
"version": "3.0.1", | ||
"version": "3.1.0", | ||
"description": "Official Node.js SDK for interacting with the Vinli Platform", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -92,3 +92,3 @@ Vinli Node.js SDK | ||
1. `forge` returns the actual object, not a promise, so you can act on it without the `then` boilerplate. | ||
2. The object returned from `forge` has not properties besides the `id` that was set. | ||
2. The object returned from `forge` has no properties besides the `id` that was set. | ||
@@ -131,3 +131,3 @@ ```javascript | ||
### `exchange(authCode, redirectUrl, clientId, clientSecret)` | ||
#### `exchange(authCode, redirectUrl, clientId, clientSecret)` | ||
@@ -196,3 +196,3 @@ For server applications that use the OAuth client type of "server", this method is used to exchange a user's OAuth token. This method returns a token that the server can use to make calls to Auth Services on behalf of the user. | ||
#### message(id) | ||
#### `message(id)` | ||
@@ -199,0 +199,0 @@ Retrieves a single message for the given ID. The message must have been generated by this device. |
@@ -41,3 +41,3 @@ var nock = require('nock'); | ||
var m = nock('https://auth.vin.li') | ||
.get('/user?access_token=fc8bdd0c-5be3-46d5-8582-b5b54052eca2') | ||
.get('/api/v1/users/_current') | ||
.reply(200, { | ||
@@ -76,3 +76,3 @@ user: { | ||
var m = nock('https://auth.vin.li') | ||
.get('/user?access_token=fc8bdd0c-5be3-46d5-8582-b5b54052eca2') | ||
.get('/api/v1/users/_current') | ||
.reply(200, { | ||
@@ -107,2 +107,2 @@ user: { | ||
}); | ||
}); | ||
}); |
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
2294
104599