Class: ZillowApi::Client
- Inherits:
-
Object
- Object
- ZillowApi::Client
- Defined in:
- lib/zillow_demographics/client.rb
Constant Summary collapse
- BASE_URL =
'http://www.zillow.com'
Instance Method Summary collapse
- #get_city_data(location, api_key) ⇒ Object
-
#initialize ⇒ Client
constructor
A new instance of Client.
Constructor Details
Instance Method Details
#get_city_data(location, api_key) ⇒ Object
11 12 13 14 15 16 17 18 19 20 |
# File 'lib/zillow_demographics/client.rb', line 11 def get_city_data(location, api_key) response = @connection.get do |req| req.url "/webservice/GetDemographics.htm" req.headers['Accepts'] = 'application/xml' req.params['zws-id'] = api_key req.params['state'] = location[:state] req.params['city'] = location[:city] end response.body end |