Closed rept closed 7 years ago
This commit enables OData filtering which wasn't possible before.
See here: https://api.insight.ly/v2.1/Help/TechnicalDetails for details.
I have enabled this for:
get_contacts get_organisations get_opportunities get_projects get_tasks get_emails get_notes
This is backwards compatible.
You can use it like this:
last_sync_time = (user.insightly['insightly_last_sync'].to_time).utc.strftime('%FT%T') client.get_contacts(query_params: { '$filter' => "DATE_UPDATED_UTC gt DateTime'#{last_sync_time}'" })
You can also use query_params to only return parent objects like this:
client.get_contacts(query_params: { 'Brief' => :True })
Or you can of course combine both:
client.get_contacts(query_params: { 'Brief' => :True, '$filter' => "DATE_UPDATED_UTC gt DateTime'#{last_sync_time}'" })
@dior001 @brianinsightly Hi guys, would appreciate if any of you could take a look at this. Thanks.
@brianinsightly is anybody at insightly considering these pull requests?
This commit enables OData filtering which wasn't possible before.
See here: https://api.insight.ly/v2.1/Help/TechnicalDetails for details.
I have enabled this for:
get_contacts get_organisations get_opportunities get_projects get_tasks get_emails get_notes
This is backwards compatible.
You can use it like this:
You can also use query_params to only return parent objects like this:
Or you can of course combine both: