The "list opportunities" endpoint does not follow the Close.io API guidelines.
Specifically: it assumes that all filters are used as queries (via the "query") parameter. As a result it is prepending query to the URL for filters and yielding incorrect output/results.
ref:
def list_opportunities(options={})
get(opportunity_path, query: options)
end
For example, when I try the following in console:
close = Closeio::Client.new(API_KEY)
close.list_opportunities(date_created__gte: '2016-08-01T00:54:51.337000+00:00')
The "list opportunities" endpoint does not follow the Close.io API guidelines.
Specifically: it assumes that all filters are used as queries (via the "query") parameter. As a result it is prepending
query
to the URL for filters and yielding incorrect output/results.ref:
For example, when I try the following in console:
I see the gem queries the following URL: https://app.close.io/api/v1/opportunity/?query%5Bdate_created__gte%5D=2016-08-01T00%3A54%3A51.337000%2B00%3A00
Per the API docs: https://developer.close.io/#opportunities
i.e.
The correct URL for filtering opportunities based on this parameter should be: https://app.close.io/api/v1/opportunity/?date_created__gte=2016-08-01T00:54:51.337000+00:00