linkedin-node-new
Advanced tools
Comparing version 0.0.2 to 0.0.4
function LinkedInConnect(params) { | ||
var utils = require('./utils'), | ||
querystring = require('querystring'); | ||
querystring = require('querystring'), | ||
https = require('https'), | ||
@@ -15,5 +15,5 @@ $scope = this; | ||
}; | ||
$scope.config = utils.extend(defaults, params); | ||
$scope.setAccessToken = function(access_token) { | ||
@@ -23,3 +23,3 @@ $scope.config.access_token = access_token; | ||
}; | ||
$scope.createURL = function() { | ||
@@ -80,3 +80,3 @@ return 'https://www.linkedin.com/uas/oauth2/authorization?' | ||
} | ||
req.end(); | ||
@@ -120,3 +120,3 @@ } | ||
}; | ||
$scope.request = function(access_token, path, method, data, callback) { | ||
@@ -130,3 +130,3 @@ var used_args = arguments; | ||
} | ||
method = method.toLowerCase(); | ||
@@ -158,3 +158,3 @@ | ||
} | ||
var opts = { | ||
@@ -171,3 +171,3 @@ host: 'api.linkedin.com', | ||
}; | ||
doReq(opts, data, function(err, json) { | ||
@@ -181,3 +181,3 @@ if(err) { | ||
}; | ||
$scope.get = function(path, data, callback) { | ||
@@ -190,11 +190,11 @@ if(arguments.length < 3) { | ||
}; | ||
$scope.post = function(path, data, callback) { | ||
$scope.request($scope.config.access_token, path, 'post', data, callback); | ||
}; | ||
$scope.put = function(path, data, callback) { | ||
$scope.request($scope.config.access_token, path, 'put', data, callback); | ||
}; | ||
$scope.delete = function(path, data, callback) { | ||
@@ -207,3 +207,3 @@ if(arguments.length < 3) { | ||
}; | ||
return $scope; | ||
@@ -210,0 +210,0 @@ } |
{ | ||
"name": "linkedin-node-new", | ||
"description": "A NodeJS connector for LinkedIn OAuth2", | ||
"version": "0.0.2", | ||
"version": "0.0.4", | ||
"author": { | ||
@@ -6,0 +6,0 @@ "name": "uh-sem-blee, Co. | typefoo", |
@@ -41,3 +41,3 @@ # LinkedIn Node | ||
Once authorized, you can perform typical REST services (http://docs.linkedIn.com/api/ for reference): | ||
Once authorized, you can perform typical REST services (https://developer.linkedin.com/documents/authentication for reference): | ||
@@ -44,0 +44,0 @@ // GET |
9571