Skip to content

Instantly share code, notes, and snippets.

@abernier
Created July 21, 2011 14:02
Show Gist options
  • Save abernier/1097256 to your computer and use it in GitHub Desktop.
Save abernier/1097256 to your computer and use it in GitHub Desktop.
YQL github.gist.content table
<?xml version="1.0" encoding="UTF-8"?>
<table xmlns="http://query.yahooapis.com/v1/schema/table.xsd">
<meta>
<author>Antoine BERNIER</author>
<documentationURL></documentationURL>
<sampleQuery>USE 'https://raw.github.com/gist/1097256' AS github.gist.content; select * from github.gist.content where gist_id='1097256'</sampleQuery>
</meta>
<bindings>
<select itemPath="content" produces="JSON">
<urls>
<url>http://gist.github.com/raw/{gist_id}</url>
</urls>
<inputs>
<key id="gist_id" type="xs:string" paramType="path" required="true"/>
</inputs>
<execute>
<![CDATA[
var content = request.get().response;
response.object = <content>{content}</content>;
]]>
</execute>
</select>
</bindings>
</table>
@abernier
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment