Closed mful closed 9 years ago
:+1: At least make the default for query
be more obvious. If you pass in a hash, the URL encoding botches the query:
I, [2015-07-29T09:50:50.372889 #17642] INFO -- : get https://app.close.io/api/v1/lead/?query%5Bemail_address%3A%5D=kurt.vonnegut%40seneca.systems
The problem with converting query:
to a hash is that you are limited to key/value type queries and you wouldn't be able to support complex queries:
https://help.close.io/customer/portal/articles/1564202-search-syntax
Meaning none of these queries would be supported:
email_date < "7 days ago"
email_address in ([ma**@hellocompass.us, m***@hellocompass.us])
city:"New York" or city:"San Francisco"
state:CA and not city:"San Francisco"
cc/@tyre @mful
Actually this is probably good, I thought Ruby's String
responded to #map
.
Fixes #20
Ideally, the
fields
param could be deprecated, as theoptions
param is a functional replacement. Didn't want to break the current API, though...