Commit 780eaf77 by Julian Beisenkötter

readme update

parent 1f3b83fc
......@@ -20,14 +20,33 @@ var LinkedInProfile = require('linkedin-public-profile');
just call the module with a public linkedin profile url. It returns a promise which resolves to the profile.
```javascript
var LinkedInProfile = require('linkedin-public-profile');
var LinkedInProfile = require('./index');
var url = 'https://de.linkedin.com/in/julian-beisenk%C3%B6tter-77038939';
// standard usage
LinkedInProfile(url)
.then(function(profile){
.then(function(profile){ // chain your logic
console.log(profile);
});
// With links to similar profiles
LinkedInProfile(url, true)
.then(function(result){
console.log(result.profile); // the requested profile
console.log(result.links); // the featured profiles on the page
});
// usage with HTML
var request = require('request-promise');
request(url) // request with html output
.then(function(html){ // promise chain
return LinkedInProfile(html)// return the LinkedInProfile promise
})
.then(function(profile){ // chain your logic
console.log(profile);
});
```
The result looks like:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment