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="#delete">delete(fileId, revisionId)</a></code></p>
79<p class="firstline">Permanently deletes a revision. This method is only applicable to files with binary content in Drive.</p>
80<p class="toc_element">
81  <code><a href="#get">get(fileId, revisionId, acknowledgeAbuse=None)</a></code></p>
82<p class="firstline">Gets a revision's metadata or content by ID.</p>
83<p class="toc_element">
84  <code><a href="#get_media">get_media(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="#list">list(fileId, pageToken=None, pageSize=None)</a></code></p>
88<p class="firstline">Lists a file's revisions.</p>
89<p class="toc_element">
90  <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p>
91<p class="firstline">Retrieves the next page of results.</p>
92<p class="toc_element">
93  <code><a href="#update">update(fileId, revisionId, body)</a></code></p>
94<p class="firstline">Updates a revision with patch semantics.</p>
95<h3>Method Details</h3>
96<div class="method">
97    <code class="details" id="delete">delete(fileId, revisionId)</code>
98  <pre>Permanently deletes a revision. This method is only applicable to files with binary content in Drive.
99
100Args:
101  fileId: string, The ID of the file. (required)
102  revisionId: string, The ID of the revision. (required)
103</pre>
104</div>
105
106<div class="method">
107    <code class="details" id="get">get(fileId, revisionId, acknowledgeAbuse=None)</code>
108  <pre>Gets a revision's metadata or content by ID.
109
110Args:
111  fileId: string, The ID of the file. (required)
112  revisionId: string, The ID of the revision. (required)
113  acknowledgeAbuse: boolean, Whether the user is acknowledging the risk of downloading known malware or other abusive files. This is only applicable when alt=media.
114
115Returns:
116  An object of the form:
117
118    { # The metadata for a revision to a file.
119    "mimeType": "A String", # The MIME type of the revision.
120    "kind": "drive#revision", # Identifies what kind of resource this is. Value: the fixed string "drive#revision".
121    "modifiedTime": "A String", # The last time the revision was modified (RFC 3339 date-time).
122    "lastModifyingUser": { # Information about a Drive user. # The last user to modify this revision.
123      "me": True or False, # Whether this user is the requesting user.
124      "kind": "drive#user", # Identifies what kind of resource this is. Value: the fixed string "drive#user".
125      "displayName": "A String", # A plain text displayable name for this user.
126      "permissionId": "A String", # The user's ID as visible in Permission resources.
127      "emailAddress": "A String", # 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.
128      "photoLink": "A String", # A link to the user's profile photo, if available.
129    },
130    "keepForever": 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.
131        # This field is only applicable to files with binary content in Drive.
132    "publishAuto": True or False, # Whether subsequent revisions will be automatically republished. This is only applicable to Google Docs.
133    "originalFilename": "A String", # The original filename used to create this revision. This is only applicable to files with binary content in Drive.
134    "published": True or False, # Whether this revision is published. This is only applicable to Google Docs.
135    "size": "A String", # The size of the revision's content in bytes. This is only applicable to files with binary content in Drive.
136    "id": "A String", # The ID of the revision.
137    "md5Checksum": "A String", # The MD5 checksum of the revision's content. This is only applicable to files with binary content in Drive.
138    "publishedOutsideDomain": True or False, # Whether this revision is published outside the domain. This is only applicable to Google Docs.
139  }</pre>
140</div>
141
142<div class="method">
143    <code class="details" id="get_media">get_media(fileId, revisionId, acknowledgeAbuse=None)</code>
144  <pre>Gets a revision's metadata or content by ID.
145
146Args:
147  fileId: string, The ID of the file. (required)
148  revisionId: string, The ID of the revision. (required)
149  acknowledgeAbuse: boolean, Whether the user is acknowledging the risk of downloading known malware or other abusive files. This is only applicable when alt=media.
150
151Returns:
152  The media object as a string.
153
154    </pre>
155</div>
156
157<div class="method">
158    <code class="details" id="list">list(fileId, pageToken=None, pageSize=None)</code>
159  <pre>Lists a file's revisions.
160
161Args:
162  fileId: string, The ID of the file. (required)
163  pageToken: string, The token for continuing a previous list request on the next page. This should be set to the value of 'nextPageToken' from the previous response.
164  pageSize: integer, The maximum number of revisions to return per page.
165
166Returns:
167  An object of the form:
168
169    { # A list of revisions of a file.
170    "nextPageToken": "A String", # The page token for the next page of revisions. This will be absent if the end of the revisions list has been reached.
171    "kind": "drive#revisionList", # Identifies what kind of resource this is. Value: the fixed string "drive#revisionList".
172    "revisions": [ # The full list of revisions.
173      { # The metadata for a revision to a file.
174        "mimeType": "A String", # The MIME type of the revision.
175        "kind": "drive#revision", # Identifies what kind of resource this is. Value: the fixed string "drive#revision".
176        "modifiedTime": "A String", # The last time the revision was modified (RFC 3339 date-time).
177        "lastModifyingUser": { # Information about a Drive user. # The last user to modify this revision.
178          "me": True or False, # Whether this user is the requesting user.
179          "kind": "drive#user", # Identifies what kind of resource this is. Value: the fixed string "drive#user".
180          "displayName": "A String", # A plain text displayable name for this user.
181          "permissionId": "A String", # The user's ID as visible in Permission resources.
182          "emailAddress": "A String", # 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.
183          "photoLink": "A String", # A link to the user's profile photo, if available.
184        },
185        "keepForever": 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.
186            # This field is only applicable to files with binary content in Drive.
187        "publishAuto": True or False, # Whether subsequent revisions will be automatically republished. This is only applicable to Google Docs.
188        "originalFilename": "A String", # The original filename used to create this revision. This is only applicable to files with binary content in Drive.
189        "published": True or False, # Whether this revision is published. This is only applicable to Google Docs.
190        "size": "A String", # The size of the revision's content in bytes. This is only applicable to files with binary content in Drive.
191        "id": "A String", # The ID of the revision.
192        "md5Checksum": "A String", # The MD5 checksum of the revision's content. This is only applicable to files with binary content in Drive.
193        "publishedOutsideDomain": True or False, # Whether this revision is published outside the domain. This is only applicable to Google Docs.
194      },
195    ],
196  }</pre>
197</div>
198
199<div class="method">
200    <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
201  <pre>Retrieves the next page of results.
202
203Args:
204  previous_request: The request for the previous page. (required)
205  previous_response: The response from the request for the previous page. (required)
206
207Returns:
208  A request object that you can call 'execute()' on to request the next
209  page. Returns None if there are no more items in the collection.
210    </pre>
211</div>
212
213<div class="method">
214    <code class="details" id="update">update(fileId, revisionId, body)</code>
215  <pre>Updates a revision with patch semantics.
216
217Args:
218  fileId: string, The ID of the file. (required)
219  revisionId: string, The ID of the revision. (required)
220  body: object, The request body. (required)
221    The object takes the form of:
222
223{ # The metadata for a revision to a file.
224  "mimeType": "A String", # The MIME type of the revision.
225  "kind": "drive#revision", # Identifies what kind of resource this is. Value: the fixed string "drive#revision".
226  "modifiedTime": "A String", # The last time the revision was modified (RFC 3339 date-time).
227  "lastModifyingUser": { # Information about a Drive user. # The last user to modify this revision.
228    "me": True or False, # Whether this user is the requesting user.
229    "kind": "drive#user", # Identifies what kind of resource this is. Value: the fixed string "drive#user".
230    "displayName": "A String", # A plain text displayable name for this user.
231    "permissionId": "A String", # The user's ID as visible in Permission resources.
232    "emailAddress": "A String", # 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.
233    "photoLink": "A String", # A link to the user's profile photo, if available.
234  },
235  "keepForever": 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.
236      # This field is only applicable to files with binary content in Drive.
237  "publishAuto": True or False, # Whether subsequent revisions will be automatically republished. This is only applicable to Google Docs.
238  "originalFilename": "A String", # The original filename used to create this revision. This is only applicable to files with binary content in Drive.
239  "published": True or False, # Whether this revision is published. This is only applicable to Google Docs.
240  "size": "A String", # The size of the revision's content in bytes. This is only applicable to files with binary content in Drive.
241  "id": "A String", # The ID of the revision.
242  "md5Checksum": "A String", # The MD5 checksum of the revision's content. This is only applicable to files with binary content in Drive.
243  "publishedOutsideDomain": True or False, # Whether this revision is published outside the domain. This is only applicable to Google Docs.
244}
245
246
247Returns:
248  An object of the form:
249
250    { # The metadata for a revision to a file.
251    "mimeType": "A String", # The MIME type of the revision.
252    "kind": "drive#revision", # Identifies what kind of resource this is. Value: the fixed string "drive#revision".
253    "modifiedTime": "A String", # The last time the revision was modified (RFC 3339 date-time).
254    "lastModifyingUser": { # Information about a Drive user. # The last user to modify this revision.
255      "me": True or False, # Whether this user is the requesting user.
256      "kind": "drive#user", # Identifies what kind of resource this is. Value: the fixed string "drive#user".
257      "displayName": "A String", # A plain text displayable name for this user.
258      "permissionId": "A String", # The user's ID as visible in Permission resources.
259      "emailAddress": "A String", # 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.
260      "photoLink": "A String", # A link to the user's profile photo, if available.
261    },
262    "keepForever": 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.
263        # This field is only applicable to files with binary content in Drive.
264    "publishAuto": True or False, # Whether subsequent revisions will be automatically republished. This is only applicable to Google Docs.
265    "originalFilename": "A String", # The original filename used to create this revision. This is only applicable to files with binary content in Drive.
266    "published": True or False, # Whether this revision is published. This is only applicable to Google Docs.
267    "size": "A String", # The size of the revision's content in bytes. This is only applicable to files with binary content in Drive.
268    "id": "A String", # The ID of the revision.
269    "md5Checksum": "A String", # The MD5 checksum of the revision's content. This is only applicable to files with binary content in Drive.
270    "publishedOutsideDomain": True or False, # Whether this revision is published outside the domain. This is only applicable to Google Docs.
271  }</pre>
272</div>
273
274</body></html>