Joe Gregorio | 5dc0f5c | 2012-06-05 13:34:31 -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>apiclient.discovery</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="apiclient-module.html">Package apiclient</a> :: |
| 38 | Module discovery |
| 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="apiclient.discovery-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 discovery</h1><p class="nomargin-top"><span class="codelink"><a href="apiclient.discovery-pysrc.html">source code</a></span></p> |
| 56 | <pre class="literalblock"> |
Joe Gregorio | 41be8e8 | 2013-03-07 10:31:47 -0500 | [diff] [blame] | 57 | Client for discovery based APIs. |
Joe Gregorio | 5dc0f5c | 2012-06-05 13:34:31 -0400 | [diff] [blame] | 58 | |
| 59 | A client library for Google's discovery based APIs. |
| 60 | |
| 61 | </pre> |
| 62 | |
| 63 | <hr /> |
| 64 | <div class="fields"> <p><strong>Author:</strong> |
| 65 | jcgregorio@google.com (Joe Gregorio) |
| 66 | </p> |
Joe Gregorio | 52a5c53 | 2013-01-24 16:19:07 -0500 | [diff] [blame] | 67 | </div><!-- ==================== CLASSES ==================== --> |
| 68 | <a name="section-Classes"></a> |
| 69 | <table class="summary" border="1" cellpadding="3" |
| 70 | cellspacing="0" width="100%" bgcolor="white"> |
| 71 | <tr bgcolor="#70b0f0" class="table-header"> |
| 72 | <td colspan="2" class="table-header"> |
| 73 | <table border="0" cellpadding="0" cellspacing="0" width="100%"> |
| 74 | <tr valign="top"> |
| 75 | <td align="left"><span class="table-header">Classes</span></td> |
| 76 | <td align="right" valign="top" |
| 77 | ><span class="options">[<a href="#section-Classes" |
| 78 | class="privatelink" onclick="toggle_private();" |
| 79 | >hide private</a>]</span></td> |
| 80 | </tr> |
| 81 | </table> |
| 82 | </td> |
| 83 | </tr> |
Joe Gregorio | 41be8e8 | 2013-03-07 10:31:47 -0500 | [diff] [blame] | 84 | <tr class="private"> |
Joe Gregorio | 52a5c53 | 2013-01-24 16:19:07 -0500 | [diff] [blame] | 85 | <td width="15%" align="right" valign="top" class="summary"> |
| 86 | <span class="summary-type"> </span> |
| 87 | </td><td class="summary"> |
Joe Gregorio | 41be8e8 | 2013-03-07 10:31:47 -0500 | [diff] [blame] | 88 | <a href="apiclient.discovery.ResourceMethodParameters-class.html" class="summary-name" onclick="show_private();">ResourceMethodParameters</a><br /> |
| 89 | Represents the parameters associated with a method. |
| 90 | </td> |
| 91 | </tr> |
| 92 | <tr class="private"> |
| 93 | <td width="15%" align="right" valign="top" class="summary"> |
| 94 | <span class="summary-type"> </span> |
| 95 | </td><td class="summary"> |
| 96 | <a href="apiclient.discovery.Resource-class.html" class="summary-name" onclick="show_private();">Resource</a><br /> |
Joe Gregorio | 52a5c53 | 2013-01-24 16:19:07 -0500 | [diff] [blame] | 97 | A class for interacting with a resource. |
| 98 | </td> |
| 99 | </tr> |
| 100 | </table> |
| 101 | <!-- ==================== FUNCTIONS ==================== --> |
Joe Gregorio | 5dc0f5c | 2012-06-05 13:34:31 -0400 | [diff] [blame] | 102 | <a name="section-Functions"></a> |
| 103 | <table class="summary" border="1" cellpadding="3" |
| 104 | cellspacing="0" width="100%" bgcolor="white"> |
| 105 | <tr bgcolor="#70b0f0" class="table-header"> |
| 106 | <td colspan="2" class="table-header"> |
| 107 | <table border="0" cellpadding="0" cellspacing="0" width="100%"> |
| 108 | <tr valign="top"> |
| 109 | <td align="left"><span class="table-header">Functions</span></td> |
| 110 | <td align="right" valign="top" |
| 111 | ><span class="options">[<a href="#section-Functions" |
| 112 | class="privatelink" onclick="toggle_private();" |
| 113 | >hide private</a>]</span></td> |
| 114 | </tr> |
| 115 | </table> |
| 116 | </td> |
| 117 | </tr> |
Joe Gregorio | f4839b0 | 2012-09-06 13:47:24 -0400 | [diff] [blame] | 118 | <tr> |
Joe Gregorio | 5dc0f5c | 2012-06-05 13:34:31 -0400 | [diff] [blame] | 119 | <td width="15%" align="right" valign="top" class="summary"> |
| 120 | <span class="summary-type"> </span> |
| 121 | </td><td class="summary"> |
| 122 | <table width="100%" cellpadding="0" cellspacing="0" border="0"> |
| 123 | <tr> |
Joe Gregorio | f4839b0 | 2012-09-06 13:47:24 -0400 | [diff] [blame] | 124 | <td><span class="summary-sig"><a href="apiclient.discovery-module.html#fix_method_name" class="summary-sig-name">fix_method_name</a>(<span class="summary-sig-arg">name</span>)</span><br /> |
Joe Gregorio | 6621203 | 2012-06-14 09:10:14 -0400 | [diff] [blame] | 125 | Fix method names to avoid reserved word conflicts.</td> |
Joe Gregorio | 5dc0f5c | 2012-06-05 13:34:31 -0400 | [diff] [blame] | 126 | <td align="right" valign="top"> |
Joe Gregorio | 6621203 | 2012-06-14 09:10:14 -0400 | [diff] [blame] | 127 | <span class="codelink"><a href="apiclient.discovery-pysrc.html#fix_method_name">source code</a></span> |
Joe Gregorio | 5dc0f5c | 2012-06-05 13:34:31 -0400 | [diff] [blame] | 128 | |
| 129 | </td> |
| 130 | </tr> |
| 131 | </table> |
| 132 | |
| 133 | </td> |
| 134 | </tr> |
Joe Gregorio | 6621203 | 2012-06-14 09:10:14 -0400 | [diff] [blame] | 135 | <tr> |
Joe Gregorio | 5dc0f5c | 2012-06-05 13:34:31 -0400 | [diff] [blame] | 136 | <td width="15%" align="right" valign="top" class="summary"> |
| 137 | <span class="summary-type"> </span> |
| 138 | </td><td class="summary"> |
| 139 | <table width="100%" cellpadding="0" cellspacing="0" border="0"> |
| 140 | <tr> |
Joe Gregorio | 6621203 | 2012-06-14 09:10:14 -0400 | [diff] [blame] | 141 | <td><span class="summary-sig"><a href="apiclient.discovery-module.html#key2param" class="summary-sig-name">key2param</a>(<span class="summary-sig-arg">key</span>)</span><br /> |
Joe Gregorio | 5dc0f5c | 2012-06-05 13:34:31 -0400 | [diff] [blame] | 142 | Converts key names into parameter names.</td> |
| 143 | <td align="right" valign="top"> |
| 144 | <span class="codelink"><a href="apiclient.discovery-pysrc.html#key2param">source code</a></span> |
| 145 | |
| 146 | </td> |
| 147 | </tr> |
| 148 | </table> |
| 149 | |
| 150 | </td> |
| 151 | </tr> |
| 152 | <tr> |
| 153 | <td width="15%" align="right" valign="top" class="summary"> |
| 154 | <span class="summary-type"> </span> |
| 155 | </td><td class="summary"> |
| 156 | <table width="100%" cellpadding="0" cellspacing="0" border="0"> |
| 157 | <tr> |
Joe Gregorio | f4839b0 | 2012-09-06 13:47:24 -0400 | [diff] [blame] | 158 | <td><span class="summary-sig"><a href="apiclient.discovery-module.html#build" class="summary-sig-name">build</a>(<span class="summary-sig-arg">serviceName</span>, |
| 159 | <span class="summary-sig-arg">version</span>, |
| 160 | <span class="summary-sig-arg">http</span>=<span class="summary-sig-default">None</span>, |
| 161 | <span class="summary-sig-arg">discoveryServiceUrl</span>=<span class="summary-sig-default">DISCOVERY_URI</span>, |
| 162 | <span class="summary-sig-arg">developerKey</span>=<span class="summary-sig-default">None</span>, |
| 163 | <span class="summary-sig-arg">model</span>=<span class="summary-sig-default">None</span>, |
| 164 | <span class="summary-sig-arg">requestBuilder</span>=<span class="summary-sig-default">HttpRequest</span>)</span><br /> |
Joe Gregorio | 5dc0f5c | 2012-06-05 13:34:31 -0400 | [diff] [blame] | 165 | Construct a Resource for interacting with an API.</td> |
| 166 | <td align="right" valign="top"> |
Joe Gregorio | f4839b0 | 2012-09-06 13:47:24 -0400 | [diff] [blame] | 167 | <span class="codelink"><a href="apiclient.discovery-pysrc.html#build">source code</a></span> |
| 168 | |
| 169 | </td> |
| 170 | </tr> |
| 171 | </table> |
| 172 | |
| 173 | </td> |
| 174 | </tr> |
| 175 | <tr> |
| 176 | <td width="15%" align="right" valign="top" class="summary"> |
| 177 | <span class="summary-type"> </span> |
| 178 | </td><td class="summary"> |
| 179 | <table width="100%" cellpadding="0" cellspacing="0" border="0"> |
| 180 | <tr> |
| 181 | <td><span class="summary-sig"><a href="apiclient.discovery-module.html#build_from_document" class="summary-sig-name">build_from_document</a>(<span class="summary-sig-arg">service</span>, |
| 182 | <span class="summary-sig-arg">base</span>=<span class="summary-sig-default">None</span>, |
| 183 | <span class="summary-sig-arg">future</span>=<span class="summary-sig-default">None</span>, |
| 184 | <span class="summary-sig-arg">http</span>=<span class="summary-sig-default">None</span>, |
| 185 | <span class="summary-sig-arg">developerKey</span>=<span class="summary-sig-default">None</span>, |
| 186 | <span class="summary-sig-arg">model</span>=<span class="summary-sig-default">None</span>, |
| 187 | <span class="summary-sig-arg">requestBuilder</span>=<span class="summary-sig-default">HttpRequest</span>)</span><br /> |
| 188 | Create a Resource for interacting with an API.</td> |
| 189 | <td align="right" valign="top"> |
| 190 | <span class="codelink"><a href="apiclient.discovery-pysrc.html#build_from_document">source code</a></span> |
Joe Gregorio | 5dc0f5c | 2012-06-05 13:34:31 -0400 | [diff] [blame] | 191 | |
| 192 | </td> |
| 193 | </tr> |
| 194 | </table> |
| 195 | |
| 196 | </td> |
| 197 | </tr> |
| 198 | <tr class="private"> |
| 199 | <td width="15%" align="right" valign="top" class="summary"> |
| 200 | <span class="summary-type"> </span> |
| 201 | </td><td class="summary"> |
| 202 | <table width="100%" cellpadding="0" cellspacing="0" border="0"> |
| 203 | <tr> |
| 204 | <td><span class="summary-sig"><a href="apiclient.discovery-module.html#_cast" class="summary-sig-name" onclick="show_private();">_cast</a>(<span class="summary-sig-arg">value</span>, |
| 205 | <span class="summary-sig-arg">schema_type</span>)</span><br /> |
| 206 | Convert value to a string based on JSON Schema type.</td> |
| 207 | <td align="right" valign="top"> |
| 208 | <span class="codelink"><a href="apiclient.discovery-pysrc.html#_cast">source code</a></span> |
| 209 | |
| 210 | </td> |
| 211 | </tr> |
| 212 | </table> |
| 213 | |
| 214 | </td> |
| 215 | </tr> |
| 216 | <tr class="private"> |
| 217 | <td width="15%" align="right" valign="top" class="summary"> |
| 218 | <span class="summary-type"> </span> |
| 219 | </td><td class="summary"> |
| 220 | <table width="100%" cellpadding="0" cellspacing="0" border="0"> |
| 221 | <tr> |
Joe Gregorio | 6621203 | 2012-06-14 09:10:14 -0400 | [diff] [blame] | 222 | <td><span class="summary-sig"><a href="apiclient.discovery-module.html#_media_size_to_long" class="summary-sig-name" onclick="show_private();">_media_size_to_long</a>(<span class="summary-sig-arg">maxSize</span>)</span><br /> |
Joe Gregorio | 5dc0f5c | 2012-06-05 13:34:31 -0400 | [diff] [blame] | 223 | Convert a string media size, such as 10GB or 3TB into an integer.</td> |
| 224 | <td align="right" valign="top"> |
| 225 | <span class="codelink"><a href="apiclient.discovery-pysrc.html#_media_size_to_long">source code</a></span> |
| 226 | |
| 227 | </td> |
| 228 | </tr> |
| 229 | </table> |
| 230 | |
| 231 | </td> |
| 232 | </tr> |
Joe Gregorio | 41be8e8 | 2013-03-07 10:31:47 -0500 | [diff] [blame] | 233 | <tr class="private"> |
Joe Gregorio | 5dc0f5c | 2012-06-05 13:34:31 -0400 | [diff] [blame] | 234 | <td width="15%" align="right" valign="top" class="summary"> |
| 235 | <span class="summary-type"> </span> |
| 236 | </td><td class="summary"> |
| 237 | <table width="100%" cellpadding="0" cellspacing="0" border="0"> |
| 238 | <tr> |
Joe Gregorio | 41be8e8 | 2013-03-07 10:31:47 -0500 | [diff] [blame] | 239 | <td><span class="summary-sig"><a href="apiclient.discovery-module.html#_media_path_url_from_info" class="summary-sig-name" onclick="show_private();">_media_path_url_from_info</a>(<span class="summary-sig-arg">root_desc</span>, |
| 240 | <span class="summary-sig-arg">path_url</span>)</span><br /> |
| 241 | Creates an absolute media path URL.</td> |
| 242 | <td align="right" valign="top"> |
| 243 | <span class="codelink"><a href="apiclient.discovery-pysrc.html#_media_path_url_from_info">source code</a></span> |
| 244 | |
| 245 | </td> |
| 246 | </tr> |
| 247 | </table> |
| 248 | |
| 249 | </td> |
| 250 | </tr> |
| 251 | <tr class="private"> |
| 252 | <td width="15%" align="right" valign="top" class="summary"> |
| 253 | <span class="summary-type"> </span> |
| 254 | </td><td class="summary"> |
| 255 | <table width="100%" cellpadding="0" cellspacing="0" border="0"> |
| 256 | <tr> |
| 257 | <td><span class="summary-sig"><a href="apiclient.discovery-module.html#_fix_up_parameters" class="summary-sig-name" onclick="show_private();">_fix_up_parameters</a>(<span class="summary-sig-arg">method_desc</span>, |
| 258 | <span class="summary-sig-arg">root_desc</span>, |
| 259 | <span class="summary-sig-arg">http_method</span>)</span><br /> |
| 260 | Updates parameters of an API method with values specific to this library.</td> |
| 261 | <td align="right" valign="top"> |
| 262 | <span class="codelink"><a href="apiclient.discovery-pysrc.html#_fix_up_parameters">source code</a></span> |
| 263 | |
| 264 | </td> |
| 265 | </tr> |
| 266 | </table> |
| 267 | |
| 268 | </td> |
| 269 | </tr> |
| 270 | <tr class="private"> |
| 271 | <td width="15%" align="right" valign="top" class="summary"> |
| 272 | <span class="summary-type"> </span> |
| 273 | </td><td class="summary"> |
| 274 | <table width="100%" cellpadding="0" cellspacing="0" border="0"> |
| 275 | <tr> |
| 276 | <td><span class="summary-sig"><a href="apiclient.discovery-module.html#_fix_up_media_upload" class="summary-sig-name" onclick="show_private();">_fix_up_media_upload</a>(<span class="summary-sig-arg">method_desc</span>, |
| 277 | <span class="summary-sig-arg">root_desc</span>, |
| 278 | <span class="summary-sig-arg">path_url</span>, |
| 279 | <span class="summary-sig-arg">parameters</span>)</span><br /> |
| 280 | Updates parameters of API by adding 'media_body' if supported by method.</td> |
| 281 | <td align="right" valign="top"> |
| 282 | <span class="codelink"><a href="apiclient.discovery-pysrc.html#_fix_up_media_upload">source code</a></span> |
| 283 | |
| 284 | </td> |
| 285 | </tr> |
| 286 | </table> |
| 287 | |
| 288 | </td> |
| 289 | </tr> |
| 290 | <tr class="private"> |
| 291 | <td width="15%" align="right" valign="top" class="summary"> |
| 292 | <span class="summary-type"> </span> |
| 293 | </td><td class="summary"> |
| 294 | <table width="100%" cellpadding="0" cellspacing="0" border="0"> |
| 295 | <tr> |
| 296 | <td><span class="summary-sig"><a href="apiclient.discovery-module.html#_fix_up_method_description" class="summary-sig-name" onclick="show_private();">_fix_up_method_description</a>(<span class="summary-sig-arg">method_desc</span>, |
| 297 | <span class="summary-sig-arg">root_desc</span>)</span><br /> |
| 298 | Updates a method description in a discovery document.</td> |
| 299 | <td align="right" valign="top"> |
| 300 | <span class="codelink"><a href="apiclient.discovery-pysrc.html#_fix_up_method_description">source code</a></span> |
| 301 | |
| 302 | </td> |
| 303 | </tr> |
| 304 | </table> |
| 305 | |
| 306 | </td> |
| 307 | </tr> |
| 308 | <tr class="private"> |
| 309 | <td width="15%" align="right" valign="top" class="summary"> |
| 310 | <span class="summary-type"> </span> |
| 311 | </td><td class="summary"> |
| 312 | <table width="100%" cellpadding="0" cellspacing="0" border="0"> |
| 313 | <tr> |
| 314 | <td><span class="summary-sig"><a href="apiclient.discovery-module.html#createMethod" class="summary-sig-name" onclick="show_private();">createMethod</a>(<span class="summary-sig-arg">methodName</span>, |
Joe Gregorio | 52a5c53 | 2013-01-24 16:19:07 -0500 | [diff] [blame] | 315 | <span class="summary-sig-arg">methodDesc</span>, |
Joe Gregorio | 6621203 | 2012-06-14 09:10:14 -0400 | [diff] [blame] | 316 | <span class="summary-sig-arg">rootDesc</span>, |
| 317 | <span class="summary-sig-arg">schema</span>)</span><br /> |
Joe Gregorio | 52a5c53 | 2013-01-24 16:19:07 -0500 | [diff] [blame] | 318 | Creates a method for attaching to a Resource.</td> |
Joe Gregorio | 5dc0f5c | 2012-06-05 13:34:31 -0400 | [diff] [blame] | 319 | <td align="right" valign="top"> |
Joe Gregorio | 52a5c53 | 2013-01-24 16:19:07 -0500 | [diff] [blame] | 320 | <span class="codelink"><a href="apiclient.discovery-pysrc.html#createMethod">source code</a></span> |
| 321 | |
| 322 | </td> |
| 323 | </tr> |
| 324 | </table> |
| 325 | |
| 326 | </td> |
| 327 | </tr> |
Joe Gregorio | 41be8e8 | 2013-03-07 10:31:47 -0500 | [diff] [blame] | 328 | <tr class="private"> |
Joe Gregorio | 52a5c53 | 2013-01-24 16:19:07 -0500 | [diff] [blame] | 329 | <td width="15%" align="right" valign="top" class="summary"> |
| 330 | <span class="summary-type"> </span> |
| 331 | </td><td class="summary"> |
| 332 | <table width="100%" cellpadding="0" cellspacing="0" border="0"> |
| 333 | <tr> |
Joe Gregorio | 41be8e8 | 2013-03-07 10:31:47 -0500 | [diff] [blame] | 334 | <td><span class="summary-sig"><a href="apiclient.discovery-module.html#createNextMethod" class="summary-sig-name" onclick="show_private();">createNextMethod</a>(<span class="summary-sig-arg">methodName</span>)</span><br /> |
Joe Gregorio | 52a5c53 | 2013-01-24 16:19:07 -0500 | [diff] [blame] | 335 | Creates any _next methods for attaching to a Resource.</td> |
| 336 | <td align="right" valign="top"> |
| 337 | <span class="codelink"><a href="apiclient.discovery-pysrc.html#createNextMethod">source code</a></span> |
Joe Gregorio | 5dc0f5c | 2012-06-05 13:34:31 -0400 | [diff] [blame] | 338 | |
| 339 | </td> |
| 340 | </tr> |
| 341 | </table> |
| 342 | |
| 343 | </td> |
| 344 | </tr> |
| 345 | </table> |
| 346 | <!-- ==================== VARIABLES ==================== --> |
| 347 | <a name="section-Variables"></a> |
| 348 | <table class="summary" border="1" cellpadding="3" |
| 349 | cellspacing="0" width="100%" bgcolor="white"> |
| 350 | <tr bgcolor="#70b0f0" class="table-header"> |
| 351 | <td colspan="2" class="table-header"> |
| 352 | <table border="0" cellpadding="0" cellspacing="0" width="100%"> |
| 353 | <tr valign="top"> |
| 354 | <td align="left"><span class="table-header">Variables</span></td> |
| 355 | <td align="right" valign="top" |
| 356 | ><span class="options">[<a href="#section-Variables" |
| 357 | class="privatelink" onclick="toggle_private();" |
| 358 | >hide private</a>]</span></td> |
| 359 | </tr> |
| 360 | </table> |
| 361 | </td> |
| 362 | </tr> |
Joe Gregorio | 41be8e8 | 2013-03-07 10:31:47 -0500 | [diff] [blame] | 363 | <tr class="private"> |
Joe Gregorio | 5dc0f5c | 2012-06-05 13:34:31 -0400 | [diff] [blame] | 364 | <td width="15%" align="right" valign="top" class="summary"> |
| 365 | <span class="summary-type"> </span> |
| 366 | </td><td class="summary"> |
| 367 | <a name="logger"></a><span class="summary-name">logger</span> = <code title="logging.getLogger(__name__)">logging.getLogger(__name__)</code> |
| 368 | </td> |
| 369 | </tr> |
Joe Gregorio | 41be8e8 | 2013-03-07 10:31:47 -0500 | [diff] [blame] | 370 | <tr class="private"> |
Joe Gregorio | 5dc0f5c | 2012-06-05 13:34:31 -0400 | [diff] [blame] | 371 | <td width="15%" align="right" valign="top" class="summary"> |
| 372 | <span class="summary-type"> </span> |
| 373 | </td><td class="summary"> |
Joe Gregorio | f4839b0 | 2012-09-06 13:47:24 -0400 | [diff] [blame] | 374 | <a name="URITEMPLATE"></a><span class="summary-name">URITEMPLATE</span> = <code title="re.compile('{[^}]*}')">re.compile('{[^}]*}')</code> |
Joe Gregorio | 5dc0f5c | 2012-06-05 13:34:31 -0400 | [diff] [blame] | 375 | </td> |
| 376 | </tr> |
Joe Gregorio | 41be8e8 | 2013-03-07 10:31:47 -0500 | [diff] [blame] | 377 | <tr class="private"> |
Joe Gregorio | 5dc0f5c | 2012-06-05 13:34:31 -0400 | [diff] [blame] | 378 | <td width="15%" align="right" valign="top" class="summary"> |
| 379 | <span class="summary-type"> </span> |
| 380 | </td><td class="summary"> |
Joe Gregorio | f4839b0 | 2012-09-06 13:47:24 -0400 | [diff] [blame] | 381 | <a name="VARNAME"></a><span class="summary-name">VARNAME</span> = <code title="re.compile('[a-zA-Z0-9_-]+')">re.compile('[a-zA-Z0-9_-]+')</code> |
Joe Gregorio | 5dc0f5c | 2012-06-05 13:34:31 -0400 | [diff] [blame] | 382 | </td> |
| 383 | </tr> |
Joe Gregorio | 41be8e8 | 2013-03-07 10:31:47 -0500 | [diff] [blame] | 384 | <tr class="private"> |
Joe Gregorio | 5dc0f5c | 2012-06-05 13:34:31 -0400 | [diff] [blame] | 385 | <td width="15%" align="right" valign="top" class="summary"> |
| 386 | <span class="summary-type"> </span> |
| 387 | </td><td class="summary"> |
Joe Gregorio | 41be8e8 | 2013-03-07 10:31:47 -0500 | [diff] [blame] | 388 | <a href="apiclient.discovery-module.html#DISCOVERY_URI" class="summary-name" onclick="show_private();">DISCOVERY_URI</a> = <code title="'https://www.googleapis.com/discovery/v1/apis/' '{api}/{apiVersion}/re\ |
Joe Gregorio | f4839b0 | 2012-09-06 13:47:24 -0400 | [diff] [blame] | 389 | st'">'https://www.googleapis.com/discovery/v1/apis/<code class="variable-ellipsis">...</code></code> |
Joe Gregorio | 5dc0f5c | 2012-06-05 13:34:31 -0400 | [diff] [blame] | 390 | </td> |
| 391 | </tr> |
Joe Gregorio | 41be8e8 | 2013-03-07 10:31:47 -0500 | [diff] [blame] | 392 | <tr class="private"> |
Joe Gregorio | 5dc0f5c | 2012-06-05 13:34:31 -0400 | [diff] [blame] | 393 | <td width="15%" align="right" valign="top" class="summary"> |
| 394 | <span class="summary-type"> </span> |
| 395 | </td><td class="summary"> |
Joe Gregorio | f4839b0 | 2012-09-06 13:47:24 -0400 | [diff] [blame] | 396 | <a name="DEFAULT_METHOD_DOC"></a><span class="summary-name">DEFAULT_METHOD_DOC</span> = <code title="'A description of how to use this function'">'A description of how to use this function'</code> |
Joe Gregorio | 5dc0f5c | 2012-06-05 13:34:31 -0400 | [diff] [blame] | 397 | </td> |
| 398 | </tr> |
Joe Gregorio | 41be8e8 | 2013-03-07 10:31:47 -0500 | [diff] [blame] | 399 | <tr class="private"> |
Joe Gregorio | 5dc0f5c | 2012-06-05 13:34:31 -0400 | [diff] [blame] | 400 | <td width="15%" align="right" valign="top" class="summary"> |
| 401 | <span class="summary-type"> </span> |
| 402 | </td><td class="summary"> |
Joe Gregorio | 41be8e8 | 2013-03-07 10:31:47 -0500 | [diff] [blame] | 403 | <a name="HTTP_PAYLOAD_METHODS"></a><span class="summary-name">HTTP_PAYLOAD_METHODS</span> = <code title="frozenset(['PUT', 'POST', 'PATCH'])">frozenset(['PUT', 'POST', 'PATCH'])</code> |
Joe Gregorio | 5dc0f5c | 2012-06-05 13:34:31 -0400 | [diff] [blame] | 404 | </td> |
| 405 | </tr> |
Joe Gregorio | 41be8e8 | 2013-03-07 10:31:47 -0500 | [diff] [blame] | 406 | <tr class="private"> |
Joe Gregorio | 5dc0f5c | 2012-06-05 13:34:31 -0400 | [diff] [blame] | 407 | <td width="15%" align="right" valign="top" class="summary"> |
| 408 | <span class="summary-type"> </span> |
| 409 | </td><td class="summary"> |
Joe Gregorio | 41be8e8 | 2013-03-07 10:31:47 -0500 | [diff] [blame] | 410 | <a name="_MEDIA_SIZE_BIT_SHIFTS"></a><span class="summary-name">_MEDIA_SIZE_BIT_SHIFTS</span> = <code title="{'KB': 10, 'MB': 20, 'GB': 30, 'TB': 40}">{'KB': 10, 'MB': 20, 'GB': 30, 'TB': 40}</code> |
Joe Gregorio | 5dc0f5c | 2012-06-05 13:34:31 -0400 | [diff] [blame] | 411 | </td> |
| 412 | </tr> |
Joe Gregorio | 41be8e8 | 2013-03-07 10:31:47 -0500 | [diff] [blame] | 413 | <tr class="private"> |
Joe Gregorio | 5dc0f5c | 2012-06-05 13:34:31 -0400 | [diff] [blame] | 414 | <td width="15%" align="right" valign="top" class="summary"> |
| 415 | <span class="summary-type"> </span> |
| 416 | </td><td class="summary"> |
Joe Gregorio | 41be8e8 | 2013-03-07 10:31:47 -0500 | [diff] [blame] | 417 | <a href="apiclient.discovery-module.html#BODY_PARAMETER_DEFAULT_VALUE" class="summary-name" onclick="show_private();">BODY_PARAMETER_DEFAULT_VALUE</a> = <code title="{'description': 'The request body.', 'type': 'object', 'required': Tru\ |
| 418 | e,}">{'description': 'The request bo<code class="variable-ellipsis">...</code></code> |
| 419 | </td> |
| 420 | </tr> |
| 421 | <tr class="private"> |
| 422 | <td width="15%" align="right" valign="top" class="summary"> |
| 423 | <span class="summary-type"> </span> |
| 424 | </td><td class="summary"> |
| 425 | <a href="apiclient.discovery-module.html#MEDIA_BODY_PARAMETER_DEFAULT_VALUE" class="summary-name" onclick="show_private();">MEDIA_BODY_PARAMETER_DEFAULT_VALUE</a> = <code title="{'description':('The filename of the media request body, or an instanc\ |
| 426 | e ' 'of a MediaUpload object.'), 'type': 'string', 'required': False,}">{'description':('The file<code class="variable-ellipsis">...</code></code> |
| 427 | </td> |
| 428 | </tr> |
| 429 | <tr class="private"> |
| 430 | <td width="15%" align="right" valign="top" class="summary"> |
| 431 | <span class="summary-type"> </span> |
| 432 | </td><td class="summary"> |
| 433 | <a href="apiclient.discovery-module.html#STACK_QUERY_PARAMETERS" class="summary-name" onclick="show_private();">STACK_QUERY_PARAMETERS</a> = <code title="frozenset(['trace', 'pp', 'userip', 'strict'])">frozenset(['trace', 'pp', 'userip', '<code class="variable-ellipsis">...</code></code> |
| 434 | </td> |
| 435 | </tr> |
| 436 | <tr class="private"> |
| 437 | <td width="15%" align="right" valign="top" class="summary"> |
| 438 | <span class="summary-type"> </span> |
| 439 | </td><td class="summary"> |
| 440 | <a href="apiclient.discovery-module.html#STACK_QUERY_PARAMETER_DEFAULT_VALUE" class="summary-name" onclick="show_private();">STACK_QUERY_PARAMETER_DEFAULT_VALUE</a> = <code title="{'type': 'string', 'location': 'query'}">{'type': 'string', 'loca<code class="variable-ellipsis">...</code></code> |
| 441 | </td> |
| 442 | </tr> |
| 443 | <tr class="private"> |
| 444 | <td width="15%" align="right" valign="top" class="summary"> |
| 445 | <span class="summary-type"> </span> |
| 446 | </td><td class="summary"> |
| 447 | <a name="RESERVED_WORDS"></a><span class="summary-name">RESERVED_WORDS</span> = <code title="frozenset(['body'])">frozenset(['body'])</code> |
Joe Gregorio | 5dc0f5c | 2012-06-05 13:34:31 -0400 | [diff] [blame] | 448 | </td> |
| 449 | </tr> |
| 450 | </table> |
| 451 | <!-- ==================== FUNCTION DETAILS ==================== --> |
| 452 | <a name="section-FunctionDetails"></a> |
| 453 | <table class="details" border="1" cellpadding="3" |
| 454 | cellspacing="0" width="100%" bgcolor="white"> |
| 455 | <tr bgcolor="#70b0f0" class="table-header"> |
| 456 | <td colspan="2" class="table-header"> |
| 457 | <table border="0" cellpadding="0" cellspacing="0" width="100%"> |
| 458 | <tr valign="top"> |
| 459 | <td align="left"><span class="table-header">Function Details</span></td> |
| 460 | <td align="right" valign="top" |
| 461 | ><span class="options">[<a href="#section-FunctionDetails" |
| 462 | class="privatelink" onclick="toggle_private();" |
| 463 | >hide private</a>]</span></td> |
| 464 | </tr> |
| 465 | </table> |
| 466 | </td> |
| 467 | </tr> |
| 468 | </table> |
Joe Gregorio | 6621203 | 2012-06-14 09:10:14 -0400 | [diff] [blame] | 469 | <a name="fix_method_name"></a> |
Joe Gregorio | f4839b0 | 2012-09-06 13:47:24 -0400 | [diff] [blame] | 470 | <div> |
Joe Gregorio | 6621203 | 2012-06-14 09:10:14 -0400 | [diff] [blame] | 471 | <table class="details" border="1" cellpadding="3" |
| 472 | cellspacing="0" width="100%" bgcolor="white"> |
| 473 | <tr><td> |
| 474 | <table width="100%" cellpadding="0" cellspacing="0" border="0"> |
| 475 | <tr valign="top"><td> |
| 476 | <h3 class="epydoc"><span class="sig"><span class="sig-name">fix_method_name</span>(<span class="sig-arg">name</span>)</span> |
| 477 | </h3> |
| 478 | </td><td align="right" valign="top" |
| 479 | ><span class="codelink"><a href="apiclient.discovery-pysrc.html#fix_method_name">source code</a></span> |
| 480 | </td> |
| 481 | </tr></table> |
| 482 | |
| 483 | <pre class="literalblock"> |
| 484 | Fix method names to avoid reserved word conflicts. |
| 485 | |
| 486 | Args: |
| 487 | name: string, method name. |
| 488 | |
| 489 | Returns: |
| 490 | The name with a '_' prefixed if the name is a reserved word. |
| 491 | |
| 492 | </pre> |
| 493 | <dl class="fields"> |
| 494 | </dl> |
| 495 | </td></tr></table> |
| 496 | </div> |
Joe Gregorio | 5dc0f5c | 2012-06-05 13:34:31 -0400 | [diff] [blame] | 497 | <a name="key2param"></a> |
Joe Gregorio | 6621203 | 2012-06-14 09:10:14 -0400 | [diff] [blame] | 498 | <div> |
Joe Gregorio | 5dc0f5c | 2012-06-05 13:34:31 -0400 | [diff] [blame] | 499 | <table class="details" border="1" cellpadding="3" |
| 500 | cellspacing="0" width="100%" bgcolor="white"> |
| 501 | <tr><td> |
| 502 | <table width="100%" cellpadding="0" cellspacing="0" border="0"> |
| 503 | <tr valign="top"><td> |
| 504 | <h3 class="epydoc"><span class="sig"><span class="sig-name">key2param</span>(<span class="sig-arg">key</span>)</span> |
| 505 | </h3> |
| 506 | </td><td align="right" valign="top" |
| 507 | ><span class="codelink"><a href="apiclient.discovery-pysrc.html#key2param">source code</a></span> |
| 508 | </td> |
| 509 | </tr></table> |
| 510 | |
| 511 | <pre class="literalblock"> |
| 512 | Converts key names into parameter names. |
| 513 | |
| 514 | For example, converting "max-results" -> "max_results" |
| 515 | |
Joe Gregorio | 6621203 | 2012-06-14 09:10:14 -0400 | [diff] [blame] | 516 | Args: |
| 517 | key: string, the method key name. |
| 518 | |
| 519 | Returns: |
| 520 | A safe method name based on the key name. |
| 521 | |
Joe Gregorio | 5dc0f5c | 2012-06-05 13:34:31 -0400 | [diff] [blame] | 522 | </pre> |
| 523 | <dl class="fields"> |
| 524 | </dl> |
| 525 | </td></tr></table> |
| 526 | </div> |
| 527 | <a name="build"></a> |
| 528 | <div> |
| 529 | <table class="details" border="1" cellpadding="3" |
| 530 | cellspacing="0" width="100%" bgcolor="white"> |
| 531 | <tr><td> |
| 532 | <table width="100%" cellpadding="0" cellspacing="0" border="0"> |
| 533 | <tr valign="top"><td> |
Joe Gregorio | f4839b0 | 2012-09-06 13:47:24 -0400 | [diff] [blame] | 534 | <h3 class="epydoc"><span class="sig"><span class="sig-name">build</span>(<span class="sig-arg">serviceName</span>, |
| 535 | <span class="sig-arg">version</span>, |
| 536 | <span class="sig-arg">http</span>=<span class="sig-default">None</span>, |
| 537 | <span class="sig-arg">discoveryServiceUrl</span>=<span class="sig-default">DISCOVERY_URI</span>, |
| 538 | <span class="sig-arg">developerKey</span>=<span class="sig-default">None</span>, |
| 539 | <span class="sig-arg">model</span>=<span class="sig-default">None</span>, |
| 540 | <span class="sig-arg">requestBuilder</span>=<span class="sig-default">HttpRequest</span>)</span> |
Joe Gregorio | 5dc0f5c | 2012-06-05 13:34:31 -0400 | [diff] [blame] | 541 | </h3> |
| 542 | </td><td align="right" valign="top" |
Joe Gregorio | f4839b0 | 2012-09-06 13:47:24 -0400 | [diff] [blame] | 543 | ><span class="codelink"><a href="apiclient.discovery-pysrc.html#build">source code</a></span> |
Joe Gregorio | 5dc0f5c | 2012-06-05 13:34:31 -0400 | [diff] [blame] | 544 | </td> |
| 545 | </tr></table> |
| 546 | |
| 547 | <pre class="literalblock"> |
| 548 | Construct a Resource for interacting with an API. |
| 549 | |
Joe Gregorio | 6621203 | 2012-06-14 09:10:14 -0400 | [diff] [blame] | 550 | Construct a Resource object for interacting with an API. The serviceName and |
| 551 | version are the names from the Discovery service. |
Joe Gregorio | 5dc0f5c | 2012-06-05 13:34:31 -0400 | [diff] [blame] | 552 | |
| 553 | Args: |
Joe Gregorio | 6621203 | 2012-06-14 09:10:14 -0400 | [diff] [blame] | 554 | serviceName: string, name of the service. |
| 555 | version: string, the version of the service. |
Joe Gregorio | 5dc0f5c | 2012-06-05 13:34:31 -0400 | [diff] [blame] | 556 | http: httplib2.Http, An instance of httplib2.Http or something that acts |
| 557 | like it that HTTP requests will be made through. |
Joe Gregorio | 6621203 | 2012-06-14 09:10:14 -0400 | [diff] [blame] | 558 | discoveryServiceUrl: string, a URI Template that points to the location of |
| 559 | the discovery service. It should have two parameters {api} and |
| 560 | {apiVersion} that when filled in produce an absolute URI to the discovery |
| 561 | document for that service. |
| 562 | developerKey: string, key obtained from |
| 563 | https://code.google.com/apis/console. |
| 564 | model: apiclient.Model, converts to and from the wire format. |
| 565 | requestBuilder: apiclient.http.HttpRequest, encapsulator for an HTTP |
| 566 | request. |
Joe Gregorio | 5dc0f5c | 2012-06-05 13:34:31 -0400 | [diff] [blame] | 567 | |
| 568 | Returns: |
Joe Gregorio | 6621203 | 2012-06-14 09:10:14 -0400 | [diff] [blame] | 569 | A Resource object with methods for interacting with the service. |
Joe Gregorio | 5dc0f5c | 2012-06-05 13:34:31 -0400 | [diff] [blame] | 570 | |
| 571 | </pre> |
| 572 | <dl class="fields"> |
Joe Gregorio | 1b425aa | 2012-08-24 12:04:34 -0400 | [diff] [blame] | 573 | <dt>Decorators:</dt> |
| 574 | <dd><ul class="nomargin-top"> |
Joe Gregorio | f4839b0 | 2012-09-06 13:47:24 -0400 | [diff] [blame] | 575 | <li><code>@positional(2)</code></li> |
| 576 | </ul></dd> |
| 577 | </dl> |
| 578 | </td></tr></table> |
| 579 | </div> |
| 580 | <a name="build_from_document"></a> |
| 581 | <div> |
| 582 | <table class="details" border="1" cellpadding="3" |
| 583 | cellspacing="0" width="100%" bgcolor="white"> |
| 584 | <tr><td> |
| 585 | <table width="100%" cellpadding="0" cellspacing="0" border="0"> |
| 586 | <tr valign="top"><td> |
| 587 | <h3 class="epydoc"><span class="sig"><span class="sig-name">build_from_document</span>(<span class="sig-arg">service</span>, |
| 588 | <span class="sig-arg">base</span>=<span class="sig-default">None</span>, |
| 589 | <span class="sig-arg">future</span>=<span class="sig-default">None</span>, |
| 590 | <span class="sig-arg">http</span>=<span class="sig-default">None</span>, |
| 591 | <span class="sig-arg">developerKey</span>=<span class="sig-default">None</span>, |
| 592 | <span class="sig-arg">model</span>=<span class="sig-default">None</span>, |
| 593 | <span class="sig-arg">requestBuilder</span>=<span class="sig-default">HttpRequest</span>)</span> |
| 594 | </h3> |
| 595 | </td><td align="right" valign="top" |
| 596 | ><span class="codelink"><a href="apiclient.discovery-pysrc.html#build_from_document">source code</a></span> |
| 597 | </td> |
| 598 | </tr></table> |
| 599 | |
| 600 | <pre class="literalblock"> |
| 601 | Create a Resource for interacting with an API. |
| 602 | |
| 603 | Same as `build()`, but constructs the Resource object from a discovery |
| 604 | document that is it given, as opposed to retrieving one over HTTP. |
| 605 | |
| 606 | Args: |
Joe Gregorio | 52a5c53 | 2013-01-24 16:19:07 -0500 | [diff] [blame] | 607 | service: string or object, the JSON discovery document describing the API. |
| 608 | The value passed in may either be the JSON string or the deserialized |
| 609 | JSON. |
Joe Gregorio | f4839b0 | 2012-09-06 13:47:24 -0400 | [diff] [blame] | 610 | base: string, base URI for all HTTP requests, usually the discovery URI. |
| 611 | This parameter is no longer used as rootUrl and servicePath are included |
| 612 | within the discovery document. (deprecated) |
| 613 | future: string, discovery document with future capabilities (deprecated). |
| 614 | http: httplib2.Http, An instance of httplib2.Http or something that acts |
| 615 | like it that HTTP requests will be made through. |
| 616 | developerKey: string, Key for controlling API usage, generated |
| 617 | from the API Console. |
| 618 | model: Model class instance that serializes and de-serializes requests and |
| 619 | responses. |
| 620 | requestBuilder: Takes an http request and packages it up to be executed. |
| 621 | |
| 622 | Returns: |
| 623 | A Resource object with methods for interacting with the service. |
| 624 | |
| 625 | </pre> |
| 626 | <dl class="fields"> |
| 627 | <dt>Decorators:</dt> |
| 628 | <dd><ul class="nomargin-top"> |
| 629 | <li><code>@positional(1)</code></li> |
Joe Gregorio | 1b425aa | 2012-08-24 12:04:34 -0400 | [diff] [blame] | 630 | </ul></dd> |
Joe Gregorio | 5dc0f5c | 2012-06-05 13:34:31 -0400 | [diff] [blame] | 631 | </dl> |
| 632 | </td></tr></table> |
| 633 | </div> |
| 634 | <a name="_cast"></a> |
| 635 | <div class="private"> |
| 636 | <table class="details" border="1" cellpadding="3" |
| 637 | cellspacing="0" width="100%" bgcolor="white"> |
| 638 | <tr><td> |
| 639 | <table width="100%" cellpadding="0" cellspacing="0" border="0"> |
| 640 | <tr valign="top"><td> |
| 641 | <h3 class="epydoc"><span class="sig"><span class="sig-name">_cast</span>(<span class="sig-arg">value</span>, |
| 642 | <span class="sig-arg">schema_type</span>)</span> |
| 643 | </h3> |
| 644 | </td><td align="right" valign="top" |
| 645 | ><span class="codelink"><a href="apiclient.discovery-pysrc.html#_cast">source code</a></span> |
| 646 | </td> |
| 647 | </tr></table> |
| 648 | |
| 649 | <pre class="literalblock"> |
| 650 | Convert value to a string based on JSON Schema type. |
| 651 | |
| 652 | See http://tools.ietf.org/html/draft-zyp-json-schema-03 for more details on |
| 653 | JSON Schema. |
| 654 | |
| 655 | Args: |
| 656 | value: any, the value to convert |
| 657 | schema_type: string, the type that value should be interpreted as |
| 658 | |
| 659 | Returns: |
| 660 | A string representation of 'value' based on the schema_type. |
| 661 | |
| 662 | </pre> |
| 663 | <dl class="fields"> |
| 664 | </dl> |
| 665 | </td></tr></table> |
| 666 | </div> |
Joe Gregorio | 6621203 | 2012-06-14 09:10:14 -0400 | [diff] [blame] | 667 | <a name="_media_size_to_long"></a> |
| 668 | <div class="private"> |
| 669 | <table class="details" border="1" cellpadding="3" |
| 670 | cellspacing="0" width="100%" bgcolor="white"> |
| 671 | <tr><td> |
| 672 | <table width="100%" cellpadding="0" cellspacing="0" border="0"> |
| 673 | <tr valign="top"><td> |
| 674 | <h3 class="epydoc"><span class="sig"><span class="sig-name">_media_size_to_long</span>(<span class="sig-arg">maxSize</span>)</span> |
| 675 | </h3> |
| 676 | </td><td align="right" valign="top" |
| 677 | ><span class="codelink"><a href="apiclient.discovery-pysrc.html#_media_size_to_long">source code</a></span> |
| 678 | </td> |
| 679 | </tr></table> |
| 680 | |
| 681 | <pre class="literalblock"> |
| 682 | Convert a string media size, such as 10GB or 3TB into an integer. |
| 683 | |
| 684 | Args: |
| 685 | maxSize: string, size as a string, such as 2MB or 7GB. |
| 686 | |
| 687 | Returns: |
| 688 | The size as an integer value. |
| 689 | |
| 690 | </pre> |
| 691 | <dl class="fields"> |
| 692 | </dl> |
| 693 | </td></tr></table> |
| 694 | </div> |
Joe Gregorio | 41be8e8 | 2013-03-07 10:31:47 -0500 | [diff] [blame] | 695 | <a name="_media_path_url_from_info"></a> |
| 696 | <div class="private"> |
| 697 | <table class="details" border="1" cellpadding="3" |
| 698 | cellspacing="0" width="100%" bgcolor="white"> |
| 699 | <tr><td> |
| 700 | <table width="100%" cellpadding="0" cellspacing="0" border="0"> |
| 701 | <tr valign="top"><td> |
| 702 | <h3 class="epydoc"><span class="sig"><span class="sig-name">_media_path_url_from_info</span>(<span class="sig-arg">root_desc</span>, |
| 703 | <span class="sig-arg">path_url</span>)</span> |
| 704 | </h3> |
| 705 | </td><td align="right" valign="top" |
| 706 | ><span class="codelink"><a href="apiclient.discovery-pysrc.html#_media_path_url_from_info">source code</a></span> |
| 707 | </td> |
| 708 | </tr></table> |
| 709 | |
| 710 | <pre class="literalblock"> |
| 711 | Creates an absolute media path URL. |
| 712 | |
| 713 | Constructed using the API root URI and service path from the discovery |
| 714 | document and the relative path for the API method. |
| 715 | |
| 716 | Args: |
| 717 | root_desc: Dictionary; the entire original deserialized discovery document. |
| 718 | path_url: String; the relative URL for the API method. Relative to the API |
| 719 | root, which is specified in the discovery document. |
| 720 | |
| 721 | Returns: |
| 722 | String; the absolute URI for media upload for the API method. |
| 723 | |
| 724 | </pre> |
| 725 | <dl class="fields"> |
| 726 | </dl> |
| 727 | </td></tr></table> |
| 728 | </div> |
| 729 | <a name="_fix_up_parameters"></a> |
| 730 | <div class="private"> |
| 731 | <table class="details" border="1" cellpadding="3" |
| 732 | cellspacing="0" width="100%" bgcolor="white"> |
| 733 | <tr><td> |
| 734 | <table width="100%" cellpadding="0" cellspacing="0" border="0"> |
| 735 | <tr valign="top"><td> |
| 736 | <h3 class="epydoc"><span class="sig"><span class="sig-name">_fix_up_parameters</span>(<span class="sig-arg">method_desc</span>, |
| 737 | <span class="sig-arg">root_desc</span>, |
| 738 | <span class="sig-arg">http_method</span>)</span> |
| 739 | </h3> |
| 740 | </td><td align="right" valign="top" |
| 741 | ><span class="codelink"><a href="apiclient.discovery-pysrc.html#_fix_up_parameters">source code</a></span> |
| 742 | </td> |
| 743 | </tr></table> |
| 744 | |
| 745 | <pre class="literalblock"> |
| 746 | Updates parameters of an API method with values specific to this library. |
| 747 | |
| 748 | Specifically, adds whatever global parameters are specified by the API to the |
| 749 | parameters for the individual method. Also adds parameters which don't |
| 750 | appear in the discovery document, but are available to all discovery based |
| 751 | APIs (these are listed in STACK_QUERY_PARAMETERS). |
| 752 | |
| 753 | SIDE EFFECTS: This updates the parameters dictionary object in the method |
| 754 | description. |
| 755 | |
| 756 | Args: |
| 757 | method_desc: Dictionary with metadata describing an API method. Value comes |
| 758 | from the dictionary of methods stored in the 'methods' key in the |
| 759 | deserialized discovery document. |
| 760 | root_desc: Dictionary; the entire original deserialized discovery document. |
| 761 | http_method: String; the HTTP method used to call the API method described |
| 762 | in method_desc. |
| 763 | |
| 764 | Returns: |
| 765 | The updated Dictionary stored in the 'parameters' key of the method |
| 766 | description dictionary. |
| 767 | |
| 768 | </pre> |
| 769 | <dl class="fields"> |
| 770 | </dl> |
| 771 | </td></tr></table> |
| 772 | </div> |
| 773 | <a name="_fix_up_media_upload"></a> |
| 774 | <div class="private"> |
| 775 | <table class="details" border="1" cellpadding="3" |
| 776 | cellspacing="0" width="100%" bgcolor="white"> |
| 777 | <tr><td> |
| 778 | <table width="100%" cellpadding="0" cellspacing="0" border="0"> |
| 779 | <tr valign="top"><td> |
| 780 | <h3 class="epydoc"><span class="sig"><span class="sig-name">_fix_up_media_upload</span>(<span class="sig-arg">method_desc</span>, |
| 781 | <span class="sig-arg">root_desc</span>, |
| 782 | <span class="sig-arg">path_url</span>, |
| 783 | <span class="sig-arg">parameters</span>)</span> |
| 784 | </h3> |
| 785 | </td><td align="right" valign="top" |
| 786 | ><span class="codelink"><a href="apiclient.discovery-pysrc.html#_fix_up_media_upload">source code</a></span> |
| 787 | </td> |
| 788 | </tr></table> |
| 789 | |
| 790 | <pre class="literalblock"> |
| 791 | Updates parameters of API by adding 'media_body' if supported by method. |
| 792 | |
| 793 | SIDE EFFECTS: If the method supports media upload and has a required body, |
| 794 | sets body to be optional (required=False) instead. Also, if there is a |
| 795 | 'mediaUpload' in the method description, adds 'media_upload' key to |
| 796 | parameters. |
| 797 | |
| 798 | Args: |
| 799 | method_desc: Dictionary with metadata describing an API method. Value comes |
| 800 | from the dictionary of methods stored in the 'methods' key in the |
| 801 | deserialized discovery document. |
| 802 | root_desc: Dictionary; the entire original deserialized discovery document. |
| 803 | path_url: String; the relative URL for the API method. Relative to the API |
| 804 | root, which is specified in the discovery document. |
| 805 | parameters: A dictionary describing method parameters for method described |
| 806 | in method_desc. |
| 807 | |
| 808 | Returns: |
| 809 | Triple (accept, max_size, media_path_url) where: |
| 810 | - accept is a list of strings representing what content types are |
| 811 | accepted for media upload. Defaults to empty list if not in the |
| 812 | discovery document. |
| 813 | - max_size is a long representing the max size in bytes allowed for a |
| 814 | media upload. Defaults to 0L if not in the discovery document. |
| 815 | - media_path_url is a String; the absolute URI for media upload for the |
| 816 | API method. Constructed using the API root URI and service path from |
| 817 | the discovery document and the relative path for the API method. If |
| 818 | media upload is not supported, this is None. |
| 819 | |
| 820 | </pre> |
| 821 | <dl class="fields"> |
| 822 | </dl> |
| 823 | </td></tr></table> |
| 824 | </div> |
| 825 | <a name="_fix_up_method_description"></a> |
| 826 | <div class="private"> |
| 827 | <table class="details" border="1" cellpadding="3" |
| 828 | cellspacing="0" width="100%" bgcolor="white"> |
| 829 | <tr><td> |
| 830 | <table width="100%" cellpadding="0" cellspacing="0" border="0"> |
| 831 | <tr valign="top"><td> |
| 832 | <h3 class="epydoc"><span class="sig"><span class="sig-name">_fix_up_method_description</span>(<span class="sig-arg">method_desc</span>, |
| 833 | <span class="sig-arg">root_desc</span>)</span> |
| 834 | </h3> |
| 835 | </td><td align="right" valign="top" |
| 836 | ><span class="codelink"><a href="apiclient.discovery-pysrc.html#_fix_up_method_description">source code</a></span> |
| 837 | </td> |
| 838 | </tr></table> |
| 839 | |
| 840 | <pre class="literalblock"> |
| 841 | Updates a method description in a discovery document. |
| 842 | |
| 843 | SIDE EFFECTS: Changes the parameters dictionary in the method description with |
| 844 | extra parameters which are used locally. |
| 845 | |
| 846 | Args: |
| 847 | method_desc: Dictionary with metadata describing an API method. Value comes |
| 848 | from the dictionary of methods stored in the 'methods' key in the |
| 849 | deserialized discovery document. |
| 850 | root_desc: Dictionary; the entire original deserialized discovery document. |
| 851 | |
| 852 | Returns: |
| 853 | Tuple (path_url, http_method, method_id, accept, max_size, media_path_url) |
| 854 | where: |
| 855 | - path_url is a String; the relative URL for the API method. Relative to |
| 856 | the API root, which is specified in the discovery document. |
| 857 | - http_method is a String; the HTTP method used to call the API method |
| 858 | described in the method description. |
| 859 | - method_id is a String; the name of the RPC method associated with the |
| 860 | API method, and is in the method description in the 'id' key. |
| 861 | - accept is a list of strings representing what content types are |
| 862 | accepted for media upload. Defaults to empty list if not in the |
| 863 | discovery document. |
| 864 | - max_size is a long representing the max size in bytes allowed for a |
| 865 | media upload. Defaults to 0L if not in the discovery document. |
| 866 | - media_path_url is a String; the absolute URI for media upload for the |
| 867 | API method. Constructed using the API root URI and service path from |
| 868 | the discovery document and the relative path for the API method. If |
| 869 | media upload is not supported, this is None. |
| 870 | |
| 871 | </pre> |
| 872 | <dl class="fields"> |
| 873 | </dl> |
| 874 | </td></tr></table> |
| 875 | </div> |
Joe Gregorio | 52a5c53 | 2013-01-24 16:19:07 -0500 | [diff] [blame] | 876 | <a name="createMethod"></a> |
Joe Gregorio | 41be8e8 | 2013-03-07 10:31:47 -0500 | [diff] [blame] | 877 | <div class="private"> |
Joe Gregorio | 6621203 | 2012-06-14 09:10:14 -0400 | [diff] [blame] | 878 | <table class="details" border="1" cellpadding="3" |
| 879 | cellspacing="0" width="100%" bgcolor="white"> |
| 880 | <tr><td> |
| 881 | <table width="100%" cellpadding="0" cellspacing="0" border="0"> |
| 882 | <tr valign="top"><td> |
Joe Gregorio | 52a5c53 | 2013-01-24 16:19:07 -0500 | [diff] [blame] | 883 | <h3 class="epydoc"><span class="sig"><span class="sig-name">createMethod</span>(<span class="sig-arg">methodName</span>, |
| 884 | <span class="sig-arg">methodDesc</span>, |
Joe Gregorio | 6621203 | 2012-06-14 09:10:14 -0400 | [diff] [blame] | 885 | <span class="sig-arg">rootDesc</span>, |
| 886 | <span class="sig-arg">schema</span>)</span> |
| 887 | </h3> |
| 888 | </td><td align="right" valign="top" |
Joe Gregorio | 52a5c53 | 2013-01-24 16:19:07 -0500 | [diff] [blame] | 889 | ><span class="codelink"><a href="apiclient.discovery-pysrc.html#createMethod">source code</a></span> |
Joe Gregorio | 6621203 | 2012-06-14 09:10:14 -0400 | [diff] [blame] | 890 | </td> |
| 891 | </tr></table> |
| 892 | |
| 893 | <pre class="literalblock"> |
Joe Gregorio | 52a5c53 | 2013-01-24 16:19:07 -0500 | [diff] [blame] | 894 | Creates a method for attaching to a Resource. |
Joe Gregorio | 6621203 | 2012-06-14 09:10:14 -0400 | [diff] [blame] | 895 | |
| 896 | Args: |
Joe Gregorio | 52a5c53 | 2013-01-24 16:19:07 -0500 | [diff] [blame] | 897 | methodName: string, name of the method to use. |
| 898 | methodDesc: object, fragment of deserialized discovery document that |
| 899 | describes the method. |
Joe Gregorio | 6621203 | 2012-06-14 09:10:14 -0400 | [diff] [blame] | 900 | rootDesc: object, the entire deserialized discovery document. |
| 901 | schema: object, mapping of schema names to schema descriptions. |
| 902 | |
Joe Gregorio | 52a5c53 | 2013-01-24 16:19:07 -0500 | [diff] [blame] | 903 | </pre> |
| 904 | <dl class="fields"> |
| 905 | </dl> |
| 906 | </td></tr></table> |
| 907 | </div> |
| 908 | <a name="createNextMethod"></a> |
Joe Gregorio | 41be8e8 | 2013-03-07 10:31:47 -0500 | [diff] [blame] | 909 | <div class="private"> |
Joe Gregorio | 52a5c53 | 2013-01-24 16:19:07 -0500 | [diff] [blame] | 910 | <table class="details" border="1" cellpadding="3" |
| 911 | cellspacing="0" width="100%" bgcolor="white"> |
| 912 | <tr><td> |
| 913 | <table width="100%" cellpadding="0" cellspacing="0" border="0"> |
| 914 | <tr valign="top"><td> |
| 915 | <h3 class="epydoc"><span class="sig"><span class="sig-name">createNextMethod</span>(<span class="sig-arg">methodName</span>)</span> |
| 916 | </h3> |
| 917 | </td><td align="right" valign="top" |
| 918 | ><span class="codelink"><a href="apiclient.discovery-pysrc.html#createNextMethod">source code</a></span> |
| 919 | </td> |
| 920 | </tr></table> |
| 921 | |
| 922 | <pre class="literalblock"> |
| 923 | Creates any _next methods for attaching to a Resource. |
| 924 | |
| 925 | The _next methods allow for easy iteration through list() responses. |
| 926 | |
| 927 | Args: |
| 928 | methodName: string, name of the method to use. |
Joe Gregorio | 6621203 | 2012-06-14 09:10:14 -0400 | [diff] [blame] | 929 | |
| 930 | </pre> |
| 931 | <dl class="fields"> |
| 932 | </dl> |
| 933 | </td></tr></table> |
| 934 | </div> |
Joe Gregorio | 5dc0f5c | 2012-06-05 13:34:31 -0400 | [diff] [blame] | 935 | <br /> |
| 936 | <!-- ==================== VARIABLES DETAILS ==================== --> |
| 937 | <a name="section-VariablesDetails"></a> |
| 938 | <table class="details" border="1" cellpadding="3" |
| 939 | cellspacing="0" width="100%" bgcolor="white"> |
| 940 | <tr bgcolor="#70b0f0" class="table-header"> |
| 941 | <td colspan="2" class="table-header"> |
| 942 | <table border="0" cellpadding="0" cellspacing="0" width="100%"> |
| 943 | <tr valign="top"> |
| 944 | <td align="left"><span class="table-header">Variables Details</span></td> |
| 945 | <td align="right" valign="top" |
| 946 | ><span class="options">[<a href="#section-VariablesDetails" |
| 947 | class="privatelink" onclick="toggle_private();" |
| 948 | >hide private</a>]</span></td> |
| 949 | </tr> |
| 950 | </table> |
| 951 | </td> |
| 952 | </tr> |
| 953 | </table> |
| 954 | <a name="DISCOVERY_URI"></a> |
Joe Gregorio | 41be8e8 | 2013-03-07 10:31:47 -0500 | [diff] [blame] | 955 | <div class="private"> |
Joe Gregorio | 5dc0f5c | 2012-06-05 13:34:31 -0400 | [diff] [blame] | 956 | <table class="details" border="1" cellpadding="3" |
| 957 | cellspacing="0" width="100%" bgcolor="white"> |
| 958 | <tr><td> |
| 959 | <h3 class="epydoc">DISCOVERY_URI</h3> |
| 960 | |
| 961 | <dl class="fields"> |
| 962 | </dl> |
| 963 | <dl class="fields"> |
| 964 | <dt>Value:</dt> |
| 965 | <dd><table><tr><td><pre class="variable"> |
Joe Gregorio | f4839b0 | 2012-09-06 13:47:24 -0400 | [diff] [blame] | 966 | 'https://www.googleapis.com/discovery/v1/apis/' '{api}/{apiVersion}/re<span class="variable-linewrap"><img src="crarr.png" alt="\" /></span> |
| 967 | st' |
Joe Gregorio | 5dc0f5c | 2012-06-05 13:34:31 -0400 | [diff] [blame] | 968 | </pre></td></tr></table> |
| 969 | </dd> |
| 970 | </dl> |
| 971 | </td></tr></table> |
| 972 | </div> |
Joe Gregorio | 41be8e8 | 2013-03-07 10:31:47 -0500 | [diff] [blame] | 973 | <a name="BODY_PARAMETER_DEFAULT_VALUE"></a> |
| 974 | <div class="private"> |
Joe Gregorio | 5dc0f5c | 2012-06-05 13:34:31 -0400 | [diff] [blame] | 975 | <table class="details" border="1" cellpadding="3" |
| 976 | cellspacing="0" width="100%" bgcolor="white"> |
| 977 | <tr><td> |
Joe Gregorio | 41be8e8 | 2013-03-07 10:31:47 -0500 | [diff] [blame] | 978 | <h3 class="epydoc">BODY_PARAMETER_DEFAULT_VALUE</h3> |
Joe Gregorio | 5dc0f5c | 2012-06-05 13:34:31 -0400 | [diff] [blame] | 979 | |
| 980 | <dl class="fields"> |
| 981 | </dl> |
| 982 | <dl class="fields"> |
| 983 | <dt>Value:</dt> |
| 984 | <dd><table><tr><td><pre class="variable"> |
Joe Gregorio | 41be8e8 | 2013-03-07 10:31:47 -0500 | [diff] [blame] | 985 | {'description': 'The request body.', 'type': 'object', 'required': Tru<span class="variable-linewrap"><img src="crarr.png" alt="\" /></span> |
| 986 | e,} |
Joe Gregorio | 5dc0f5c | 2012-06-05 13:34:31 -0400 | [diff] [blame] | 987 | </pre></td></tr></table> |
| 988 | </dd> |
| 989 | </dl> |
| 990 | </td></tr></table> |
| 991 | </div> |
Joe Gregorio | 41be8e8 | 2013-03-07 10:31:47 -0500 | [diff] [blame] | 992 | <a name="MEDIA_BODY_PARAMETER_DEFAULT_VALUE"></a> |
| 993 | <div class="private"> |
Joe Gregorio | 5dc0f5c | 2012-06-05 13:34:31 -0400 | [diff] [blame] | 994 | <table class="details" border="1" cellpadding="3" |
| 995 | cellspacing="0" width="100%" bgcolor="white"> |
| 996 | <tr><td> |
Joe Gregorio | 41be8e8 | 2013-03-07 10:31:47 -0500 | [diff] [blame] | 997 | <h3 class="epydoc">MEDIA_BODY_PARAMETER_DEFAULT_VALUE</h3> |
Joe Gregorio | 5dc0f5c | 2012-06-05 13:34:31 -0400 | [diff] [blame] | 998 | |
| 999 | <dl class="fields"> |
| 1000 | </dl> |
| 1001 | <dl class="fields"> |
| 1002 | <dt>Value:</dt> |
| 1003 | <dd><table><tr><td><pre class="variable"> |
Joe Gregorio | 41be8e8 | 2013-03-07 10:31:47 -0500 | [diff] [blame] | 1004 | {'description':('The filename of the media request body, or an instanc<span class="variable-linewrap"><img src="crarr.png" alt="\" /></span> |
| 1005 | e ' 'of a MediaUpload object.'), 'type': 'string', 'required': False,} |
| 1006 | </pre></td></tr></table> |
| 1007 | </dd> |
| 1008 | </dl> |
| 1009 | </td></tr></table> |
| 1010 | </div> |
| 1011 | <a name="STACK_QUERY_PARAMETERS"></a> |
| 1012 | <div class="private"> |
| 1013 | <table class="details" border="1" cellpadding="3" |
| 1014 | cellspacing="0" width="100%" bgcolor="white"> |
| 1015 | <tr><td> |
| 1016 | <h3 class="epydoc">STACK_QUERY_PARAMETERS</h3> |
| 1017 | |
| 1018 | <dl class="fields"> |
| 1019 | </dl> |
| 1020 | <dl class="fields"> |
| 1021 | <dt>Value:</dt> |
| 1022 | <dd><table><tr><td><pre class="variable"> |
| 1023 | frozenset(['trace', 'pp', 'userip', 'strict']) |
| 1024 | </pre></td></tr></table> |
| 1025 | </dd> |
| 1026 | </dl> |
| 1027 | </td></tr></table> |
| 1028 | </div> |
| 1029 | <a name="STACK_QUERY_PARAMETER_DEFAULT_VALUE"></a> |
| 1030 | <div class="private"> |
| 1031 | <table class="details" border="1" cellpadding="3" |
| 1032 | cellspacing="0" width="100%" bgcolor="white"> |
| 1033 | <tr><td> |
| 1034 | <h3 class="epydoc">STACK_QUERY_PARAMETER_DEFAULT_VALUE</h3> |
| 1035 | |
| 1036 | <dl class="fields"> |
| 1037 | </dl> |
| 1038 | <dl class="fields"> |
| 1039 | <dt>Value:</dt> |
| 1040 | <dd><table><tr><td><pre class="variable"> |
| 1041 | {'type': 'string', 'location': 'query'} |
Joe Gregorio | 5dc0f5c | 2012-06-05 13:34:31 -0400 | [diff] [blame] | 1042 | </pre></td></tr></table> |
| 1043 | </dd> |
| 1044 | </dl> |
| 1045 | </td></tr></table> |
| 1046 | </div> |
| 1047 | <br /> |
| 1048 | <!-- ==================== NAVIGATION BAR ==================== --> |
| 1049 | <table class="navbar" border="0" width="100%" cellpadding="0" |
| 1050 | bgcolor="#a0c0ff" cellspacing="0"> |
| 1051 | <tr valign="middle"> |
| 1052 | |
| 1053 | <!-- Tree link --> |
| 1054 | <th> <a |
| 1055 | href="module-tree.html">Trees</a> </th> |
| 1056 | |
| 1057 | <!-- Index link --> |
| 1058 | <th> <a |
| 1059 | href="identifier-index.html">Indices</a> </th> |
| 1060 | |
| 1061 | <!-- Help link --> |
| 1062 | <th> <a |
| 1063 | href="help.html">Help</a> </th> |
| 1064 | |
| 1065 | <th class="navbar" width="100%"></th> |
| 1066 | </tr> |
| 1067 | </table> |
| 1068 | <table border="0" cellpadding="0" cellspacing="0" width="100%%"> |
| 1069 | <tr> |
| 1070 | <td align="left" class="footer"> |
Joe Gregorio | 37802c3 | 2013-08-06 12:24:05 -0400 | [diff] [blame] | 1071 | Generated by Epydoc 3.0.1 on Tue Aug 6 12:16:42 2013 |
Joe Gregorio | 5dc0f5c | 2012-06-05 13:34:31 -0400 | [diff] [blame] | 1072 | </td> |
| 1073 | <td align="right" class="footer"> |
| 1074 | <a target="mainFrame" href="http://epydoc.sourceforge.net" |
| 1075 | >http://epydoc.sourceforge.net</a> |
| 1076 | </td> |
| 1077 | </tr> |
| 1078 | </table> |
| 1079 | |
| 1080 | <script type="text/javascript"> |
| 1081 | <!-- |
| 1082 | // Private objects are initially displayed (because if |
| 1083 | // javascript is turned off then we want them to be |
| 1084 | // visible); but by default, we want to hide them. So hide |
| 1085 | // them unless we have a cookie that says to show them. |
| 1086 | checkCookie(); |
| 1087 | // --> |
| 1088 | </script> |
| 1089 | </body> |
| 1090 | </html> |