1<html><body>
2<style>
3
4body, h1, h2, h3, div, span, p, pre, a {
5  margin: 0;
6  padding: 0;
7  border: 0;
8  font-weight: inherit;
9  font-style: inherit;
10  font-size: 100%;
11  font-family: inherit;
12  vertical-align: baseline;
13}
14
15body {
16  font-size: 13px;
17  padding: 1em;
18}
19
20h1 {
21  font-size: 26px;
22  margin-bottom: 1em;
23}
24
25h2 {
26  font-size: 24px;
27  margin-bottom: 1em;
28}
29
30h3 {
31  font-size: 20px;
32  margin-bottom: 1em;
33  margin-top: 1em;
34}
35
36pre, code {
37  line-height: 1.5;
38  font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace;
39}
40
41pre {
42  margin-top: 0.5em;
43}
44
45h1, h2, h3, p {
46  font-family: Arial, sans serif;
47}
48
49h1, h2, h3 {
50  border-bottom: solid #CCC 1px;
51}
52
53.toc_element {
54  margin-top: 0.5em;
55}
56
57.firstline {
58  margin-left: 2 em;
59}
60
61.method  {
62  margin-top: 1em;
63  border: solid 1px #CCC;
64  padding: 1em;
65  background: #EEE;
66}
67
68.details {
69  font-weight: bold;
70  font-size: 14px;
71}
72
73</style>
74
75<h1><a href="drive_v3.html">Drive API</a> . <a href="drive_v3.revisions.html">revisions</a></h1>
76<h2>Instance Methods</h2>
77<p class="toc_element">
78  <code><a href="#close">close()</a></code></p>
79<p class="firstline">Close httplib2 connections.</p>
80<p class="toc_element">
81  <code><a href="#delete">delete(fileId, revisionId)</a></code></p>
82<p class="firstline">Permanently deletes a file version. You can only delete revisions for files with binary content in Google Drive, like images or videos. Revisions for other files, like Google Docs or Sheets, and the last remaining file version can't be deleted.</p>
83<p class="toc_element">
84  <code><a href="#get">get(fileId, revisionId, acknowledgeAbuse=None)</a></code></p>
85<p class="firstline">Gets a revision's metadata or content by ID.</p>
86<p class="toc_element">
87  <code><a href="#get_media">get_media(fileId, revisionId, acknowledgeAbuse=None)</a></code></p>
88<p class="firstline">Gets a revision's metadata or content by ID.</p>
89<p class="toc_element">
90  <code><a href="#list">list(fileId, pageSize=None, pageToken=None)</a></code></p>
91<p class="firstline">Lists a file's revisions.</p>
92<p class="toc_element">
93  <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p>
94<p class="firstline">Retrieves the next page of results.</p>
95<p class="toc_element">
96  <code><a href="#update">update(fileId, revisionId, body=None)</a></code></p>
97<p class="firstline">Updates a revision with patch semantics.</p>
98<h3>Method Details</h3>
99<div class="method">
100    <code class="details" id="close">close()</code>
101  <pre>Close httplib2 connections.</pre>
102</div>
103
104<div class="method">
105    <code class="details" id="delete">delete(fileId, revisionId)</code>
106  <pre>Permanently deletes a file version. You can only delete revisions for files with binary content in Google Drive, like images or videos. Revisions for other files, like Google Docs or Sheets, and the last remaining file version can&#x27;t be deleted.
107
108Args:
109  fileId: string, The ID of the file. (required)
110  revisionId: string, The ID of the revision. (required)
111</pre>
112</div>
113
114<div class="method">
115    <code class="details" id="get">get(fileId, revisionId, acknowledgeAbuse=None)</code>
116  <pre>Gets a revision&#x27;s metadata or content by ID.
117
118Args:
119  fileId: string, The ID of the file. (required)
120  revisionId: string, The ID of the revision. (required)
121  acknowledgeAbuse: boolean, Whether the user is acknowledging the risk of downloading known malware or other abusive files. This is only applicable when alt=media.
122
123Returns:
124  An object of the form:
125
126    { # The metadata for a revision to a file.
127  &quot;exportLinks&quot;: { # Links for exporting Docs Editors files to specific formats.
128    &quot;a_key&quot;: &quot;A String&quot;, # A mapping from export format to URL
129  },
130  &quot;id&quot;: &quot;A String&quot;, # The ID of the revision.
131  &quot;keepForever&quot;: True or False, # Whether to keep this revision forever, even if it is no longer the head revision. If not set, the revision will be automatically purged 30 days after newer content is uploaded. This can be set on a maximum of 200 revisions for a file.
132      # This field is only applicable to files with binary content in Drive.
133  &quot;kind&quot;: &quot;drive#revision&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;drive#revision&quot;.
134  &quot;lastModifyingUser&quot;: { # Information about a Drive user. # The last user to modify this revision.
135    &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
136    &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user. This may not be present in certain contexts if the user has not made their email address visible to the requester.
137    &quot;kind&quot;: &quot;drive#user&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;drive#user&quot;.
138    &quot;me&quot;: True or False, # Whether this user is the requesting user.
139    &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in Permission resources.
140    &quot;photoLink&quot;: &quot;A String&quot;, # A link to the user&#x27;s profile photo, if available.
141  },
142  &quot;md5Checksum&quot;: &quot;A String&quot;, # The MD5 checksum of the revision&#x27;s content. This is only applicable to files with binary content in Drive.
143  &quot;mimeType&quot;: &quot;A String&quot;, # The MIME type of the revision.
144  &quot;modifiedTime&quot;: &quot;A String&quot;, # The last time the revision was modified (RFC 3339 date-time).
145  &quot;originalFilename&quot;: &quot;A String&quot;, # The original filename used to create this revision. This is only applicable to files with binary content in Drive.
146  &quot;publishAuto&quot;: True or False, # Whether subsequent revisions will be automatically republished. This is only applicable to Docs Editors files.
147  &quot;published&quot;: True or False, # Whether this revision is published. This is only applicable to Docs Editors files.
148  &quot;publishedLink&quot;: &quot;A String&quot;, # A link to the published revision. This is only populated for Google Sites files.
149  &quot;publishedOutsideDomain&quot;: True or False, # Whether this revision is published outside the domain. This is only applicable to Docs Editors files.
150  &quot;size&quot;: &quot;A String&quot;, # The size of the revision&#x27;s content in bytes. This is only applicable to files with binary content in Drive.
151}</pre>
152</div>
153
154<div class="method">
155    <code class="details" id="get_media">get_media(fileId, revisionId, acknowledgeAbuse=None)</code>
156  <pre>Gets a revision&#x27;s metadata or content by ID.
157
158Args:
159  fileId: string, The ID of the file. (required)
160  revisionId: string, The ID of the revision. (required)
161  acknowledgeAbuse: boolean, Whether the user is acknowledging the risk of downloading known malware or other abusive files. This is only applicable when alt=media.
162
163Returns:
164  The media object as a string.
165
166    </pre>
167</div>
168
169<div class="method">
170    <code class="details" id="list">list(fileId, pageSize=None, pageToken=None)</code>
171  <pre>Lists a file&#x27;s revisions.
172
173Args:
174  fileId: string, The ID of the file. (required)
175  pageSize: integer, The maximum number of revisions to return per page.
176  pageToken: string, The token for continuing a previous list request on the next page. This should be set to the value of &#x27;nextPageToken&#x27; from the previous response.
177
178Returns:
179  An object of the form:
180
181    { # A list of revisions of a file.
182  &quot;kind&quot;: &quot;drive#revisionList&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;drive#revisionList&quot;.
183  &quot;nextPageToken&quot;: &quot;A String&quot;, # The page token for the next page of revisions. This will be absent if the end of the revisions list has been reached. If the token is rejected for any reason, it should be discarded, and pagination should be restarted from the first page of results.
184  &quot;revisions&quot;: [ # The list of revisions. If nextPageToken is populated, then this list may be incomplete and an additional page of results should be fetched.
185    { # The metadata for a revision to a file.
186      &quot;exportLinks&quot;: { # Links for exporting Docs Editors files to specific formats.
187        &quot;a_key&quot;: &quot;A String&quot;, # A mapping from export format to URL
188      },
189      &quot;id&quot;: &quot;A String&quot;, # The ID of the revision.
190      &quot;keepForever&quot;: True or False, # Whether to keep this revision forever, even if it is no longer the head revision. If not set, the revision will be automatically purged 30 days after newer content is uploaded. This can be set on a maximum of 200 revisions for a file.
191          # This field is only applicable to files with binary content in Drive.
192      &quot;kind&quot;: &quot;drive#revision&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;drive#revision&quot;.
193      &quot;lastModifyingUser&quot;: { # Information about a Drive user. # The last user to modify this revision.
194        &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
195        &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user. This may not be present in certain contexts if the user has not made their email address visible to the requester.
196        &quot;kind&quot;: &quot;drive#user&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;drive#user&quot;.
197        &quot;me&quot;: True or False, # Whether this user is the requesting user.
198        &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in Permission resources.
199        &quot;photoLink&quot;: &quot;A String&quot;, # A link to the user&#x27;s profile photo, if available.
200      },
201      &quot;md5Checksum&quot;: &quot;A String&quot;, # The MD5 checksum of the revision&#x27;s content. This is only applicable to files with binary content in Drive.
202      &quot;mimeType&quot;: &quot;A String&quot;, # The MIME type of the revision.
203      &quot;modifiedTime&quot;: &quot;A String&quot;, # The last time the revision was modified (RFC 3339 date-time).
204      &quot;originalFilename&quot;: &quot;A String&quot;, # The original filename used to create this revision. This is only applicable to files with binary content in Drive.
205      &quot;publishAuto&quot;: True or False, # Whether subsequent revisions will be automatically republished. This is only applicable to Docs Editors files.
206      &quot;published&quot;: True or False, # Whether this revision is published. This is only applicable to Docs Editors files.
207      &quot;publishedLink&quot;: &quot;A String&quot;, # A link to the published revision. This is only populated for Google Sites files.
208      &quot;publishedOutsideDomain&quot;: True or False, # Whether this revision is published outside the domain. This is only applicable to Docs Editors files.
209      &quot;size&quot;: &quot;A String&quot;, # The size of the revision&#x27;s content in bytes. This is only applicable to files with binary content in Drive.
210    },
211  ],
212}</pre>
213</div>
214
215<div class="method">
216    <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
217  <pre>Retrieves the next page of results.
218
219Args:
220  previous_request: The request for the previous page. (required)
221  previous_response: The response from the request for the previous page. (required)
222
223Returns:
224  A request object that you can call &#x27;execute()&#x27; on to request the next
225  page. Returns None if there are no more items in the collection.
226    </pre>
227</div>
228
229<div class="method">
230    <code class="details" id="update">update(fileId, revisionId, body=None)</code>
231  <pre>Updates a revision with patch semantics.
232
233Args:
234  fileId: string, The ID of the file. (required)
235  revisionId: string, The ID of the revision. (required)
236  body: object, The request body.
237    The object takes the form of:
238
239{ # The metadata for a revision to a file.
240  &quot;exportLinks&quot;: { # Links for exporting Docs Editors files to specific formats.
241    &quot;a_key&quot;: &quot;A String&quot;, # A mapping from export format to URL
242  },
243  &quot;id&quot;: &quot;A String&quot;, # The ID of the revision.
244  &quot;keepForever&quot;: True or False, # Whether to keep this revision forever, even if it is no longer the head revision. If not set, the revision will be automatically purged 30 days after newer content is uploaded. This can be set on a maximum of 200 revisions for a file.
245      # This field is only applicable to files with binary content in Drive.
246  &quot;kind&quot;: &quot;drive#revision&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;drive#revision&quot;.
247  &quot;lastModifyingUser&quot;: { # Information about a Drive user. # The last user to modify this revision.
248    &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
249    &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user. This may not be present in certain contexts if the user has not made their email address visible to the requester.
250    &quot;kind&quot;: &quot;drive#user&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;drive#user&quot;.
251    &quot;me&quot;: True or False, # Whether this user is the requesting user.
252    &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in Permission resources.
253    &quot;photoLink&quot;: &quot;A String&quot;, # A link to the user&#x27;s profile photo, if available.
254  },
255  &quot;md5Checksum&quot;: &quot;A String&quot;, # The MD5 checksum of the revision&#x27;s content. This is only applicable to files with binary content in Drive.
256  &quot;mimeType&quot;: &quot;A String&quot;, # The MIME type of the revision.
257  &quot;modifiedTime&quot;: &quot;A String&quot;, # The last time the revision was modified (RFC 3339 date-time).
258  &quot;originalFilename&quot;: &quot;A String&quot;, # The original filename used to create this revision. This is only applicable to files with binary content in Drive.
259  &quot;publishAuto&quot;: True or False, # Whether subsequent revisions will be automatically republished. This is only applicable to Docs Editors files.
260  &quot;published&quot;: True or False, # Whether this revision is published. This is only applicable to Docs Editors files.
261  &quot;publishedLink&quot;: &quot;A String&quot;, # A link to the published revision. This is only populated for Google Sites files.
262  &quot;publishedOutsideDomain&quot;: True or False, # Whether this revision is published outside the domain. This is only applicable to Docs Editors files.
263  &quot;size&quot;: &quot;A String&quot;, # The size of the revision&#x27;s content in bytes. This is only applicable to files with binary content in Drive.
264}
265
266
267Returns:
268  An object of the form:
269
270    { # The metadata for a revision to a file.
271  &quot;exportLinks&quot;: { # Links for exporting Docs Editors files to specific formats.
272    &quot;a_key&quot;: &quot;A String&quot;, # A mapping from export format to URL
273  },
274  &quot;id&quot;: &quot;A String&quot;, # The ID of the revision.
275  &quot;keepForever&quot;: True or False, # Whether to keep this revision forever, even if it is no longer the head revision. If not set, the revision will be automatically purged 30 days after newer content is uploaded. This can be set on a maximum of 200 revisions for a file.
276      # This field is only applicable to files with binary content in Drive.
277  &quot;kind&quot;: &quot;drive#revision&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;drive#revision&quot;.
278  &quot;lastModifyingUser&quot;: { # Information about a Drive user. # The last user to modify this revision.
279    &quot;displayName&quot;: &quot;A String&quot;, # A plain text displayable name for this user.
280    &quot;emailAddress&quot;: &quot;A String&quot;, # The email address of the user. This may not be present in certain contexts if the user has not made their email address visible to the requester.
281    &quot;kind&quot;: &quot;drive#user&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;drive#user&quot;.
282    &quot;me&quot;: True or False, # Whether this user is the requesting user.
283    &quot;permissionId&quot;: &quot;A String&quot;, # The user&#x27;s ID as visible in Permission resources.
284    &quot;photoLink&quot;: &quot;A String&quot;, # A link to the user&#x27;s profile photo, if available.
285  },
286  &quot;md5Checksum&quot;: &quot;A String&quot;, # The MD5 checksum of the revision&#x27;s content. This is only applicable to files with binary content in Drive.
287  &quot;mimeType&quot;: &quot;A String&quot;, # The MIME type of the revision.
288  &quot;modifiedTime&quot;: &quot;A String&quot;, # The last time the revision was modified (RFC 3339 date-time).
289  &quot;originalFilename&quot;: &quot;A String&quot;, # The original filename used to create this revision. This is only applicable to files with binary content in Drive.
290  &quot;publishAuto&quot;: True or False, # Whether subsequent revisions will be automatically republished. This is only applicable to Docs Editors files.
291  &quot;published&quot;: True or False, # Whether this revision is published. This is only applicable to Docs Editors files.
292  &quot;publishedLink&quot;: &quot;A String&quot;, # A link to the published revision. This is only populated for Google Sites files.
293  &quot;publishedOutsideDomain&quot;: True or False, # Whether this revision is published outside the domain. This is only applicable to Docs Editors files.
294  &quot;size&quot;: &quot;A String&quot;, # The size of the revision&#x27;s content in bytes. This is only applicable to files with binary content in Drive.
295}</pre>
296</div>
297
298</body></html>