Add _media methods and support for resumable media download.
TBR: http://codereview.appspot.com/6295077/
diff --git a/apiclient/model.py b/apiclient/model.py
index aafd88b..0e31053 100644
--- a/apiclient/model.py
+++ b/apiclient/model.py
@@ -289,6 +289,25 @@
return ''
+class MediaModel(JsonModel):
+ """Model class for requests that return Media.
+
+ Serializes and de-serializes between JSON and the Python
+ object representation of HTTP request, and returns the raw bytes
+ of the response body.
+ """
+ accept = '*/*'
+ content_type = 'application/json'
+ alt_param = 'media'
+
+ def deserialize(self, content):
+ return content
+
+ @property
+ def no_content_response(self):
+ return ''
+
+
class ProtocolBufferModel(BaseModel):
"""Model class for protocol buffers.