Class: Rubillow::HomeValuation
- Inherits:
-
Object
- Object
- Rubillow::HomeValuation
- Defined in:
- lib/rubillow/home_valuation.rb
Overview
Interface for the Home Valuation API.
Read the more about this API at: http://www.zillow.com/howto/api/HomeValuationAPIOverview.htm
Class Method Summary collapse
-
.chart(options = {}) ⇒ Models::PropertyChart
Retrieve a chart for the specified property.
-
.comps(options = {}) ⇒ Models::Comps
Retrieve a list of comps for the specified property.
-
.search_results(options = {}) ⇒ Models::SearchResult
Retrieve a property by the specified address.
-
.zestimate(options = {}) ⇒ Models::SearchResult
Retrieve a zestimate for the specified property.
Class Method Details
.chart(options = {}) ⇒ Models::PropertyChart
Retrieve a chart for the specified property.
Read more at: http://www.zillow.com/howto/api/GetChart.htm.
90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 |
# File 'lib/rubillow/home_valuation.rb', line 90 def self.chart( = {}) = { :zws_id => Rubillow.configuration.zwsid, :zpid => nil, :unit_type => nil, :width => nil, :height => nil, :chartDuration => nil, }.merge!() if [:zpid].nil? raise ArgumentError, "The zpid option is required" end if [:unit_type].nil? raise ArgumentError, "The unit_type option is required" end Models::PropertyChart.new(Rubillow::Request.get("GetChart", )) end |
.comps(options = {}) ⇒ Models::Comps
Retrieve a list of comps for the specified property.
Read more at: http://www.zillow.com/howto/api/GetComps.htm.
129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 |
# File 'lib/rubillow/home_valuation.rb', line 129 def self.comps( = {}) = { :zws_id => Rubillow.configuration.zwsid, :zpid => nil, :count => nil, :rentzestimate => false, }.merge!() if [:zpid].nil? raise ArgumentError, "The zpid option is required" end if [:count].nil? raise ArgumentError, "The count option is required" end Models::Comps.new(Rubillow::Request.get("GetComps", )) end |
.search_results(options = {}) ⇒ Models::SearchResult
Retrieve a property by the specified address.
Read more at: http://www.zillow.com/howto/api/GetSearchResults.htm.
23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 |
# File 'lib/rubillow/home_valuation.rb', line 23 def self.search_results( = {}) = { :zws_id => Rubillow.configuration.zwsid, :address => nil, :citystatezip => nil, :rentzestimate => false, }.merge!() if [:address].nil? raise ArgumentError, "The address option is required" end if [:citystatezip].nil? raise ArgumentError, "The citystatezip option is required" end Models::SearchResult.new(Rubillow::Request.get("GetSearchResults", )) end |
.zestimate(options = {}) ⇒ Models::SearchResult
Retrieve a zestimate for the specified property.
Read more at: http://www.zillow.com/howto/api/GetZestimate.htm.
58 59 60 61 62 63 64 65 66 67 68 69 70 |
# File 'lib/rubillow/home_valuation.rb', line 58 def self.zestimate( = {}) = { :zws_id => Rubillow.configuration.zwsid, :zpid => nil, :rentzestimate => false, }.merge!() if [:zpid].nil? raise ArgumentError, "The zpid option is required" end Models::SearchResult.new(Rubillow::Request.get("GetZestimate", )) end |