closeio / closeio-node

An Unofficial Close.io API wrapper for Node.js.
19 stars 18 forks source link

Add ability to use a lead search query string instead of an itemized list of search keywords #26

Closed eengoron closed 4 years ago

eengoron commented 5 years ago

Fixes #25

In this PR, I add the ability to use a query parameter in lead.search to specify your query as a single string instead of an itemized list of search keywords. This allows you to use the not keyword and also allows you to copy and paste search queries directly from Close into your code if applicable.

An example of how to use the query parameter: closeio.lead.search({ query: 'name:"Bruce Wayne" email_address:bruce@wayneenterprises.com' })

@taylorbrooks -- Can you please take a look? :)

eengoron commented 5 years ago

@taylorbrooks -- Bump on this :)

pcothenet commented 4 years ago

+1 on this one. The current parsing of the object is limiting compared to being able to pass the query string directly.

This solution works well in practice and is retro-compatible.