Class: Fleakr::Objects::Search
- Inherits:
-
Object
- Object
- Fleakr::Objects::Search
- Defined in:
- lib/fleakr/objects/search.rb
Instance Method Summary collapse
-
#initialize(search_options) ⇒ Search
constructor
Create a new search.
-
#results ⇒ Object
Retrieve search results from the API.
Constructor Details
#initialize(search_options) ⇒ Search
Create a new search
6 7 8 |
# File 'lib/fleakr/objects/search.rb', line 6 def initialize() @search_options = end |
Instance Method Details
#results ⇒ Object
Retrieve search results from the API
11 12 13 14 15 16 |
# File 'lib/fleakr/objects/search.rb', line 11 def results @results ||= begin response = Fleakr::Api::MethodRequest.with_response!('photos.search', parameters) (response.body/'rsp/photos/photo').map {|p| Photo.new(p) } end end |