public DataPoints GetData(Address address) { var searchRequest = new SearchRequest { ZWSID = ZWSID, StreetAddress = address.Street, Zip = address.Zip, }; var searchDocument = api.GetDeepSearchResults(searchRequest); var data = new DataPoints { Address = new Address { ID = GetID(searchDocument), Street = address.Street, Zip = address.Zip, }, MonthlyRent = GetMonthlyRent(searchDocument), SquareFootage = GetFinishedSqFoot(searchDocument), Zestimate = GetZestimate(searchDocument), }; var monthlyRequest = new SearchRequest { ZWSID = ZWSID, StreetAddress = address.Street, Zip = address.Zip, Price = data.Zestimate, }; var monthlyDocument = api.GetMonthlyPaymentResults(monthlyRequest); data.MonthlyTaxes = GetMonthlyTaxes(monthlyDocument); data.MonthlyInsurance = GetMonthlyInsurance(monthlyDocument); return data; }
public XDocument GetMonthlyPaymentResults(SearchRequest request) { var url = string.Format(GetMonthlyPaymentUrl, request.ZWSID, request.Price, request.Zip); return RunQuery(url); }
public XDocument GetDeepSearchResults(SearchRequest request) { var url = string.Format(GetDeepSearchResultUrl, request.ZWSID, request.StreetAddress, request.Zip); return RunQuery(url); }