synewaves / rubillow

Ruby library to access the Zillow API
MIT License
50 stars 39 forks source link

Returning neighborhoods from a region_children search. #24

Open raielin opened 10 years ago

raielin commented 10 years ago

Hi, I needed to be able to call just the name of the neighborhoods returned from a query like:

query = Rubillow::Neighborhood.region_children({state:"MA", city: "Boston", childtype: "neighborhood"})

But, in its current state, query.regions[0].neighborhood returns an empty string. In looking at the query results, I think it's just a matter of changing @neighborhood = @parser.xpath('//neighborhood').text to @neighborhood = @parser.xpath('//name').text in the model region.rb.

IF this seems right, would appreciate this minor edit! Thanks!

synewaves commented 10 years ago

@raielin is this something you can provide a pull request for?

raielin commented 10 years ago

@synewaves - no problem! just did. thanks!