Permalink
Browse files

Merge branch 'master' of github.com:yql/yql-tables

  • Loading branch information...
2 parents 480e2bf + 28c37cf commit 62a36400515e53000ec821e9c3967cc9decfcb82 @zagraves zagraves committed Aug 12, 2010
Showing with 2,477 additions and 134 deletions.
  1. +21 −0 arxiv/arxiv.search.xml
  2. +87 −0 bbc/bbc.goodfood.seasonal.xml
  3. +1 −1 brazil/correios/brazil.correios.encomendas.xml
  4. +4 −4 facebook/facebook.graph.xml
  5. +59 −0 geo/geo.globeimage.xml
  6. +50 −0 geo/geo.placefinder.xml
  7. +18 −0 github/github.user.whatched.xml
  8. +1 −1 google/google.buzz.updates.xml
  9. +35 −0 google/google.picasa.album.info.xml
  10. +38 −0 google/google.picasa.album.photos.xml
  11. +33 −0 google/google.picasa.photo.comments.xml
  12. +30 −0 google/google.picasa.photo.info.xml
  13. +33 −0 google/google.picasa.photo.tags.xml
  14. +29 −0 google/google.picasa.user.contacts.xml
  15. +26 −0 google/google.picasa.user.info.xml
  16. +2 −2 google/google.search.xml
  17. +32 −0 hatena/hatena.bookmark.getasincount.xml
  18. +32 −0 hatena/hatena.bookmark.getcount.xml
  19. +30 −0 hatena/hatena.bookmark.gettotalcount.xml
  20. +20 −0 infochimps/infochimps.influence.xml
  21. +20 −0 infochimps/infochimps.trstrank.xml
  22. +20 −0 infochimps/infochimps.wordbag.xml
  23. +49 −0 keywordfinder/keywordfinder.xml
  24. +58 −0 linkedin/linkedin.peoplesearch.xml
  25. +19 −0 livedoor/livedoor.weather.forecast.xml
  26. +27 −0 mendeley/mendeley.search.xml
  27. +4 −1 newegg/newegg.search.xml
  28. +1 −1 noaa/noaa.spc.day1otlk.xml
  29. +21 −0 npr/npr.stations.xml
  30. +21 −0 npr/npr.stories.xml
  31. +15 −0 npr/npr.topics.xml
  32. +115 −0 openid/openid.assoc.test.xml
  33. +194 −0 openid/openid.test.xml
  34. +100 −0 openid/openid.verify.test.xml
  35. +101 −0 openid/test.normalize.xml
  36. +29 −0 seomoz/seomoz.urlMetrics.xml
  37. +30 −0 slideshare/slideshare.slides.xml
  38. +22 −0 socialmention/socialmention.search.xml
  39. +29 −0 sunlight/sunlight.contributions.xml
  40. +1 −1 thesaurus/thesaurus.xml
  41. +149 −0 timeout/timeout.london.search.xml
  42. +30 −0 twitter/twitter.addlang.xml
  43. +9 −6 twitter/twitter.user.timeline.xml
  44. +21 −0 ukgeocode/ukgeocode.xml
  45. +18 −0 ukparliament/ukparliament.commons.constituencies.xml
  46. +18 −0 ukparliament/ukparliament.commons.members.xml
  47. +20 −0 url/status.xml
  48. +179 −111 yahoo/finance/yahoo.finance.options.xml
  49. +10 −6 yahoo/finance/yahoo.finance.stock.xml
  50. +141 −0 yahoo/finance/yahoo.finance.stocks.xml
  51. +22 −0 yahoojp/auctions/yahoojp.auctions.contentsmatchitem.xml
  52. +26 −0 yahoojp/map/yahoojp.map.openlocalplatform.geocoder.xml
  53. +20 −0 yahoojp/map/yahoojp.map.openlocalplatform.reversegeocoder.xml
  54. +56 −0 yahoojp/map/yahoojp.map.openlocalplatform.static.xml
  55. +22 −0 yahoojp/search/yahoojp.search.blogsearch.xml
  56. +1 −0 yahoojp/shopping/yahoojp.shopping.categoryranking.xml
  57. +1 −0 yahoojp/shopping/yahoojp.shopping.queryranking.xml
  58. +25 −0 yahoojp/shopping/yahoojp.shopping.urlitemmatchadd.xml
  59. +23 −0 yahoojp/shopping/yahoojp.shopping.urlitemmatchlookup.xml
  60. +25 −0 yahoojp/shopping/yahoojp.shopping.urlitemmatchremove.xml
  61. +25 −0 yahoojp/shopping/yahoojp.shopping.urlitemmatchsearch.xml
  62. +48 −0 youtube/youtube.user.xml
  63. +41 −0 youtube/youtube.video.comments.xml
  64. +71 −0 youtube/youtube.video.xml
  65. +19 −0 yui/yui.files.md5.xml
