observing / fullcontact

FullContact API bindings for Node.js
MIT License
42 stars 18 forks source link

Pass Additional Api Parameters? #7

Open dreadjr opened 9 years ago

dreadjr commented 9 years ago

How do I add extra parameters to api calls.

For example for Person


fc.person.email('dreadjr@gmail.com', 'queue', 'webhookUrl', 'webhookId', function(err, data) {
});

But i can't pass any extra arguments, like style or css, etc. Maybe just moving to a

var options = {
  email: '123',
  emailMD5: '',
  etc...
};
fc.person.email(options)
3rd-Eden commented 9 years ago

I don't think that's currently possible in the implementation. The API I would suggest would be..

fullcontact.person.email('required email value', { optional options }, function () {

});

But I don't know if I have the time to implement this, so i'm accepting pull requests for this feature request.

dreadjr commented 9 years ago

Ok, yeah I didn't see a way in the code, i'll see if I have time to implement this and submit a pull request.

AdriVanHoudt commented 9 years ago

We could have 1 argument that's an options object and validate it has no invalid options for that route, would be more flexible than the current implementation of the webhookUrl for example where you have to pass null as que if you only want the webhook.

wlaurance commented 8 years ago

:+1: it would be great to add in things like keyPeople: true for the Company API

AdriVanHoudt commented 8 years ago

What does that param do?

AdriVanHoudt commented 7 years ago

Latests proposal from @3rd-Eden is

fullcontact.person.email('email@adr.ess', { 
  macromeasures: true,
   webhookId:'id here' 
}, fn);

PR's very welcome! If you need any help let me know!