Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 48 lines (44 sloc) 2.074 kb
3d8e352 sample tables from the blog post
Samuel Pullara authored
1 <?xml version="1.0" encoding="UTF-8"?>
2 <table xmlns="http://query.yahooapis.com/v1/schema/table.xsd" https="true">
3 <meta>
4 <author>Paul Donnelly</author>
5 <documentationURL>http://developer.netflix.com/docs/REST_API_Reference#0_52696</documentationURL>
6 </meta>
7 <bindings>
98b98f0 put the titles at the top level
Samuel Pullara authored
8 <select itemPath="catalog_titles.catalog_title" produces="XML" >
3d8e352 sample tables from the blog post
Samuel Pullara authored
9 <urls>
10 <url env="all">http://api.netflix.com/catalog/titles/</url>
11 </urls>
12 <paging model="offset">
13 <start id="start_index" default="0" />
14 <pagesize id="max_results" max="100" />
15 <total default="10" />
16 </paging>
17 <inputs>
18 <key id="term" type="xs:string" paramType="query" required="true" />
19 <key id="ck" type="xs:string" paramType="variable" required="true" />
20 <key id="cks" type="xs:string" paramType="variable" required="true" />
21 </inputs>
22 <execute><![CDATA[
1b3e97b @spullara get around a bug where oauth.js assumes a browser is running the code
spullara authored
23 // Get around a bug where oauth.js assumes a browser is running the code
24 var document = {getElementsByTagName:function(value) { return null; }};
3d8e352 sample tables from the blog post
Samuel Pullara authored
25 // Include the OAuth libraries from oauth.net
26 y.include("http://oauth.googlecode.com/svn/code/javascript/oauth.js");
27 y.include("http://oauth.googlecode.com/svn/code/javascript/sha1.js");
28
29 // Collect all the parameters
30 var encodedurl = request.url;
31 var accessor = { consumerSecret: cks, tokenSecret: ""};
32 var message = { action: encodedurl, method: "GET", parameters: [["oauth_consumer_key",ck],["oauth_version","1.0"]]};
33 OAuth.setTimestampAndNonce(message);
34
35 // Sign the request
36 OAuth.SignatureMethod.sign(message, accessor);
37
38 try {
39 // get the content from service along with the OAuth header, and return the result back out
40 response.object = request.contentType('application/xml').header("Authorization", OAuth.getAuthorizationHeader("netflix.com", message.parameters)).get().response;
41 } catch(err) {
42 response.object = {'result':'failure', 'error': err};
43 }
44 ]]></execute>
45 </select>
46 </bindings>
47 </table>
Something went wrong with that request. Please try again.