Permalink
Browse files

0.0.2, improved npm and docs

  • Loading branch information...
masylum committed Nov 7, 2010
1 parent 1a98b88 commit e9903c08ba101b10d01ccd5e9cf08eb486ad38ef
Showing with 13 additions and 4 deletions.
  1. +8 −1 Readme.md
  2. +1 −1 index.js
  3. +1 −1 lib/linkedin_client.js
  4. +3 −1 package.json
View
@@ -16,8 +16,14 @@ Params must contain the token.
## Example using express.js
+ // You need sessions
+ app.configure(function () {
+ app.use(connect.cookieDecoder());
+ app.use(connect.session());
+ });
+
app.get('/linkedin/share/:message', function (req, res) {
- var linkedinClient = require('linkedin-js').linkedinClient('consumerKey', 'consumerSecret');
+ var linkedinClient = require('linkedin-js')('consumerKey', 'consumerSecret');
linkedinClient.getAccessToken(req, res, function (error, token) {
linkedinClient.apiCall('POST', '/people/~/shares',
@@ -33,3 +39,4 @@ Params must contain the token.
}
);
});
+ });
View
@@ -1 +1 @@
-module.exports.linkedinClient = require('./lib/linkedin_client');
+module.exports = require('./lib/linkedin_client');
View
@@ -13,7 +13,7 @@ var url = require("url"),
querystring = require("querystring");
module.exports = function (api_key, api_secret, redirect) {
- var client = {version: '0.0.1'},
+ var client = {version: '0.0.2'},
// PRIVATE
oAuth = new OAuth(
View
@@ -1,10 +1,12 @@
{
"name": "linkedin-js",
"description": "easy peasy linkedin client",
- "version": "0.0.1",
+ "version": "0.0.2",
"author": "Pau Ramon <masylum@gmail.com>",
"keywords": ["linkedin"],
"dependencies": { "oauth": ">= 0.8.2" },
+ "main" : "lib/linkedin_client.js",
+ "directories" : { "lib" : "./lib" },
"repository" : {"type": "git" , "url": "http://github.com/masylum/linkedin-js.git" },
"engines": { "node": ">= 0.2.0" }
}

0 comments on commit e9903c0

Please sign in to comment.