ArkeologeN / node-linkedin

LinkedIn 2.0 wrapper in Node.js
MIT License
163 stars 78 forks source link

allow json body for posts #11

Closed jamuhl closed 10 years ago

jamuhl commented 10 years ago

this allows us to use the POST API endpoints like the share:

    var api = linkedin.init(access_token);
    api.people.share = function(share, cb) {
      this.createCall('POST', 'people/~/shares', { json: share }, cb)(this.config);
    };

    api.people.share({
      comment: 'blabla',
      content: { title: 'a', description: 'b', 'submitted-url': 'http://google.ch', 'submitted-image-url': '' },
      visibility: { code: 'anyone' }
    }, function(err, res) {/*..*/});