I've fiddled with the Kickstarter API a bit recently, and noticed that searches for updates/projects/comments can have a "count" parameter that defines the maximum number of results returned. If not specified, the API returns 10 results at a time. Non-numeric values or values less than 1 are treated as 1.
This functionality is easy enough to implement in Kickscraper by adding a "count" parameter to the relevant methods in client.rb, but I'm wondering if it might be better to accept a hash parameter. So we could call something like:
search_projects { q => "search term", cursor => 100000, count => 5 }
Alternatively, we could make things a little more explicit by creating something like a QueryParameters class and passing that around. I'd be happy to implement this either way, but figured I'd see how the maintainers feel before running off in an unproductive direction.
I've fiddled with the Kickstarter API a bit recently, and noticed that searches for updates/projects/comments can have a "count" parameter that defines the maximum number of results returned. If not specified, the API returns 10 results at a time. Non-numeric values or values less than 1 are treated as 1.
This functionality is easy enough to implement in Kickscraper by adding a "count" parameter to the relevant methods in client.rb, but I'm wondering if it might be better to accept a hash parameter. So we could call something like:
Alternatively, we could make things a little more explicit by creating something like a
QueryParametersclass and passing that around. I'd be happy to implement this either way, but figured I'd see how the maintainers feel before running off in an unproductive direction.