Class: Zoopla::AreaValueGraphs
- Defined in:
- lib/zoopla/area_value_graphs.rb
Instance Method Summary collapse
-
#in(location) ⇒ AreaValueGraphs
Defines the search area.
-
#large ⇒ Object
Sets the size of the returned images to large.
-
#medium ⇒ Object
Sets the size of the returned images to medium.
-
#small ⇒ Object
Sets the size of the returned images to small.
Methods inherited from API
#actual_location, #initialize, #reset!
Constructor Details
This class inherits a constructor from Zoopla::API
Instance Method Details
#in(location) ⇒ AreaValueGraphs
Defines the search area. All possible params are described at developer.zoopla.com/docs/
8 9 10 11 12 13 14 15 16 17 18 |
# File 'lib/zoopla/area_value_graphs.rb', line 8 def in(location) check_output_type location @request.merge! location reply = fetch_data(@request) fields = %w(area_values_url home_values_graph_url value_trend_graph_url value_ranges_graph_url average_values_graph_url) filtered = fields.inject({}) do |result, field| result[field] = reply[field] result end Hashie::Mash.new.update filtered end |
#large ⇒ Object
Sets the size of the returned images to large
36 37 38 39 |
# File 'lib/zoopla/area_value_graphs.rb', line 36 def large @request[:size] = 'large' self end |
#medium ⇒ Object
Sets the size of the returned images to medium
29 30 31 32 |
# File 'lib/zoopla/area_value_graphs.rb', line 29 def medium @request[:size] = 'medium' self end |
#small ⇒ Object
Sets the size of the returned images to small
22 23 24 25 |
# File 'lib/zoopla/area_value_graphs.rb', line 22 def small @request[:size] = 'small' self end |