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.http.MediaInMemoryUpload</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 | <a href="apiclient.http-module.html">Module http</a> :: |
| 39 | Class MediaInMemoryUpload |
| 40 | </span> |
| 41 | </td> |
| 42 | <td> |
| 43 | <table cellpadding="0" cellspacing="0"> |
| 44 | <!-- hide/show private --> |
| 45 | <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink" |
| 46 | onclick="toggle_private();">hide private</a>]</span></td></tr> |
| 47 | <tr><td align="right"><span class="options" |
| 48 | >[<a href="frames.html" target="_top">frames</a |
| 49 | >] | <a href="apiclient.http.MediaInMemoryUpload-class.html" |
| 50 | target="_top">no frames</a>]</span></td></tr> |
| 51 | </table> |
| 52 | </td> |
| 53 | </tr> |
| 54 | </table> |
| 55 | <!-- ==================== CLASS DESCRIPTION ==================== --> |
| 56 | <h1 class="epydoc">Class MediaInMemoryUpload</h1><p class="nomargin-top"><span class="codelink"><a href="apiclient.http-pysrc.html#MediaInMemoryUpload">source code</a></span></p> |
| 57 | <center> |
Joe Gregorio | 37802c3 | 2013-08-06 12:24:05 -0400 | [diff] [blame] | 58 | <center> <map id="uml_class_diagram_for_apiclien_26" name="uml_class_diagram_for_apiclien_26"> |
| 59 | <area shape="rect" id="node70" href="apiclient.http.MediaInMemoryUpload-class.html#__init__" title="Create a new MediaInMemoryUpload." alt="" coords="17,324,689,343"/> |
| 60 | <area shape="rect" id="node1" href="apiclient.http.MediaInMemoryUpload-class.html" title="MediaUpload for a chunk of bytes." alt="" coords="5,291,701,349"/> |
| 61 | <area shape="rect" id="node71" href="apiclient.http.MediaIoBaseUpload-class.html#chunksize" title="Chunk size for resumable uploads." alt="" coords="269,116,437,135"/> |
| 62 | <area shape="rect" id="node71" href="apiclient.http.MediaIoBaseUpload-class.html#mimetype" title="Mime type of the body." alt="" coords="269,135,437,153"/> |
| 63 | <area shape="rect" id="node71" href="apiclient.http.MediaIoBaseUpload-class.html#size" title="Size of upload." alt="" coords="269,153,437,172"/> |
| 64 | <area shape="rect" id="node71" href="apiclient.http.MediaIoBaseUpload-class.html#resumable" title="Whether this upload is resumable." alt="" coords="269,172,437,191"/> |
| 65 | <area shape="rect" id="node71" href="apiclient.http.MediaIoBaseUpload-class.html#getbytes" title="Get bytes from the media." alt="" coords="269,191,437,209"/> |
| 66 | <area shape="rect" id="node71" href="apiclient.http.MediaIoBaseUpload-class.html#has_stream" title="Does the underlying upload support a streaming interface." alt="" coords="269,209,437,228"/> |
| 67 | <area shape="rect" id="node71" href="apiclient.http.MediaIoBaseUpload-class.html#stream" title="A stream interface to the data being uploaded." alt="" coords="269,228,437,247"/> |
| 68 | <area shape="rect" id="node71" href="apiclient.http.MediaIoBaseUpload-class.html#to_json" title="This upload type is not serializable." alt="" coords="269,247,437,265"/> |
| 69 | <area shape="rect" id="node2" href="apiclient.http.MediaIoBaseUpload-class.html" title="A MediaUpload for a io.Base objects." alt="" coords="257,83,449,271"/> |
| 70 | <area shape="rect" id="node72" href="apiclient.http.MediaUpload-class.html#new_from_json" title="Utility class method to instantiate a MediaUpload subclass from a JSON representation produced by to_json()." alt="" coords="285,39,421,57"/> |
| 71 | <area shape="rect" id="node3" href="apiclient.http.MediaUpload-class.html" title="Describes a media object to upload." alt="" coords="273,6,433,63"/> |
Joe Gregorio | 5dc0f5c | 2012-06-05 13:34:31 -0400 | [diff] [blame] | 72 | </map> |
Joe Gregorio | 37802c3 | 2013-08-06 12:24:05 -0400 | [diff] [blame] | 73 | <img src="uml_class_diagram_for_apiclien_26.gif" alt='' usemap="#uml_class_diagram_for_apiclien_26" ismap="ismap" class="graph-without-title" /> |
Joe Gregorio | 5dc0f5c | 2012-06-05 13:34:31 -0400 | [diff] [blame] | 74 | </center> |
| 75 | </center> |
| 76 | <hr /> |
| 77 | <pre class="literalblock"> |
| 78 | MediaUpload for a chunk of bytes. |
| 79 | |
Joe Gregorio | 1b425aa | 2012-08-24 12:04:34 -0400 | [diff] [blame] | 80 | DEPRECATED: Use MediaIoBaseUpload with either io.TextIOBase or StringIO for |
| 81 | the stream. |
Joe Gregorio | 5dc0f5c | 2012-06-05 13:34:31 -0400 | [diff] [blame] | 82 | |
| 83 | </pre> |
| 84 | |
| 85 | <!-- ==================== INSTANCE METHODS ==================== --> |
| 86 | <a name="section-InstanceMethods"></a> |
| 87 | <table class="summary" border="1" cellpadding="3" |
| 88 | cellspacing="0" width="100%" bgcolor="white"> |
| 89 | <tr bgcolor="#70b0f0" class="table-header"> |
| 90 | <td colspan="2" class="table-header"> |
| 91 | <table border="0" cellpadding="0" cellspacing="0" width="100%"> |
| 92 | <tr valign="top"> |
| 93 | <td align="left"><span class="table-header">Instance Methods</span></td> |
| 94 | <td align="right" valign="top" |
| 95 | ><span class="options">[<a href="#section-InstanceMethods" |
| 96 | class="privatelink" onclick="toggle_private();" |
| 97 | >hide private</a>]</span></td> |
| 98 | </tr> |
| 99 | </table> |
| 100 | </td> |
| 101 | </tr> |
| 102 | <tr> |
| 103 | <td width="15%" align="right" valign="top" class="summary"> |
| 104 | <span class="summary-type"> </span> |
| 105 | </td><td class="summary"> |
| 106 | <table width="100%" cellpadding="0" cellspacing="0" border="0"> |
| 107 | <tr> |
Joe Gregorio | f4839b0 | 2012-09-06 13:47:24 -0400 | [diff] [blame] | 108 | <td><span class="summary-sig"><a href="apiclient.http.MediaInMemoryUpload-class.html#__init__" class="summary-sig-name">__init__</a>(<span class="summary-sig-arg">self</span>, |
| 109 | <span class="summary-sig-arg">body</span>, |
| 110 | <span class="summary-sig-arg">mimetype</span>=<span class="summary-sig-default">'application/octet-stream'</span>, |
| 111 | <span class="summary-sig-arg">chunksize</span>=<span class="summary-sig-default">DEFAULT_CHUNK_SIZE</span>, |
| 112 | <span class="summary-sig-arg">resumable</span>=<span class="summary-sig-default">False</span>)</span><br /> |
Joe Gregorio | 1b425aa | 2012-08-24 12:04:34 -0400 | [diff] [blame] | 113 | Create a new MediaInMemoryUpload.</td> |
Joe Gregorio | 5dc0f5c | 2012-06-05 13:34:31 -0400 | [diff] [blame] | 114 | <td align="right" valign="top"> |
Joe Gregorio | f4839b0 | 2012-09-06 13:47:24 -0400 | [diff] [blame] | 115 | <span class="codelink"><a href="apiclient.http-pysrc.html#MediaInMemoryUpload.__init__">source code</a></span> |
Joe Gregorio | 5dc0f5c | 2012-06-05 13:34:31 -0400 | [diff] [blame] | 116 | |
| 117 | </td> |
| 118 | </tr> |
| 119 | </table> |
| 120 | |
| 121 | </td> |
| 122 | </tr> |
| 123 | <tr> |
| 124 | <td colspan="2" class="summary"> |
Joe Gregorio | 1b425aa | 2012-08-24 12:04:34 -0400 | [diff] [blame] | 125 | <p class="indent-wrapped-lines"><b>Inherited from <code><a href="apiclient.http.MediaIoBaseUpload-class.html">MediaIoBaseUpload</a></code></b>: |
| 126 | <code><a href="apiclient.http.MediaIoBaseUpload-class.html#chunksize">chunksize</a></code>, |
| 127 | <code><a href="apiclient.http.MediaIoBaseUpload-class.html#getbytes">getbytes</a></code>, |
| 128 | <code><a href="apiclient.http.MediaIoBaseUpload-class.html#has_stream">has_stream</a></code>, |
| 129 | <code><a href="apiclient.http.MediaIoBaseUpload-class.html#mimetype">mimetype</a></code>, |
| 130 | <code><a href="apiclient.http.MediaIoBaseUpload-class.html#resumable">resumable</a></code>, |
| 131 | <code><a href="apiclient.http.MediaIoBaseUpload-class.html#size">size</a></code>, |
| 132 | <code><a href="apiclient.http.MediaIoBaseUpload-class.html#stream">stream</a></code>, |
| 133 | <code><a href="apiclient.http.MediaIoBaseUpload-class.html#to_json">to_json</a></code> |
| 134 | </p> |
Joe Gregorio | 5dc0f5c | 2012-06-05 13:34:31 -0400 | [diff] [blame] | 135 | <div class="private"> <p class="indent-wrapped-lines"><b>Inherited from <code><a href="apiclient.http.MediaUpload-class.html">MediaUpload</a></code></b> (private): |
| 136 | <code><a href="apiclient.http.MediaUpload-class.html#_to_json" onclick="show_private();">_to_json</a></code> |
| 137 | </p></div> |
| 138 | <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>: |
| 139 | <code>__delattr__</code>, |
| 140 | <code>__format__</code>, |
| 141 | <code>__getattribute__</code>, |
| 142 | <code>__hash__</code>, |
| 143 | <code>__new__</code>, |
| 144 | <code>__reduce__</code>, |
| 145 | <code>__reduce_ex__</code>, |
| 146 | <code>__repr__</code>, |
| 147 | <code>__setattr__</code>, |
| 148 | <code>__sizeof__</code>, |
| 149 | <code>__str__</code>, |
| 150 | <code>__subclasshook__</code> |
| 151 | </p> |
| 152 | </td> |
| 153 | </tr> |
| 154 | </table> |
| 155 | <!-- ==================== CLASS METHODS ==================== --> |
| 156 | <a name="section-ClassMethods"></a> |
| 157 | <table class="summary" border="1" cellpadding="3" |
| 158 | cellspacing="0" width="100%" bgcolor="white"> |
| 159 | <tr bgcolor="#70b0f0" class="table-header"> |
| 160 | <td colspan="2" class="table-header"> |
| 161 | <table border="0" cellpadding="0" cellspacing="0" width="100%"> |
| 162 | <tr valign="top"> |
| 163 | <td align="left"><span class="table-header">Class Methods</span></td> |
| 164 | <td align="right" valign="top" |
| 165 | ><span class="options">[<a href="#section-ClassMethods" |
| 166 | class="privatelink" onclick="toggle_private();" |
| 167 | >hide private</a>]</span></td> |
| 168 | </tr> |
| 169 | </table> |
| 170 | </td> |
| 171 | </tr> |
| 172 | <tr> |
| 173 | <td colspan="2" class="summary"> |
| 174 | <p class="indent-wrapped-lines"><b>Inherited from <code><a href="apiclient.http.MediaUpload-class.html">MediaUpload</a></code></b>: |
| 175 | <code><a href="apiclient.http.MediaUpload-class.html#new_from_json">new_from_json</a></code> |
| 176 | </p> |
| 177 | </td> |
| 178 | </tr> |
| 179 | </table> |
Joe Gregorio | 5dc0f5c | 2012-06-05 13:34:31 -0400 | [diff] [blame] | 180 | <!-- ==================== PROPERTIES ==================== --> |
| 181 | <a name="section-Properties"></a> |
| 182 | <table class="summary" border="1" cellpadding="3" |
| 183 | cellspacing="0" width="100%" bgcolor="white"> |
| 184 | <tr bgcolor="#70b0f0" class="table-header"> |
| 185 | <td colspan="2" class="table-header"> |
| 186 | <table border="0" cellpadding="0" cellspacing="0" width="100%"> |
| 187 | <tr valign="top"> |
| 188 | <td align="left"><span class="table-header">Properties</span></td> |
| 189 | <td align="right" valign="top" |
| 190 | ><span class="options">[<a href="#section-Properties" |
| 191 | class="privatelink" onclick="toggle_private();" |
| 192 | >hide private</a>]</span></td> |
| 193 | </tr> |
| 194 | </table> |
| 195 | </td> |
| 196 | </tr> |
| 197 | <tr> |
| 198 | <td colspan="2" class="summary"> |
| 199 | <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>: |
| 200 | <code>__class__</code> |
| 201 | </p> |
| 202 | </td> |
| 203 | </tr> |
| 204 | </table> |
| 205 | <!-- ==================== METHOD DETAILS ==================== --> |
| 206 | <a name="section-MethodDetails"></a> |
| 207 | <table class="details" border="1" cellpadding="3" |
| 208 | cellspacing="0" width="100%" bgcolor="white"> |
| 209 | <tr bgcolor="#70b0f0" class="table-header"> |
| 210 | <td colspan="2" class="table-header"> |
| 211 | <table border="0" cellpadding="0" cellspacing="0" width="100%"> |
| 212 | <tr valign="top"> |
| 213 | <td align="left"><span class="table-header">Method Details</span></td> |
| 214 | <td align="right" valign="top" |
| 215 | ><span class="options">[<a href="#section-MethodDetails" |
| 216 | class="privatelink" onclick="toggle_private();" |
| 217 | >hide private</a>]</span></td> |
| 218 | </tr> |
| 219 | </table> |
| 220 | </td> |
| 221 | </tr> |
| 222 | </table> |
| 223 | <a name="__init__"></a> |
| 224 | <div> |
| 225 | <table class="details" border="1" cellpadding="3" |
| 226 | cellspacing="0" width="100%" bgcolor="white"> |
| 227 | <tr><td> |
| 228 | <table width="100%" cellpadding="0" cellspacing="0" border="0"> |
| 229 | <tr valign="top"><td> |
Joe Gregorio | f4839b0 | 2012-09-06 13:47:24 -0400 | [diff] [blame] | 230 | <h3 class="epydoc"><span class="sig"><span class="sig-name">__init__</span>(<span class="sig-arg">self</span>, |
| 231 | <span class="sig-arg">body</span>, |
| 232 | <span class="sig-arg">mimetype</span>=<span class="sig-default">'application/octet-stream'</span>, |
| 233 | <span class="sig-arg">chunksize</span>=<span class="sig-default">DEFAULT_CHUNK_SIZE</span>, |
| 234 | <span class="sig-arg">resumable</span>=<span class="sig-default">False</span>)</span> |
Joe Gregorio | 5dc0f5c | 2012-06-05 13:34:31 -0400 | [diff] [blame] | 235 | <br /><em class="fname">(Constructor)</em> |
| 236 | </h3> |
| 237 | </td><td align="right" valign="top" |
Joe Gregorio | f4839b0 | 2012-09-06 13:47:24 -0400 | [diff] [blame] | 238 | ><span class="codelink"><a href="apiclient.http-pysrc.html#MediaInMemoryUpload.__init__">source code</a></span> |
Joe Gregorio | 5dc0f5c | 2012-06-05 13:34:31 -0400 | [diff] [blame] | 239 | </td> |
| 240 | </tr></table> |
| 241 | |
| 242 | <pre class="literalblock"> |
Joe Gregorio | 1b425aa | 2012-08-24 12:04:34 -0400 | [diff] [blame] | 243 | Create a new MediaInMemoryUpload. |
| 244 | |
| 245 | DEPRECATED: Use MediaIoBaseUpload with either io.TextIOBase or StringIO for |
| 246 | the stream. |
Joe Gregorio | 5dc0f5c | 2012-06-05 13:34:31 -0400 | [diff] [blame] | 247 | |
| 248 | Args: |
| 249 | body: string, Bytes of body content. |
| 250 | mimetype: string, Mime-type of the file or default of |
| 251 | 'application/octet-stream'. |
| 252 | chunksize: int, File will be uploaded in chunks of this many bytes. Only |
| 253 | used if resumable=True. |
| 254 | resumable: bool, True if this is a resumable upload. False means upload |
| 255 | in a single request. |
Joe Gregorio | 1b425aa | 2012-08-24 12:04:34 -0400 | [diff] [blame] | 256 | |
Joe Gregorio | 5dc0f5c | 2012-06-05 13:34:31 -0400 | [diff] [blame] | 257 | |
| 258 | </pre> |
| 259 | <dl class="fields"> |
Joe Gregorio | 1b425aa | 2012-08-24 12:04:34 -0400 | [diff] [blame] | 260 | <dt>Decorators:</dt> |
| 261 | <dd><ul class="nomargin-top"> |
| 262 | <li><code>@util.positional(2)</code></li> |
| 263 | </ul></dd> |
Joe Gregorio | 5dc0f5c | 2012-06-05 13:34:31 -0400 | [diff] [blame] | 264 | <dt>Overrides: |
| 265 | object.__init__ |
| 266 | </dt> |
| 267 | </dl> |
| 268 | </td></tr></table> |
| 269 | </div> |
Joe Gregorio | 5dc0f5c | 2012-06-05 13:34:31 -0400 | [diff] [blame] | 270 | <br /> |
| 271 | <!-- ==================== NAVIGATION BAR ==================== --> |
| 272 | <table class="navbar" border="0" width="100%" cellpadding="0" |
| 273 | bgcolor="#a0c0ff" cellspacing="0"> |
| 274 | <tr valign="middle"> |
| 275 | |
| 276 | <!-- Tree link --> |
| 277 | <th> <a |
| 278 | href="module-tree.html">Trees</a> </th> |
| 279 | |
| 280 | <!-- Index link --> |
| 281 | <th> <a |
| 282 | href="identifier-index.html">Indices</a> </th> |
| 283 | |
| 284 | <!-- Help link --> |
| 285 | <th> <a |
| 286 | href="help.html">Help</a> </th> |
| 287 | |
| 288 | <th class="navbar" width="100%"></th> |
| 289 | </tr> |
| 290 | </table> |
| 291 | <table border="0" cellpadding="0" cellspacing="0" width="100%%"> |
| 292 | <tr> |
| 293 | <td align="left" class="footer"> |
Joe Gregorio | 37802c3 | 2013-08-06 12:24:05 -0400 | [diff] [blame] | 294 | Generated by Epydoc 3.0.1 on Tue Aug 6 12:16:43 2013 |
Joe Gregorio | 5dc0f5c | 2012-06-05 13:34:31 -0400 | [diff] [blame] | 295 | </td> |
| 296 | <td align="right" class="footer"> |
| 297 | <a target="mainFrame" href="http://epydoc.sourceforge.net" |
| 298 | >http://epydoc.sourceforge.net</a> |
| 299 | </td> |
| 300 | </tr> |
| 301 | </table> |
| 302 | |
| 303 | <script type="text/javascript"> |
| 304 | <!-- |
| 305 | // Private objects are initially displayed (because if |
| 306 | // javascript is turned off then we want them to be |
| 307 | // visible); but by default, we want to hide them. So hide |
| 308 | // them unless we have a cookie that says to show them. |
| 309 | checkCookie(); |
| 310 | // --> |
| 311 | </script> |
| 312 | </body> |
| 313 | </html> |