Support LinkedIn v2 API (#5660)
This commit is contained in:
committed by
Diamond Lewis
parent
d06d020c13
commit
a58653ada8
@@ -5,7 +5,7 @@ const httpsRequest = require('./httpsRequest');
|
|||||||
// Returns a promise that fulfills iff this user id is valid.
|
// Returns a promise that fulfills iff this user id is valid.
|
||||||
function validateAuthData(authData) {
|
function validateAuthData(authData) {
|
||||||
return request(
|
return request(
|
||||||
'people/~:(id)',
|
'me',
|
||||||
authData.access_token,
|
authData.access_token,
|
||||||
authData.is_mobile_sdk
|
authData.is_mobile_sdk
|
||||||
).then(data => {
|
).then(data => {
|
||||||
@@ -36,7 +36,7 @@ function request(path, access_token, is_mobile_sdk) {
|
|||||||
}
|
}
|
||||||
return httpsRequest.get({
|
return httpsRequest.get({
|
||||||
host: 'api.linkedin.com',
|
host: 'api.linkedin.com',
|
||||||
path: '/v1/' + path,
|
path: '/v2/' + path,
|
||||||
headers: headers,
|
headers: headers,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user