Created
March 5, 2009 05:08
Revisions
-
wireframe revised this gist
Mar 5, 2009 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -24,7 +24,7 @@ CmdUtils.CreateCommand({ var html = ''; html += result.size() + ' result found. <br />'; html += "<p>" + address.text + "</p>"; html += "<b>$" + result.find('zestimate').find('amount').text() + "</b><br />"; html += "<i>($" + result.find('zestimate').find('valuationRange').find('low').text() + " - "; -
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -24,6 +24,8 @@ CmdUtils.CreateCommand({ var html = ''; html += result.size() + ' result found. <br />'; html += "<p>" + address.input + "</p>"; html += "<b>$" + result.find('zestimate').find('amount').text() + "</b><br />"; html += "<i>($" + result.find('zestimate').find('valuationRange').find('low').text() + " - "; html += "$" + result.find('zestimate').find('valuationRange').find('high').text() + ")</i>"; -
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -22,11 +22,12 @@ CmdUtils.CreateCommand({ var result = jQuery(xml).find('result'); var html = ''; html += result.size() + ' result found. <br />'; html += "<b>$" + result.find('zestimate').find('amount').text() + "</b><br />"; html += "<i>($" + result.find('zestimate').find('valuationRange').find('low').text() + " - "; html += "$" + result.find('zestimate').find('valuationRange').find('high').text() + ")</i>"; pblock.innerHTML = html; }); }, -
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,40 @@ CmdUtils.CreateCommand({ name: "zillow", icon: "http://www.zillow.com/favicon.ico", homepage: "http://ryan.codecrate.com", author: { name: "Ryan Sonnek", email: "ryan@codecrate.com"}, license: "MIT", description: "Search for property value on zillow.com", help: "select an address and invoke this command", takes: {"address": noun_arb_text}, searchUrl: 'http://www.zillow.com/webservice/GetSearchResults.htm', postData: function(input) { var address = input.text; var zipcode = address.substring(address.lastIndexOf(' ')); var street = address.substring(0, address.lastIndexOf(' ')); return {'zws-id': 'X1-ZWz1csm2cyipsb_6plsv', 'address': address, 'citystatezip': zipcode}; }, preview: function(pblock, address) { pblock.innerHTML = 'Loading...'; jQuery.get(this.searchUrl, this.postData(address), function(xml) { var result = jQuery(xml).find('result'); var html = ''; html += result.size() + ' result found' + "<br />"; html += "<b>$" + result.find('zestimate').find('amount').text() + "</b><br />"; html += "from: $" + result.find('zestimate').find('valuationRange').find('low').text() + "<br />"; html += "to: $" + result.find('zestimate')find('valuationRange').find('high').text() + "<br />"; pblock.innerHTML = html; }); }, execute: function(address) { jQuery.get(this.searchUrl, this.postData(address), function(xml) { var result = jQuery(xml).find('result'); var url = result.find('links').find('homedetails').text(); Utils.openUrlInBrowser(url); }); } });