forked from yql/yql-tables
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
merging yql/yql-tables into my fork of Spullara's fork
- Loading branch information
Showing
920 changed files
with
38,237 additions
and
1,845 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -0,0 +1,85 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<table xmlns="http://query.yahooapis.com/v1/schema/table.xsd"> | ||
<meta> | ||
<author>3taps, Inc</author> | ||
<description>A table that provides access to the 3taps Search API</description> | ||
<documentationURL>http://developers.3taps.net/methods/search</documentationURL> | ||
<sampleQuery>select * from {table} where source="E_BAY" and text="nintendo" and location="LAX"</sampleQuery> | ||
</meta> | ||
|
||
<bindings> | ||
<select itemPath="postings.posting" produces="XML"> | ||
<urls> | ||
<url>http://3taps.net/search?retvals=accountID,accountName,annotations,body,category,clickCount,currency,expiration,externalID,externalURL,heading,language,images,indexed,latitude,location,longitude,postKey,price,source,text,timestamp,trustedAnnotations</url> | ||
</urls> | ||
<inputs> | ||
<key id="accountID" type="xs:string" paramType="query" required="false" /> | ||
<key id="accountName" type="xs:string" paramType="query" required="false" /> | ||
<key id="body" type="xs:string" paramType="query" required="false" /> | ||
<key id="category" type="xs:string" paramType="query" required="false" /> | ||
<key id="end" type="xs:dateTime" paramType="query" required="false" /> | ||
<key id="externalID" type="xs:string" paramType="query" required="false" /> | ||
<key id="heading" type="xs:string" paramType="query" required="false" /> | ||
<key id="location" type="xs:string" paramType="query" required="false" /> | ||
<key id="postKey" type="xs:string" paramType="query" required="false" /> | ||
<key id="price" type="xs:string" paramType="query" required="false" /> | ||
<key id="source" type="xs:string" paramType="query" required="false" /> | ||
<key id="start" type="xs:dateTime" paramType="query" required="false" /> | ||
<key id="text" type="xs:string" paramType="query" required="false" /> | ||
<key id="trustedAnnotations" type="xs:string" paramType="query" required="false" /> | ||
</inputs> | ||
|
||
<execute> | ||
<![CDATA[ | ||
// not the simplest way to get our results but we need to reformat a few key fields | ||
try { | ||
var results = request.get().response.results; | ||
var postings = <postings/>; | ||
for (var i in results) { | ||
var result = results[i]; | ||
var posting = <posting />; | ||
posting.accountID = result.accountID; | ||
posting.accountName = result.accountName; | ||
posting.annotations = result.annotations; | ||
posting.body = result.body; | ||
posting.category = result.category; | ||
posting.clickCount = result.clickCount; | ||
posting.currency = result.currency; | ||
posting.expiration = result.expiration; | ||
posting.externalID = result.externalID; | ||
posting.externalURL = result.externalURL; | ||
posting.heading = result.heading; | ||
posting.language = result.language; | ||
posting.images = result.images; | ||
posting.indexed = result.indexed; | ||
posting.latitude = result.latitude; | ||
posting.location = result.location; | ||
posting.longitude = result.longitude; | ||
posting.postKey = result.postKey; | ||
posting.price = result.price; | ||
posting.source = result.source; | ||
posting.text = result.text; | ||
posting.timestamp = result.timestamp; | ||
posting.trustedAnnotations = result.trustedAnnotations; | ||
postings.posting += posting; | ||
} | ||
response.object = postings; | ||
} catch(err) { | ||
response.object = {'result':'failure', 'error': err}; | ||
} | ||
]]> | ||
</execute> | ||
|
||
<paging model="page"> | ||
<start id="page" default="0" /> | ||
<pagesize id="rpp" max="1000" /> | ||
<total default="100" /> | ||
</paging> | ||
</select> | ||
</bindings> | ||
</table> | ||
|
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 |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<?xml version="1.0" encoding="UTF-8" ?> | ||
<table xmlns="http://query.yahooapis.com/v1/schema/table.xsd"> | ||
<meta> | ||
<author>Bungie, LLC (table definition by Tim Acheson: www.timacheson.com)</author> | ||
<documentationURL>http://www.haloreachapi.net/wiki/GetPlayerRenderedVideos</documentationURL> | ||
<sampleQuery>SELECT * FROM {table} WHERE gamertag="cbjoe" AND iPage=0</sampleQuery> | ||
</meta> | ||
<bindings> | ||
<select itemPath="" produces="JSON"> | ||
<urls> | ||
<url>http://www.bungie.net/api/reach/reachapijson.svc/file/videos/{identifier}/{gamertag}/{iPage}</url> | ||
</urls> | ||
<inputs> | ||
<key id="identifier" type="xs:string" private="true" paramType="path" default="" /> | ||
<key id="gamertag" type="xs:string" paramType="path" /> | ||
<key id="iPage" type="xs:string" paramType="path" /> | ||
</inputs> | ||
</select> | ||
</bindings> | ||
</table> |
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 |
---|---|---|
@@ -0,0 +1,24 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<table xmlns="http://query.yahooapis.com/v1/schema/table.xsd"> | ||
<meta> | ||
<author></author> | ||
<description></description> | ||
<documentationURL></documentationURL> | ||
<sampleQuery>select * from {table}</sampleQuery> | ||
</meta> | ||
<bindings> | ||
<select itemPath="" produces="XML"> | ||
<urls> | ||
<url></url> | ||
</urls> | ||
<inputs> | ||
<key id="" type="xs:string" paramType="query" /> | ||
</inputs> | ||
<execute> | ||
<![CDATA[ | ||
]]> | ||
</execute> | ||
</select> | ||
</bindings> | ||
</table> |
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 |
---|---|---|
@@ -0,0 +1,91 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<table xmlns="http://query.yahooapis.com/v1/schema/table.xsd"> | ||
<meta> | ||
<author>Willian Massami Watanabe ([email protected])</author> | ||
<description>Validate WCAG 1.0 conformance using EvalAccess (http://sipt07.si.ehu.es/evalaccess2/)</description> | ||
<documentationURL>http://sipt07.si.ehu.es/evalaccess2/howto.html</documentationURL> | ||
<sampleQuery>SELECT * FROM evalaccess WHERE url='http://www.watinha.com';</sampleQuery> | ||
<sampleQuery>SELECT * FROM evalaccess WHERE url='http://www.yahoo.com' AND levels='1';</sampleQuery> | ||
</meta> | ||
<bindings> | ||
<select itemPath="" produces="XML"> | ||
<urls> | ||
<url>http://{evalaccess_url}/evalaccess2/servlet/Evaluate</url> | ||
</urls> | ||
<inputs> | ||
<key id="url" type="xs:string" paramType="query" required="true" /> | ||
<key id="levels" type="xs:string" paramType="query" default="123" /> | ||
<key id="errors" type="xs:string" paramType="query" default="checked" /> | ||
<key id="warnings" type="xs:string" paramType="query" default="checked" /> | ||
<key id="action" type="xs:string" paramType="query" default="Accessibility Evaluation" /> | ||
<key id="evalaccess_url" type="xs:string" paramType="path" default="sipt07.si.ehu.es" /> | ||
</inputs> | ||
<execute> | ||
<![CDATA[ | ||
var params = {url: url, levels: levels, errors: errors, warnings: warnings, action: action}; | ||
var response_text = request.contentType('application/text').accept('application/text').query(params).post().response; | ||
if (response_text){ | ||
// removing extra data before parsing the HTML content | ||
var table_beginning = response_text.search('<h3 class="post">Detailed accessibility evaluation report</h3>'); | ||
var table_end = response_text.search('<h3 class="post">Checkpoint verification times</h3>'); | ||
var results = response_text.substring(table_beginning, table_end); | ||
// getting the json representation for parsing after removing extraoneus content | ||
results = '<result>' + results + '</result>'; | ||
results = new XML(results); | ||
results = y.xmlToJson(results); | ||
var response_xml = <result>{""}</result>; | ||
// if there is no table in the document then there are no errors and warnings to be reported | ||
if (!results.result.table) { | ||
response.object = "0 errors and warnings"; | ||
}else{ | ||
// moving through the tables looking for errors and warnings | ||
for (var i in results.result.table){ | ||
var kind_of_message, table; | ||
table = results.result.table[i]; | ||
// identifying if it is an error or a warning and the priority of the checkpoint | ||
kind_of_message = (table.summary.search('errors') >= 0 ? 'error' : 'warning'); | ||
priority = table.summary.substring(0, 11); | ||
// for each issue identified we move along to create the xml element | ||
for (var j in table.tr){ | ||
var row = table.tr[j]; | ||
if (row.td){ | ||
var checkpoint, description, more_information, html_element, lines; | ||
checkpoint = row.td[0]; | ||
description = row.td[1].content; | ||
if (row.td[1].p.a) | ||
more_information = row.td[1].p.a.href; | ||
else | ||
more_information = ""; | ||
html_element = row.td[2]; | ||
lines = row.td[3].tt; | ||
var issue; | ||
if (kind_of_message == 'error') | ||
issue = <error></error>; | ||
else | ||
issue = <warning></warning>; | ||
issue.appendChild(<priority>{priority}</priority>); | ||
issue.appendChild(<checkpoint>{checkpoint}</checkpoint>); | ||
issue.appendChild(<description>{description}</description>); | ||
issue.appendChild(<more_information>{more_information}</more_information>); | ||
issue.appendChild(<html_element>{html_element}</html_element>); | ||
issue.appendChild(<lines>{lines}</lines>); | ||
} | ||
response_xml.appendChild(issue); | ||
} | ||
} | ||
} | ||
response.object = response_xml; | ||
} | ||
]]> | ||
</execute> | ||
</select> | ||
</bindings> | ||
</table> |
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 |
---|---|---|
@@ -0,0 +1,49 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<table xmlns="http://query.yahooapis.com/v1/schema/table.xsd"> | ||
<meta> | ||
<author>César Rodas</author> | ||
<description>Check if a comment-text is SPAM</description> | ||
<documentationURL>http://akismet.com/development/api/</documentationURL> | ||
<sampleQuery>select * from {table} where key='123456' and text in ('enlarge your penis', 'buy free viagra! viagra for free', 'Nice post I agree with you')</sampleQuery> | ||
</meta> | ||
<bindings> | ||
<select itemPath="" produces="XML"> | ||
<urls> | ||
<url></url> | ||
</urls> | ||
<inputs> | ||
<key id='text' type='xs:string' paramType='variable' required="true" /> | ||
<key id='key' type='xs:string' paramType='variable' required="true" /> | ||
<key id='blog' type='xs:string' paramType='variable' /> | ||
<key id='ip' type='xs:string' paramType='variable' /> | ||
<key id='author' type='xs:string' paramType='variable' /> | ||
<key id='email' type='xs:string' paramType='variable' /> | ||
</inputs> | ||
<execute><![CDATA[ | ||
if (!ip) { | ||
/* Fake IP */ | ||
ip = "127.0.0.2"; | ||
} | ||
if (!author) { | ||
author = ""; | ||
} | ||
if (!email) { | ||
email=""; | ||
} | ||
if (!blog) { | ||
blog=""; | ||
} | ||
var url = "http://" + key + ".rest.akismet.com/1.1/comment-check"; | ||
var post = "blog=" + blog + "&user_ip=" + ip + "&comment_author=" + author + "&comment_author_email=" + email + "&comment_author_url=&comment_content=" + text; | ||
var resp = y.rest(url).post(post).response; | ||
var spam = resp.substr(0,4) == 'true'; | ||
response.object = <result><text>{text}</text> | ||
<is_spam>{spam}</is_spam></result>; | ||
]]></execute> | ||
</select> | ||
</bindings> | ||
</table> |
Oops, something went wrong.