Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

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...
commit 59a9b9748172ff9fe7d89a209340797aa2377a54 1 parent be5b99d
John Tregoning authored
Showing with 7 additions and 9 deletions.
  1. +7 −9 smushit/smushit.xml
16 smushit/smushit.xml
View
@@ -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>
Please sign in to comment.
Something went wrong with that request. Please try again.