taylorbrooks / closeio

A Ruby wrapper for the Close.io API
http://developer.close.com
MIT License
45 stars 57 forks source link

List lead "options" #20

Closed JonasNielsen closed 9 years ago

JonasNielsen commented 9 years ago

Cool gem!

I was a bit confused by the list_lead definition. Why does options default to a hash, when the argument only works with a string?

# works
client.list_leads('name:"Some name"', true)
# does not work
client.list_leads({"name" => "Some name"}, true)

Also, just to be sure, the gem does not support limiting fields, right? Explained on the Close.io documentation page:

Most endpoints support a _fields parameter that lets you specify which fields you require in the response. For example, if you only need ID and display_name when listing Leads, add ?_fields=id,display_name to the URL. This will improve performance of your API calls.

Given how list_leads is implemented I don't think it is possible to pass on that argument.