def set_region_children_data(self, data): handle_errors(data["RegionChildren:regionchildren"]['message']['code']) result = data['RegionChildren:regionchildren'] self.region = result['response'] self._map_data_to_places(result['response']['list']['region'], result['request'], result['response']['subregiontype'])
def set_property_details_data(self, data): handle_errors(data['UpdatedPropertyDetails:updatedPropertyDetails']['message']['code']) result = data['UpdatedPropertyDetails:updatedPropertyDetails']['response'] place = self.place place.set_zpid(result['zpid']) place.links.set_links_data(result, 'propertydetails') place.address.set_address_data(result, 'propertydetails') place.details.set_details_data(result, 'propertydetails')
def set_zestimate_data(self, data): handle_errors(data["Zestimate:zestimate"]['message']['code']) result = data['Zestimate:zestimate']['response'] place = self.place place.set_zpid(result['zpid']) place.links.set_links_data(result, 'zestimate') place.address.set_address_data(result, 'zestimate') place.zestimate.set_zestimate_data(result, 'zestimate') place.local_real_estate.set_local_real_estate_data(result, 'zestimate')
def set_search_result_data(self, data): handle_errors(data['SearchResults:searchresults']['message']['code']) result = data['SearchResults:searchresults']['response']['results'][ 'result'] place = self.place place.set_zpid(result['zpid']) place.links.set_links_data(result, 'searchresults') place.address.set_address_data(result, 'searchresults') place.zestimate.set_zestimate_data(result, 'searchresults') place.local_real_estate.set_local_real_estate_data( result, 'searchresults')
def set_comps_data(self, data): handle_errors(data['Comps:comps']['message']['code']) result = data['Comps:comps']['response']['properties'] principal = self.principal principal.set_zpid(result['principal']['zpid']) principal.links.set_links_data(result['principal'], 'comps') principal.address.set_address_data(result['principal'], 'comps') principal.zestimate.set_zestimate_data(result['principal'], 'comps') principal.local_real_estate.set_local_real_estate_data( result['principal'], 'comps') self._map_data_to_places(result['comparables']['comp'])