| <?xml version="1.0" encoding="ascii"?> |
| <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" |
| "DTD/xhtml1-transitional.dtd"> |
| <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> |
| <head> |
| <title>googleapiclient.http.MediaUpload</title> |
| <link rel="stylesheet" href="epydoc.css" type="text/css" /> |
| <script type="text/javascript" src="epydoc.js"></script> |
| </head> |
| |
| <body bgcolor="white" text="black" link="blue" vlink="#204080" |
| alink="#204080"> |
| <!-- ==================== NAVIGATION BAR ==================== --> |
| <table class="navbar" border="0" width="100%" cellpadding="0" |
| bgcolor="#a0c0ff" cellspacing="0"> |
| <tr valign="middle"> |
| <!-- Home link --> |
| <th> <a |
| href="googleapiclient-module.html">Home</a> </th> |
| |
| <!-- Tree link --> |
| <th> <a |
| href="module-tree.html">Trees</a> </th> |
| |
| <!-- Index link --> |
| <th> <a |
| href="identifier-index.html">Indices</a> </th> |
| |
| <!-- Help link --> |
| <th> <a |
| href="help.html">Help</a> </th> |
| |
| <th class="navbar" width="100%"></th> |
| </tr> |
| </table> |
| <table width="100%" cellpadding="0" cellspacing="0"> |
| <tr valign="top"> |
| <td width="100%"> |
| <span class="breadcrumbs"> |
| <a href="googleapiclient-module.html">Package googleapiclient</a> :: |
| <a href="googleapiclient.http-module.html">Module http</a> :: |
| Class MediaUpload |
| </span> |
| </td> |
| <td> |
| <table cellpadding="0" cellspacing="0"> |
| <!-- hide/show private --> |
| <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink" |
| onclick="toggle_private();">hide private</a>]</span></td></tr> |
| <tr><td align="right"><span class="options" |
| >[<a href="frames.html" target="_top">frames</a |
| >] | <a href="googleapiclient.http.MediaUpload-class.html" |
| target="_top">no frames</a>]</span></td></tr> |
| </table> |
| </td> |
| </tr> |
| </table> |
| <!-- ==================== CLASS DESCRIPTION ==================== --> |
| <h1 class="epydoc">Class MediaUpload</h1><p class="nomargin-top"><span class="codelink"><a href="googleapiclient.http-pysrc.html#MediaUpload">source code</a></span></p> |
| <center> |
| <center> <map id="uml_class_diagram_for_googleap_29" name="uml_class_diagram_for_googleap_29"> |
| <area shape="rect" id="node1_9" href="googleapiclient.http.MediaUpload-class.html#chunksize" title="Chunk size for resumable uploads." alt="" coords="17,36,172,55"/> |
| <area shape="rect" id="node1_10" href="googleapiclient.http.MediaUpload-class.html#mimetype" title="Mime type of the body." alt="" coords="17,55,172,73"/> |
| <area shape="rect" id="node1_11" href="googleapiclient.http.MediaUpload-class.html#size" title="Size of upload." alt="" coords="17,73,172,92"/> |
| <area shape="rect" id="node1_12" href="googleapiclient.http.MediaUpload-class.html#resumable" title="Whether this upload is resumable." alt="" coords="17,92,172,111"/> |
| <area shape="rect" id="node1_13" href="googleapiclient.http.MediaUpload-class.html#getbytes" title="Get bytes from the media." alt="" coords="17,111,172,129"/> |
| <area shape="rect" id="node1_14" href="googleapiclient.http.MediaUpload-class.html#has_stream" title="Does the underlying upload support a streaming interface." alt="" coords="17,129,172,148"/> |
| <area shape="rect" id="node1_15" href="googleapiclient.http.MediaUpload-class.html#stream" title="A stream interface to the data being uploaded." alt="" coords="17,148,172,167"/> |
| <area shape="rect" id="node1_16" href="googleapiclient.http.MediaUpload-class.html#to_json" title="Create a JSON representation of an instance of MediaUpload." alt="" coords="17,167,172,185"/> |
| <area shape="rect" id="node1_17" href="googleapiclient.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="17,185,172,204"/> |
| <area shape="rect" id="node1" href="googleapiclient.http.MediaUpload-class.html" title="Describes a media object to upload." alt="" coords="5,5,184,211"/> |
| </map> |
| <img src="uml_class_diagram_for_googleap_29.gif" alt='' usemap="#uml_class_diagram_for_googleap_29" ismap="ismap" class="graph-without-title" /> |
| </center> |
| </center> |
| <hr /> |
| <pre class="literalblock"> |
| Describes a media object to upload. |
| |
| Base class that defines the interface of MediaUpload subclasses. |
| |
| Note that subclasses of MediaUpload may allow you to control the chunksize |
| when uploading a media object. It is important to keep the size of the chunk |
| as large as possible to keep the upload efficient. Other factors may influence |
| the size of the chunk you use, particularly if you are working in an |
| environment where individual HTTP requests may have a hardcoded time limit, |
| such as under certain classes of requests under Google App Engine. |
| |
| Streams are io.Base compatible objects that support seek(). Some MediaUpload |
| subclasses support using streams directly to upload data. Support for |
| streaming may be indicated by a MediaUpload sub-class and if appropriate for a |
| platform that stream will be used for uploading the media object. The support |
| for streaming is indicated by has_stream() returning True. The stream() method |
| should return an io.Base object that supports seek(). On platforms where the |
| underlying httplib module supports streaming, for example Python 2.6 and |
| later, the stream will be passed into the http library which will result in |
| less memory being used and possibly faster uploads. |
| |
| If you need to upload media that can't be uploaded using any of the existing |
| MediaUpload sub-class then you can sub-class MediaUpload for your particular |
| needs. |
| |
| </pre> |
| |
| <!-- ==================== INSTANCE METHODS ==================== --> |
| <a name="section-InstanceMethods"></a> |
| <table class="summary" border="1" cellpadding="3" |
| cellspacing="0" width="100%" bgcolor="white"> |
| <tr bgcolor="#70b0f0" class="table-header"> |
| <td colspan="2" class="table-header"> |
| <table border="0" cellpadding="0" cellspacing="0" width="100%"> |
| <tr valign="top"> |
| <td align="left"><span class="table-header">Instance Methods</span></td> |
| <td align="right" valign="top" |
| ><span class="options">[<a href="#section-InstanceMethods" |
| class="privatelink" onclick="toggle_private();" |
| >hide private</a>]</span></td> |
| </tr> |
| </table> |
| </td> |
| </tr> |
| <tr> |
| <td width="15%" align="right" valign="top" class="summary"> |
| <span class="summary-type"> </span> |
| </td><td class="summary"> |
| <table width="100%" cellpadding="0" cellspacing="0" border="0"> |
| <tr> |
| <td><span class="summary-sig"><a href="googleapiclient.http.MediaUpload-class.html#chunksize" class="summary-sig-name">chunksize</a>(<span class="summary-sig-arg">self</span>)</span><br /> |
| Chunk size for resumable uploads.</td> |
| <td align="right" valign="top"> |
| <span class="codelink"><a href="googleapiclient.http-pysrc.html#MediaUpload.chunksize">source code</a></span> |
| |
| </td> |
| </tr> |
| </table> |
| |
| </td> |
| </tr> |
| <tr> |
| <td width="15%" align="right" valign="top" class="summary"> |
| <span class="summary-type"> </span> |
| </td><td class="summary"> |
| <table width="100%" cellpadding="0" cellspacing="0" border="0"> |
| <tr> |
| <td><span class="summary-sig"><a href="googleapiclient.http.MediaUpload-class.html#mimetype" class="summary-sig-name">mimetype</a>(<span class="summary-sig-arg">self</span>)</span><br /> |
| Mime type of the body.</td> |
| <td align="right" valign="top"> |
| <span class="codelink"><a href="googleapiclient.http-pysrc.html#MediaUpload.mimetype">source code</a></span> |
| |
| </td> |
| </tr> |
| </table> |
| |
| </td> |
| </tr> |
| <tr> |
| <td width="15%" align="right" valign="top" class="summary"> |
| <span class="summary-type"> </span> |
| </td><td class="summary"> |
| <table width="100%" cellpadding="0" cellspacing="0" border="0"> |
| <tr> |
| <td><span class="summary-sig"><a href="googleapiclient.http.MediaUpload-class.html#size" class="summary-sig-name">size</a>(<span class="summary-sig-arg">self</span>)</span><br /> |
| Size of upload.</td> |
| <td align="right" valign="top"> |
| <span class="codelink"><a href="googleapiclient.http-pysrc.html#MediaUpload.size">source code</a></span> |
| |
| </td> |
| </tr> |
| </table> |
| |
| </td> |
| </tr> |
| <tr> |
| <td width="15%" align="right" valign="top" class="summary"> |
| <span class="summary-type"> </span> |
| </td><td class="summary"> |
| <table width="100%" cellpadding="0" cellspacing="0" border="0"> |
| <tr> |
| <td><span class="summary-sig"><a href="googleapiclient.http.MediaUpload-class.html#resumable" class="summary-sig-name">resumable</a>(<span class="summary-sig-arg">self</span>)</span><br /> |
| Whether this upload is resumable.</td> |
| <td align="right" valign="top"> |
| <span class="codelink"><a href="googleapiclient.http-pysrc.html#MediaUpload.resumable">source code</a></span> |
| |
| </td> |
| </tr> |
| </table> |
| |
| </td> |
| </tr> |
| <tr> |
| <td width="15%" align="right" valign="top" class="summary"> |
| <span class="summary-type"> </span> |
| </td><td class="summary"> |
| <table width="100%" cellpadding="0" cellspacing="0" border="0"> |
| <tr> |
| <td><span class="summary-sig"><a href="googleapiclient.http.MediaUpload-class.html#getbytes" class="summary-sig-name">getbytes</a>(<span class="summary-sig-arg">self</span>, |
| <span class="summary-sig-arg">begin</span>, |
| <span class="summary-sig-arg">end</span>)</span><br /> |
| Get bytes from the media.</td> |
| <td align="right" valign="top"> |
| <span class="codelink"><a href="googleapiclient.http-pysrc.html#MediaUpload.getbytes">source code</a></span> |
| |
| </td> |
| </tr> |
| </table> |
| |
| </td> |
| </tr> |
| <tr> |
| <td width="15%" align="right" valign="top" class="summary"> |
| <span class="summary-type"> </span> |
| </td><td class="summary"> |
| <table width="100%" cellpadding="0" cellspacing="0" border="0"> |
| <tr> |
| <td><span class="summary-sig"><a href="googleapiclient.http.MediaUpload-class.html#has_stream" class="summary-sig-name">has_stream</a>(<span class="summary-sig-arg">self</span>)</span><br /> |
| Does the underlying upload support a streaming interface.</td> |
| <td align="right" valign="top"> |
| <span class="codelink"><a href="googleapiclient.http-pysrc.html#MediaUpload.has_stream">source code</a></span> |
| |
| </td> |
| </tr> |
| </table> |
| |
| </td> |
| </tr> |
| <tr> |
| <td width="15%" align="right" valign="top" class="summary"> |
| <span class="summary-type"> </span> |
| </td><td class="summary"> |
| <table width="100%" cellpadding="0" cellspacing="0" border="0"> |
| <tr> |
| <td><span class="summary-sig"><a href="googleapiclient.http.MediaUpload-class.html#stream" class="summary-sig-name">stream</a>(<span class="summary-sig-arg">self</span>)</span><br /> |
| A stream interface to the data being uploaded.</td> |
| <td align="right" valign="top"> |
| <span class="codelink"><a href="googleapiclient.http-pysrc.html#MediaUpload.stream">source code</a></span> |
| |
| </td> |
| </tr> |
| </table> |
| |
| </td> |
| </tr> |
| <tr class="private"> |
| <td width="15%" align="right" valign="top" class="summary"> |
| <span class="summary-type"> </span> |
| </td><td class="summary"> |
| <table width="100%" cellpadding="0" cellspacing="0" border="0"> |
| <tr> |
| <td><span class="summary-sig"><a href="googleapiclient.http.MediaUpload-class.html#_to_json" class="summary-sig-name" onclick="show_private();">_to_json</a>(<span class="summary-sig-arg">self</span>, |
| <span class="summary-sig-arg">strip</span>=<span class="summary-sig-default">None</span>)</span><br /> |
| Utility function for creating a JSON representation of a MediaUpload.</td> |
| <td align="right" valign="top"> |
| <span class="codelink"><a href="googleapiclient.http-pysrc.html#MediaUpload._to_json">source code</a></span> |
| |
| </td> |
| </tr> |
| </table> |
| |
| </td> |
| </tr> |
| <tr> |
| <td width="15%" align="right" valign="top" class="summary"> |
| <span class="summary-type"> </span> |
| </td><td class="summary"> |
| <table width="100%" cellpadding="0" cellspacing="0" border="0"> |
| <tr> |
| <td><span class="summary-sig"><a href="googleapiclient.http.MediaUpload-class.html#to_json" class="summary-sig-name">to_json</a>(<span class="summary-sig-arg">self</span>)</span><br /> |
| Create a JSON representation of an instance of MediaUpload.</td> |
| <td align="right" valign="top"> |
| <span class="codelink"><a href="googleapiclient.http-pysrc.html#MediaUpload.to_json">source code</a></span> |
| |
| </td> |
| </tr> |
| </table> |
| |
| </td> |
| </tr> |
| <tr> |
| <td colspan="2" class="summary"> |
| <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>: |
| <code>__delattr__</code>, |
| <code>__format__</code>, |
| <code>__getattribute__</code>, |
| <code>__hash__</code>, |
| <code>__init__</code>, |
| <code>__new__</code>, |
| <code>__reduce__</code>, |
| <code>__reduce_ex__</code>, |
| <code>__repr__</code>, |
| <code>__setattr__</code>, |
| <code>__sizeof__</code>, |
| <code>__str__</code>, |
| <code>__subclasshook__</code> |
| </p> |
| </td> |
| </tr> |
| </table> |
| <!-- ==================== CLASS METHODS ==================== --> |
| <a name="section-ClassMethods"></a> |
| <table class="summary" border="1" cellpadding="3" |
| cellspacing="0" width="100%" bgcolor="white"> |
| <tr bgcolor="#70b0f0" class="table-header"> |
| <td colspan="2" class="table-header"> |
| <table border="0" cellpadding="0" cellspacing="0" width="100%"> |
| <tr valign="top"> |
| <td align="left"><span class="table-header">Class Methods</span></td> |
| <td align="right" valign="top" |
| ><span class="options">[<a href="#section-ClassMethods" |
| class="privatelink" onclick="toggle_private();" |
| >hide private</a>]</span></td> |
| </tr> |
| </table> |
| </td> |
| </tr> |
| <tr> |
| <td width="15%" align="right" valign="top" class="summary"> |
| <span class="summary-type"> </span> |
| </td><td class="summary"> |
| <table width="100%" cellpadding="0" cellspacing="0" border="0"> |
| <tr> |
| <td><span class="summary-sig"><a href="googleapiclient.http.MediaUpload-class.html#new_from_json" class="summary-sig-name">new_from_json</a>(<span class="summary-sig-arg">cls</span>, |
| <span class="summary-sig-arg">s</span>)</span><br /> |
| Utility class method to instantiate a MediaUpload subclass from a JSON |
| representation produced by to_json().</td> |
| <td align="right" valign="top"> |
| <span class="codelink"><a href="googleapiclient.http-pysrc.html#MediaUpload.new_from_json">source code</a></span> |
| |
| </td> |
| </tr> |
| </table> |
| |
| </td> |
| </tr> |
| </table> |
| <!-- ==================== PROPERTIES ==================== --> |
| <a name="section-Properties"></a> |
| <table class="summary" border="1" cellpadding="3" |
| cellspacing="0" width="100%" bgcolor="white"> |
| <tr bgcolor="#70b0f0" class="table-header"> |
| <td colspan="2" class="table-header"> |
| <table border="0" cellpadding="0" cellspacing="0" width="100%"> |
| <tr valign="top"> |
| <td align="left"><span class="table-header">Properties</span></td> |
| <td align="right" valign="top" |
| ><span class="options">[<a href="#section-Properties" |
| class="privatelink" onclick="toggle_private();" |
| >hide private</a>]</span></td> |
| </tr> |
| </table> |
| </td> |
| </tr> |
| <tr> |
| <td colspan="2" class="summary"> |
| <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>: |
| <code>__class__</code> |
| </p> |
| </td> |
| </tr> |
| </table> |
| <!-- ==================== METHOD DETAILS ==================== --> |
| <a name="section-MethodDetails"></a> |
| <table class="details" border="1" cellpadding="3" |
| cellspacing="0" width="100%" bgcolor="white"> |
| <tr bgcolor="#70b0f0" class="table-header"> |
| <td colspan="2" class="table-header"> |
| <table border="0" cellpadding="0" cellspacing="0" width="100%"> |
| <tr valign="top"> |
| <td align="left"><span class="table-header">Method Details</span></td> |
| <td align="right" valign="top" |
| ><span class="options">[<a href="#section-MethodDetails" |
| class="privatelink" onclick="toggle_private();" |
| >hide private</a>]</span></td> |
| </tr> |
| </table> |
| </td> |
| </tr> |
| </table> |
| <a name="chunksize"></a> |
| <div> |
| <table class="details" border="1" cellpadding="3" |
| cellspacing="0" width="100%" bgcolor="white"> |
| <tr><td> |
| <table width="100%" cellpadding="0" cellspacing="0" border="0"> |
| <tr valign="top"><td> |
| <h3 class="epydoc"><span class="sig"><span class="sig-name">chunksize</span>(<span class="sig-arg">self</span>)</span> |
| </h3> |
| </td><td align="right" valign="top" |
| ><span class="codelink"><a href="googleapiclient.http-pysrc.html#MediaUpload.chunksize">source code</a></span> |
| </td> |
| </tr></table> |
| |
| <pre class="literalblock"> |
| Chunk size for resumable uploads. |
| |
| Returns: |
| Chunk size in bytes. |
| |
| </pre> |
| <dl class="fields"> |
| </dl> |
| </td></tr></table> |
| </div> |
| <a name="mimetype"></a> |
| <div> |
| <table class="details" border="1" cellpadding="3" |
| cellspacing="0" width="100%" bgcolor="white"> |
| <tr><td> |
| <table width="100%" cellpadding="0" cellspacing="0" border="0"> |
| <tr valign="top"><td> |
| <h3 class="epydoc"><span class="sig"><span class="sig-name">mimetype</span>(<span class="sig-arg">self</span>)</span> |
| </h3> |
| </td><td align="right" valign="top" |
| ><span class="codelink"><a href="googleapiclient.http-pysrc.html#MediaUpload.mimetype">source code</a></span> |
| </td> |
| </tr></table> |
| |
| <pre class="literalblock"> |
| Mime type of the body. |
| |
| Returns: |
| Mime type. |
| |
| </pre> |
| <dl class="fields"> |
| </dl> |
| </td></tr></table> |
| </div> |
| <a name="size"></a> |
| <div> |
| <table class="details" border="1" cellpadding="3" |
| cellspacing="0" width="100%" bgcolor="white"> |
| <tr><td> |
| <table width="100%" cellpadding="0" cellspacing="0" border="0"> |
| <tr valign="top"><td> |
| <h3 class="epydoc"><span class="sig"><span class="sig-name">size</span>(<span class="sig-arg">self</span>)</span> |
| </h3> |
| </td><td align="right" valign="top" |
| ><span class="codelink"><a href="googleapiclient.http-pysrc.html#MediaUpload.size">source code</a></span> |
| </td> |
| </tr></table> |
| |
| <pre class="literalblock"> |
| Size of upload. |
| |
| Returns: |
| Size of the body, or None of the size is unknown. |
| |
| </pre> |
| <dl class="fields"> |
| </dl> |
| </td></tr></table> |
| </div> |
| <a name="resumable"></a> |
| <div> |
| <table class="details" border="1" cellpadding="3" |
| cellspacing="0" width="100%" bgcolor="white"> |
| <tr><td> |
| <table width="100%" cellpadding="0" cellspacing="0" border="0"> |
| <tr valign="top"><td> |
| <h3 class="epydoc"><span class="sig"><span class="sig-name">resumable</span>(<span class="sig-arg">self</span>)</span> |
| </h3> |
| </td><td align="right" valign="top" |
| ><span class="codelink"><a href="googleapiclient.http-pysrc.html#MediaUpload.resumable">source code</a></span> |
| </td> |
| </tr></table> |
| |
| <pre class="literalblock"> |
| Whether this upload is resumable. |
| |
| Returns: |
| True if resumable upload or False. |
| |
| </pre> |
| <dl class="fields"> |
| </dl> |
| </td></tr></table> |
| </div> |
| <a name="getbytes"></a> |
| <div> |
| <table class="details" border="1" cellpadding="3" |
| cellspacing="0" width="100%" bgcolor="white"> |
| <tr><td> |
| <table width="100%" cellpadding="0" cellspacing="0" border="0"> |
| <tr valign="top"><td> |
| <h3 class="epydoc"><span class="sig"><span class="sig-name">getbytes</span>(<span class="sig-arg">self</span>, |
| <span class="sig-arg">begin</span>, |
| <span class="sig-arg">end</span>)</span> |
| </h3> |
| </td><td align="right" valign="top" |
| ><span class="codelink"><a href="googleapiclient.http-pysrc.html#MediaUpload.getbytes">source code</a></span> |
| </td> |
| </tr></table> |
| |
| <pre class="literalblock"> |
| Get bytes from the media. |
| |
| Args: |
| begin: int, offset from beginning of file. |
| length: int, number of bytes to read, starting at begin. |
| |
| Returns: |
| A string of bytes read. May be shorter than length if EOF was reached |
| first. |
| |
| </pre> |
| <dl class="fields"> |
| </dl> |
| </td></tr></table> |
| </div> |
| <a name="has_stream"></a> |
| <div> |
| <table class="details" border="1" cellpadding="3" |
| cellspacing="0" width="100%" bgcolor="white"> |
| <tr><td> |
| <table width="100%" cellpadding="0" cellspacing="0" border="0"> |
| <tr valign="top"><td> |
| <h3 class="epydoc"><span class="sig"><span class="sig-name">has_stream</span>(<span class="sig-arg">self</span>)</span> |
| </h3> |
| </td><td align="right" valign="top" |
| ><span class="codelink"><a href="googleapiclient.http-pysrc.html#MediaUpload.has_stream">source code</a></span> |
| </td> |
| </tr></table> |
| |
| <pre class="literalblock"> |
| Does the underlying upload support a streaming interface. |
| |
| Streaming means it is an io.IOBase subclass that supports seek, i.e. |
| seekable() returns True. |
| |
| Returns: |
| True if the call to stream() will return an instance of a seekable io.Base |
| subclass. |
| |
| </pre> |
| <dl class="fields"> |
| </dl> |
| </td></tr></table> |
| </div> |
| <a name="stream"></a> |
| <div> |
| <table class="details" border="1" cellpadding="3" |
| cellspacing="0" width="100%" bgcolor="white"> |
| <tr><td> |
| <table width="100%" cellpadding="0" cellspacing="0" border="0"> |
| <tr valign="top"><td> |
| <h3 class="epydoc"><span class="sig"><span class="sig-name">stream</span>(<span class="sig-arg">self</span>)</span> |
| </h3> |
| </td><td align="right" valign="top" |
| ><span class="codelink"><a href="googleapiclient.http-pysrc.html#MediaUpload.stream">source code</a></span> |
| </td> |
| </tr></table> |
| |
| <pre class="literalblock"> |
| A stream interface to the data being uploaded. |
| |
| Returns: |
| The returned value is an io.IOBase subclass that supports seek, i.e. |
| seekable() returns True. |
| |
| </pre> |
| <dl class="fields"> |
| </dl> |
| </td></tr></table> |
| </div> |
| <a name="_to_json"></a> |
| <div class="private"> |
| <table class="details" border="1" cellpadding="3" |
| cellspacing="0" width="100%" bgcolor="white"> |
| <tr><td> |
| <table width="100%" cellpadding="0" cellspacing="0" border="0"> |
| <tr valign="top"><td> |
| <h3 class="epydoc"><span class="sig"><span class="sig-name">_to_json</span>(<span class="sig-arg">self</span>, |
| <span class="sig-arg">strip</span>=<span class="sig-default">None</span>)</span> |
| </h3> |
| </td><td align="right" valign="top" |
| ><span class="codelink"><a href="googleapiclient.http-pysrc.html#MediaUpload._to_json">source code</a></span> |
| </td> |
| </tr></table> |
| |
| <pre class="literalblock"> |
| Utility function for creating a JSON representation of a MediaUpload. |
| |
| Args: |
| strip: array, An array of names of members to not include in the JSON. |
| |
| Returns: |
| string, a JSON representation of this instance, suitable to pass to |
| from_json(). |
| |
| </pre> |
| <dl class="fields"> |
| <dt>Decorators:</dt> |
| <dd><ul class="nomargin-top"> |
| <li><code>@util.positional(1)</code></li> |
| </ul></dd> |
| </dl> |
| </td></tr></table> |
| </div> |
| <a name="to_json"></a> |
| <div> |
| <table class="details" border="1" cellpadding="3" |
| cellspacing="0" width="100%" bgcolor="white"> |
| <tr><td> |
| <table width="100%" cellpadding="0" cellspacing="0" border="0"> |
| <tr valign="top"><td> |
| <h3 class="epydoc"><span class="sig"><span class="sig-name">to_json</span>(<span class="sig-arg">self</span>)</span> |
| </h3> |
| </td><td align="right" valign="top" |
| ><span class="codelink"><a href="googleapiclient.http-pysrc.html#MediaUpload.to_json">source code</a></span> |
| </td> |
| </tr></table> |
| |
| <pre class="literalblock"> |
| Create a JSON representation of an instance of MediaUpload. |
| |
| Returns: |
| string, a JSON representation of this instance, suitable to pass to |
| from_json(). |
| |
| </pre> |
| <dl class="fields"> |
| </dl> |
| </td></tr></table> |
| </div> |
| <a name="new_from_json"></a> |
| <div> |
| <table class="details" border="1" cellpadding="3" |
| cellspacing="0" width="100%" bgcolor="white"> |
| <tr><td> |
| <table width="100%" cellpadding="0" cellspacing="0" border="0"> |
| <tr valign="top"><td> |
| <h3 class="epydoc"><span class="sig"><span class="sig-name">new_from_json</span>(<span class="sig-arg">cls</span>, |
| <span class="sig-arg">s</span>)</span> |
| <br /><em class="fname">Class Method</em> |
| </h3> |
| </td><td align="right" valign="top" |
| ><span class="codelink"><a href="googleapiclient.http-pysrc.html#MediaUpload.new_from_json">source code</a></span> |
| </td> |
| </tr></table> |
| |
| <pre class="literalblock"> |
| Utility class method to instantiate a MediaUpload subclass from a JSON |
| representation produced by to_json(). |
| |
| Args: |
| s: string, JSON from to_json(). |
| |
| Returns: |
| An instance of the subclass of MediaUpload that was serialized with |
| to_json(). |
| |
| </pre> |
| <dl class="fields"> |
| </dl> |
| </td></tr></table> |
| </div> |
| <br /> |
| <!-- ==================== NAVIGATION BAR ==================== --> |
| <table class="navbar" border="0" width="100%" cellpadding="0" |
| bgcolor="#a0c0ff" cellspacing="0"> |
| <tr valign="middle"> |
| <!-- Home link --> |
| <th> <a |
| href="googleapiclient-module.html">Home</a> </th> |
| |
| <!-- Tree link --> |
| <th> <a |
| href="module-tree.html">Trees</a> </th> |
| |
| <!-- Index link --> |
| <th> <a |
| href="identifier-index.html">Indices</a> </th> |
| |
| <!-- Help link --> |
| <th> <a |
| href="help.html">Help</a> </th> |
| |
| <th class="navbar" width="100%"></th> |
| </tr> |
| </table> |
| <table border="0" cellpadding="0" cellspacing="0" width="100%%"> |
| <tr> |
| <td align="left" class="footer"> |
| Generated by Epydoc 3.0.1 on Thu Aug 14 00:45:19 2014 |
| </td> |
| <td align="right" class="footer"> |
| <a target="mainFrame" href="http://epydoc.sourceforge.net" |
| >http://epydoc.sourceforge.net</a> |
| </td> |
| </tr> |
| </table> |
| |
| <script type="text/javascript"> |
| <!-- |
| // Private objects are initially displayed (because if |
| // javascript is turned off then we want them to be |
| // visible); but by default, we want to hide them. So hide |
| // them unless we have a cookie that says to show them. |
| checkCookie(); |
| // --> |
| </script> |
| </body> |
| </html> |