Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

linkedin-js

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

linkedin-js - npm Package Compare versions

Comparing version 0.1.3 to 0.1.4

9

lib/linkedin_client.js

@@ -25,3 +25,4 @@ var url = require('url')

}
, paramAppender = "?"
, hasParameters = /\/*\?/i
, _rest_base = 'http://api.linkedin.com/v1';

@@ -62,5 +63,9 @@

params.format = 'json';
if (path.match(hasParameters)) {
paramAppender = "&";
}
return CLIENT.oauth.get(
_rest_base + path + '?' + querystring.stringify(params)
_rest_base + path + paramAppender + querystring.stringify(params)
, token.oauth_token

@@ -67,0 +72,0 @@ , token.oauth_token_secret

{
"name": "linkedin-js",
"description": "Minimalistic linkedin API client",
"version": "0.1.3",
"version": "0.1.4",
"author": "Pau Ramon <masylum@gmail.com>",

@@ -6,0 +6,0 @@ "keywords": ["linkedin"],

@@ -27,4 +27,4 @@ # linkedin-js

, app = express.createServer(
express.cookieDecoder()
, express.session()
express.cookieParser()
, express.session({ secret: "string" })
);

@@ -36,2 +36,4 @@

// will enter here when coming back from linkedin
req.session.token = token;
res.render('auth');

@@ -45,4 +47,4 @@ });

token: {
oauth_token_secret: req.param('oauth_token_secret')
, oauth_token: req.param('oauth_token')
oauth_token_secret: req.session.token.oauth_token_secret
, oauth_token: req.session.token.oauth_token
}

@@ -49,0 +51,0 @@ , share: {

@@ -55,3 +55,21 @@ var testosterone = require('testosterone')({title: 'models/linkedin'})

})
.add('`apiCall` GET', function (done) {
var callback;
gently.expect(linkedin_client.oauth, 'get', function (_path, _token, _secret, _callback) {
assert.equal(_path, 'http://api.linkedin.com/v1/people-search?keywords=linkedin&format=json');
assert.equal(_token, token.oauth_token);
assert.equal(_secret, token.oauth_token_secret);
assert.equal(_callback, callback);
_callback();
});
callback = gently.expect(function (error, response, body) {
done();
});
linkedin_client.apiCall('GET', '/people-search?keywords=linkedin', {token: token}, callback);
})
.run();
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc