Class: GiantBombApi::Request::Search
- Inherits:
-
GiantBombApi::Request
- Object
- GiantBombApi::Request
- GiantBombApi::Request::Search
- Defined in:
- lib/giant_bomb_api/request/search.rb
Instance Attribute Summary
Attributes inherited from GiantBombApi::Request
Instance Method Summary collapse
- #end_point ⇒ Object
-
#initialize(query, resources: [GiantBombApi::Resource::Game], limit: 100, page: 1) ⇒ Search
constructor
A new instance of Search.
Constructor Details
#initialize(query, resources: [GiantBombApi::Resource::Game], limit: 100, page: 1) ⇒ Search
Returns a new instance of Search.
4 5 6 7 8 9 10 11 12 |
# File 'lib/giant_bomb_api/request/search.rb', line 4 def initialize(query, resources: [GiantBombApi::Resource::Game], limit: 100, page: 1) params = { query: query, resources: resources.map { |res| res.resource_name }.join(','), limit: limit, page: page } super end_point, params end |
Instance Method Details
#end_point ⇒ Object
14 15 16 |
# File 'lib/giant_bomb_api/request/search.rb', line 14 def end_point '/search' end |