Joe Gregorio | 6e53703 | 2011-02-09 23:04:26 -0500 | [diff] [blame^] | 1 | |
| 2 | <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> |
| 3 | <html><head><title>Python: module oauth2client.client</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="oauth2client.html"><font color="#ffffff">oauth2client</font></a>.client</strong></big></big></font></td |
| 10 | ><td align=right valign=bottom |
| 11 | ><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br><a href="file:/home/jcgregorio/projects/apiary/oauth2client/client.py">/home/jcgregorio/projects/apiary/oauth2client/client.py</a></font></td></tr></table> |
| 12 | <p><tt>An OAuth 2.0 client<br> |
| 13 | <br> |
| 14 | Tools for interacting with OAuth 2.0 protected<br> |
| 15 | resources.</tt></p> |
| 16 | <p> |
| 17 | <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> |
| 18 | <tr bgcolor="#aa55cc"> |
| 19 | <td colspan=3 valign=bottom> <br> |
| 20 | <font color="#ffffff" face="helvetica, arial"><big><strong>Modules</strong></big></font></td></tr> |
| 21 | |
| 22 | <tr><td bgcolor="#aa55cc"><tt> </tt></td><td> </td> |
| 23 | <td width="100%"><table width="100%" summary="list"><tr><td width="25%" valign=top><a href="copy.html">copy</a><br> |
| 24 | <a href="datetime.html">datetime</a><br> |
| 25 | </td><td width="25%" valign=top><a href="httplib2.html">httplib2</a><br> |
| 26 | <a href="logging.html">logging</a><br> |
| 27 | </td><td width="25%" valign=top><a href="simplejson.html">simplejson</a><br> |
| 28 | <a href="urllib.html">urllib</a><br> |
| 29 | </td><td width="25%" valign=top><a href="urlparse.html">urlparse</a><br> |
| 30 | </td></tr></table></td></tr></table><p> |
| 31 | <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> |
| 32 | <tr bgcolor="#ee77aa"> |
| 33 | <td colspan=3 valign=bottom> <br> |
| 34 | <font color="#ffffff" face="helvetica, arial"><big><strong>Classes</strong></big></font></td></tr> |
| 35 | |
| 36 | <tr><td bgcolor="#ee77aa"><tt> </tt></td><td> </td> |
| 37 | <td width="100%"><dl> |
| 38 | <dt><font face="helvetica, arial"><a href="__builtin__.html#object">__builtin__.object</a> |
| 39 | </font></dt><dd> |
| 40 | <dl> |
| 41 | <dt><font face="helvetica, arial"><a href="oauth2client.client.html#Credentials">Credentials</a> |
| 42 | </font></dt><dd> |
| 43 | <dl> |
| 44 | <dt><font face="helvetica, arial"><a href="oauth2client.client.html#OAuth2Credentials">OAuth2Credentials</a> |
| 45 | </font></dt></dl> |
| 46 | </dd> |
| 47 | <dt><font face="helvetica, arial"><a href="oauth2client.client.html#Flow">Flow</a> |
| 48 | </font></dt><dd> |
| 49 | <dl> |
| 50 | <dt><font face="helvetica, arial"><a href="oauth2client.client.html#OAuth2WebServerFlow">OAuth2WebServerFlow</a> |
| 51 | </font></dt></dl> |
| 52 | </dd> |
| 53 | </dl> |
| 54 | </dd> |
| 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="oauth2client.client.html#Error">Error</a> |
| 59 | </font></dt><dd> |
| 60 | <dl> |
| 61 | <dt><font face="helvetica, arial"><a href="oauth2client.client.html#MissingParameter">MissingParameter</a> |
| 62 | </font></dt><dt><font face="helvetica, arial"><a href="oauth2client.client.html#RequestError">RequestError</a> |
| 63 | </font></dt></dl> |
| 64 | </dd> |
| 65 | </dl> |
| 66 | </dd> |
| 67 | </dl> |
| 68 | <p> |
| 69 | <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> |
| 70 | <tr bgcolor="#ffc8d8"> |
| 71 | <td colspan=3 valign=bottom> <br> |
| 72 | <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> |
| 73 | |
| 74 | <tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td> |
| 75 | <td colspan=2><tt>Base class for all <a href="#Credentials">Credentials</a> objects.<br> |
| 76 | <br> |
| 77 | Subclasses must define an <a href="#Credentials-authorize">authorize</a>() method<br> |
| 78 | that applies the credentials to an HTTP transport.<br> </tt></td></tr> |
| 79 | <tr><td> </td> |
| 80 | <td width="100%">Methods defined here:<br> |
| 81 | <dl><dt><a name="Credentials-authorize"><strong>authorize</strong></a>(self, http)</dt><dd><tt>Take an httplib2.Http instance (or equivalent) and<br> |
| 82 | authorizes it for the set of credentials, usually by<br> |
| 83 | replacing http.request() with a method that adds in<br> |
| 84 | the appropriate headers and then delegates to the original<br> |
| 85 | Http.request() method.</tt></dd></dl> |
| 86 | |
| 87 | <hr> |
| 88 | Data descriptors defined here:<br> |
| 89 | <dl><dt><strong>__dict__</strong></dt> |
| 90 | <dd><tt>dictionary for instance variables (if defined)</tt></dd> |
| 91 | </dl> |
| 92 | <dl><dt><strong>__weakref__</strong></dt> |
| 93 | <dd><tt>list of weak references to the object (if defined)</tt></dd> |
| 94 | </dl> |
| 95 | </td></tr></table> <p> |
| 96 | <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> |
| 97 | <tr bgcolor="#ffc8d8"> |
| 98 | <td colspan=3 valign=bottom> <br> |
| 99 | <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> |
| 100 | |
| 101 | <tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td> |
| 102 | <td colspan=2><tt>Base error for this module.<br> </tt></td></tr> |
| 103 | <tr><td> </td> |
| 104 | <td width="100%"><dl><dt>Method resolution order:</dt> |
| 105 | <dd><a href="oauth2client.client.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 defined here:<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> |
| 117 | <dl><dt><a name="Error-__init__"><strong>__init__</strong></a>(...)</dt><dd><tt>x.<a href="#Error-__init__">__init__</a>(...) initializes x; see x.__class__.__doc__ for signature</tt></dd></dl> |
| 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="#Error-__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="Error-__delattr__"><strong>__delattr__</strong></a>(...)</dt><dd><tt>x.<a href="#Error-__delattr__">__delattr__</a>('name') <==> del x.name</tt></dd></dl> |
| 126 | |
| 127 | <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> |
| 128 | |
| 129 | <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> |
| 130 | |
| 131 | <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> |
| 132 | <br> |
| 133 | Use of negative indices is not supported.</tt></dd></dl> |
| 134 | |
| 135 | <dl><dt><a name="Error-__reduce__"><strong>__reduce__</strong></a>(...)</dt></dl> |
| 136 | |
| 137 | <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> |
| 138 | |
| 139 | <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> |
| 140 | |
| 141 | <dl><dt><a name="Error-__setstate__"><strong>__setstate__</strong></a>(...)</dt></dl> |
| 142 | |
| 143 | <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> |
| 144 | |
| 145 | <dl><dt><a name="Error-__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> |
| 159 | <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> |
| 160 | |
| 161 | <tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td> |
| 162 | <td colspan=2><tt>Base class for all <a href="#Flow">Flow</a> objects.<br> </tt></td></tr> |
| 163 | <tr><td> </td> |
| 164 | <td width="100%">Data descriptors defined here:<br> |
| 165 | <dl><dt><strong>__dict__</strong></dt> |
| 166 | <dd><tt>dictionary for instance variables (if defined)</tt></dd> |
| 167 | </dl> |
| 168 | <dl><dt><strong>__weakref__</strong></dt> |
| 169 | <dd><tt>list of weak references to the object (if defined)</tt></dd> |
| 170 | </dl> |
| 171 | </td></tr></table> <p> |
| 172 | <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> |
| 173 | <tr bgcolor="#ffc8d8"> |
| 174 | <td colspan=3 valign=bottom> <br> |
| 175 | <font color="#000000" face="helvetica, arial"><a name="MissingParameter">class <strong>MissingParameter</strong></a>(<a href="oauth2client.client.html#Error">Error</a>)</font></td></tr> |
| 176 | |
| 177 | <tr><td bgcolor="#ffc8d8"><tt> </tt></td><td> </td> |
| 178 | <td width="100%"><dl><dt>Method resolution order:</dt> |
| 179 | <dd><a href="oauth2client.client.html#MissingParameter">MissingParameter</a></dd> |
| 180 | <dd><a href="oauth2client.client.html#Error">Error</a></dd> |
| 181 | <dd><a href="exceptions.html#Exception">exceptions.Exception</a></dd> |
| 182 | <dd><a href="exceptions.html#BaseException">exceptions.BaseException</a></dd> |
| 183 | <dd><a href="__builtin__.html#object">__builtin__.object</a></dd> |
| 184 | </dl> |
| 185 | <hr> |
| 186 | Data descriptors inherited from <a href="oauth2client.client.html#Error">Error</a>:<br> |
| 187 | <dl><dt><strong>__weakref__</strong></dt> |
| 188 | <dd><tt>list of weak references to the object (if defined)</tt></dd> |
| 189 | </dl> |
| 190 | <hr> |
| 191 | Methods inherited from <a href="exceptions.html#Exception">exceptions.Exception</a>:<br> |
| 192 | <dl><dt><a name="MissingParameter-__init__"><strong>__init__</strong></a>(...)</dt><dd><tt>x.<a href="#MissingParameter-__init__">__init__</a>(...) initializes x; see x.__class__.__doc__ for signature</tt></dd></dl> |
| 193 | |
| 194 | <hr> |
| 195 | Data and other attributes inherited from <a href="exceptions.html#Exception">exceptions.Exception</a>:<br> |
| 196 | <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> |
| 197 | |
| 198 | <hr> |
| 199 | Methods inherited from <a href="exceptions.html#BaseException">exceptions.BaseException</a>:<br> |
| 200 | <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> |
| 201 | |
| 202 | <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> |
| 203 | |
| 204 | <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> |
| 205 | |
| 206 | <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> |
| 207 | <br> |
| 208 | Use of negative indices is not supported.</tt></dd></dl> |
| 209 | |
| 210 | <dl><dt><a name="MissingParameter-__reduce__"><strong>__reduce__</strong></a>(...)</dt></dl> |
| 211 | |
| 212 | <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> |
| 213 | |
| 214 | <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> |
| 215 | |
| 216 | <dl><dt><a name="MissingParameter-__setstate__"><strong>__setstate__</strong></a>(...)</dt></dl> |
| 217 | |
| 218 | <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> |
| 219 | |
| 220 | <dl><dt><a name="MissingParameter-__unicode__"><strong>__unicode__</strong></a>(...)</dt></dl> |
| 221 | |
| 222 | <hr> |
| 223 | Data descriptors inherited from <a href="exceptions.html#BaseException">exceptions.BaseException</a>:<br> |
| 224 | <dl><dt><strong>__dict__</strong></dt> |
| 225 | </dl> |
| 226 | <dl><dt><strong>args</strong></dt> |
| 227 | </dl> |
| 228 | <dl><dt><strong>message</strong></dt> |
| 229 | </dl> |
| 230 | </td></tr></table> <p> |
| 231 | <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> |
| 232 | <tr bgcolor="#ffc8d8"> |
| 233 | <td colspan=3 valign=bottom> <br> |
| 234 | <font color="#000000" face="helvetica, arial"><a name="OAuth2Credentials">class <strong>OAuth2Credentials</strong></a>(<a href="oauth2client.client.html#Credentials">Credentials</a>)</font></td></tr> |
| 235 | |
| 236 | <tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td> |
| 237 | <td colspan=2><tt><a href="#Credentials">Credentials</a> <a href="__builtin__.html#object">object</a> for OAuth 2.0<br> |
| 238 | <br> |
| 239 | <a href="#Credentials">Credentials</a> can be applied to an httplib2.Http <a href="__builtin__.html#object">object</a><br> |
| 240 | using the <a href="#OAuth2Credentials-authorize">authorize</a>() method, which then signs each<br> |
| 241 | request from that <a href="__builtin__.html#object">object</a> with the OAuth 2.0 access token.<br> |
| 242 | <br> |
| 243 | <a href="#OAuth2Credentials">OAuth2Credentials</a> objects may be safely pickled and unpickled.<br> </tt></td></tr> |
| 244 | <tr><td> </td> |
| 245 | <td width="100%"><dl><dt>Method resolution order:</dt> |
| 246 | <dd><a href="oauth2client.client.html#OAuth2Credentials">OAuth2Credentials</a></dd> |
| 247 | <dd><a href="oauth2client.client.html#Credentials">Credentials</a></dd> |
| 248 | <dd><a href="__builtin__.html#object">__builtin__.object</a></dd> |
| 249 | </dl> |
| 250 | <hr> |
| 251 | Methods defined here:<br> |
| 252 | <dl><dt><a name="OAuth2Credentials-__getstate__"><strong>__getstate__</strong></a>(self)</dt><dd><tt>Trim the state down to something that can be pickled.</tt></dd></dl> |
| 253 | |
| 254 | <dl><dt><a name="OAuth2Credentials-__init__"><strong>__init__</strong></a>(self, access_token, client_id, client_secret, refresh_token, token_expiry, token_uri, user_agent)</dt><dd><tt>Create an instance of <a href="#OAuth2Credentials">OAuth2Credentials</a><br> |
| 255 | <br> |
| 256 | This constructor is not usually called by the user, instead<br> |
| 257 | <a href="#OAuth2Credentials">OAuth2Credentials</a> objects are instantiated by<br> |
| 258 | the <a href="#OAuth2WebServerFlow">OAuth2WebServerFlow</a>.<br> |
| 259 | <br> |
| 260 | Args:<br> |
| 261 | token_uri: string, URI of token endpoint<br> |
| 262 | client_id: string, client identifier<br> |
| 263 | client_secret: string, client secret<br> |
| 264 | access_token: string, access token<br> |
| 265 | token_expiry: datetime, when the access_token expires<br> |
| 266 | refresh_token: string, refresh token<br> |
| 267 | user_agent: string, The HTTP User-Agent to provide for this application.<br> |
| 268 | <br> |
| 269 | <br> |
| 270 | Notes:<br> |
| 271 | store: callable, a callable that when passed a Credential<br> |
| 272 | will store the credential back to where it came from.<br> |
| 273 | This is needed to store the latest access_token if it<br> |
| 274 | has expired and been refreshed.</tt></dd></dl> |
| 275 | |
| 276 | <dl><dt><a name="OAuth2Credentials-__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> |
| 277 | |
| 278 | <dl><dt><a name="OAuth2Credentials-authorize"><strong>authorize</strong></a>(self, http)</dt><dd><tt>Args:<br> |
| 279 | http: An instance of httplib2.Http<br> |
| 280 | or something that acts like it.<br> |
| 281 | <br> |
| 282 | Returns:<br> |
| 283 | A modified instance of http that was passed in.<br> |
| 284 | <br> |
| 285 | Example:<br> |
| 286 | <br> |
| 287 | h = httplib2.Http()<br> |
| 288 | h = credentials.<a href="#OAuth2Credentials-authorize">authorize</a>(h)<br> |
| 289 | <br> |
| 290 | You can't create a new OAuth<br> |
| 291 | subclass of httplib2.Authenication because<br> |
| 292 | it never gets passed the absolute URI, which is<br> |
| 293 | needed for signing. So instead we have to overload<br> |
| 294 | 'request' with a closure that adds in the<br> |
| 295 | Authorization header and then calls the original version<br> |
| 296 | of 'request()'.</tt></dd></dl> |
| 297 | |
| 298 | <dl><dt><a name="OAuth2Credentials-set_store"><strong>set_store</strong></a>(self, store)</dt><dd><tt>Set the storage for the credential.<br> |
| 299 | <br> |
| 300 | Args:<br> |
| 301 | store: callable, a callable that when passed a Credential<br> |
| 302 | will store the credential back to where it came from.<br> |
| 303 | This is needed to store the latest access_token if it<br> |
| 304 | has expired and been refreshed.</tt></dd></dl> |
| 305 | |
| 306 | <hr> |
| 307 | Data descriptors inherited from <a href="oauth2client.client.html#Credentials">Credentials</a>:<br> |
| 308 | <dl><dt><strong>__dict__</strong></dt> |
| 309 | <dd><tt>dictionary for instance variables (if defined)</tt></dd> |
| 310 | </dl> |
| 311 | <dl><dt><strong>__weakref__</strong></dt> |
| 312 | <dd><tt>list of weak references to the object (if defined)</tt></dd> |
| 313 | </dl> |
| 314 | </td></tr></table> <p> |
| 315 | <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> |
| 316 | <tr bgcolor="#ffc8d8"> |
| 317 | <td colspan=3 valign=bottom> <br> |
| 318 | <font color="#000000" face="helvetica, arial"><a name="OAuth2WebServerFlow">class <strong>OAuth2WebServerFlow</strong></a>(<a href="oauth2client.client.html#Flow">Flow</a>)</font></td></tr> |
| 319 | |
| 320 | <tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td> |
| 321 | <td colspan=2><tt>Does the Web Server <a href="#Flow">Flow</a> for OAuth 2.0.<br> |
| 322 | <br> |
| 323 | <a href="#OAuth2Credentials">OAuth2Credentials</a> objects may be safely pickled and unpickled.<br> </tt></td></tr> |
| 324 | <tr><td> </td> |
| 325 | <td width="100%"><dl><dt>Method resolution order:</dt> |
| 326 | <dd><a href="oauth2client.client.html#OAuth2WebServerFlow">OAuth2WebServerFlow</a></dd> |
| 327 | <dd><a href="oauth2client.client.html#Flow">Flow</a></dd> |
| 328 | <dd><a href="__builtin__.html#object">__builtin__.object</a></dd> |
| 329 | </dl> |
| 330 | <hr> |
| 331 | Methods defined here:<br> |
| 332 | <dl><dt><a name="OAuth2WebServerFlow-__init__"><strong>__init__</strong></a>(self, client_id, client_secret, scope, user_agent, authorization_uri<font color="#909090">='https://www.google.com/accounts/o8/oauth2/authorization'</font>, token_uri<font color="#909090">='https://www.google.com/accounts/o8/oauth2/token'</font>, **kwargs)</dt><dd><tt>Constructor for <a href="#OAuth2WebServerFlow">OAuth2WebServerFlow</a><br> |
| 333 | <br> |
| 334 | Args:<br> |
| 335 | client_id: string, client identifier<br> |
| 336 | client_secret: string client secret<br> |
| 337 | scope: string, scope of the credentials being requested<br> |
| 338 | user_agent: string, HTTP User-Agent to provide for this application.<br> |
| 339 | authorization_uri: string, URI for authorization endpoint<br> |
| 340 | token_uri: string, URI for token endpoint<br> |
| 341 | **kwargs: dict, The keyword arguments are all optional and required<br> |
| 342 | parameters for the OAuth calls.</tt></dd></dl> |
| 343 | |
| 344 | <dl><dt><a name="OAuth2WebServerFlow-step1_get_authorize_url"><strong>step1_get_authorize_url</strong></a>(self, redirect_uri<font color="#909090">='oob'</font>)</dt><dd><tt>Returns a URI to redirect to the provider.<br> |
| 345 | <br> |
| 346 | Args:<br> |
| 347 | redirect_uri: string, Either the string 'oob' for a non-web-based<br> |
| 348 | application, or a URI that handles the callback from<br> |
| 349 | the authorization server.<br> |
| 350 | <br> |
| 351 | If redirect_uri is 'oob' then pass in the<br> |
| 352 | generated verification code to step2_exchange,<br> |
| 353 | otherwise pass in the query parameters received<br> |
| 354 | at the callback uri to step2_exchange.</tt></dd></dl> |
| 355 | |
| 356 | <dl><dt><a name="OAuth2WebServerFlow-step2_exchange"><strong>step2_exchange</strong></a>(self, code)</dt><dd><tt>Exhanges a code for <a href="#OAuth2Credentials">OAuth2Credentials</a>.<br> |
| 357 | <br> |
| 358 | Args:<br> |
| 359 | code: string or dict, either the code as a string, or a dictionary<br> |
| 360 | of the query parameters to the redirect_uri, which contains<br> |
| 361 | the code.</tt></dd></dl> |
| 362 | |
| 363 | <hr> |
| 364 | Data descriptors inherited from <a href="oauth2client.client.html#Flow">Flow</a>:<br> |
| 365 | <dl><dt><strong>__dict__</strong></dt> |
| 366 | <dd><tt>dictionary for instance variables (if defined)</tt></dd> |
| 367 | </dl> |
| 368 | <dl><dt><strong>__weakref__</strong></dt> |
| 369 | <dd><tt>list of weak references to the object (if defined)</tt></dd> |
| 370 | </dl> |
| 371 | </td></tr></table> <p> |
| 372 | <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> |
| 373 | <tr bgcolor="#ffc8d8"> |
| 374 | <td colspan=3 valign=bottom> <br> |
| 375 | <font color="#000000" face="helvetica, arial"><a name="RequestError">class <strong>RequestError</strong></a>(<a href="oauth2client.client.html#Error">Error</a>)</font></td></tr> |
| 376 | |
| 377 | <tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td> |
| 378 | <td colspan=2><tt><a href="#Error">Error</a> occurred during request.<br> </tt></td></tr> |
| 379 | <tr><td> </td> |
| 380 | <td width="100%"><dl><dt>Method resolution order:</dt> |
| 381 | <dd><a href="oauth2client.client.html#RequestError">RequestError</a></dd> |
| 382 | <dd><a href="oauth2client.client.html#Error">Error</a></dd> |
| 383 | <dd><a href="exceptions.html#Exception">exceptions.Exception</a></dd> |
| 384 | <dd><a href="exceptions.html#BaseException">exceptions.BaseException</a></dd> |
| 385 | <dd><a href="__builtin__.html#object">__builtin__.object</a></dd> |
| 386 | </dl> |
| 387 | <hr> |
| 388 | Data descriptors inherited from <a href="oauth2client.client.html#Error">Error</a>:<br> |
| 389 | <dl><dt><strong>__weakref__</strong></dt> |
| 390 | <dd><tt>list of weak references to the object (if defined)</tt></dd> |
| 391 | </dl> |
| 392 | <hr> |
| 393 | Methods inherited from <a href="exceptions.html#Exception">exceptions.Exception</a>:<br> |
| 394 | <dl><dt><a name="RequestError-__init__"><strong>__init__</strong></a>(...)</dt><dd><tt>x.<a href="#RequestError-__init__">__init__</a>(...) initializes x; see x.__class__.__doc__ for signature</tt></dd></dl> |
| 395 | |
| 396 | <hr> |
| 397 | Data and other attributes inherited from <a href="exceptions.html#Exception">exceptions.Exception</a>:<br> |
| 398 | <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> |
| 399 | |
| 400 | <hr> |
| 401 | Methods inherited from <a href="exceptions.html#BaseException">exceptions.BaseException</a>:<br> |
| 402 | <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> |
| 403 | |
| 404 | <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> |
| 405 | |
| 406 | <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> |
| 407 | |
| 408 | <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> |
| 409 | <br> |
| 410 | Use of negative indices is not supported.</tt></dd></dl> |
| 411 | |
| 412 | <dl><dt><a name="RequestError-__reduce__"><strong>__reduce__</strong></a>(...)</dt></dl> |
| 413 | |
| 414 | <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> |
| 415 | |
| 416 | <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> |
| 417 | |
| 418 | <dl><dt><a name="RequestError-__setstate__"><strong>__setstate__</strong></a>(...)</dt></dl> |
| 419 | |
| 420 | <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> |
| 421 | |
| 422 | <dl><dt><a name="RequestError-__unicode__"><strong>__unicode__</strong></a>(...)</dt></dl> |
| 423 | |
| 424 | <hr> |
| 425 | Data descriptors inherited from <a href="exceptions.html#BaseException">exceptions.BaseException</a>:<br> |
| 426 | <dl><dt><strong>__dict__</strong></dt> |
| 427 | </dl> |
| 428 | <dl><dt><strong>args</strong></dt> |
| 429 | </dl> |
| 430 | <dl><dt><strong>message</strong></dt> |
| 431 | </dl> |
| 432 | </td></tr></table></td></tr></table><p> |
| 433 | <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> |
| 434 | <tr bgcolor="#55aa55"> |
| 435 | <td colspan=3 valign=bottom> <br> |
| 436 | <font color="#ffffff" face="helvetica, arial"><big><strong>Data</strong></big></font></td></tr> |
| 437 | |
| 438 | <tr><td bgcolor="#55aa55"><tt> </tt></td><td> </td> |
| 439 | <td width="100%"><strong>__author__</strong> = 'jcgregorio@google.com (Joe Gregorio)'</td></tr></table><p> |
| 440 | <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> |
| 441 | <tr bgcolor="#7799ee"> |
| 442 | <td colspan=3 valign=bottom> <br> |
| 443 | <font color="#ffffff" face="helvetica, arial"><big><strong>Author</strong></big></font></td></tr> |
| 444 | |
| 445 | <tr><td bgcolor="#7799ee"><tt> </tt></td><td> </td> |
| 446 | <td width="100%">jcgregorio@google.com (Joe Gregorio)</td></tr></table> |
| 447 | </body></html> |