forked from yql/yql-tables
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' of git@github.com:yql/yql-tables
- Loading branch information
Showing
3 changed files
with
92 additions
and
0 deletions.
There are no files selected for viewing
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,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> |
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
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,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> |