MadKudu / node-hubspot

Node wrapper for the HubSpot API
MIT License
192 stars 157 forks source link

Contacts getById should accept optional parameters #162

Closed shhac closed 5 years ago

shhac commented 5 years ago

contacts.getById only takes id, but per Hub Spot spec there are more options that can go into the URL query string (as it is a GET)

https://developers.hubspot.com/docs/methods/contacts/get_contact

string[]? property
string? propertyMode // "value_only", "value_and_history"
string? formSubmissionMode // "all", "none", "newest", "oldest"
boolean? showListMemberships

Solution:

Add an options param which accepts these values and adds them to qs


The signature is slightly different to the equivalent company/deal versions documented

pcothenet commented 5 years ago

@shhac I'm short on time these days. Do you want to submit a PR? (looks like you've already researched this issue quite a bit)

slouis commented 5 years ago

I also need it, can you accept the PR soon ?