Joe Gregorio | 37802c3 | 2013-08-06 12:24:05 -0400 | [diff] [blame] | 1 | <?xml version="1.0" encoding="ascii"?> |
| 2 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" |
| 3 | "DTD/xhtml1-transitional.dtd"> |
| 4 | <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> |
| 5 | <head> |
| 6 | <title>oauth2client.old_run</title> |
| 7 | <link rel="stylesheet" href="epydoc.css" type="text/css" /> |
| 8 | <script type="text/javascript" src="epydoc.js"></script> |
| 9 | </head> |
| 10 | |
| 11 | <body bgcolor="white" text="black" link="blue" vlink="#204080" |
| 12 | alink="#204080"> |
| 13 | <!-- ==================== NAVIGATION BAR ==================== --> |
| 14 | <table class="navbar" border="0" width="100%" cellpadding="0" |
| 15 | bgcolor="#a0c0ff" cellspacing="0"> |
| 16 | <tr valign="middle"> |
| 17 | |
| 18 | <!-- Tree link --> |
| 19 | <th> <a |
| 20 | href="module-tree.html">Trees</a> </th> |
| 21 | |
| 22 | <!-- Index link --> |
| 23 | <th> <a |
| 24 | href="identifier-index.html">Indices</a> </th> |
| 25 | |
| 26 | <!-- Help link --> |
| 27 | <th> <a |
| 28 | href="help.html">Help</a> </th> |
| 29 | |
| 30 | <th class="navbar" width="100%"></th> |
| 31 | </tr> |
| 32 | </table> |
| 33 | <table width="100%" cellpadding="0" cellspacing="0"> |
| 34 | <tr valign="top"> |
| 35 | <td width="100%"> |
| 36 | <span class="breadcrumbs"> |
| 37 | <a href="oauth2client-module.html">Package oauth2client</a> :: |
| 38 | Module old_run |
| 39 | </span> |
| 40 | </td> |
| 41 | <td> |
| 42 | <table cellpadding="0" cellspacing="0"> |
| 43 | <!-- hide/show private --> |
| 44 | <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink" |
| 45 | onclick="toggle_private();">hide private</a>]</span></td></tr> |
| 46 | <tr><td align="right"><span class="options" |
| 47 | >[<a href="frames.html" target="_top">frames</a |
| 48 | >] | <a href="oauth2client.old_run-module.html" |
| 49 | target="_top">no frames</a>]</span></td></tr> |
| 50 | </table> |
| 51 | </td> |
| 52 | </tr> |
| 53 | </table> |
| 54 | <!-- ==================== MODULE DESCRIPTION ==================== --> |
| 55 | <h1 class="epydoc">Module old_run</h1><p class="nomargin-top"><span class="codelink"><a href="oauth2client.old_run-pysrc.html">source code</a></span></p> |
| 56 | <pre class="literalblock"> |
| 57 | This module holds the old run() function which is deprecated, the |
| 58 | tools.run_flow() function should be used in its place. |
| 59 | |
| 60 | </pre> |
| 61 | |
| 62 | <!-- ==================== FUNCTIONS ==================== --> |
| 63 | <a name="section-Functions"></a> |
| 64 | <table class="summary" border="1" cellpadding="3" |
| 65 | cellspacing="0" width="100%" bgcolor="white"> |
| 66 | <tr bgcolor="#70b0f0" class="table-header"> |
| 67 | <td colspan="2" class="table-header"> |
| 68 | <table border="0" cellpadding="0" cellspacing="0" width="100%"> |
| 69 | <tr valign="top"> |
| 70 | <td align="left"><span class="table-header">Functions</span></td> |
| 71 | <td align="right" valign="top" |
| 72 | ><span class="options">[<a href="#section-Functions" |
| 73 | class="privatelink" onclick="toggle_private();" |
| 74 | >hide private</a>]</span></td> |
| 75 | </tr> |
| 76 | </table> |
| 77 | </td> |
| 78 | </tr> |
| 79 | <tr> |
| 80 | <td width="15%" align="right" valign="top" class="summary"> |
| 81 | <span class="summary-type"> </span> |
| 82 | </td><td class="summary"> |
| 83 | <table width="100%" cellpadding="0" cellspacing="0" border="0"> |
| 84 | <tr> |
| 85 | <td><span class="summary-sig"><a href="oauth2client.old_run-module.html#run" class="summary-sig-name">run</a>(<span class="summary-sig-arg">flow</span>, |
| 86 | <span class="summary-sig-arg">storage</span>, |
| 87 | <span class="summary-sig-arg">http</span>=<span class="summary-sig-default">None</span>)</span><br /> |
| 88 | Core code for a command-line application.</td> |
| 89 | <td align="right" valign="top"> |
| 90 | <span class="codelink"><a href="oauth2client.old_run-pysrc.html#run">source code</a></span> |
| 91 | |
| 92 | </td> |
| 93 | </tr> |
| 94 | </table> |
| 95 | |
| 96 | </td> |
| 97 | </tr> |
| 98 | </table> |
| 99 | <!-- ==================== VARIABLES ==================== --> |
| 100 | <a name="section-Variables"></a> |
| 101 | <table class="summary" border="1" cellpadding="3" |
| 102 | cellspacing="0" width="100%" bgcolor="white"> |
| 103 | <tr bgcolor="#70b0f0" class="table-header"> |
| 104 | <td colspan="2" class="table-header"> |
| 105 | <table border="0" cellpadding="0" cellspacing="0" width="100%"> |
| 106 | <tr valign="top"> |
| 107 | <td align="left"><span class="table-header">Variables</span></td> |
| 108 | <td align="right" valign="top" |
| 109 | ><span class="options">[<a href="#section-Variables" |
| 110 | class="privatelink" onclick="toggle_private();" |
| 111 | >hide private</a>]</span></td> |
| 112 | </tr> |
| 113 | </table> |
| 114 | </td> |
| 115 | </tr> |
| 116 | <tr> |
| 117 | <td width="15%" align="right" valign="top" class="summary"> |
| 118 | <span class="summary-type"> </span> |
| 119 | </td><td class="summary"> |
| 120 | <a name="FLAGS"></a><span class="summary-name">FLAGS</span> = <code title="gflags.FLAGS">gflags.FLAGS</code> |
| 121 | </td> |
| 122 | </tr> |
| 123 | </table> |
| 124 | <!-- ==================== FUNCTION DETAILS ==================== --> |
| 125 | <a name="section-FunctionDetails"></a> |
| 126 | <table class="details" border="1" cellpadding="3" |
| 127 | cellspacing="0" width="100%" bgcolor="white"> |
| 128 | <tr bgcolor="#70b0f0" class="table-header"> |
| 129 | <td colspan="2" class="table-header"> |
| 130 | <table border="0" cellpadding="0" cellspacing="0" width="100%"> |
| 131 | <tr valign="top"> |
| 132 | <td align="left"><span class="table-header">Function Details</span></td> |
| 133 | <td align="right" valign="top" |
| 134 | ><span class="options">[<a href="#section-FunctionDetails" |
| 135 | class="privatelink" onclick="toggle_private();" |
| 136 | >hide private</a>]</span></td> |
| 137 | </tr> |
| 138 | </table> |
| 139 | </td> |
| 140 | </tr> |
| 141 | </table> |
| 142 | <a name="run"></a> |
| 143 | <div> |
| 144 | <table class="details" border="1" cellpadding="3" |
| 145 | cellspacing="0" width="100%" bgcolor="white"> |
| 146 | <tr><td> |
| 147 | <table width="100%" cellpadding="0" cellspacing="0" border="0"> |
| 148 | <tr valign="top"><td> |
| 149 | <h3 class="epydoc"><span class="sig"><span class="sig-name">run</span>(<span class="sig-arg">flow</span>, |
| 150 | <span class="sig-arg">storage</span>, |
| 151 | <span class="sig-arg">http</span>=<span class="sig-default">None</span>)</span> |
| 152 | </h3> |
| 153 | </td><td align="right" valign="top" |
| 154 | ><span class="codelink"><a href="oauth2client.old_run-pysrc.html#run">source code</a></span> |
| 155 | </td> |
| 156 | </tr></table> |
| 157 | |
| 158 | <pre class="literalblock"> |
| 159 | Core code for a command-line application. |
| 160 | |
| 161 | The run() function is called from your application and runs through all |
| 162 | the steps to obtain credentials. It takes a Flow argument and attempts to |
| 163 | open an authorization server page in the user's default web browser. The |
| 164 | server asks the user to grant your application access to the user's data. |
| 165 | If the user grants access, the run() function returns new credentials. The |
| 166 | new credentials are also stored in the Storage argument, which updates the |
| 167 | file associated with the Storage object. |
| 168 | |
| 169 | It presumes it is run from a command-line application and supports the |
| 170 | following flags: |
| 171 | |
| 172 | --auth_host_name: Host name to use when running a local web server |
| 173 | to handle redirects during OAuth authorization. |
| 174 | (default: 'localhost') |
| 175 | |
| 176 | --auth_host_port: Port to use when running a local web server to handle |
| 177 | redirects during OAuth authorization.; |
| 178 | repeat this option to specify a list of values |
| 179 | (default: '[8080, 8090]') |
| 180 | (an integer) |
| 181 | |
| 182 | --[no]auth_local_webserver: Run a local web server to handle redirects |
| 183 | during OAuth authorization. |
| 184 | (default: 'true') |
| 185 | |
| 186 | Since it uses flags make sure to initialize the gflags module before |
| 187 | calling run(). |
| 188 | |
| 189 | Args: |
| 190 | flow: Flow, an OAuth 2.0 Flow to step through. |
| 191 | storage: Storage, a Storage to store the credential in. |
| 192 | http: An instance of httplib2.Http.request |
| 193 | or something that acts like it. |
| 194 | |
| 195 | Returns: |
| 196 | Credentials, the obtained credential. |
| 197 | |
| 198 | </pre> |
| 199 | <dl class="fields"> |
| 200 | <dt>Decorators:</dt> |
| 201 | <dd><ul class="nomargin-top"> |
| 202 | <li><code>@util.positional(2)</code></li> |
| 203 | </ul></dd> |
| 204 | </dl> |
| 205 | </td></tr></table> |
| 206 | </div> |
| 207 | <br /> |
| 208 | <!-- ==================== NAVIGATION BAR ==================== --> |
| 209 | <table class="navbar" border="0" width="100%" cellpadding="0" |
| 210 | bgcolor="#a0c0ff" cellspacing="0"> |
| 211 | <tr valign="middle"> |
| 212 | |
| 213 | <!-- Tree link --> |
| 214 | <th> <a |
| 215 | href="module-tree.html">Trees</a> </th> |
| 216 | |
| 217 | <!-- Index link --> |
| 218 | <th> <a |
| 219 | href="identifier-index.html">Indices</a> </th> |
| 220 | |
| 221 | <!-- Help link --> |
| 222 | <th> <a |
| 223 | href="help.html">Help</a> </th> |
| 224 | |
| 225 | <th class="navbar" width="100%"></th> |
| 226 | </tr> |
| 227 | </table> |
| 228 | <table border="0" cellpadding="0" cellspacing="0" width="100%%"> |
| 229 | <tr> |
| 230 | <td align="left" class="footer"> |
| 231 | Generated by Epydoc 3.0.1 on Tue Aug 6 12:16:42 2013 |
| 232 | </td> |
| 233 | <td align="right" class="footer"> |
| 234 | <a target="mainFrame" href="http://epydoc.sourceforge.net" |
| 235 | >http://epydoc.sourceforge.net</a> |
| 236 | </td> |
| 237 | </tr> |
| 238 | </table> |
| 239 | |
| 240 | <script type="text/javascript"> |
| 241 | <!-- |
| 242 | // Private objects are initially displayed (because if |
| 243 | // javascript is turned off then we want them to be |
| 244 | // visible); but by default, we want to hide them. So hide |
| 245 | // them unless we have a cookie that says to show them. |
| 246 | checkCookie(); |
| 247 | // --> |
| 248 | </script> |
| 249 | </body> |
| 250 | </html> |