blob: c99f7226f87aa43c31286533b04b35946460570f [file] [log] [blame]
Joe Gregorio30dfdc32010-12-09 16:34:22 -05001
2<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
3<html><head><title>Python: module apiclient.oauth</title>
4</head><body bgcolor="#f0f0f8">
5
6<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="heading">
7<tr bgcolor="#7799ee">
8<td valign=bottom>&nbsp;<br>
9<font color="#ffffff" face="helvetica, arial">&nbsp;<br><big><big><strong><a href="apiclient.html"><font color="#ffffff">apiclient</font></a>.oauth</strong></big></big></font></td
10><td align=right valign=bottom
Joe Gregorio3b79fa82011-02-17 11:47:17 -050011><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br><a href="file:/usr/local/google/home/jcgregorio/projects/apiclient/apiclient/oauth.py">/usr/local/google/home/jcgregorio/projects/apiclient/apiclient/oauth.py</a></font></td></tr></table>
Joe Gregorio30dfdc32010-12-09 16:34:22 -050012 <p><tt>Utilities&nbsp;for&nbsp;OAuth.<br>
13&nbsp;<br>
14Utilities&nbsp;for&nbsp;making&nbsp;it&nbsp;easier&nbsp;to&nbsp;work&nbsp;with&nbsp;OAuth.</tt></p>
15<p>
16<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
17<tr bgcolor="#aa55cc">
18<td colspan=3 valign=bottom>&nbsp;<br>
19<font color="#ffffff" face="helvetica, arial"><big><strong>Modules</strong></big></font></td></tr>
20
21<tr><td bgcolor="#aa55cc"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
22<td width="100%"><table width="100%" summary="list"><tr><td width="25%" valign=top><a href="copy.html">copy</a><br>
Joe Gregorio3b79fa82011-02-17 11:47:17 -050023<a href="httplib2.html">httplib2</a><br>
24</td><td width="25%" valign=top><a href="logging.html">logging</a><br>
25<a href="oauth2.html">oauth2</a><br>
26</td><td width="25%" valign=top><a href="simplejson.html">simplejson</a><br>
27<a href="urllib.html">urllib</a><br>
28</td><td width="25%" valign=top><a href="urlparse.html">urlparse</a><br>
Joe Gregorio6e537032011-02-09 23:04:26 -050029</td></tr></table></td></tr></table><p>
Joe Gregorio30dfdc32010-12-09 16:34:22 -050030<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
31<tr bgcolor="#ee77aa">
32<td colspan=3 valign=bottom>&nbsp;<br>
33<font color="#ffffff" face="helvetica, arial"><big><strong>Classes</strong></big></font></td></tr>
34
35<tr><td bgcolor="#ee77aa"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
36<td width="100%"><dl>
37<dt><font face="helvetica, arial"><a href="__builtin__.html#object">__builtin__.object</a>
38</font></dt><dd>
39<dl>
40<dt><font face="helvetica, arial"><a href="apiclient.oauth.html#Credentials">Credentials</a>
41</font></dt><dd>
42<dl>
43<dt><font face="helvetica, arial"><a href="apiclient.oauth.html#OAuthCredentials">OAuthCredentials</a>
44</font></dt></dl>
45</dd>
Joe Gregorio6e537032011-02-09 23:04:26 -050046<dt><font face="helvetica, arial"><a href="apiclient.oauth.html#Flow">Flow</a>
47</font></dt><dd>
48<dl>
Joe Gregorio30dfdc32010-12-09 16:34:22 -050049<dt><font face="helvetica, arial"><a href="apiclient.oauth.html#FlowThreeLegged">FlowThreeLegged</a>
50</font></dt></dl>
51</dd>
Joe Gregorio6e537032011-02-09 23:04:26 -050052</dl>
53</dd>
Joe Gregorio30dfdc32010-12-09 16:34:22 -050054<dt><font face="helvetica, arial"><a href="exceptions.html#Exception">exceptions.Exception</a>(<a href="exceptions.html#BaseException">exceptions.BaseException</a>)
55</font></dt><dd>
56<dl>
57<dt><font face="helvetica, arial"><a href="apiclient.oauth.html#Error">Error</a>
58</font></dt><dd>
59<dl>
60<dt><font face="helvetica, arial"><a href="apiclient.oauth.html#MissingParameter">MissingParameter</a>
61</font></dt><dt><font face="helvetica, arial"><a href="apiclient.oauth.html#RequestError">RequestError</a>
62</font></dt></dl>
63</dd>
64</dl>
65</dd>
66</dl>
67 <p>
68<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
69<tr bgcolor="#ffc8d8">
70<td colspan=3 valign=bottom>&nbsp;<br>
71<font color="#000000" face="helvetica, arial"><a name="Credentials">class <strong>Credentials</strong></a>(<a href="__builtin__.html#object">__builtin__.object</a>)</font></td></tr>
72
73<tr bgcolor="#ffc8d8"><td rowspan=2><tt>&nbsp;&nbsp;&nbsp;</tt></td>
74<td colspan=2><tt>Base&nbsp;class&nbsp;for&nbsp;all&nbsp;<a href="#Credentials">Credentials</a>&nbsp;objects.<br>
75&nbsp;<br>
76Subclasses&nbsp;must&nbsp;define&nbsp;an&nbsp;<a href="#Credentials-authorize">authorize</a>()&nbsp;method<br>
77that&nbsp;applies&nbsp;the&nbsp;credentials&nbsp;to&nbsp;an&nbsp;HTTP&nbsp;transport.<br>&nbsp;</tt></td></tr>
78<tr><td>&nbsp;</td>
79<td width="100%">Methods defined here:<br>
80<dl><dt><a name="Credentials-authorize"><strong>authorize</strong></a>(self, http)</dt><dd><tt>Take&nbsp;an&nbsp;httplib2.Http&nbsp;instance&nbsp;(or&nbsp;equivalent)&nbsp;and<br>
81authorizes&nbsp;it&nbsp;for&nbsp;the&nbsp;set&nbsp;of&nbsp;credentials,&nbsp;usually&nbsp;by<br>
82replacing&nbsp;http.request()&nbsp;with&nbsp;a&nbsp;method&nbsp;that&nbsp;adds&nbsp;in<br>
83the&nbsp;appropriate&nbsp;headers&nbsp;and&nbsp;then&nbsp;delegates&nbsp;to&nbsp;the&nbsp;original<br>
84Http.request()&nbsp;method.</tt></dd></dl>
85
86<hr>
87Data descriptors defined here:<br>
88<dl><dt><strong>__dict__</strong></dt>
89<dd><tt>dictionary&nbsp;for&nbsp;instance&nbsp;variables&nbsp;(if&nbsp;defined)</tt></dd>
90</dl>
91<dl><dt><strong>__weakref__</strong></dt>
92<dd><tt>list&nbsp;of&nbsp;weak&nbsp;references&nbsp;to&nbsp;the&nbsp;object&nbsp;(if&nbsp;defined)</tt></dd>
93</dl>
94</td></tr></table> <p>
95<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
96<tr bgcolor="#ffc8d8">
97<td colspan=3 valign=bottom>&nbsp;<br>
98<font color="#000000" face="helvetica, arial"><a name="Error">class <strong>Error</strong></a>(<a href="exceptions.html#Exception">exceptions.Exception</a>)</font></td></tr>
99
100<tr bgcolor="#ffc8d8"><td rowspan=2><tt>&nbsp;&nbsp;&nbsp;</tt></td>
101<td colspan=2><tt>Base&nbsp;error&nbsp;for&nbsp;this&nbsp;module.<br>&nbsp;</tt></td></tr>
102<tr><td>&nbsp;</td>
103<td width="100%"><dl><dt>Method resolution order:</dt>
104<dd><a href="apiclient.oauth.html#Error">Error</a></dd>
105<dd><a href="exceptions.html#Exception">exceptions.Exception</a></dd>
106<dd><a href="exceptions.html#BaseException">exceptions.BaseException</a></dd>
107<dd><a href="__builtin__.html#object">__builtin__.object</a></dd>
108</dl>
109<hr>
110Data descriptors defined here:<br>
111<dl><dt><strong>__weakref__</strong></dt>
112<dd><tt>list&nbsp;of&nbsp;weak&nbsp;references&nbsp;to&nbsp;the&nbsp;object&nbsp;(if&nbsp;defined)</tt></dd>
113</dl>
114<hr>
115Methods inherited from <a href="exceptions.html#Exception">exceptions.Exception</a>:<br>
116<dl><dt><a name="Error-__init__"><strong>__init__</strong></a>(...)</dt><dd><tt>x.<a href="#Error-__init__">__init__</a>(...)&nbsp;initializes&nbsp;x;&nbsp;see&nbsp;x.__class__.__doc__&nbsp;for&nbsp;signature</tt></dd></dl>
117
118<hr>
119Data and other attributes inherited from <a href="exceptions.html#Exception">exceptions.Exception</a>:<br>
120<dl><dt><strong>__new__</strong> = &lt;built-in method __new__ of type object&gt;<dd><tt>T.<a href="#Error-__new__">__new__</a>(S,&nbsp;...)&nbsp;-&gt;&nbsp;a&nbsp;new&nbsp;<a href="__builtin__.html#object">object</a>&nbsp;with&nbsp;type&nbsp;S,&nbsp;a&nbsp;subtype&nbsp;of&nbsp;T</tt></dl>
121
122<hr>
123Methods inherited from <a href="exceptions.html#BaseException">exceptions.BaseException</a>:<br>
124<dl><dt><a name="Error-__delattr__"><strong>__delattr__</strong></a>(...)</dt><dd><tt>x.<a href="#Error-__delattr__">__delattr__</a>('name')&nbsp;&lt;==&gt;&nbsp;del&nbsp;x.name</tt></dd></dl>
125
126<dl><dt><a name="Error-__getattribute__"><strong>__getattribute__</strong></a>(...)</dt><dd><tt>x.<a href="#Error-__getattribute__">__getattribute__</a>('name')&nbsp;&lt;==&gt;&nbsp;x.name</tt></dd></dl>
127
128<dl><dt><a name="Error-__getitem__"><strong>__getitem__</strong></a>(...)</dt><dd><tt>x.<a href="#Error-__getitem__">__getitem__</a>(y)&nbsp;&lt;==&gt;&nbsp;x[y]</tt></dd></dl>
129
130<dl><dt><a name="Error-__getslice__"><strong>__getslice__</strong></a>(...)</dt><dd><tt>x.<a href="#Error-__getslice__">__getslice__</a>(i,&nbsp;j)&nbsp;&lt;==&gt;&nbsp;x[i:j]<br>
131&nbsp;<br>
132Use&nbsp;of&nbsp;negative&nbsp;indices&nbsp;is&nbsp;not&nbsp;supported.</tt></dd></dl>
133
134<dl><dt><a name="Error-__reduce__"><strong>__reduce__</strong></a>(...)</dt></dl>
135
136<dl><dt><a name="Error-__repr__"><strong>__repr__</strong></a>(...)</dt><dd><tt>x.<a href="#Error-__repr__">__repr__</a>()&nbsp;&lt;==&gt;&nbsp;repr(x)</tt></dd></dl>
137
138<dl><dt><a name="Error-__setattr__"><strong>__setattr__</strong></a>(...)</dt><dd><tt>x.<a href="#Error-__setattr__">__setattr__</a>('name',&nbsp;value)&nbsp;&lt;==&gt;&nbsp;x.name&nbsp;=&nbsp;value</tt></dd></dl>
139
140<dl><dt><a name="Error-__setstate__"><strong>__setstate__</strong></a>(...)</dt></dl>
141
142<dl><dt><a name="Error-__str__"><strong>__str__</strong></a>(...)</dt><dd><tt>x.<a href="#Error-__str__">__str__</a>()&nbsp;&lt;==&gt;&nbsp;str(x)</tt></dd></dl>
143
144<dl><dt><a name="Error-__unicode__"><strong>__unicode__</strong></a>(...)</dt></dl>
145
146<hr>
147Data descriptors inherited from <a href="exceptions.html#BaseException">exceptions.BaseException</a>:<br>
148<dl><dt><strong>__dict__</strong></dt>
149</dl>
150<dl><dt><strong>args</strong></dt>
151</dl>
152<dl><dt><strong>message</strong></dt>
153</dl>
154</td></tr></table> <p>
155<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
156<tr bgcolor="#ffc8d8">
157<td colspan=3 valign=bottom>&nbsp;<br>
Joe Gregorio6e537032011-02-09 23:04:26 -0500158<font color="#000000" face="helvetica, arial"><a name="Flow">class <strong>Flow</strong></a>(<a href="__builtin__.html#object">__builtin__.object</a>)</font></td></tr>
159
160<tr bgcolor="#ffc8d8"><td rowspan=2><tt>&nbsp;&nbsp;&nbsp;</tt></td>
161<td colspan=2><tt>Base&nbsp;class&nbsp;for&nbsp;all&nbsp;<a href="#Flow">Flow</a>&nbsp;objects.<br>&nbsp;</tt></td></tr>
162<tr><td>&nbsp;</td>
163<td width="100%">Data descriptors defined here:<br>
164<dl><dt><strong>__dict__</strong></dt>
165<dd><tt>dictionary&nbsp;for&nbsp;instance&nbsp;variables&nbsp;(if&nbsp;defined)</tt></dd>
166</dl>
167<dl><dt><strong>__weakref__</strong></dt>
168<dd><tt>list&nbsp;of&nbsp;weak&nbsp;references&nbsp;to&nbsp;the&nbsp;object&nbsp;(if&nbsp;defined)</tt></dd>
169</dl>
170</td></tr></table> <p>
171<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
172<tr bgcolor="#ffc8d8">
173<td colspan=3 valign=bottom>&nbsp;<br>
174<font color="#000000" face="helvetica, arial"><a name="FlowThreeLegged">class <strong>FlowThreeLegged</strong></a>(<a href="apiclient.oauth.html#Flow">Flow</a>)</font></td></tr>
Joe Gregorio30dfdc32010-12-09 16:34:22 -0500175
176<tr bgcolor="#ffc8d8"><td rowspan=2><tt>&nbsp;&nbsp;&nbsp;</tt></td>
177<td colspan=2><tt>Does&nbsp;the&nbsp;Three&nbsp;Legged&nbsp;Dance&nbsp;for&nbsp;OAuth&nbsp;1.0a.<br>&nbsp;</tt></td></tr>
178<tr><td>&nbsp;</td>
Joe Gregorio6e537032011-02-09 23:04:26 -0500179<td width="100%"><dl><dt>Method resolution order:</dt>
180<dd><a href="apiclient.oauth.html#FlowThreeLegged">FlowThreeLegged</a></dd>
181<dd><a href="apiclient.oauth.html#Flow">Flow</a></dd>
182<dd><a href="__builtin__.html#object">__builtin__.object</a></dd>
183</dl>
184<hr>
185Methods defined here:<br>
Joe Gregorio30dfdc32010-12-09 16:34:22 -0500186<dl><dt><a name="FlowThreeLegged-__init__"><strong>__init__</strong></a>(self, discovery, consumer_key, consumer_secret, user_agent, **kwargs)</dt><dd><tt>discovery&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;-&nbsp;Section&nbsp;of&nbsp;the&nbsp;API&nbsp;discovery&nbsp;document&nbsp;that&nbsp;describes<br>
187&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;the&nbsp;OAuth&nbsp;endpoints.<br>
188consumer_key&nbsp;&nbsp;&nbsp;&nbsp;-&nbsp;OAuth&nbsp;consumer&nbsp;key<br>
189consumer_secret&nbsp;-&nbsp;OAuth&nbsp;consumer&nbsp;secret<br>
190user_agent&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;-&nbsp;The&nbsp;HTTP&nbsp;User-Agent&nbsp;that&nbsp;identifies&nbsp;the&nbsp;application.<br>
191**kwargs&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;-&nbsp;The&nbsp;keyword&nbsp;arguments&nbsp;are&nbsp;all&nbsp;optional&nbsp;and&nbsp;required<br>
192&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;parameters&nbsp;for&nbsp;the&nbsp;OAuth&nbsp;calls.</tt></dd></dl>
193
194<dl><dt><a name="FlowThreeLegged-step1_get_authorize_url"><strong>step1_get_authorize_url</strong></a>(self, oauth_callback<font color="#909090">='oob'</font>)</dt><dd><tt>Returns&nbsp;a&nbsp;URI&nbsp;to&nbsp;redirect&nbsp;to&nbsp;the&nbsp;provider.<br>
195&nbsp;<br>
196oauth_callback&nbsp;-&nbsp;Either&nbsp;the&nbsp;string&nbsp;'oob'&nbsp;for&nbsp;a&nbsp;non-web-based&nbsp;application,<br>
197&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;or&nbsp;a&nbsp;URI&nbsp;that&nbsp;handles&nbsp;the&nbsp;callback&nbsp;from&nbsp;the&nbsp;authorization<br>
198&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;server.<br>
199&nbsp;<br>
200If&nbsp;oauth_callback&nbsp;is&nbsp;'oob'&nbsp;then&nbsp;pass&nbsp;in&nbsp;the<br>
201generated&nbsp;verification&nbsp;code&nbsp;to&nbsp;step2_exchange,<br>
202otherwise&nbsp;pass&nbsp;in&nbsp;the&nbsp;query&nbsp;parameters&nbsp;received<br>
203at&nbsp;the&nbsp;callback&nbsp;uri&nbsp;to&nbsp;step2_exchange.</tt></dd></dl>
204
205<dl><dt><a name="FlowThreeLegged-step2_exchange"><strong>step2_exchange</strong></a>(self, verifier)</dt><dd><tt>Exhanges&nbsp;an&nbsp;authorized&nbsp;request&nbsp;token<br>
206for&nbsp;<a href="#OAuthCredentials">OAuthCredentials</a>.<br>
207&nbsp;<br>
208verifier&nbsp;-&nbsp;either&nbsp;the&nbsp;verifier&nbsp;token,&nbsp;or&nbsp;a&nbsp;dictionary<br>
209&nbsp;&nbsp;&nbsp;&nbsp;of&nbsp;the&nbsp;query&nbsp;parameters&nbsp;to&nbsp;the&nbsp;callback,&nbsp;which&nbsp;contains<br>
210&nbsp;&nbsp;&nbsp;&nbsp;the&nbsp;oauth_verifier.</tt></dd></dl>
211
212<hr>
Joe Gregorio6e537032011-02-09 23:04:26 -0500213Data descriptors inherited from <a href="apiclient.oauth.html#Flow">Flow</a>:<br>
Joe Gregorio30dfdc32010-12-09 16:34:22 -0500214<dl><dt><strong>__dict__</strong></dt>
215<dd><tt>dictionary&nbsp;for&nbsp;instance&nbsp;variables&nbsp;(if&nbsp;defined)</tt></dd>
216</dl>
217<dl><dt><strong>__weakref__</strong></dt>
218<dd><tt>list&nbsp;of&nbsp;weak&nbsp;references&nbsp;to&nbsp;the&nbsp;object&nbsp;(if&nbsp;defined)</tt></dd>
219</dl>
220</td></tr></table> <p>
221<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
222<tr bgcolor="#ffc8d8">
223<td colspan=3 valign=bottom>&nbsp;<br>
224<font color="#000000" face="helvetica, arial"><a name="MissingParameter">class <strong>MissingParameter</strong></a>(<a href="apiclient.oauth.html#Error">Error</a>)</font></td></tr>
225
226<tr><td bgcolor="#ffc8d8"><tt>&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
227<td width="100%"><dl><dt>Method resolution order:</dt>
228<dd><a href="apiclient.oauth.html#MissingParameter">MissingParameter</a></dd>
229<dd><a href="apiclient.oauth.html#Error">Error</a></dd>
230<dd><a href="exceptions.html#Exception">exceptions.Exception</a></dd>
231<dd><a href="exceptions.html#BaseException">exceptions.BaseException</a></dd>
232<dd><a href="__builtin__.html#object">__builtin__.object</a></dd>
233</dl>
234<hr>
235Data descriptors inherited from <a href="apiclient.oauth.html#Error">Error</a>:<br>
236<dl><dt><strong>__weakref__</strong></dt>
237<dd><tt>list&nbsp;of&nbsp;weak&nbsp;references&nbsp;to&nbsp;the&nbsp;object&nbsp;(if&nbsp;defined)</tt></dd>
238</dl>
239<hr>
240Methods inherited from <a href="exceptions.html#Exception">exceptions.Exception</a>:<br>
241<dl><dt><a name="MissingParameter-__init__"><strong>__init__</strong></a>(...)</dt><dd><tt>x.<a href="#MissingParameter-__init__">__init__</a>(...)&nbsp;initializes&nbsp;x;&nbsp;see&nbsp;x.__class__.__doc__&nbsp;for&nbsp;signature</tt></dd></dl>
242
243<hr>
244Data and other attributes inherited from <a href="exceptions.html#Exception">exceptions.Exception</a>:<br>
245<dl><dt><strong>__new__</strong> = &lt;built-in method __new__ of type object&gt;<dd><tt>T.<a href="#MissingParameter-__new__">__new__</a>(S,&nbsp;...)&nbsp;-&gt;&nbsp;a&nbsp;new&nbsp;<a href="__builtin__.html#object">object</a>&nbsp;with&nbsp;type&nbsp;S,&nbsp;a&nbsp;subtype&nbsp;of&nbsp;T</tt></dl>
246
247<hr>
248Methods inherited from <a href="exceptions.html#BaseException">exceptions.BaseException</a>:<br>
249<dl><dt><a name="MissingParameter-__delattr__"><strong>__delattr__</strong></a>(...)</dt><dd><tt>x.<a href="#MissingParameter-__delattr__">__delattr__</a>('name')&nbsp;&lt;==&gt;&nbsp;del&nbsp;x.name</tt></dd></dl>
250
251<dl><dt><a name="MissingParameter-__getattribute__"><strong>__getattribute__</strong></a>(...)</dt><dd><tt>x.<a href="#MissingParameter-__getattribute__">__getattribute__</a>('name')&nbsp;&lt;==&gt;&nbsp;x.name</tt></dd></dl>
252
253<dl><dt><a name="MissingParameter-__getitem__"><strong>__getitem__</strong></a>(...)</dt><dd><tt>x.<a href="#MissingParameter-__getitem__">__getitem__</a>(y)&nbsp;&lt;==&gt;&nbsp;x[y]</tt></dd></dl>
254
255<dl><dt><a name="MissingParameter-__getslice__"><strong>__getslice__</strong></a>(...)</dt><dd><tt>x.<a href="#MissingParameter-__getslice__">__getslice__</a>(i,&nbsp;j)&nbsp;&lt;==&gt;&nbsp;x[i:j]<br>
256&nbsp;<br>
257Use&nbsp;of&nbsp;negative&nbsp;indices&nbsp;is&nbsp;not&nbsp;supported.</tt></dd></dl>
258
259<dl><dt><a name="MissingParameter-__reduce__"><strong>__reduce__</strong></a>(...)</dt></dl>
260
261<dl><dt><a name="MissingParameter-__repr__"><strong>__repr__</strong></a>(...)</dt><dd><tt>x.<a href="#MissingParameter-__repr__">__repr__</a>()&nbsp;&lt;==&gt;&nbsp;repr(x)</tt></dd></dl>
262
263<dl><dt><a name="MissingParameter-__setattr__"><strong>__setattr__</strong></a>(...)</dt><dd><tt>x.<a href="#MissingParameter-__setattr__">__setattr__</a>('name',&nbsp;value)&nbsp;&lt;==&gt;&nbsp;x.name&nbsp;=&nbsp;value</tt></dd></dl>
264
265<dl><dt><a name="MissingParameter-__setstate__"><strong>__setstate__</strong></a>(...)</dt></dl>
266
267<dl><dt><a name="MissingParameter-__str__"><strong>__str__</strong></a>(...)</dt><dd><tt>x.<a href="#MissingParameter-__str__">__str__</a>()&nbsp;&lt;==&gt;&nbsp;str(x)</tt></dd></dl>
268
269<dl><dt><a name="MissingParameter-__unicode__"><strong>__unicode__</strong></a>(...)</dt></dl>
270
271<hr>
272Data descriptors inherited from <a href="exceptions.html#BaseException">exceptions.BaseException</a>:<br>
273<dl><dt><strong>__dict__</strong></dt>
274</dl>
275<dl><dt><strong>args</strong></dt>
276</dl>
277<dl><dt><strong>message</strong></dt>
278</dl>
279</td></tr></table> <p>
280<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
281<tr bgcolor="#ffc8d8">
282<td colspan=3 valign=bottom>&nbsp;<br>
283<font color="#000000" face="helvetica, arial"><a name="OAuthCredentials">class <strong>OAuthCredentials</strong></a>(<a href="apiclient.oauth.html#Credentials">Credentials</a>)</font></td></tr>
284
285<tr bgcolor="#ffc8d8"><td rowspan=2><tt>&nbsp;&nbsp;&nbsp;</tt></td>
286<td colspan=2><tt><a href="#Credentials">Credentials</a>&nbsp;<a href="__builtin__.html#object">object</a>&nbsp;for&nbsp;OAuth&nbsp;1.0a<br>&nbsp;</tt></td></tr>
287<tr><td>&nbsp;</td>
288<td width="100%"><dl><dt>Method resolution order:</dt>
289<dd><a href="apiclient.oauth.html#OAuthCredentials">OAuthCredentials</a></dd>
290<dd><a href="apiclient.oauth.html#Credentials">Credentials</a></dd>
291<dd><a href="__builtin__.html#object">__builtin__.object</a></dd>
292</dl>
293<hr>
294Methods defined here:<br>
295<dl><dt><a name="OAuthCredentials-__init__"><strong>__init__</strong></a>(self, consumer, token, user_agent)</dt><dd><tt>consumer&nbsp;&nbsp;&nbsp;-&nbsp;An&nbsp;instance&nbsp;of&nbsp;oauth.Consumer.<br>
296token&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;-&nbsp;An&nbsp;instance&nbsp;of&nbsp;oauth.Token&nbsp;constructed&nbsp;with<br>
297&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;the&nbsp;access&nbsp;token&nbsp;and&nbsp;secret.<br>
298user_agent&nbsp;-&nbsp;The&nbsp;HTTP&nbsp;User-Agent&nbsp;to&nbsp;provide&nbsp;for&nbsp;this&nbsp;application.</tt></dd></dl>
299
300<dl><dt><a name="OAuthCredentials-authorize"><strong>authorize</strong></a>(self, http)</dt><dd><tt>Args:<br>
301&nbsp;&nbsp;&nbsp;http&nbsp;-&nbsp;An&nbsp;instance&nbsp;of&nbsp;httplib2.Http<br>
302&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;or&nbsp;something&nbsp;that&nbsp;acts&nbsp;like&nbsp;it.<br>
303&nbsp;<br>
304Returns:<br>
305&nbsp;&nbsp;&nbsp;A&nbsp;modified&nbsp;instance&nbsp;of&nbsp;http&nbsp;that&nbsp;was&nbsp;passed&nbsp;in.<br>
306&nbsp;<br>
307Example:<br>
308&nbsp;<br>
309&nbsp;&nbsp;h&nbsp;=&nbsp;httplib2.Http()<br>
310&nbsp;&nbsp;h&nbsp;=&nbsp;credentials.<a href="#OAuthCredentials-authorize">authorize</a>(h)<br>
311&nbsp;<br>
312You&nbsp;can't&nbsp;create&nbsp;a&nbsp;new&nbsp;OAuth<br>
313subclass&nbsp;of&nbsp;httplib2.Authenication&nbsp;because<br>
314it&nbsp;never&nbsp;gets&nbsp;passed&nbsp;the&nbsp;absolute&nbsp;URI,&nbsp;which&nbsp;is<br>
315needed&nbsp;for&nbsp;signing.&nbsp;So&nbsp;instead&nbsp;we&nbsp;have&nbsp;to&nbsp;overload<br>
316'request'&nbsp;with&nbsp;a&nbsp;closure&nbsp;that&nbsp;adds&nbsp;in&nbsp;the<br>
317Authorization&nbsp;header&nbsp;and&nbsp;then&nbsp;calls&nbsp;the&nbsp;original&nbsp;version<br>
318of&nbsp;'request()'.</tt></dd></dl>
319
320<hr>
321Data descriptors inherited from <a href="apiclient.oauth.html#Credentials">Credentials</a>:<br>
322<dl><dt><strong>__dict__</strong></dt>
323<dd><tt>dictionary&nbsp;for&nbsp;instance&nbsp;variables&nbsp;(if&nbsp;defined)</tt></dd>
324</dl>
325<dl><dt><strong>__weakref__</strong></dt>
326<dd><tt>list&nbsp;of&nbsp;weak&nbsp;references&nbsp;to&nbsp;the&nbsp;object&nbsp;(if&nbsp;defined)</tt></dd>
327</dl>
328</td></tr></table> <p>
329<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
330<tr bgcolor="#ffc8d8">
331<td colspan=3 valign=bottom>&nbsp;<br>
332<font color="#000000" face="helvetica, arial"><a name="RequestError">class <strong>RequestError</strong></a>(<a href="apiclient.oauth.html#Error">Error</a>)</font></td></tr>
333
334<tr bgcolor="#ffc8d8"><td rowspan=2><tt>&nbsp;&nbsp;&nbsp;</tt></td>
335<td colspan=2><tt><a href="#Error">Error</a>&nbsp;occurred&nbsp;during&nbsp;request.<br>&nbsp;</tt></td></tr>
336<tr><td>&nbsp;</td>
337<td width="100%"><dl><dt>Method resolution order:</dt>
338<dd><a href="apiclient.oauth.html#RequestError">RequestError</a></dd>
339<dd><a href="apiclient.oauth.html#Error">Error</a></dd>
340<dd><a href="exceptions.html#Exception">exceptions.Exception</a></dd>
341<dd><a href="exceptions.html#BaseException">exceptions.BaseException</a></dd>
342<dd><a href="__builtin__.html#object">__builtin__.object</a></dd>
343</dl>
344<hr>
345Data descriptors inherited from <a href="apiclient.oauth.html#Error">Error</a>:<br>
346<dl><dt><strong>__weakref__</strong></dt>
347<dd><tt>list&nbsp;of&nbsp;weak&nbsp;references&nbsp;to&nbsp;the&nbsp;object&nbsp;(if&nbsp;defined)</tt></dd>
348</dl>
349<hr>
350Methods inherited from <a href="exceptions.html#Exception">exceptions.Exception</a>:<br>
351<dl><dt><a name="RequestError-__init__"><strong>__init__</strong></a>(...)</dt><dd><tt>x.<a href="#RequestError-__init__">__init__</a>(...)&nbsp;initializes&nbsp;x;&nbsp;see&nbsp;x.__class__.__doc__&nbsp;for&nbsp;signature</tt></dd></dl>
352
353<hr>
354Data and other attributes inherited from <a href="exceptions.html#Exception">exceptions.Exception</a>:<br>
355<dl><dt><strong>__new__</strong> = &lt;built-in method __new__ of type object&gt;<dd><tt>T.<a href="#RequestError-__new__">__new__</a>(S,&nbsp;...)&nbsp;-&gt;&nbsp;a&nbsp;new&nbsp;<a href="__builtin__.html#object">object</a>&nbsp;with&nbsp;type&nbsp;S,&nbsp;a&nbsp;subtype&nbsp;of&nbsp;T</tt></dl>
356
357<hr>
358Methods inherited from <a href="exceptions.html#BaseException">exceptions.BaseException</a>:<br>
359<dl><dt><a name="RequestError-__delattr__"><strong>__delattr__</strong></a>(...)</dt><dd><tt>x.<a href="#RequestError-__delattr__">__delattr__</a>('name')&nbsp;&lt;==&gt;&nbsp;del&nbsp;x.name</tt></dd></dl>
360
361<dl><dt><a name="RequestError-__getattribute__"><strong>__getattribute__</strong></a>(...)</dt><dd><tt>x.<a href="#RequestError-__getattribute__">__getattribute__</a>('name')&nbsp;&lt;==&gt;&nbsp;x.name</tt></dd></dl>
362
363<dl><dt><a name="RequestError-__getitem__"><strong>__getitem__</strong></a>(...)</dt><dd><tt>x.<a href="#RequestError-__getitem__">__getitem__</a>(y)&nbsp;&lt;==&gt;&nbsp;x[y]</tt></dd></dl>
364
365<dl><dt><a name="RequestError-__getslice__"><strong>__getslice__</strong></a>(...)</dt><dd><tt>x.<a href="#RequestError-__getslice__">__getslice__</a>(i,&nbsp;j)&nbsp;&lt;==&gt;&nbsp;x[i:j]<br>
366&nbsp;<br>
367Use&nbsp;of&nbsp;negative&nbsp;indices&nbsp;is&nbsp;not&nbsp;supported.</tt></dd></dl>
368
369<dl><dt><a name="RequestError-__reduce__"><strong>__reduce__</strong></a>(...)</dt></dl>
370
371<dl><dt><a name="RequestError-__repr__"><strong>__repr__</strong></a>(...)</dt><dd><tt>x.<a href="#RequestError-__repr__">__repr__</a>()&nbsp;&lt;==&gt;&nbsp;repr(x)</tt></dd></dl>
372
373<dl><dt><a name="RequestError-__setattr__"><strong>__setattr__</strong></a>(...)</dt><dd><tt>x.<a href="#RequestError-__setattr__">__setattr__</a>('name',&nbsp;value)&nbsp;&lt;==&gt;&nbsp;x.name&nbsp;=&nbsp;value</tt></dd></dl>
374
375<dl><dt><a name="RequestError-__setstate__"><strong>__setstate__</strong></a>(...)</dt></dl>
376
377<dl><dt><a name="RequestError-__str__"><strong>__str__</strong></a>(...)</dt><dd><tt>x.<a href="#RequestError-__str__">__str__</a>()&nbsp;&lt;==&gt;&nbsp;str(x)</tt></dd></dl>
378
379<dl><dt><a name="RequestError-__unicode__"><strong>__unicode__</strong></a>(...)</dt></dl>
380
381<hr>
382Data descriptors inherited from <a href="exceptions.html#BaseException">exceptions.BaseException</a>:<br>
383<dl><dt><strong>__dict__</strong></dt>
384</dl>
385<dl><dt><strong>args</strong></dt>
386</dl>
387<dl><dt><strong>message</strong></dt>
388</dl>
389</td></tr></table></td></tr></table><p>
390<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
391<tr bgcolor="#55aa55">
392<td colspan=3 valign=bottom>&nbsp;<br>
393<font color="#ffffff" face="helvetica, arial"><big><strong>Data</strong></big></font></td></tr>
394
395<tr><td bgcolor="#55aa55"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
396<td width="100%"><strong>__author__</strong> = 'jcgregorio@google.com (Joe Gregorio)'</td></tr></table><p>
397<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
398<tr bgcolor="#7799ee">
399<td colspan=3 valign=bottom>&nbsp;<br>
400<font color="#ffffff" face="helvetica, arial"><big><strong>Author</strong></big></font></td></tr>
401
402<tr><td bgcolor="#7799ee"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
403<td width="100%">jcgregorio@google.com&nbsp;(Joe&nbsp;Gregorio)</td></tr></table>
404</body></html>