Skip to content

Commit

Permalink
Merge branch 'master' of git@github.com:yql/yql-tables
Browse files Browse the repository at this point in the history
  • Loading branch information
erik committed Apr 18, 2010
2 parents 501c0dc + 4b182fc commit 5da2526
Show file tree
Hide file tree
Showing 3 changed files with 92 additions and 0 deletions.
61 changes: 61 additions & 0 deletions google/google.analytics.xml
@@ -0,0 +1,61 @@
<?xml version="1.0" encoding="UTF-8"?>
<table xmlns="http://query.yahooapis.com/v1/schema/table.xsd">
<meta>
<author>Sam Pullara</author>
<description>Access your Google Analytics accounts</description>
<documentationURL>http://code.google.com/apis/analytics/docs/gdata/gdataDeveloperGuide.html</documentationURL>
</meta>
<bindings>
<select>
<urls>
<url>https://www.google.com/accounts/ClientLogin</url>
</urls>
<inputs>
<key id="accountType" paramType="variable" default="GOOGLE"/>
<key id="Email" paramType="variable" required="true"/>
<key id="Passwd" paramType="variable" required="true"/>
<key id="service" paramType="variable" default="analytics"/>
<key id="source" paramType="variable" default="sampullara-yql-1.0"/>
</inputs>
<execute><![CDATA[
var content = "accountType=" + encodeURIComponent(accountType) +
"&Email=" + encodeURIComponent(Email) +
"&Passwd=" + encodeURIComponent(Passwd) +
"&service=" + encodeURIComponent(service) +
"&source=" + encodeURIComponent(source);
response.object = request.contentType("application/x-www-form-urlencoded").header("GData-Version", "2").post(content).response;
]]></execute>
</select>
<select itemPath="" produces="XML">
<urls>
<url>https://www.google.com/analytics/feeds/data</url>
</urls>
<inputs>
<key id="ids" type="xs:string" paramType="query" required="true"/>
<key id="dimensions" type="xs:string" paramType="query"/>
<key id="metrics" type="xs:string" paramType="query" required="true"/>
<key id="filters" type="xs:string" paramType="query"/>
<key id="sort" type="xs:string" paramType="query"/>
<key id="start-date" as="start" type="xs:string" paramType="query" required="true"/>
<key id="end-date" as="end" type="xs:string" paramType="query" required="true"/>
<key id="max-results" as="max" type="xs:string" paramType="query"/>
<key id="auth" paramType="variable" required="true"/>
</inputs>
<execute><![CDATA[
y.log(request.url);
response.object = request.header("GData-Version", "2").header("Authorization", "GoogleLogin Auth=" + auth).get().response;
]]></execute>
</select>
<select>
<urls>
<url>https://www.google.com/analytics/feeds/accounts/default</url>
</urls>
<inputs>
<key id="auth" paramType="variable" required="true"/>
</inputs>
<execute><![CDATA[
response.object = request.header("GData-Version", "2").header("Authorization", "GoogleLogin Auth=" + auth).get().response;
]]></execute>
</select>
</bindings>
</table>
12 changes: 12 additions & 0 deletions simplegeo/simplegeo.nearby.xml
Expand Up @@ -26,6 +26,12 @@ var accessor = { consumerSecret:secret, tokenSecret:""};
<key id="geohash" type="xs:string" paramType="path" required="true"/>
<key id="ck" type="xs:string" paramType="variable" required="true"/>
<key id="secret" type="xs:string" paramType="variable" required="true"/>
<key id="radius" paramType="query"/>
<key id="layers" paramType="query"/>
<key id="types" paramType="query"/>
<key id="start" paramType="query"/>
<key id="end" paramType="query"/>
<key id="limit" paramType="query"/>
</inputs>
<execute>
<![CDATA[
Expand Down Expand Up @@ -56,6 +62,12 @@ try {
<key id="lon" type="xs:string" paramType="path" required="true"/>
<key id="ck" type="xs:string" paramType="variable" required="true"/>
<key id="secret" type="xs:string" paramType="variable" required="true"/>
<key id="radius" paramType="query"/>
<key id="layers" paramType="query"/>
<key id="types" paramType="query"/>
<key id="start" paramType="query"/>
<key id="end" paramType="query"/>
<key id="limit" paramType="query"/>
</inputs>
<execute>
<![CDATA[
Expand Down
19 changes: 19 additions & 0 deletions slideshare/slideshare.slideshows.xml
@@ -0,0 +1,19 @@
<?xml version="1.0" encoding="UTF-8"?>
<table xmlns="http://query.yahooapis.com/v1/schema/table.xsd">
<meta>
<author>Jonathan LeBlanc (Twitter: @jcleblanc)</author>
<description>Slideshare Slideshows by User</description>
<documentationURL>http://www.slideshare.net/rss/user/{user}</documentationURL>
<sampleQuery>SELECT * FROM {table} WHERE user='jcleblanc'</sampleQuery>
</meta>
<bindings>
<select itemPath="rss.channel.item" produces="XML" >
<urls>
<url env="all">http://www.slideshare.net/rss/user/{user}</url>
</urls>
<inputs>
<key id="user" type="xs:string" paramType="path" required="true" />
</inputs>
</select>
</bindings>
</table>

0 comments on commit 5da2526

Please sign in to comment.