jpick (owner)

Revisions

gist: 104273 Download_button fork
public
Public Clone URL: git://gist.github.com/104273.git
Embed All Files: show embed
gdata-van-twitter.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
<?xml version="1.0" encoding="UTF-8"?>
<table xmlns="http://query.yahooapis.com/v1/schema/table.xsd" https="true">
    <meta>
        <author>Jim Pick</author>
        <documentationURL>http://gist.github.com/gists/104273/</documentationURL>
    </meta>
      <bindings>
        <select itemPath="" produces="XML" >
          <urls>
            <url env="all">http://spreadsheets.google.com/feeds/cells/pUetVbUnXgLbDjatWZKjVAw/1/private/values</url>
          </urls>
         <paging model="offset">
           <start id="start_index" default="0" />
           <pagesize id="max_results" max="100" />
           <total default="10" />
         </paging>
          <inputs>
                <key id="min-row" type="xs:string" paramType="query" const="true" private="true" default="7"/>
                <key id="min-col" type="xs:string" paramType="query" const="true" private="true" default="2"/>
                <key id="max-col" type="xs:string" paramType="query" const="true" private="true" default="2"/>
                <key id="ck" type="xs:string" paramType="variable" required="true" default="45c53f8...d5f645"/>
                <key id="cks" type="xs:string" paramType="variable" required="true" default="45c53f8...d5f645"/>
          </inputs>
          <execute><![CDATA[
// Include the OAuth libraries from oauth.net
y.include("http://oauth.googlecode.com/svn/code/javascript/oauth.js");
y.include("http://oauth.googlecode.com/svn/code/javascript/sha1.js");
 
// Collect all the parameters
var encodedurl = request.url;
var accessor = { consumerSecret: cks, tokenSecret: ""};
var message = { action: encodedurl, method: "GET", parameters: [["oauth_consumer_key",ck],["oauth_version","1.0"]]};
OAuth.setTimestampAndNonce(message);
 
// Sign the request
OAuth.SignatureMethod.sign(message, accessor);
 
try {
// get the content from service along with the OAuth header, and return the result back out
response.object = request.contentType('application/xml').header("Authorization", OAuth.getAuthorizationHeader("netflix.com", message.parameters)).get().response;
} catch(err) {
response.object = {'result':'failure', 'error': err};
}
]]></execute>
        </select>
      </bindings>
</table>