|
8 | 8 | <td valign=bottom> <br> |
9 | 9 | <font color="#ffffff" face="helvetica, arial"> <br><big><big><strong><a href="gdata.html"><font color="#ffffff">gdata</font></a>.<a href="gdata.apps.html"><font color="#ffffff">apps</font></a>.service</strong></big></big></font></td |
10 | 10 | ><td align=right valign=bottom |
11 | | -><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br><a href="file:/home/jhartmann/gdata-python-client2/src/gdata/apps/service.py">/home/jhartmann/gdata-python-client2/src/gdata/apps/service.py</a></font></td></tr></table> |
| 11 | +><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br><a href="file:/usr/local/svn/gdata-python-client-release/src/gdata/apps/service.py">/usr/local/svn/gdata-python-client-release/src/gdata/apps/service.py</a></font></td></tr></table> |
12 | 12 | <p><tt># Copyright (C) 2007 SIOS Technology, Inc.<br> |
13 | 13 | #<br> |
14 | 14 | # Licensed under the Apache License, Version 2.0 (the "License");<br> |
|
29 | 29 | <font color="#fffff" face="helvetica, arial"><big><strong>Modules</strong></big></font></td></tr> |
30 | 30 |
|
31 | 31 | <tr><td bgcolor="#aa55cc"><tt> </tt></td><td> </td> |
32 | | -<td width="100%"><table width="100%" summary="list"><tr><td width="25%" valign=top><a href="elementtree.ElementTree.html">elementtree.ElementTree</a><br> |
| 32 | +<td width="100%"><table width="100%" summary="list"><tr><td width="25%" valign=top><a href="cElementTree.html">cElementTree</a><br> |
33 | 33 | </td><td width="25%" valign=top><a href="atom.html">atom</a><br> |
34 | 34 | </td><td width="25%" valign=top><a href="gdata.html">gdata</a><br> |
35 | 35 | </td><td width="25%" valign=top><a href="urllib.html">urllib</a><br> |
|
114 | 114 |
|
115 | 115 | <dl><dt><a name="AppsService-DeleteUser"><strong>DeleteUser</strong></a>(self, user_name)</dt><dd><tt>Delete a user account</tt></dd></dl> |
116 | 116 |
|
117 | | -<dl><dt><a name="AppsService-GetGenaratorFromLinkFinder"><strong>GetGenaratorFromLinkFinder</strong></a>(self, link_finder, func)</dt><dd><tt>returns a generator for pagination</tt></dd></dl> |
118 | | - |
119 | 117 | <dl><dt><a name="AppsService-GetGeneratorForAllUsers"><strong>GetGeneratorForAllUsers</strong></a>(self)</dt><dd><tt>Retrieve a generator for all users in this domain.</tt></dd></dl> |
120 | 118 |
|
| 119 | +<dl><dt><a name="AppsService-GetGeneratorFromLinkFinder"><strong>GetGeneratorFromLinkFinder</strong></a>(self, link_finder, func)</dt><dd><tt>returns a generator for pagination</tt></dd></dl> |
| 120 | + |
121 | 121 | <dl><dt><a name="AppsService-RemoveRecipientFromEmailList"><strong>RemoveRecipientFromEmailList</strong></a>(self, recipient, list_name)</dt><dd><tt>Remove recipient from email list.</tt></dd></dl> |
122 | 122 |
|
123 | 123 | <dl><dt><a name="AppsService-RestoreUser"><strong>RestoreUser</strong></a>(self, user_name)</dt></dl> |
|
202 | 202 | Returns:<br> |
203 | 203 | True if the entry was deleted.</tt></dd></dl> |
204 | 204 |
|
205 | | -<dl><dt><a name="AppsService-GenerateAuthSubURL"><strong>GenerateAuthSubURL</strong></a>(self, next, scope, secure<font color="#909090">=False</font>, session<font color="#909090">=True</font>)</dt><dd><tt>Generate a URL at which the user will login and be redirected back.<br> |
| 205 | +<dl><dt><a name="AppsService-GenerateAuthSubURL"><strong>GenerateAuthSubURL</strong></a>(self, next, scope, secure<font color="#909090">=False</font>, session<font color="#909090">=True</font>, domain<font color="#909090">='default'</font>)</dt><dd><tt>Generate a URL at which the user will login and be redirected back.<br> |
206 | 206 | <br> |
207 | 207 | Users enter their credentials on a Google login page and a token is sent<br> |
208 | 208 | to the URL specified in next. See documentation for AuthSub login at:<br> |
|
263 | 263 | Label. If the AuthSub Token does not start with the AuthSub<br> |
264 | 264 | Authorization Label or it is not set, None is returned.</tt></dd></dl> |
265 | 265 |
|
266 | | -<dl><dt><a name="AppsService-GetClientLoginToken"><strong>GetClientLoginToken</strong></a>(self)</dt></dl> |
| 266 | +<dl><dt><a name="AppsService-GetClientLoginToken"><strong>GetClientLoginToken</strong></a>(self)</dt><dd><tt>Returns the token string for the current request scope.<br> |
| 267 | + <br> |
| 268 | +The current scope is determined by the service name string member.<br> |
| 269 | +The token string is the end of the Authorization header, it doesn not<br> |
| 270 | +include the ClientLogin label.</tt></dd></dl> |
267 | 271 |
|
268 | 272 | <dl><dt><a name="AppsService-GetEntry"><strong>GetEntry</strong></a>(self, uri, extra_headers<font color="#909090">=None</font>)</dt><dd><tt>Query the GData API with the given URI and receive an Entry.<br> |
269 | 273 | <br> |
|
433 | 437 | Raises:<br> |
434 | 438 | NonAuthSubToken if the user's auth token is not an AuthSub token</tt></dd></dl> |
435 | 439 |
|
436 | | -<dl><dt><a name="AppsService-SetAuthSubToken"><strong>SetAuthSubToken</strong></a>(self, token)</dt></dl> |
| 440 | +<dl><dt><a name="AppsService-SetAuthSubToken"><strong>SetAuthSubToken</strong></a>(self, token, scopes<font color="#909090">=None</font>)</dt><dd><tt>Sets the token sent in requests to an AuthSub token.<br> |
| 441 | + <br> |
| 442 | +Only use this method if you have received a token from the AuthSub<br> |
| 443 | +service. The auth_token is set automatically when <a href="#AppsService-UpgradeToSessionToken">UpgradeToSessionToken</a>()<br> |
| 444 | +is used. See documentation for Google AuthSub here:<br> |
| 445 | +<a href="http://code.google.com/apis/accounts/AuthForWebApps.html">http://code.google.com/apis/accounts/AuthForWebApps.html</a> <br> |
| 446 | + <br> |
| 447 | +Args:<br> |
| 448 | + token: string The token returned by the AuthSub service.</tt></dd></dl> |
437 | 449 |
|
438 | | -<dl><dt><a name="AppsService-SetClientLoginToken"><strong>SetClientLoginToken</strong></a>(self, token)</dt></dl> |
| 450 | +<dl><dt><a name="AppsService-SetClientLoginToken"><strong>SetClientLoginToken</strong></a>(self, token, scopes<font color="#909090">=None</font>)</dt><dd><tt>Sets the token sent in requests to an ClientLogin token.<br> |
| 451 | + <br> |
| 452 | +Only use this method if you have received a token from the ClientLogin<br> |
| 453 | +service. The auth_token is set automatically when <a href="#AppsService-ProgrammaticLogin">ProgrammaticLogin</a>()<br> |
| 454 | +is used. See documentation for Google ClientLogin here:<br> |
| 455 | +<a href="http://code.google.com/apis/accounts/docs/AuthForInstalledApps.html">http://code.google.com/apis/accounts/docs/AuthForInstalledApps.html</a><br> |
| 456 | + <br> |
| 457 | +Args:<br> |
| 458 | + token: string The token returned by the ClientLogin service.</tt></dd></dl> |
439 | 459 |
|
440 | 460 | <dl><dt><a name="AppsService-UpgradeToSessionToken"><strong>UpgradeToSessionToken</strong></a>(self)</dt><dd><tt>Upgrades a single use AuthSub token to a session token.<br> |
441 | 461 | <br> |
|
444 | 464 |
|
445 | 465 | <hr> |
446 | 466 | Properties inherited from <a href="gdata.service.html#GDataService">gdata.service.GDataService</a>:<br> |
447 | | -<dl><dt><strong>auth_token</strong></dt> |
448 | | -<dd><tt>Get or set the token used for authentication.</tt></dd> |
449 | | -<dd><dl><dt><a name="-<em>get</em>"><strong><em>get</em></strong></a> = __GetAuthToken(self)</dt></dl> |
450 | | -</dd> |
451 | | -<dd><dl><dt><a name="-<em>set</em>"><strong><em>set</em></strong></a> = __SetAuthSubToken(self, auth_token)</dt></dl> |
452 | | -</dd> |
453 | | -</dl> |
454 | 467 | <dl><dt><strong>captcha_token</strong></dt> |
455 | 468 | <dd><tt>Get the captcha token for a login request.</tt></dd> |
456 | 469 | <dd><dl><dt><a name="-<em>get</em>"><strong><em>get</em></strong></a> = __GetCaptchaToken(self)</dt></dl> |
|
470 | 483 | </dd> |
471 | 484 | </dl> |
472 | 485 | <hr> |
473 | | -Methods inherited from <a href="atom.service.html#AtomService">atom.service.AtomService</a>:<br> |
474 | | -<dl><dt><a name="AppsService-PrepareConnection"><strong>PrepareConnection</strong></a>(self, full_uri)</dt><dd><tt>Opens a connection to the server based on the full URI.<br> |
475 | | - <br> |
476 | | -Examines the target URI and the proxy settings, which are set as <br> |
477 | | -environment variables, to open a connection with the server. This <br> |
478 | | -connection is used to make an HTTP request.<br> |
479 | | - <br> |
480 | | -Args:<br> |
481 | | - full_uri: str Which is the target relative (lacks protocol and host) or<br> |
482 | | - absolute URL to be opened. Example:<br> |
483 | | - 'https://www.google.com/accounts/ClientLogin' or<br> |
484 | | - 'base/feeds/snippets' where the server is set to www.google.com.<br> |
485 | | - <br> |
486 | | -Returns:<br> |
487 | | - A tuple containing the httplib.HTTPConnection and the full_uri for the<br> |
488 | | - request.</tt></dd></dl> |
| 486 | +Data and other attributes inherited from <a href="gdata.service.html#GDataService">gdata.service.GDataService</a>:<br> |
| 487 | +<dl><dt><strong>auth_token</strong> = None</dl> |
| 488 | + |
| 489 | +<dl><dt><strong>handler</strong> = None</dl> |
489 | 490 |
|
| 491 | +<dl><dt><strong>tokens</strong> = None</dl> |
| 492 | + |
| 493 | +<hr> |
| 494 | +Methods inherited from <a href="atom.service.html#AtomService">atom.service.AtomService</a>:<br> |
490 | 495 | <dl><dt><a name="AppsService-UseBasicAuth"><strong>UseBasicAuth</strong></a>(self, username, password, for_proxy<font color="#909090">=False</font>)</dt><dd><tt>Sets an Authenticaiton: Basic HTTP header containing plaintext.<br> |
491 | 496 | <br> |
| 497 | +Deprecated, use use_basic_auth instead.<br> |
| 498 | + <br> |
492 | 499 | The username and password are base64 encoded and added to an HTTP header<br> |
493 | 500 | which will be included in each request. Note that your username and <br> |
494 | 501 | password are sent in plaintext.<br> |
|
497 | 504 | username: str<br> |
498 | 505 | password: str</tt></dd></dl> |
499 | 506 |
|
| 507 | +<dl><dt><a name="AppsService-request"><strong>request</strong></a>(self, operation, url, data<font color="#909090">=None</font>, headers<font color="#909090">=None</font>, url_params<font color="#909090">=None</font>)</dt></dl> |
| 508 | + |
| 509 | +<dl><dt><a name="AppsService-use_basic_auth"><strong>use_basic_auth</strong></a>(self, username, password, scopes<font color="#909090">=None</font>)</dt></dl> |
| 510 | + |
| 511 | +<hr> |
| 512 | +Properties inherited from <a href="atom.service.html#AtomService">atom.service.AtomService</a>:<br> |
| 513 | +<dl><dt><strong>debug</strong></dt> |
| 514 | +<dd><tt>If True, HTTP debug information is printed.</tt></dd> |
| 515 | +<dd><dl><dt><a name="-<em>get</em>"><strong><em>get</em></strong></a> = _get_debug(self)</dt></dl> |
| 516 | +</dd> |
| 517 | +<dd><dl><dt><a name="-<em>set</em>"><strong><em>set</em></strong></a> = _set_debug(self, value)</dt></dl> |
| 518 | +</dd> |
| 519 | +</dl> |
500 | 520 | <hr> |
501 | 521 | Data and other attributes inherited from <a href="atom.service.html#AtomService">atom.service.AtomService</a>:<br> |
502 | 522 | <dl><dt><strong>__dict__</strong> = <dictproxy object><dd><tt>dictionary for instance variables (if defined)</tt></dl> |
503 | 523 |
|
504 | 524 | <dl><dt><strong>__weakref__</strong> = <attribute '__weakref__' of 'AtomService' objects><dd><tt>list of weak references to the object (if defined)</tt></dl> |
505 | 525 |
|
506 | | -<dl><dt><strong>debug</strong> = False</dl> |
507 | | - |
508 | 526 | <dl><dt><strong>port</strong> = 80</dl> |
509 | 527 |
|
510 | 528 | <dl><dt><strong>ssl</strong> = False</dl> |
|
0 commit comments