public updatedPropertyDetails GetUpdatedPropertyDetails(uint zpid) { try { Hashtable p = new Hashtable { { "zws-id", Zwsid }, { "zpid", zpid } }; updatedPropertyDetails upd = (updatedPropertyDetails)CallAPI(ZillowURI.UpdatedPropertyDetails, p, typeof(updatedPropertyDetails)); if (upd == null) { throw new NullReferenceException("searchresults API value is null"); } if (int.Parse(upd.message.code) != 0 && int.Parse(upd.message.code) != 501) { throw new Exception(string.Format("Zillow Error #{0}: {1}", upd.message.code, upd.message.text)); } return(upd); } catch (Exception ex) { Debug.WriteLine(ex.Message); throw ex; } }
public async Task <updatedPropertyDetails> GetUpdatedPropertyDetailsAsync(uint zpid) { try { Hashtable p = new Hashtable { { "zws-id", Zwsid }, { "zpid", zpid } }; updatedPropertyDetails upd = await CallAPIAsync <updatedPropertyDetails>(ZillowURI.UpdatedPropertyDetails, p); if (upd == null) { throw new NullReferenceException("updatedPropertyDetails API value is null"); } if (int.Parse(upd.message.code) != 0) { throw new Exception(string.Format("Zillow Error #{0}: {1}", upd.message.code, upd.message.text)); } return(upd); } catch (Exception ex) { Debug.WriteLine(ex.Message); throw ex; } }