Class: UCLAPI::Client::Search
- Inherits:
-
Object
- Object
- UCLAPI::Client::Search
- Defined in:
- lib/uclapi/client/search.rb
Instance Method Summary collapse
-
#initialize(client) ⇒ Search
constructor
A new instance of Search.
- #people(params = {}) ⇒ Object
Constructor Details
#initialize(client) ⇒ Search
Returns a new instance of Search.
2 3 4 |
# File 'lib/uclapi/client/search.rb', line 2 def initialize client @client = client end |
Instance Method Details
#people(params = {}) ⇒ Object
6 7 8 9 10 11 12 13 |
# File 'lib/uclapi/client/search.rb', line 6 def people(params = {}) params['query'] || params[:query] || raise(KeyError, "Missing required argument: query") @client.get('/search/people', params)['people'].map do |people| people[:client] = @client UCLAPI::People.new(people) end end |