-
Notifications
You must be signed in to change notification settings - Fork 0
/
twitter.status.xml
52 lines (50 loc) · 1.83 KB
/
twitter.status.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
<?xml version="1.0" encoding="UTF-8"?>
<table xmlns="http://query.yahooapis.com/v1/schema/table.xsd" https="true">
<meta>
<author>Zach Graves ([email protected])</author>
<description>Twitter OAuth API</description>
<documentationURL>http://apiwiki.twitter.com/Twitter-API-Documentation</documentationURL>
<sampleQuery>select * from {table} where id=@id;</sampleQuery>
<sampleQuery>URL Pattern; dsdsdsdsds</sampleQuery>
</meta>
<bindings>
<select itemPath="" produces="XML">
<urls>
<url>http://api.twitter.com/1/statuses/show/{id}.{format}</url>
</urls>
<inputs>
<key id="id" type="xs:string" paramType="path" required="true"/>
<key id="format" type="xs:string" paramType="path" default="xml" private="true"/>
<key id="oauth_consumer_key" type="xs:string" paramType="variable" required="false"/>
<key id="oauth_consumer_secret" type="xs:string" paramType="variable" required="false"/>
<key id="oauth_token" type="xs:string" paramType="variable" required="false"/>
<key id="oauth_token_secret" type="xs:string" paramType="variable" required="false"/>
</inputs>
<execute>
<![CDATA[
if(oauth_consumer_key && oauth_consumer_secret && oauth_token && oauth_token_secret) {
y.include("http://www.datatables.org/oauth/oauth.utils.js");
var accessor = {};
accessor.consumerKey = oauth_consumer_key;
accessor.consumerSecret = oauth_consumer_secret;
accessor.realm = request.url;
accessor.token = oauth_token;
accessor.tokenSecret = oauth_token_secret;
response.object = sendRequest({
action: request.url,
method: 'GET',
accessor: accessor,
parameters: null
});
} else {
try {
response.object = request.get().response;
} catch(err) {
response.object = {'result':'failure', 'error': err};
}
}
]]>
</execute>
</select>
</bindings>
</table>