Joe Gregorio | 30dfdc3 | 2010-12-09 16:34:22 -0500 | [diff] [blame] | 1 | |
| 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> <br> |
| 9 | <font color="#ffffff" face="helvetica, arial"> <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 Gregorio | 351b149 | 2011-05-08 23:32:46 -0700 | [diff] [blame^] | 11 | ><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br><a href="file:/home/jcgregorio/projects/google-api-python-client/apiclient/oauth.py">/home/jcgregorio/projects/google-api-python-client/apiclient/oauth.py</a></font></td></tr></table> |
Joe Gregorio | 30dfdc3 | 2010-12-09 16:34:22 -0500 | [diff] [blame] | 12 | <p><tt>Utilities for OAuth.<br> |
| 13 | <br> |
| 14 | Utilities for making it easier to work with 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> <br> |
| 19 | <font color="#ffffff" face="helvetica, arial"><big><strong>Modules</strong></big></font></td></tr> |
| 20 | |
| 21 | <tr><td bgcolor="#aa55cc"><tt> </tt></td><td> </td> |
| 22 | <td width="100%"><table width="100%" summary="list"><tr><td width="25%" valign=top><a href="copy.html">copy</a><br> |
Joe Gregorio | 3b79fa8 | 2011-02-17 11:47:17 -0500 | [diff] [blame] | 23 | <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 Gregorio | 6e53703 | 2011-02-09 23:04:26 -0500 | [diff] [blame] | 29 | </td></tr></table></td></tr></table><p> |
Joe Gregorio | 30dfdc3 | 2010-12-09 16:34:22 -0500 | [diff] [blame] | 30 | <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> |
| 31 | <tr bgcolor="#ee77aa"> |
| 32 | <td colspan=3 valign=bottom> <br> |
| 33 | <font color="#ffffff" face="helvetica, arial"><big><strong>Classes</strong></big></font></td></tr> |
| 34 | |
| 35 | <tr><td bgcolor="#ee77aa"><tt> </tt></td><td> </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 Gregorio | 6e53703 | 2011-02-09 23:04:26 -0500 | [diff] [blame] | 46 | <dt><font face="helvetica, arial"><a href="apiclient.oauth.html#Flow">Flow</a> |
| 47 | </font></dt><dd> |
| 48 | <dl> |
Joe Gregorio | 30dfdc3 | 2010-12-09 16:34:22 -0500 | [diff] [blame] | 49 | <dt><font face="helvetica, arial"><a href="apiclient.oauth.html#FlowThreeLegged">FlowThreeLegged</a> |
| 50 | </font></dt></dl> |
| 51 | </dd> |
Joe Gregorio | fffa7d7 | 2011-02-18 17:20:39 -0500 | [diff] [blame] | 52 | <dt><font face="helvetica, arial"><a href="apiclient.oauth.html#Storage">Storage</a> |
| 53 | </font></dt></dl> |
Joe Gregorio | 6e53703 | 2011-02-09 23:04:26 -0500 | [diff] [blame] | 54 | </dd> |
Joe Gregorio | 30dfdc3 | 2010-12-09 16:34:22 -0500 | [diff] [blame] | 55 | <dt><font face="helvetica, arial"><a href="exceptions.html#Exception">exceptions.Exception</a>(<a href="exceptions.html#BaseException">exceptions.BaseException</a>) |
| 56 | </font></dt><dd> |
| 57 | <dl> |
| 58 | <dt><font face="helvetica, arial"><a href="apiclient.oauth.html#Error">Error</a> |
| 59 | </font></dt><dd> |
| 60 | <dl> |
Joe Gregorio | fffa7d7 | 2011-02-18 17:20:39 -0500 | [diff] [blame] | 61 | <dt><font face="helvetica, arial"><a href="apiclient.oauth.html#CredentialsInvalidError">CredentialsInvalidError</a> |
| 62 | </font></dt><dt><font face="helvetica, arial"><a href="apiclient.oauth.html#MissingParameter">MissingParameter</a> |
Joe Gregorio | 30dfdc3 | 2010-12-09 16:34:22 -0500 | [diff] [blame] | 63 | </font></dt><dt><font face="helvetica, arial"><a href="apiclient.oauth.html#RequestError">RequestError</a> |
| 64 | </font></dt></dl> |
| 65 | </dd> |
| 66 | </dl> |
| 67 | </dd> |
| 68 | </dl> |
| 69 | <p> |
| 70 | <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> |
| 71 | <tr bgcolor="#ffc8d8"> |
| 72 | <td colspan=3 valign=bottom> <br> |
| 73 | <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> |
| 74 | |
| 75 | <tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td> |
| 76 | <td colspan=2><tt>Base class for all <a href="#Credentials">Credentials</a> objects.<br> |
| 77 | <br> |
| 78 | Subclasses must define an <a href="#Credentials-authorize">authorize</a>() method<br> |
| 79 | that applies the credentials to an HTTP transport.<br> </tt></td></tr> |
| 80 | <tr><td> </td> |
| 81 | <td width="100%">Methods defined here:<br> |
| 82 | <dl><dt><a name="Credentials-authorize"><strong>authorize</strong></a>(self, http)</dt><dd><tt>Take an httplib2.Http instance (or equivalent) and<br> |
| 83 | authorizes it for the set of credentials, usually by<br> |
| 84 | replacing http.request() with a method that adds in<br> |
| 85 | the appropriate headers and then delegates to the original<br> |
| 86 | Http.request() method.</tt></dd></dl> |
| 87 | |
| 88 | <hr> |
| 89 | Data descriptors defined here:<br> |
| 90 | <dl><dt><strong>__dict__</strong></dt> |
| 91 | <dd><tt>dictionary for instance variables (if defined)</tt></dd> |
| 92 | </dl> |
| 93 | <dl><dt><strong>__weakref__</strong></dt> |
| 94 | <dd><tt>list of weak references to the object (if defined)</tt></dd> |
| 95 | </dl> |
| 96 | </td></tr></table> <p> |
| 97 | <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> |
| 98 | <tr bgcolor="#ffc8d8"> |
| 99 | <td colspan=3 valign=bottom> <br> |
Joe Gregorio | fffa7d7 | 2011-02-18 17:20:39 -0500 | [diff] [blame] | 100 | <font color="#000000" face="helvetica, arial"><a name="CredentialsInvalidError">class <strong>CredentialsInvalidError</strong></a>(<a href="apiclient.oauth.html#Error">Error</a>)</font></td></tr> |
| 101 | |
| 102 | <tr><td bgcolor="#ffc8d8"><tt> </tt></td><td> </td> |
| 103 | <td width="100%"><dl><dt>Method resolution order:</dt> |
| 104 | <dd><a href="apiclient.oauth.html#CredentialsInvalidError">CredentialsInvalidError</a></dd> |
| 105 | <dd><a href="apiclient.oauth.html#Error">Error</a></dd> |
| 106 | <dd><a href="exceptions.html#Exception">exceptions.Exception</a></dd> |
| 107 | <dd><a href="exceptions.html#BaseException">exceptions.BaseException</a></dd> |
| 108 | <dd><a href="__builtin__.html#object">__builtin__.object</a></dd> |
| 109 | </dl> |
| 110 | <hr> |
| 111 | Data descriptors inherited from <a href="apiclient.oauth.html#Error">Error</a>:<br> |
| 112 | <dl><dt><strong>__weakref__</strong></dt> |
| 113 | <dd><tt>list of weak references to the object (if defined)</tt></dd> |
| 114 | </dl> |
| 115 | <hr> |
| 116 | Methods inherited from <a href="exceptions.html#Exception">exceptions.Exception</a>:<br> |
Joe Gregorio | 4258d6b | 2011-03-18 10:20:16 -0400 | [diff] [blame] | 117 | <dl><dt><a name="CredentialsInvalidError-__init__"><strong>__init__</strong></a>(...)</dt><dd><tt>x.<a href="#CredentialsInvalidError-__init__">__init__</a>(...) initializes x; see help(type(x)) for signature</tt></dd></dl> |
Joe Gregorio | fffa7d7 | 2011-02-18 17:20:39 -0500 | [diff] [blame] | 118 | |
| 119 | <hr> |
| 120 | Data and other attributes inherited from <a href="exceptions.html#Exception">exceptions.Exception</a>:<br> |
| 121 | <dl><dt><strong>__new__</strong> = <built-in method __new__ of type object><dd><tt>T.<a href="#CredentialsInvalidError-__new__">__new__</a>(S, ...) -> a new <a href="__builtin__.html#object">object</a> with type S, a subtype of T</tt></dl> |
| 122 | |
| 123 | <hr> |
| 124 | Methods inherited from <a href="exceptions.html#BaseException">exceptions.BaseException</a>:<br> |
| 125 | <dl><dt><a name="CredentialsInvalidError-__delattr__"><strong>__delattr__</strong></a>(...)</dt><dd><tt>x.<a href="#CredentialsInvalidError-__delattr__">__delattr__</a>('name') <==> del x.name</tt></dd></dl> |
| 126 | |
| 127 | <dl><dt><a name="CredentialsInvalidError-__getattribute__"><strong>__getattribute__</strong></a>(...)</dt><dd><tt>x.<a href="#CredentialsInvalidError-__getattribute__">__getattribute__</a>('name') <==> x.name</tt></dd></dl> |
| 128 | |
| 129 | <dl><dt><a name="CredentialsInvalidError-__getitem__"><strong>__getitem__</strong></a>(...)</dt><dd><tt>x.<a href="#CredentialsInvalidError-__getitem__">__getitem__</a>(y) <==> x[y]</tt></dd></dl> |
| 130 | |
| 131 | <dl><dt><a name="CredentialsInvalidError-__getslice__"><strong>__getslice__</strong></a>(...)</dt><dd><tt>x.<a href="#CredentialsInvalidError-__getslice__">__getslice__</a>(i, j) <==> x[i:j]<br> |
| 132 | <br> |
| 133 | Use of negative indices is not supported.</tt></dd></dl> |
| 134 | |
| 135 | <dl><dt><a name="CredentialsInvalidError-__reduce__"><strong>__reduce__</strong></a>(...)</dt></dl> |
| 136 | |
| 137 | <dl><dt><a name="CredentialsInvalidError-__repr__"><strong>__repr__</strong></a>(...)</dt><dd><tt>x.<a href="#CredentialsInvalidError-__repr__">__repr__</a>() <==> repr(x)</tt></dd></dl> |
| 138 | |
| 139 | <dl><dt><a name="CredentialsInvalidError-__setattr__"><strong>__setattr__</strong></a>(...)</dt><dd><tt>x.<a href="#CredentialsInvalidError-__setattr__">__setattr__</a>('name', value) <==> x.name = value</tt></dd></dl> |
| 140 | |
| 141 | <dl><dt><a name="CredentialsInvalidError-__setstate__"><strong>__setstate__</strong></a>(...)</dt></dl> |
| 142 | |
| 143 | <dl><dt><a name="CredentialsInvalidError-__str__"><strong>__str__</strong></a>(...)</dt><dd><tt>x.<a href="#CredentialsInvalidError-__str__">__str__</a>() <==> str(x)</tt></dd></dl> |
| 144 | |
| 145 | <dl><dt><a name="CredentialsInvalidError-__unicode__"><strong>__unicode__</strong></a>(...)</dt></dl> |
| 146 | |
| 147 | <hr> |
| 148 | Data descriptors inherited from <a href="exceptions.html#BaseException">exceptions.BaseException</a>:<br> |
| 149 | <dl><dt><strong>__dict__</strong></dt> |
| 150 | </dl> |
| 151 | <dl><dt><strong>args</strong></dt> |
| 152 | </dl> |
| 153 | <dl><dt><strong>message</strong></dt> |
| 154 | </dl> |
| 155 | </td></tr></table> <p> |
| 156 | <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> |
| 157 | <tr bgcolor="#ffc8d8"> |
| 158 | <td colspan=3 valign=bottom> <br> |
Joe Gregorio | 30dfdc3 | 2010-12-09 16:34:22 -0500 | [diff] [blame] | 159 | <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> |
| 160 | |
| 161 | <tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td> |
| 162 | <td colspan=2><tt>Base error for this module.<br> </tt></td></tr> |
| 163 | <tr><td> </td> |
| 164 | <td width="100%"><dl><dt>Method resolution order:</dt> |
| 165 | <dd><a href="apiclient.oauth.html#Error">Error</a></dd> |
| 166 | <dd><a href="exceptions.html#Exception">exceptions.Exception</a></dd> |
| 167 | <dd><a href="exceptions.html#BaseException">exceptions.BaseException</a></dd> |
| 168 | <dd><a href="__builtin__.html#object">__builtin__.object</a></dd> |
| 169 | </dl> |
| 170 | <hr> |
| 171 | Data descriptors defined here:<br> |
| 172 | <dl><dt><strong>__weakref__</strong></dt> |
| 173 | <dd><tt>list of weak references to the object (if defined)</tt></dd> |
| 174 | </dl> |
| 175 | <hr> |
| 176 | Methods inherited from <a href="exceptions.html#Exception">exceptions.Exception</a>:<br> |
Joe Gregorio | 4258d6b | 2011-03-18 10:20:16 -0400 | [diff] [blame] | 177 | <dl><dt><a name="Error-__init__"><strong>__init__</strong></a>(...)</dt><dd><tt>x.<a href="#Error-__init__">__init__</a>(...) initializes x; see help(type(x)) for signature</tt></dd></dl> |
Joe Gregorio | 30dfdc3 | 2010-12-09 16:34:22 -0500 | [diff] [blame] | 178 | |
| 179 | <hr> |
| 180 | Data and other attributes inherited from <a href="exceptions.html#Exception">exceptions.Exception</a>:<br> |
| 181 | <dl><dt><strong>__new__</strong> = <built-in method __new__ of type object><dd><tt>T.<a href="#Error-__new__">__new__</a>(S, ...) -> a new <a href="__builtin__.html#object">object</a> with type S, a subtype of T</tt></dl> |
| 182 | |
| 183 | <hr> |
| 184 | Methods inherited from <a href="exceptions.html#BaseException">exceptions.BaseException</a>:<br> |
| 185 | <dl><dt><a name="Error-__delattr__"><strong>__delattr__</strong></a>(...)</dt><dd><tt>x.<a href="#Error-__delattr__">__delattr__</a>('name') <==> del x.name</tt></dd></dl> |
| 186 | |
| 187 | <dl><dt><a name="Error-__getattribute__"><strong>__getattribute__</strong></a>(...)</dt><dd><tt>x.<a href="#Error-__getattribute__">__getattribute__</a>('name') <==> x.name</tt></dd></dl> |
| 188 | |
| 189 | <dl><dt><a name="Error-__getitem__"><strong>__getitem__</strong></a>(...)</dt><dd><tt>x.<a href="#Error-__getitem__">__getitem__</a>(y) <==> x[y]</tt></dd></dl> |
| 190 | |
| 191 | <dl><dt><a name="Error-__getslice__"><strong>__getslice__</strong></a>(...)</dt><dd><tt>x.<a href="#Error-__getslice__">__getslice__</a>(i, j) <==> x[i:j]<br> |
| 192 | <br> |
| 193 | Use of negative indices is not supported.</tt></dd></dl> |
| 194 | |
| 195 | <dl><dt><a name="Error-__reduce__"><strong>__reduce__</strong></a>(...)</dt></dl> |
| 196 | |
| 197 | <dl><dt><a name="Error-__repr__"><strong>__repr__</strong></a>(...)</dt><dd><tt>x.<a href="#Error-__repr__">__repr__</a>() <==> repr(x)</tt></dd></dl> |
| 198 | |
| 199 | <dl><dt><a name="Error-__setattr__"><strong>__setattr__</strong></a>(...)</dt><dd><tt>x.<a href="#Error-__setattr__">__setattr__</a>('name', value) <==> x.name = value</tt></dd></dl> |
| 200 | |
| 201 | <dl><dt><a name="Error-__setstate__"><strong>__setstate__</strong></a>(...)</dt></dl> |
| 202 | |
| 203 | <dl><dt><a name="Error-__str__"><strong>__str__</strong></a>(...)</dt><dd><tt>x.<a href="#Error-__str__">__str__</a>() <==> str(x)</tt></dd></dl> |
| 204 | |
| 205 | <dl><dt><a name="Error-__unicode__"><strong>__unicode__</strong></a>(...)</dt></dl> |
| 206 | |
| 207 | <hr> |
| 208 | Data descriptors inherited from <a href="exceptions.html#BaseException">exceptions.BaseException</a>:<br> |
| 209 | <dl><dt><strong>__dict__</strong></dt> |
| 210 | </dl> |
| 211 | <dl><dt><strong>args</strong></dt> |
| 212 | </dl> |
| 213 | <dl><dt><strong>message</strong></dt> |
| 214 | </dl> |
| 215 | </td></tr></table> <p> |
| 216 | <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> |
| 217 | <tr bgcolor="#ffc8d8"> |
| 218 | <td colspan=3 valign=bottom> <br> |
Joe Gregorio | 6e53703 | 2011-02-09 23:04:26 -0500 | [diff] [blame] | 219 | <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> |
| 220 | |
| 221 | <tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td> |
| 222 | <td colspan=2><tt>Base class for all <a href="#Flow">Flow</a> objects.<br> </tt></td></tr> |
| 223 | <tr><td> </td> |
| 224 | <td width="100%">Data descriptors defined here:<br> |
| 225 | <dl><dt><strong>__dict__</strong></dt> |
| 226 | <dd><tt>dictionary for instance variables (if defined)</tt></dd> |
| 227 | </dl> |
| 228 | <dl><dt><strong>__weakref__</strong></dt> |
| 229 | <dd><tt>list of weak references to the object (if defined)</tt></dd> |
| 230 | </dl> |
| 231 | </td></tr></table> <p> |
| 232 | <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> |
| 233 | <tr bgcolor="#ffc8d8"> |
| 234 | <td colspan=3 valign=bottom> <br> |
| 235 | <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 Gregorio | 30dfdc3 | 2010-12-09 16:34:22 -0500 | [diff] [blame] | 236 | |
| 237 | <tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td> |
| 238 | <td colspan=2><tt>Does the Three Legged Dance for OAuth 1.0a.<br> </tt></td></tr> |
| 239 | <tr><td> </td> |
Joe Gregorio | 6e53703 | 2011-02-09 23:04:26 -0500 | [diff] [blame] | 240 | <td width="100%"><dl><dt>Method resolution order:</dt> |
| 241 | <dd><a href="apiclient.oauth.html#FlowThreeLegged">FlowThreeLegged</a></dd> |
| 242 | <dd><a href="apiclient.oauth.html#Flow">Flow</a></dd> |
| 243 | <dd><a href="__builtin__.html#object">__builtin__.object</a></dd> |
| 244 | </dl> |
| 245 | <hr> |
| 246 | Methods defined here:<br> |
Joe Gregorio | 30dfdc3 | 2010-12-09 16:34:22 -0500 | [diff] [blame] | 247 | <dl><dt><a name="FlowThreeLegged-__init__"><strong>__init__</strong></a>(self, discovery, consumer_key, consumer_secret, user_agent, **kwargs)</dt><dd><tt>discovery - Section of the API discovery document that describes<br> |
| 248 | the OAuth endpoints.<br> |
| 249 | consumer_key - OAuth consumer key<br> |
| 250 | consumer_secret - OAuth consumer secret<br> |
| 251 | user_agent - The HTTP User-Agent that identifies the application.<br> |
| 252 | **kwargs - The keyword arguments are all optional and required<br> |
| 253 | parameters for the OAuth calls.</tt></dd></dl> |
| 254 | |
| 255 | <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 a URI to redirect to the provider.<br> |
| 256 | <br> |
| 257 | oauth_callback - Either the string 'oob' for a non-web-based application,<br> |
| 258 | or a URI that handles the callback from the authorization<br> |
| 259 | server.<br> |
| 260 | <br> |
| 261 | If oauth_callback is 'oob' then pass in the<br> |
| 262 | generated verification code to step2_exchange,<br> |
| 263 | otherwise pass in the query parameters received<br> |
| 264 | at the callback uri to step2_exchange.</tt></dd></dl> |
| 265 | |
| 266 | <dl><dt><a name="FlowThreeLegged-step2_exchange"><strong>step2_exchange</strong></a>(self, verifier)</dt><dd><tt>Exhanges an authorized request token<br> |
| 267 | for <a href="#OAuthCredentials">OAuthCredentials</a>.<br> |
| 268 | <br> |
Joe Gregorio | 4258d6b | 2011-03-18 10:20:16 -0400 | [diff] [blame] | 269 | Args:<br> |
| 270 | verifier: string, dict - either the verifier token, or a dictionary<br> |
Joe Gregorio | 30dfdc3 | 2010-12-09 16:34:22 -0500 | [diff] [blame] | 271 | of the query parameters to the callback, which contains<br> |
Joe Gregorio | 4258d6b | 2011-03-18 10:20:16 -0400 | [diff] [blame] | 272 | the oauth_verifier.<br> |
| 273 | Returns:<br> |
| 274 | The <a href="#Credentials">Credentials</a> <a href="__builtin__.html#object">object</a>.</tt></dd></dl> |
Joe Gregorio | 30dfdc3 | 2010-12-09 16:34:22 -0500 | [diff] [blame] | 275 | |
| 276 | <hr> |
Joe Gregorio | 6e53703 | 2011-02-09 23:04:26 -0500 | [diff] [blame] | 277 | Data descriptors inherited from <a href="apiclient.oauth.html#Flow">Flow</a>:<br> |
Joe Gregorio | 30dfdc3 | 2010-12-09 16:34:22 -0500 | [diff] [blame] | 278 | <dl><dt><strong>__dict__</strong></dt> |
| 279 | <dd><tt>dictionary for instance variables (if defined)</tt></dd> |
| 280 | </dl> |
| 281 | <dl><dt><strong>__weakref__</strong></dt> |
| 282 | <dd><tt>list of weak references to the object (if defined)</tt></dd> |
| 283 | </dl> |
| 284 | </td></tr></table> <p> |
| 285 | <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> |
| 286 | <tr bgcolor="#ffc8d8"> |
| 287 | <td colspan=3 valign=bottom> <br> |
| 288 | <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> |
| 289 | |
| 290 | <tr><td bgcolor="#ffc8d8"><tt> </tt></td><td> </td> |
| 291 | <td width="100%"><dl><dt>Method resolution order:</dt> |
| 292 | <dd><a href="apiclient.oauth.html#MissingParameter">MissingParameter</a></dd> |
| 293 | <dd><a href="apiclient.oauth.html#Error">Error</a></dd> |
| 294 | <dd><a href="exceptions.html#Exception">exceptions.Exception</a></dd> |
| 295 | <dd><a href="exceptions.html#BaseException">exceptions.BaseException</a></dd> |
| 296 | <dd><a href="__builtin__.html#object">__builtin__.object</a></dd> |
| 297 | </dl> |
| 298 | <hr> |
| 299 | Data descriptors inherited from <a href="apiclient.oauth.html#Error">Error</a>:<br> |
| 300 | <dl><dt><strong>__weakref__</strong></dt> |
| 301 | <dd><tt>list of weak references to the object (if defined)</tt></dd> |
| 302 | </dl> |
| 303 | <hr> |
| 304 | Methods inherited from <a href="exceptions.html#Exception">exceptions.Exception</a>:<br> |
Joe Gregorio | 4258d6b | 2011-03-18 10:20:16 -0400 | [diff] [blame] | 305 | <dl><dt><a name="MissingParameter-__init__"><strong>__init__</strong></a>(...)</dt><dd><tt>x.<a href="#MissingParameter-__init__">__init__</a>(...) initializes x; see help(type(x)) for signature</tt></dd></dl> |
Joe Gregorio | 30dfdc3 | 2010-12-09 16:34:22 -0500 | [diff] [blame] | 306 | |
| 307 | <hr> |
| 308 | Data and other attributes inherited from <a href="exceptions.html#Exception">exceptions.Exception</a>:<br> |
| 309 | <dl><dt><strong>__new__</strong> = <built-in method __new__ of type object><dd><tt>T.<a href="#MissingParameter-__new__">__new__</a>(S, ...) -> a new <a href="__builtin__.html#object">object</a> with type S, a subtype of T</tt></dl> |
| 310 | |
| 311 | <hr> |
| 312 | Methods inherited from <a href="exceptions.html#BaseException">exceptions.BaseException</a>:<br> |
| 313 | <dl><dt><a name="MissingParameter-__delattr__"><strong>__delattr__</strong></a>(...)</dt><dd><tt>x.<a href="#MissingParameter-__delattr__">__delattr__</a>('name') <==> del x.name</tt></dd></dl> |
| 314 | |
| 315 | <dl><dt><a name="MissingParameter-__getattribute__"><strong>__getattribute__</strong></a>(...)</dt><dd><tt>x.<a href="#MissingParameter-__getattribute__">__getattribute__</a>('name') <==> x.name</tt></dd></dl> |
| 316 | |
| 317 | <dl><dt><a name="MissingParameter-__getitem__"><strong>__getitem__</strong></a>(...)</dt><dd><tt>x.<a href="#MissingParameter-__getitem__">__getitem__</a>(y) <==> x[y]</tt></dd></dl> |
| 318 | |
| 319 | <dl><dt><a name="MissingParameter-__getslice__"><strong>__getslice__</strong></a>(...)</dt><dd><tt>x.<a href="#MissingParameter-__getslice__">__getslice__</a>(i, j) <==> x[i:j]<br> |
| 320 | <br> |
| 321 | Use of negative indices is not supported.</tt></dd></dl> |
| 322 | |
| 323 | <dl><dt><a name="MissingParameter-__reduce__"><strong>__reduce__</strong></a>(...)</dt></dl> |
| 324 | |
| 325 | <dl><dt><a name="MissingParameter-__repr__"><strong>__repr__</strong></a>(...)</dt><dd><tt>x.<a href="#MissingParameter-__repr__">__repr__</a>() <==> repr(x)</tt></dd></dl> |
| 326 | |
| 327 | <dl><dt><a name="MissingParameter-__setattr__"><strong>__setattr__</strong></a>(...)</dt><dd><tt>x.<a href="#MissingParameter-__setattr__">__setattr__</a>('name', value) <==> x.name = value</tt></dd></dl> |
| 328 | |
| 329 | <dl><dt><a name="MissingParameter-__setstate__"><strong>__setstate__</strong></a>(...)</dt></dl> |
| 330 | |
| 331 | <dl><dt><a name="MissingParameter-__str__"><strong>__str__</strong></a>(...)</dt><dd><tt>x.<a href="#MissingParameter-__str__">__str__</a>() <==> str(x)</tt></dd></dl> |
| 332 | |
| 333 | <dl><dt><a name="MissingParameter-__unicode__"><strong>__unicode__</strong></a>(...)</dt></dl> |
| 334 | |
| 335 | <hr> |
| 336 | Data descriptors inherited from <a href="exceptions.html#BaseException">exceptions.BaseException</a>:<br> |
| 337 | <dl><dt><strong>__dict__</strong></dt> |
| 338 | </dl> |
| 339 | <dl><dt><strong>args</strong></dt> |
| 340 | </dl> |
| 341 | <dl><dt><strong>message</strong></dt> |
| 342 | </dl> |
| 343 | </td></tr></table> <p> |
| 344 | <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> |
| 345 | <tr bgcolor="#ffc8d8"> |
| 346 | <td colspan=3 valign=bottom> <br> |
| 347 | <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> |
| 348 | |
| 349 | <tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td> |
| 350 | <td colspan=2><tt><a href="#Credentials">Credentials</a> <a href="__builtin__.html#object">object</a> for OAuth 1.0a<br> </tt></td></tr> |
| 351 | <tr><td> </td> |
| 352 | <td width="100%"><dl><dt>Method resolution order:</dt> |
| 353 | <dd><a href="apiclient.oauth.html#OAuthCredentials">OAuthCredentials</a></dd> |
| 354 | <dd><a href="apiclient.oauth.html#Credentials">Credentials</a></dd> |
| 355 | <dd><a href="__builtin__.html#object">__builtin__.object</a></dd> |
| 356 | </dl> |
| 357 | <hr> |
| 358 | Methods defined here:<br> |
Joe Gregorio | fffa7d7 | 2011-02-18 17:20:39 -0500 | [diff] [blame] | 359 | <dl><dt><a name="OAuthCredentials-__getstate__"><strong>__getstate__</strong></a>(self)</dt><dd><tt>Trim the state down to something that can be pickled.</tt></dd></dl> |
| 360 | |
Joe Gregorio | 30dfdc3 | 2010-12-09 16:34:22 -0500 | [diff] [blame] | 361 | <dl><dt><a name="OAuthCredentials-__init__"><strong>__init__</strong></a>(self, consumer, token, user_agent)</dt><dd><tt>consumer - An instance of oauth.Consumer.<br> |
| 362 | token - An instance of oauth.Token constructed with<br> |
| 363 | the access token and secret.<br> |
| 364 | user_agent - The HTTP User-Agent to provide for this application.</tt></dd></dl> |
| 365 | |
Joe Gregorio | fffa7d7 | 2011-02-18 17:20:39 -0500 | [diff] [blame] | 366 | <dl><dt><a name="OAuthCredentials-__setstate__"><strong>__setstate__</strong></a>(self, state)</dt><dd><tt>Reconstitute the state of the <a href="__builtin__.html#object">object</a> from being pickled.</tt></dd></dl> |
| 367 | |
Joe Gregorio | 30dfdc3 | 2010-12-09 16:34:22 -0500 | [diff] [blame] | 368 | <dl><dt><a name="OAuthCredentials-authorize"><strong>authorize</strong></a>(self, http)</dt><dd><tt>Args:<br> |
| 369 | http - An instance of httplib2.Http<br> |
| 370 | or something that acts like it.<br> |
| 371 | <br> |
| 372 | Returns:<br> |
| 373 | A modified instance of http that was passed in.<br> |
| 374 | <br> |
| 375 | Example:<br> |
| 376 | <br> |
| 377 | h = httplib2.Http()<br> |
| 378 | h = credentials.<a href="#OAuthCredentials-authorize">authorize</a>(h)<br> |
| 379 | <br> |
| 380 | You can't create a new OAuth<br> |
| 381 | subclass of httplib2.Authenication because<br> |
| 382 | it never gets passed the absolute URI, which is<br> |
| 383 | needed for signing. So instead we have to overload<br> |
| 384 | 'request' with a closure that adds in the<br> |
| 385 | Authorization header and then calls the original version<br> |
| 386 | of 'request()'.</tt></dd></dl> |
| 387 | |
Joe Gregorio | fffa7d7 | 2011-02-18 17:20:39 -0500 | [diff] [blame] | 388 | <dl><dt><a name="OAuthCredentials-set_store"><strong>set_store</strong></a>(self, store)</dt><dd><tt>Set the storage for the credential.<br> |
| 389 | <br> |
| 390 | Args:<br> |
| 391 | store: callable, a callable that when passed a Credential<br> |
| 392 | will store the credential back to where it came from.<br> |
| 393 | This is needed to store the latest access_token if it<br> |
| 394 | has been revoked.</tt></dd></dl> |
| 395 | |
| 396 | <hr> |
| 397 | Data descriptors defined here:<br> |
| 398 | <dl><dt><strong>invalid</strong></dt> |
| 399 | <dd><tt>True if the credentials are invalid, such as being revoked.</tt></dd> |
| 400 | </dl> |
Joe Gregorio | 30dfdc3 | 2010-12-09 16:34:22 -0500 | [diff] [blame] | 401 | <hr> |
| 402 | Data descriptors inherited from <a href="apiclient.oauth.html#Credentials">Credentials</a>:<br> |
| 403 | <dl><dt><strong>__dict__</strong></dt> |
| 404 | <dd><tt>dictionary for instance variables (if defined)</tt></dd> |
| 405 | </dl> |
| 406 | <dl><dt><strong>__weakref__</strong></dt> |
| 407 | <dd><tt>list of weak references to the object (if defined)</tt></dd> |
| 408 | </dl> |
| 409 | </td></tr></table> <p> |
| 410 | <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> |
| 411 | <tr bgcolor="#ffc8d8"> |
| 412 | <td colspan=3 valign=bottom> <br> |
| 413 | <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> |
| 414 | |
| 415 | <tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td> |
| 416 | <td colspan=2><tt><a href="#Error">Error</a> occurred during request.<br> </tt></td></tr> |
| 417 | <tr><td> </td> |
| 418 | <td width="100%"><dl><dt>Method resolution order:</dt> |
| 419 | <dd><a href="apiclient.oauth.html#RequestError">RequestError</a></dd> |
| 420 | <dd><a href="apiclient.oauth.html#Error">Error</a></dd> |
| 421 | <dd><a href="exceptions.html#Exception">exceptions.Exception</a></dd> |
| 422 | <dd><a href="exceptions.html#BaseException">exceptions.BaseException</a></dd> |
| 423 | <dd><a href="__builtin__.html#object">__builtin__.object</a></dd> |
| 424 | </dl> |
| 425 | <hr> |
| 426 | Data descriptors inherited from <a href="apiclient.oauth.html#Error">Error</a>:<br> |
| 427 | <dl><dt><strong>__weakref__</strong></dt> |
| 428 | <dd><tt>list of weak references to the object (if defined)</tt></dd> |
| 429 | </dl> |
| 430 | <hr> |
| 431 | Methods inherited from <a href="exceptions.html#Exception">exceptions.Exception</a>:<br> |
Joe Gregorio | 4258d6b | 2011-03-18 10:20:16 -0400 | [diff] [blame] | 432 | <dl><dt><a name="RequestError-__init__"><strong>__init__</strong></a>(...)</dt><dd><tt>x.<a href="#RequestError-__init__">__init__</a>(...) initializes x; see help(type(x)) for signature</tt></dd></dl> |
Joe Gregorio | 30dfdc3 | 2010-12-09 16:34:22 -0500 | [diff] [blame] | 433 | |
| 434 | <hr> |
| 435 | Data and other attributes inherited from <a href="exceptions.html#Exception">exceptions.Exception</a>:<br> |
| 436 | <dl><dt><strong>__new__</strong> = <built-in method __new__ of type object><dd><tt>T.<a href="#RequestError-__new__">__new__</a>(S, ...) -> a new <a href="__builtin__.html#object">object</a> with type S, a subtype of T</tt></dl> |
| 437 | |
| 438 | <hr> |
| 439 | Methods inherited from <a href="exceptions.html#BaseException">exceptions.BaseException</a>:<br> |
| 440 | <dl><dt><a name="RequestError-__delattr__"><strong>__delattr__</strong></a>(...)</dt><dd><tt>x.<a href="#RequestError-__delattr__">__delattr__</a>('name') <==> del x.name</tt></dd></dl> |
| 441 | |
| 442 | <dl><dt><a name="RequestError-__getattribute__"><strong>__getattribute__</strong></a>(...)</dt><dd><tt>x.<a href="#RequestError-__getattribute__">__getattribute__</a>('name') <==> x.name</tt></dd></dl> |
| 443 | |
| 444 | <dl><dt><a name="RequestError-__getitem__"><strong>__getitem__</strong></a>(...)</dt><dd><tt>x.<a href="#RequestError-__getitem__">__getitem__</a>(y) <==> x[y]</tt></dd></dl> |
| 445 | |
| 446 | <dl><dt><a name="RequestError-__getslice__"><strong>__getslice__</strong></a>(...)</dt><dd><tt>x.<a href="#RequestError-__getslice__">__getslice__</a>(i, j) <==> x[i:j]<br> |
| 447 | <br> |
| 448 | Use of negative indices is not supported.</tt></dd></dl> |
| 449 | |
| 450 | <dl><dt><a name="RequestError-__reduce__"><strong>__reduce__</strong></a>(...)</dt></dl> |
| 451 | |
| 452 | <dl><dt><a name="RequestError-__repr__"><strong>__repr__</strong></a>(...)</dt><dd><tt>x.<a href="#RequestError-__repr__">__repr__</a>() <==> repr(x)</tt></dd></dl> |
| 453 | |
| 454 | <dl><dt><a name="RequestError-__setattr__"><strong>__setattr__</strong></a>(...)</dt><dd><tt>x.<a href="#RequestError-__setattr__">__setattr__</a>('name', value) <==> x.name = value</tt></dd></dl> |
| 455 | |
| 456 | <dl><dt><a name="RequestError-__setstate__"><strong>__setstate__</strong></a>(...)</dt></dl> |
| 457 | |
| 458 | <dl><dt><a name="RequestError-__str__"><strong>__str__</strong></a>(...)</dt><dd><tt>x.<a href="#RequestError-__str__">__str__</a>() <==> str(x)</tt></dd></dl> |
| 459 | |
| 460 | <dl><dt><a name="RequestError-__unicode__"><strong>__unicode__</strong></a>(...)</dt></dl> |
| 461 | |
| 462 | <hr> |
| 463 | Data descriptors inherited from <a href="exceptions.html#BaseException">exceptions.BaseException</a>:<br> |
| 464 | <dl><dt><strong>__dict__</strong></dt> |
| 465 | </dl> |
| 466 | <dl><dt><strong>args</strong></dt> |
| 467 | </dl> |
| 468 | <dl><dt><strong>message</strong></dt> |
| 469 | </dl> |
Joe Gregorio | fffa7d7 | 2011-02-18 17:20:39 -0500 | [diff] [blame] | 470 | </td></tr></table> <p> |
| 471 | <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> |
| 472 | <tr bgcolor="#ffc8d8"> |
| 473 | <td colspan=3 valign=bottom> <br> |
| 474 | <font color="#000000" face="helvetica, arial"><a name="Storage">class <strong>Storage</strong></a>(<a href="__builtin__.html#object">__builtin__.object</a>)</font></td></tr> |
| 475 | |
| 476 | <tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td> |
| 477 | <td colspan=2><tt>Base class for all <a href="#Storage">Storage</a> objects.<br> |
| 478 | <br> |
| 479 | Store and retrieve a single credential.<br> </tt></td></tr> |
| 480 | <tr><td> </td> |
| 481 | <td width="100%">Methods defined here:<br> |
| 482 | <dl><dt><a name="Storage-get"><strong>get</strong></a>(self)</dt><dd><tt>Retrieve credential.<br> |
| 483 | <br> |
| 484 | Returns:<br> |
| 485 | apiclient.oauth.<a href="#Credentials">Credentials</a></tt></dd></dl> |
| 486 | |
| 487 | <dl><dt><a name="Storage-put"><strong>put</strong></a>(self, credentials)</dt><dd><tt>Write a credential.<br> |
| 488 | <br> |
| 489 | Args:<br> |
| 490 | credentials: <a href="#Credentials">Credentials</a>, the credentials to store.</tt></dd></dl> |
| 491 | |
| 492 | <hr> |
| 493 | Data descriptors defined here:<br> |
| 494 | <dl><dt><strong>__dict__</strong></dt> |
| 495 | <dd><tt>dictionary for instance variables (if defined)</tt></dd> |
| 496 | </dl> |
| 497 | <dl><dt><strong>__weakref__</strong></dt> |
| 498 | <dd><tt>list of weak references to the object (if defined)</tt></dd> |
| 499 | </dl> |
Joe Gregorio | 30dfdc3 | 2010-12-09 16:34:22 -0500 | [diff] [blame] | 500 | </td></tr></table></td></tr></table><p> |
| 501 | <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> |
| 502 | <tr bgcolor="#55aa55"> |
| 503 | <td colspan=3 valign=bottom> <br> |
| 504 | <font color="#ffffff" face="helvetica, arial"><big><strong>Data</strong></big></font></td></tr> |
| 505 | |
| 506 | <tr><td bgcolor="#55aa55"><tt> </tt></td><td> </td> |
| 507 | <td width="100%"><strong>__author__</strong> = 'jcgregorio@google.com (Joe Gregorio)'</td></tr></table><p> |
| 508 | <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> |
| 509 | <tr bgcolor="#7799ee"> |
| 510 | <td colspan=3 valign=bottom> <br> |
| 511 | <font color="#ffffff" face="helvetica, arial"><big><strong>Author</strong></big></font></td></tr> |
| 512 | |
| 513 | <tr><td bgcolor="#7799ee"><tt> </tt></td><td> </td> |
| 514 | <td width="100%">jcgregorio@google.com (Joe Gregorio)</td></tr></table> |
| 515 | </body></html> |