DoubleYouGTT / hubspot

R package πŸ“¦ for working with Hubspot πŸ‘©β€πŸ’ΌπŸ‘¨β€πŸ’Ό data
https://itsalocke.com/hubspot/
Other
10 stars 8 forks source link

Use `max_properties` to truncate the number of parameters in GET requests #104

Open stephlocke opened 4 years ago

stephlocke commented 4 years ago

It looks like the functionality to avoid sending too long a request to hubspot has been lost in translation, at least on the deals functionality.

Before we send a set of properties to the query construction, we should apply properties <- properties[seq_len(max_properties)] when max_properties exists as a variable.

Functions should be checked for this issue and any functions found to have max_properties should have the appropriate truncation and also unit tests that validate we request the truncated amount.

(Note #103 shows that hubspot may send us back more properties than we asked for so testing the return may not be initially the recommended approach)