View
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<table xmlns="http://query.yahooapis.com/v1/schema/table.xsd">
+ <meta>
+ <author>Christian Heilmann</author>
+ <documentationURL>http://arxiv.org/help/api/index</documentationURL>
+ <sampleQuery>select * from {table} where search_query="all:electron"</sampleQuery>
+ </meta>
+ <bindings>
+ <select itemPath="feed.entry" produces="XML">
+ <urls>
+ <url><![CDATA[http://export.arxiv.org/api/query]]></url>
+ </urls>
+ <inputs>
+ <key id='search_query' type='xs:string' paramType='query' />
+ <key id='start' type='xs:string' paramType='query' />
+ <key id='max_results' type='xs:string' paramType='query' />
+ </inputs>
+ </select>
+ </bindings>
+</table>
+
@@ -0,0 +1,87 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+ Document : bbc.goodfood.seasonal.xml
+ Created on : May 9, 2010, 6:00 PM
+ Author : rob
+ Description:
+ Purpose of the document follows.
+-->
+
+<table xmlns="http://query.yahooapis.com/v1/schema/table.xsd">
+ <meta>
+ <author>Rob Young</author>
+ <sampleQuery>USE "http://www.roryoung.co.uk/bbc.goodfood.seasonal.xml" as bbc.goodfood.seasonal; SELECT * FROM bbc.goodfood.seasonal;</sampleQuery>
+ <documentationURL></documentationURL>
+ </meta>
+ <bindings>
+ <select itemPath="" produces="JSON">
+ <urls>
+ <url>http://www.bbcgoodfood.com/content/local/seasonal/table</url>
+ </urls>
+ <inputs>
+ <key id="foodtype" type="xs:string" paramType="variable"/>
+ </inputs>
+ <execute><![CDATA[
+ var url = "http://www.bbcgoodfood.com/content/local/seasonal/table";
+ if (foodtype != undefined) {
+ url += "/" + foodtype;
+ }
+ var xpath = '//div[@id="content"]/table/tbody/tr';
+
+ var query = y.query("SELECT * FROM html WHERE url=@url AND xpath=@xpath", {url: url, xpath: xpath});
+ var results = <results></results>;
+
+ for each(var result in query.results.tr) {
+ var my_result = <result/>;
+ my_result.appendChild(<name>{result.th.a.text()}</name>);
+ my_result.@href = result.th.a.@href;
+
+ var monthResults = new Array();
+ for (var i in result.td) {
+ if (result.td[i].img.@alt.length() > 0) {
+ if (result.td[i].img.@alt.substring(0, 9) == "coming in") {
+ monthResults.push(1);
+ } else {
+ monthResults.push(2);
+ }
+ } else {
+ monthResults.push(0);
+ }
+ }
+ var previous = null;
+ var foundComing = false;
+ var foundBestIn = false;
+ var foundBestOut = false;
+ for (var i in monthResults) {
+ if (previous != null && monthResults[i] != previous) {
+ if (monthResults[i] == 1) {
+ foundComing = true;
+ my_result.appendChild(<comingInFrom>{i}</comingInFrom>);
+ } else if(monthResults[i] == 2) {
+ foundBestIn = true;
+ my_result.appendChild(<atItsBestFrom>{i}</atItsBestFrom>);
+ } else if(monthResults[i] == 0 && previous == 2) {
+ foundBestOut = true;
+ my_result.appendChild(<atItsBestUntil>{i-1}</atItsBestUntil>);
+ }
+ }
+ previous = monthResults[i];
+ }
+ if (!foundComing) {
+ my_result.appendChild(<comingInFrom>0</comingInFrom>);
+ }
+ if (!foundBestIn) {
+ my_result.appendChild(<atItsBestFrom>0</atItsBestFrom>);
+ }
+ if (!foundBestOut) {
+ my_result.appendChild(<atItsBestUntil>11</atItsBestUntil>);
+ }
+
+ results.appendChild(my_result);
+ }
+ response.object = results;
+ ]]></execute>
+ </select>
+ </bindings>
+</table>
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<table xmlns="http://query.yahooapis.com/v1/schema/table.xsd">
<meta>
- <author>Guilherme Chapiewski</author>
+ <author>Guilherme Chapiewski &lt;guilherme.chapiewski@gmail.com&gt;</author>
<sampleQuery>select * from {table} where numero='EC884014459BR'</sampleQuery>
</meta>
<bindings>
@@ -25,7 +25,7 @@
<key id="id" type="xs:string" paramType="path" required="true" />
<key id="connection" type="xs:string" paramType="path" required="true" />
<key id="fields" type="xs:string" paramType="query" required="false" />
- <key id="access_token" type="xs:stirng" paramType="query" required="false" />
+ <key id="access_token" type="xs:string" paramType="query" required="false" />
</inputs>
</select>
<select produces="JSON" itemPath="">
@@ -39,7 +39,7 @@
<inputs>
<key id="ids" type="xs:string" paramType="query" required="true" />
<key id="fields" type="xs:string" paramType="query" required="false" />
- <key id="access_token" type="xs:stirng" paramType="query" required="false" />
+ <key id="access_token" type="xs:string" paramType="query" required="false" />
</inputs>
</select>
<select produces="JSON" itemPath="">
@@ -53,7 +53,7 @@
<inputs>
<key id="id" type="xs:string" paramType="path" required="true" />
<key id="fields" type="xs:string" paramType="query" required="false" />
- <key id="access_token" type="xs:stirng" paramType="query" required="false" />
+ <key id="access_token" type="xs:string" paramType="query" required="false" />
</inputs>
</select>
<select produces="JSON" itemPath="">
@@ -67,7 +67,7 @@
<inputs>
<key id="q" type="xs:string" paramType="query" required="true" />
<key id="type" type="xs:string" paramType="query" required="true" />
- <key id="access_token" type="xs:stirng" paramType="query" required="false" />
+ <key id="access_token" type="xs:string" paramType="query" required="false" />
</inputs>
</select>
</bindings>
View
@@ -0,0 +1,59 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<table xmlns="http://query.yahooapis.com/v1/schema/table.xsd">
+ <meta>
+ <sampleQuery>select * from {table} where place="london,uk"</sampleQuery>
+ <author>Christian Heilmann</author>
+ <description>Creates an badge of earth with a star at the location you defined. Returns the HTML image tag. If you provide a type parameter of "data" it returns the image as a data URI. If you set the location parameter to true you also get the information about the place.</description>
+ </meta>
+ <bindings>
+ <select itemPath="" produces="XML">
+ <inputs>
+ <key id='place' type='xs:string' paramType='variable' required="true" />
+ <key id='type' type='xs:string' paramType='variable' required="false" />
+ <key id='location' type='xs:string' paramType='variable' required="false" />
+ </inputs>
+ <execute><![CDATA[
+ default xml namespace = "http://where.yahooapis.com/v1/schema.rng";
+ var res = y.query("select * from geo.places(1) where text='"+
+ place + "'").results;
+ var lat = res.place.centroid.latitude;
+ var lon = res.place.centroid.longitude;
+ lat = Math.round(parseInt(lat)/5)*5;
+ lon = Math.round(parseInt(lon)/5)*5;
+ if(lat === +lat){
+ var src='http://earthquake.usgs.gov/images/globes/'+
+ lat+'_'+lon+'.jpg';
+ var loc = '';
+ if(location === 'true'){
+ var loc = <ul class="location">
+ <li>Name: {res..name.text()}</li>
+ <li>Placetype: {res..placeTypeName.text()}</li>
+ <li>Country: {res..country.text()}</li>
+ <li>Latitude: {res..centroid.latitude.text()}</li>
+ <li>Longitude: {res..centroid.longitude.text()}</li>
+ <li>WOEID: {res..woeid.text()}</li>
+ </ul>;
+ }
+ default xml namespace = "";
+ if(type === 'data'){
+ var data = y.query('select * from data.uri where url="'+
+ src+'"').results;
+ var datauri = data..url;
+ var dataimg = <img/>;
+ dataimg.@src = data..url;
+ dataimg.@alt = place;
+ }
+ var img = <img/>;
+ img.@src = src;
+ img.@alt = place;
+ var out = (type === 'data') ? dataimg : img;
+ response.object = <div class="globe">{out}{loc}</div>;
+ } else {
+ response.object = <error>
+ No location found for {place}, sorry.
+ </error>;
+ }
+ ]]></execute>
+ </select>
+ </bindings>
+</table>
View
@@ -0,0 +1,50 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<table xmlns="http://query.yahooapis.com/v1/schema/table.xsd">
+ <meta>
+ <author>Yahoo! Inc.</author>
+ <description>GeoPlanet PlaceFinder table</description>
+<documentationURL>http://developer.yahoo.com/geo/placefinder/guide</documentationURL>
+ <sampleQuery>select * from {table} where text="sfo"</sampleQuery>
+ </meta>
+ <bindings>
+ <select itemPath="ResultSet.Result" produces="XML">
+ <urls>
+ <url env="all">http://where.yahooapis.com/geocode?locale={lang}_{focus}</url>
+ </urls>
+ <paging model="offset" matrix="false">
+
+ <start id="start" default="0" />
+ <pagesize id="count" max="100" />
+ <total default="100" />
+ </paging>
+ <inputs>
+ <key id="house" type="xs:string" paramType="query" />
+ <key id="street" type="xs:string" paramType="query" />
+ <key id="unittype" type="xs:string" paramType="query" />
+ <key id="unit" type="xs:string" paramType="query" />
+
+ <key id="xstreet" type="xs:string" paramType="query" />
+ <key id="postal" type="xs:string" paramType="query" />
+ <key id="level4" type="xs:string" paramType="query" />
+ <key id="level3" type="xs:string" paramType="query" />
+ <key id="level2" type="xs:string" paramType="query" />
+ <key id="level1" type="xs:string" paramType="query" />
+ <key id="level0" type="xs:string" paramType="query" />
+ <key id="neighborhood" type="xs:string" paramType="query" />
+ <key id="city" type="xs:string" paramType="query" />
+
+ <key id="county" type="xs:string" paramType="query" />
+ <key id="state" type="xs:string" paramType="query" />
+ <key id="country" type="xs:string" paramType="query" />
+ <key id="lang" type="xs:string" paramType="path" default="en" />
+ <key id="focus" type="xs:string" paramType="path" default="US" />
+ <key id="q" type="xs:string" paramType="query" default="" />
+ <key id="offset" type="xs:integer" paramType="query" default="0" />
+ <key id="flags" type="xs:string" paramType="query" default="QRGSTX" />
+ <key id="gflags" type="xs:string" paramType="query" default="ACR" />
+ <key id="appid" type="xs:string" const="true" paramType="query" default="YD-bs4vWJU_JXrmPwSfQ8yStcfWoDA5n51J" />
+
+ </inputs>
+ </select>
+ </bindings>
+</table>
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<table xmlns="http://query.yahooapis.com/v1/schema/table.xsd">
+ <meta>
+ <author>Jésus Lopes</author>
+ <documentationURL></documentationURL>
+ <sampleQuery>select * from {table} where id='jtadeulopes'</sampleQuery>
+ </meta>
+ <bindings>
+ <select itemPath="repositories" produces="XML">
+ <urls>
+ <url>http://github.com/api/v2/xml/repos/watched/{id}</url>
+ </urls>
+ <inputs>
+ <key id="id" type="xs:string" paramType="path" required="true"/>
+ </inputs>
+ </select>
+ </bindings>
+</table>
@@ -9,7 +9,7 @@
<bindings>
<select itemPath="" produces="XML" >
<urls>
- <url env="all">http://buzz.googleapis.com/feeds/{user}/public/posted</url>
+ <url env="all">https://www.googleapis.com/buzz/v1/activities/{user}/@public</url>
</urls>
<inputs>
<key id="user" type="xs:string" paramType="path" required="true" />
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<table xmlns="http://query.yahooapis.com/v1/schema/table.xsd">
+ <meta>
+ <author>Jules Cisek</author>
+ <documentationURL>http://code.google.com/apis/picasaweb/overview.html</documentationURL>
+ <description>Uses the picasa API to fetch album data (use google.picasa.album.photos to page through photos)</description>
+ <sampleQuery>SELECT * FROM {table} WHERE user='popmonkey' AND album_key_type='album' AND album_key='Cars'</sampleQuery>
+ </meta>
+ <bindings>
+ <select itemPath='feed' produces='XML'>
+ <urls>
+ <url>http://{host}/data/feed/api/user/{user}/{album_key_type}/{album_key}</url>
+ </urls>
+ <inputs>
+ <key id='user' type='xs:string' paramType='path' required='true'/>
+ <key id='album_key_type' type='xs:string' paramType='path' required='true'/> <!-- either 'album' or 'albumid' -->
+ <key id='album_key' type='xs:string' paramType='path' required='true'/>
+ <key id='host' type='xs:string' paramType='path' default='picasaweb.google.com'/>
+ <key id='kind' type='xs:string' paramType='query' default='photo'/>
+ <key id='alt' type='xs:string' paramType='query' default='atom'/>
+ <key id='access' type='xs:string' paramType='query' default='visible'/>
+ <key id='bbox' type='xs:string' paramType='query'/>
+ <key id='imgmax' type='xs:string' paramType='query'/>
+ <key id='l' type='xs:string' paramType='query'/>
+ <key id='q' type='xs:string' paramType='query'/>
+ <key id='tag' type='xs:string' paramType='query'/>
+ <key id='thumbsize' type='xs:string' paramType='query'/>
+ <key id='authkey' type='xs:string' paramType='query'/>
+ <key id='start-index' type='xs:string' paramType='query' default='1'/>
+ <key id='max-results' type='xs:string' paramType='query' default='0'/>
+ </inputs>
+ </select>
+ </bindings>
+</table>
+
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<table xmlns="http://query.yahooapis.com/v1/schema/table.xsd">
+ <meta>
+ <author>Jules Cisek</author>
+ <documentationURL>http://code.google.com/apis/picasaweb/overview.html</documentationURL>
+ <description>Uses the picasa API to fetch photos from an album (as an array of entries)</description>
+ <sampleQuery>SELECT * FROM {table}(2,5) WHERE user='popmonkey' AND album_key_type='album' AND album_key='Cars'</sampleQuery>
+ </meta>
+ <bindings>
+ <select itemPath='feed.entry' produces='XML'>
+ <urls>
+ <url>http://{host}/data/feed/api/user/{user}/{album_key_type}/{album_key}</url>
+ </urls>
+ <paging model='offset'>
+ <start default='1' id='start-index'/>
+ <pagesize max='100' id='max-results'/>
+ <total default='500'/>
+ </paging>
+ <inputs>
+ <key id='user' type='xs:string' paramType='path' required='true'/>
+ <key id='album_key_type' type='xs:string' paramType='path' required='true'/> <!-- either 'album' or 'albumid' -->
+ <key id='album_key' type='xs:string' paramType='path' required='true'/>
+ <key id='host' type='xs:string' paramType='path' default='picasaweb.google.com'/>
+ <key id='kind' type='xs:string' paramType='query' default='photo'/>
+ <key id='alt' type='xs:string' paramType='query' default='atom'/>
+ <key id='access' type='xs:string' paramType='query' default='visible'/>
+ <key id='bbox' type='xs:string' paramType='query'/>
+ <key id='imgmax' type='xs:string' paramType='query'/>
+ <key id='l' type='xs:string' paramType='query'/>
+ <key id='q' type='xs:string' paramType='query'/>
+ <key id='tag' type='xs:string' paramType='query'/>
+ <key id='thumbsize' type='xs:string' paramType='query'/>
+ <key id='authkey' type='xs:string' paramType='query'/>
+ </inputs>
+ </select>
+ </bindings>
+</table>
+
Oops, something went wrong.

0 comments on commit 62a3640

Please sign in to comment.