forked from yql/yql-tables
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactoring smushit table, removing unnecessary complexity as the tab…
…le was using executable JavaScript when the same goal can be achieved by simply using yql's inputs/key features
- Loading branch information
John Tregoning
authored and
John Tregoning
committed
Mar 9, 2010
1 parent
be5b99d
commit 59a9b97
Showing
1 changed file
with
7 additions
and
9 deletions.
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 characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,18 @@ | ||
<?xml version="1.0" encoding="UTF-8" ?> | ||
<table xmlns="http://query.yahooapis.com/v1/schema/table.xsd"> | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<table xmlns="http://query.yahooapis.com/v1/schema/table.xsd" securityLevel="any" https="false"> | ||
<meta> | ||
<author>Chirag Shah</author> | ||
<documentationURL>http://developer.yahoo.com/yslow/smushit/</documentationURL> | ||
<sampleQuery>select * from smushit where url='http://l.yimg.com/a/i/brand/purplelogo/uh/us/news.gif'</sampleQuery> | ||
<sampleQuery>select * from smushit where url="http://l.yimg.com/a/i/brand/purplelogo/uh/us/news.gif"</sampleQuery> | ||
</meta> | ||
<bindings> | ||
<select itemPath="" produces="XML"> | ||
<select produces="JSON"> | ||
<urls> | ||
<url env="all">http://smushit.eperf.vip.ac4.yahoo.com/ysmush.it/ws.php</url> | ||
</urls> | ||
<inputs><key id='url' type='xs:string' paramType='variable' required="true"/></inputs> | ||
<execute><![CDATA[ | ||
var base = [request.url, '?img=', url].join(''); | ||
response.object = y.rest(base).get().response; | ||
]]></execute> | ||
<inputs> | ||
<key id="img" as="url" type="xs:string" paramType="query" required="true" batchable="false" /> | ||
</inputs> | ||
</select> | ||
</bindings> | ||
</table> |