Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge pull request #116 from spier/klout

Klout
  • Loading branch information...
commit d3c277c7a01400460ba5e83c7f7259ac668bc4fa 2 parents d50bf37 + 9457e27
@pjdonnelly pjdonnelly authored
View
6 accessibility/accessibility.evalaccess.xml
@@ -4,8 +4,8 @@
<author>Willian Massami Watanabe (willian@yahoo-inc.com)</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 {table} WHERE url='http://www.watinha.com';</sampleQuery>
- <sampleQuery>SELECT * FROM {table} WHERE url='http://www.yahoo.com' AND levels='1';</sampleQuery>
+ <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">
@@ -18,7 +18,7 @@
<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" />
+ <key id="evalaccess_url" type="xs:string" paramType="path" default="sipt07.si.ehu.es" />
</inputs>
<execute>
<![CDATA[
View
66 klout/README.md
@@ -0,0 +1,66 @@
+# YQL Datatables for klout.com
+
+These YQL datatables allow you to easily query [Klout][klout] data via the [Klout API][klout_api].
+
+In order to use these datatables you will need an API key.
+
+[klout]: http://klout.com
+[klout_api]: http://developer.klout.com/docs/read/api/API
+
+# TODO
+
+The Klout API allows to query a maximum of 5 users in one call.
+With YQL you can query more than 5 in one call though, as YQL will translate your query into multiple calls to the Klout API.
+
+As the Klout API rate limit is 10 calls per second, I assume you could query up to 50 users per call (but I have not tried this).
+
+# Examples of Usage
+
+First load all YQL datatables for klout.com like this:
+(NOTE: this is only valid until the tables are included in datatables.org)
+
+ USE "https://raw.github.com/spier/yql-tables/klout/klout/klout.score.xml";
+ USE "https://raw.github.com/spier/yql-tables/klout/klout/klout.user.show.xml";
+ USE "https://raw.github.com/spier/yql-tables/klout/klout/klout.user.topics.xml";
+ USE "https://raw.github.com/spier/yql-tables/klout/klout/klout.user.influenced_by.xml";
+ USE "https://raw.github.com/spier/yql-tables/klout/klout/klout.user.influencer_of.xml";
+
+Then try either of the YQL queries below. You will need an API key.
+
+## Score for one user
+
+ SELECT *
+ FROM klout.score
+ WHERE api_key="YOUR_API_KEY_HERE" AND users="sebastianspier"
+
+## Score for multiple users
+
+HINT: You can use this syntax to query multiple users for all other queries below as well.
+
+ SELECT *
+ FROM klout.score
+ WHERE api_key="YOUR_API_KEY_HERE" AND users IN ("a","b","c","d","e","f")
+
+## User details
+
+ SELECT *
+ FROM klout.user.show
+ WHERE api_key="YOUR_API_KEY_HERE" AND users="sebastianspier"
+
+## User topics
+
+ SELECT *
+ FROM klout.user.topics
+ WHERE api_key="YOUR_API_KEY_HERE" AND users="sebastianspier"
+
+## Influencees of this user
+
+ SELECT *
+ FROM klout.user.influencer_of
+ WHERE api_key="YOUR_API_KEY_HERE" AND users="sebastianspier"
+
+## Influencers of this user
+
+ SELECT *
+ FROM klout.user.influenced_by
+ WHERE api_key="YOUR_API_KEY_HERE" AND users="sebastianspier"
View
20 klout/klout.score.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<table xmlns="http://query.yahooapis.com/v1/schema/table.xsd">
+ <meta>
+ <author>Sebastian Spier (http://twitter.com/#!/sebastianspier/)</author>
+ <description>Retrieve Klout scores for user(s)</description>
+ <documentationURL>http://developer.klout.com/docs/read/api/API</documentationURL>
+ <sampleQuery>SELECT * FROM {table} WHERE users='davewiner' AND api_key='yourKeyGoesHere'</sampleQuery>
+ </meta>
+ <bindings>
+ <select itemPath="json.users" produces="JSON">
+ <urls>
+ <url>http://api.klout.com/1/klout.json?users={-listjoin|,|users}</url>
+ </urls>
+ <inputs>
+ <key id="users" type="xs:string" paramType="path" required="true" batchable="true" maxBatchItems="5"/>
+ <key id="key" as="api_key" type="xs:string" paramType="query" required="true"/>
+ </inputs>
+ </select>
+ </bindings>
+</table>
View
20 klout/klout.user.influenced_by.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<table xmlns="http://query.yahooapis.com/v1/schema/table.xsd">
+ <meta>
+ <author>Sebastian Spier (http://twitter.com/#!/sebastianspier/)</author>
+ <description>Retrieve up to 5 users that are influenced by the given user.</description>
+ <documentationURL>http://developer.klout.com/docs/read/api/SOI_Methods</documentationURL>
+ <sampleQuery>SELECT * FROM {table} WHERE users='davewiner' AND api_key='yourKeyGoesHere'</sampleQuery>
+ </meta>
+ <bindings>
+ <select itemPath="json.users" produces="JSON">
+ <urls>
+ <url>http://api.klout.com/1/soi/influenced_by.json?users={-listjoin|,|users}</url>
+ </urls>
+ <inputs>
+ <key id="users" type="xs:string" paramType="path" required="true" batchable="true" maxBatchItems="5"/>
+ <key id="key" as="api_key" type="xs:string" paramType="query" required="true"/>
+ </inputs>
+ </select>
+ </bindings>
+</table>
View
20 klout/klout.user.influencer_of.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<table xmlns="http://query.yahooapis.com/v1/schema/table.xsd">
+ <meta>
+ <author>Sebastian Spier (http://twitter.com/#!/sebastianspier/)</author>
+ <description>Retrieve up to 5 users that the given user is an influencer of.</description>
+ <documentationURL>http://developer.klout.com/docs/read/api/SOI_Methods</documentationURL>
+ <sampleQuery>SELECT * FROM {table} WHERE users='davewiner' AND api_key='yourKeyGoesHere'</sampleQuery>
+ </meta>
+ <bindings>
+ <select itemPath="json.users" produces="JSON">
+ <urls>
+ <url>http://api.klout.com/1/soi/influencer_of.json?users={-listjoin|,|users}</url>
+ </urls>
+ <inputs>
+ <key id="users" type="xs:string" paramType="path" required="true" batchable="true" maxBatchItems="5"/>
+ <key id="key" as="api_key" type="xs:string" paramType="query" required="true"/>
+ </inputs>
+ </select>
+ </bindings>
+</table>
View
20 klout/klout.user.show.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<table xmlns="http://query.yahooapis.com/v1/schema/table.xsd">
+ <meta>
+ <author>Sebastian Spier (http://twitter.com/#!/sebastianspier/)</author>
+ <description>Retrieve details about a user</description>
+ <documentationURL>http://developer.klout.com/docs/read/api/User_Methods</documentationURL>
+ <sampleQuery>SELECT * FROM {table} WHERE users='davewiner' AND api_key='yourKeyGoesHere'</sampleQuery>
+ </meta>
+ <bindings>
+ <select itemPath="json.users" produces="JSON">
+ <urls>
+ <url>http://api.klout.com/1/users/show.json?users={-listjoin|,|users}</url>
+ </urls>
+ <inputs>
+ <key id="users" type="xs:string" paramType="path" required="true" batchable="true" maxBatchItems="5"/>
+ <key id="key" as="api_key" type="xs:string" paramType="query" required="true"/>
+ </inputs>
+ </select>
+ </bindings>
+</table>
View
20 klout/klout.user.topics.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<table xmlns="http://query.yahooapis.com/v1/schema/table.xsd">
+ <meta>
+ <author>Sebastian Spier (http://twitter.com/#!/sebastianspier/)</author>
+ <description>Retrieve the top 5 topic of a given user.</description>
+ <documentationURL>http://developer.klout.com/docs/read/api/User_Methods</documentationURL>
+ <sampleQuery>SELECT * FROM {table} WHERE users='davewiner' AND api_key='yourKeyGoesHere'</sampleQuery>
+ </meta>
+ <bindings>
+ <select itemPath="json.users" produces="JSON">
+ <urls>
+ <url>http://api.klout.com/1/users/topics.json?users={-listjoin|,|users}</url>
+ </urls>
+ <inputs>
+ <key id="users" type="xs:string" paramType="path" required="true" batchable="true" maxBatchItems="5"/>
+ <key id="key" as="api_key" type="xs:string" paramType="query" required="true"/>
+ </inputs>
+ </select>
+ </bindings>
+</table>
View
2  prlog/prlog.releases.xml
@@ -7,7 +7,7 @@
<sampleQuery>SELECT * FROM {table}</sampleQuery>
<sampleQuery>SELECT * FROM {table} WHERE country="de"</sampleQuery>
<sampleQuery>SELECT * FROM {table} WHERE country="de" AND category="books"</sampleQuery>
- <sampleQuery>SELECT * FROM {table} WHERE category IN (SELECT category FROM prlog.categories LIMIT 5)"</sampleQuery>
+ <sampleQuery>SELECT * FROM prlog WHERE category IN (SELECT category FROM prlog.categories LIMIT 5)"</sampleQuery>
</meta>
<bindings>
<select itemPath="rss.channel.item" produces="XML">
Please sign in to comment.
Something went wrong with that request. Please try again.