You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
gh_client.offices(id, page: 1, per_page: 2) works but gh_client.offices(page: 1, per_page: 2) failed with error: /Users/yefeiwang/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/uri/common.rb:176:in split': bad URI(is not URI?): /candidates/{:page=>1, :per_page=>200} (URI::InvalidURIError)`
The text was updated successfully, but these errors were encountered:
Gee, it's been a while since you've posted this. Sorry about that, and thanks for sharing!
@adrianbautista kindly transferred this repo over to Greenhouse, so we'll be maintaining this gem from now on.
I can confirm this is an issue. It's not possible to call GreenhouseIo::Client#jobs with only an options hash, since it would set the id default parameter instead of the options parameter.
However, if you pass in nil for the id, it should work as expected.
gh_client.officesnil,per_page: 1
I do agree it's not very intuitive and the docs don't point this out. Perhaps a better solution, similar to the Job Board code, is to create a new set of methods for retrieving single objects, and then remove the id param from the current list methods, like so:
gh_client.offices(id, page: 1, per_page: 2)
works butgh_client.offices(page: 1, per_page: 2)
failed with error:/Users/yefeiwang/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/uri/common.rb:176:in
split': bad URI(is not URI?): /candidates/{:page=>1, :per_page=>200} (URI::InvalidURIError)`The text was updated successfully, but these errors were encountered: