Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: d85e325d18
Fetching contributors…

Cannot retrieve contributors at this time

file 30 lines (28 sloc) 1.042 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
<?xml version="1.0" encoding="UTF-8"?>
<table xmlns="http://query.yahooapis.com/v1/schema/table.xsd">
  <meta>
    <author>Martin Wittemann</author>
    <documentationURL></documentationURL>
    <sampleQuery>select * from {table} where user='wittemann'</sampleQuery>
  </meta>
  <bindings>
    <select itemPath="gists" produces="XML">
      <urls>
        <url>http://gist.github.com/api/v1/xml/gists/{user}</url>
      </urls>
      <inputs>
        <key id="user" type="xs:string" paramType="path" required="true"/>
      </inputs>
      <execute><![CDATA[
var list = request.get().response;

for (var i = 0; i < list.gist.length(); i++) {
var repo = list.gist[i].repo;
var q = y.query('use "http://github.com/wittemann/yql-tables/raw/master/github/github.gist.content.xml" as ghc; select * from ghc where repo=' + repo);
var content = q.results.content;
list.gist[i].node += content
}

response.object = list;
]]></execute>
    </select>
  </bindings>
</table>
Something went wrong with that request. Please try again.