示例#1
0
		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;
		}
示例#2
0
		public XDocument GetMonthlyPaymentResults(SearchRequest request) {
			var url = string.Format(GetMonthlyPaymentUrl, request.ZWSID, request.Price, request.Zip);
			return RunQuery(url);
		}
示例#3
0
		public XDocument GetDeepSearchResults(SearchRequest request) {
			var url = string.Format(GetDeepSearchResultUrl, request.ZWSID, request.StreetAddress, request.Zip);
			return RunQuery(url);
		}