Refresh docs
diff --git a/docs/apiclient.http.html b/docs/apiclient.http.html
index 0aff590..8f06991 100644
--- a/docs/apiclient.http.html
+++ b/docs/apiclient.http.html
@@ -49,6 +49,8 @@
</font></dt><dt><font face="helvetica, arial"><a href="apiclient.http.html#HttpMockSequence">HttpMockSequence</a>
</font></dt><dt><font face="helvetica, arial"><a href="apiclient.http.html#HttpRequest">HttpRequest</a>
</font></dt><dt><font face="helvetica, arial"><a href="apiclient.http.html#HttpRequestMock">HttpRequestMock</a>
+</font></dt><dt><font face="helvetica, arial"><a href="apiclient.http.html#MediaDownloadProgress">MediaDownloadProgress</a>
+</font></dt><dt><font face="helvetica, arial"><a href="apiclient.http.html#MediaIoBaseDownload">MediaIoBaseDownload</a>
</font></dt><dt><font face="helvetica, arial"><a href="apiclient.http.html#MediaUpload">MediaUpload</a>
</font></dt><dd>
<dl>
@@ -69,7 +71,26 @@
<font color="#000000" face="helvetica, arial"><a name="BatchHttpRequest">class <strong>BatchHttpRequest</strong></a>(<a href="__builtin__.html#object">__builtin__.object</a>)</font></td></tr>
<tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td>
-<td colspan=2><tt>Batches multiple <a href="#HttpRequest">HttpRequest</a> objects into a single HTTP request.<br> </tt></td></tr>
+<td colspan=2><tt>Batches multiple <a href="#HttpRequest">HttpRequest</a> objects into a single HTTP request.<br>
+ <br>
+Example:<br>
+ from apiclient.http import <a href="#BatchHttpRequest">BatchHttpRequest</a><br>
+ <br>
+ def list_animals(request_id, response):<br>
+ """Do something with the animals list response."""<br>
+ pass<br>
+ <br>
+ def list_farmers(request_id, response):<br>
+ """Do something with the farmers list response."""<br>
+ pass<br>
+ <br>
+ service = build('farm', 'v2')<br>
+ <br>
+ batch = <a href="#BatchHttpRequest">BatchHttpRequest</a>()<br>
+ <br>
+ batch.<a href="#BatchHttpRequest-add">add</a>(service.animals().list(), list_animals)<br>
+ batch.<a href="#BatchHttpRequest-add">add</a>(service.farmers().list(), list_farmers)<br>
+ batch.<a href="#BatchHttpRequest-execute">execute</a>(http)<br> </tt></td></tr>
<tr><td> </td>
<td width="100%">Methods defined here:<br>
<dl><dt><a name="BatchHttpRequest-__init__"><strong>__init__</strong></a>(self, callback<font color="#909090">=None</font>, batch_uri<font color="#909090">=None</font>)</dt><dd><tt>Constructor for a <a href="#BatchHttpRequest">BatchHttpRequest</a>.<br>
@@ -102,7 +123,7 @@
None<br>
<br>
Raises:<br>
- BatchError if a resumable request is added to a batch.<br>
+ BatchError if a media request is added to a batch.<br>
KeyError is the request_id is not unique.</tt></dd></dl>
<dl><dt><a name="BatchHttpRequest-execute"><strong>execute</strong></a>(self, http<font color="#909090">=None</font>)</dt><dd><tt>Execute all the requests as a single batched HTTP request.<br>
@@ -239,11 +260,11 @@
<br>
Example:<br>
<br>
- media = <a href="#MediaFileUpload">MediaFileUpload</a>('smiley.png', mimetype='image/png',<br>
+ media = <a href="#MediaFileUpload">MediaFileUpload</a>('cow.png', mimetype='image/png',<br>
chunksize=1000, resumable=True)<br>
- request = service.objects().insert(<br>
- bucket=buckets['items'][0]['id'],<br>
- name='smiley.png',<br>
+ request = farm.animals().insert(<br>
+ id='cow',<br>
+ name='cow.png',<br>
media_body=media)<br>
<br>
response = None<br>
@@ -312,6 +333,36 @@
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ffc8d8">
<td colspan=3 valign=bottom> <br>
+<font color="#000000" face="helvetica, arial"><a name="MediaDownloadProgress">class <strong>MediaDownloadProgress</strong></a>(<a href="__builtin__.html#object">__builtin__.object</a>)</font></td></tr>
+
+<tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td>
+<td colspan=2><tt>Status of a resumable download.<br> </tt></td></tr>
+<tr><td> </td>
+<td width="100%">Methods defined here:<br>
+<dl><dt><a name="MediaDownloadProgress-__init__"><strong>__init__</strong></a>(self, resumable_progress, total_size)</dt><dd><tt>Constructor.<br>
+ <br>
+Args:<br>
+ resumable_progress: int, bytes received so far.<br>
+ total_size: int, total bytes in complete download.</tt></dd></dl>
+
+<dl><dt><a name="MediaDownloadProgress-progress"><strong>progress</strong></a>(self)</dt><dd><tt>Percent of download completed, as a float.<br>
+ <br>
+Returns:<br>
+ the percentage complete as a float, returning 0.0 if the total size of<br>
+ the download is unknown.</tt></dd></dl>
+
+<hr>
+Data descriptors defined here:<br>
+<dl><dt><strong>__dict__</strong></dt>
+<dd><tt>dictionary for instance variables (if defined)</tt></dd>
+</dl>
+<dl><dt><strong>__weakref__</strong></dt>
+<dd><tt>list of weak references to the object (if defined)</tt></dd>
+</dl>
+</td></tr></table> <p>
+<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
+<tr bgcolor="#ffc8d8">
+<td colspan=3 valign=bottom> <br>
<font color="#000000" face="helvetica, arial"><a name="MediaFileUpload">class <strong>MediaFileUpload</strong></a>(<a href="apiclient.http.html#MediaUpload">MediaUpload</a>)</font></td></tr>
<tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td>
@@ -321,11 +372,11 @@
method. For example, if we had a service that allowed uploading images:<br>
<br>
<br>
- media = <a href="#MediaFileUpload">MediaFileUpload</a>('smiley.png', mimetype='image/png',<br>
+ media = <a href="#MediaFileUpload">MediaFileUpload</a>('cow.png', mimetype='image/png',<br>
chunksize=1024*1024, resumable=True)<br>
- service.objects().insert(<br>
- bucket=buckets['items'][0]['id'],<br>
- name='smiley.png',<br>
+ farm.animals()..insert(<br>
+ id='cow',<br>
+ name='cow.png',<br>
media_body=media).execute()<br> </tt></td></tr>
<tr><td> </td>
<td width="100%"><dl><dt>Method resolution order:</dt>
@@ -376,7 +427,7 @@
Returns:<br>
Size of the body, or None of the size is unknown.</tt></dd></dl>
-<dl><dt><a name="MediaFileUpload-to_json"><strong>to_json</strong></a>(self)</dt><dd><tt>Creating a JSON representation of an instance of Credentials.<br>
+<dl><dt><a name="MediaFileUpload-to_json"><strong>to_json</strong></a>(self)</dt><dd><tt>Creating a JSON representation of an instance of <a href="#MediaFileUpload">MediaFileUpload</a>.<br>
<br>
Returns:<br>
string, a JSON representation of this instance, suitable to pass to<br>
@@ -416,7 +467,7 @@
<td colspan=2><tt><a href="#MediaUpload">MediaUpload</a> for a chunk of bytes.<br>
<br>
Construct a <a href="#MediaFileUpload">MediaFileUpload</a> and pass as the media_body parameter of the<br>
-method. For example, if we had a service that allowed plain text:<br> </tt></td></tr>
+method.<br> </tt></td></tr>
<tr><td> </td>
<td width="100%"><dl><dt>Method resolution order:</dt>
<dd><a href="apiclient.http.html#MediaInMemoryUpload">MediaInMemoryUpload</a></dd>
@@ -500,6 +551,60 @@
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ffc8d8">
<td colspan=3 valign=bottom> <br>
+<font color="#000000" face="helvetica, arial"><a name="MediaIoBaseDownload">class <strong>MediaIoBaseDownload</strong></a>(<a href="__builtin__.html#object">__builtin__.object</a>)</font></td></tr>
+
+<tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td>
+<td colspan=2><tt>"Download media resources.<br>
+ <br>
+Note that the Python file <a href="__builtin__.html#object">object</a> is compatible with io.Base and can be used<br>
+with this class also.<br>
+ <br>
+ <br>
+Example:<br>
+ request = farms.animals().get_media(id='cow')<br>
+ fh = io.FileIO('cow.png', mode='wb')<br>
+ downloader = <a href="#MediaIoBaseDownload">MediaIoBaseDownload</a>(fh, request, chunksize=1024*1024)<br>
+ <br>
+ done = False<br>
+ while done is False:<br>
+ status, done = downloader.<a href="#MediaIoBaseDownload-next_chunk">next_chunk</a>()<br>
+ if status:<br>
+ print "Download %d%%." % int(status.progress() * 100)<br>
+ print "Download Complete!"<br> </tt></td></tr>
+<tr><td> </td>
+<td width="100%">Methods defined here:<br>
+<dl><dt><a name="MediaIoBaseDownload-__init__"><strong>__init__</strong></a>(self, fh, request, chunksize<font color="#909090">=524288</font>)</dt><dd><tt>Constructor.<br>
+ <br>
+Args:<br>
+ fh: io.Base or file <a href="__builtin__.html#object">object</a>, The stream in which to write the downloaded<br>
+ bytes.<br>
+ request: apiclient.http.<a href="#HttpRequest">HttpRequest</a>, the media request to perform in<br>
+ chunks.<br>
+ chunksize: int, File will be downloaded in chunks of this many bytes.</tt></dd></dl>
+
+<dl><dt><a name="MediaIoBaseDownload-next_chunk"><strong>next_chunk</strong></a>(self)</dt><dd><tt>Get the next chunk of the download.<br>
+ <br>
+Returns:<br>
+ (status, done): (MediaDownloadStatus, boolean)<br>
+ The value of 'done' will be True when the media has been fully<br>
+ downloaded.<br>
+ <br>
+Raises:<br>
+ apiclient.errors.HttpError if the response was not a 2xx.<br>
+ httplib2.Error if a transport error has occured.</tt></dd></dl>
+
+<hr>
+Data descriptors defined here:<br>
+<dl><dt><strong>__dict__</strong></dt>
+<dd><tt>dictionary for instance variables (if defined)</tt></dd>
+</dl>
+<dl><dt><strong>__weakref__</strong></dt>
+<dd><tt>list of weak references to the object (if defined)</tt></dd>
+</dl>
+</td></tr></table> <p>
+<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
+<tr bgcolor="#ffc8d8">
+<td colspan=3 valign=bottom> <br>
<font color="#000000" face="helvetica, arial"><a name="MediaIoBaseUpload">class <strong>MediaIoBaseUpload</strong></a>(<a href="apiclient.http.html#MediaUpload">MediaUpload</a>)</font></td></tr>
<tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td>
@@ -511,9 +616,9 @@
fh = io.BytesIO('...Some data to upload...')<br>
media = <a href="#MediaIoBaseUpload">MediaIoBaseUpload</a>(fh, mimetype='image/png',<br>
chunksize=1024*1024, resumable=True)<br>
- service.objects().insert(<br>
- bucket='a_bucket_id',<br>
- name='smiley.png',<br>
+ farm.animals().insert(<br>
+ id='cow',<br>
+ name='cow.png',<br>
media_body=media).execute()<br> </tt></td></tr>
<tr><td> </td>
<td width="100%"><dl><dt>Method resolution order:</dt>