blob: 7eff89c7cc0700b221d00e1e8d14f435fa557b72 [file] [log] [blame]
John Asmuth614db982014-04-24 15:46:26 -04001<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_v2.html">Drive API</a> . <a href="drive_v2.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">Removes a revision.</p>
80<p class="toc_element">
81 <code><a href="#get">get(fileId, revisionId)</a></code></p>
82<p class="firstline">Gets a specific revision.</p>
83<p class="toc_element">
84 <code><a href="#list">list(fileId)</a></code></p>
85<p class="firstline">Lists a file's revisions.</p>
86<p class="toc_element">
87 <code><a href="#patch">patch(fileId, revisionId, body)</a></code></p>
88<p class="firstline">Updates a revision. This method supports patch semantics.</p>
89<p class="toc_element">
90 <code><a href="#update">update(fileId, revisionId, body)</a></code></p>
91<p class="firstline">Updates a revision.</p>
92<h3>Method Details</h3>
93<div class="method">
94 <code class="details" id="delete">delete(fileId, revisionId)</code>
95 <pre>Removes a revision.
96
97Args:
98 fileId: string, The ID of the file. (required)
99 revisionId: string, The ID of the revision. (required)
100</pre>
101</div>
102
103<div class="method">
104 <code class="details" id="get">get(fileId, revisionId)</code>
105 <pre>Gets a specific revision.
106
107Args:
108 fileId: string, The ID of the file. (required)
109 revisionId: string, The ID of the revision. (required)
110
111Returns:
112 An object of the form:
113
114 { # A revision of a file.
115 "mimeType": "A String", # The MIME type of the revision.
116 "pinned": True or False, # Whether this revision is pinned to prevent automatic purging. This will only be populated and can only be modified on files with content stored in Drive which are not Google Docs. Revisions can also be pinned when they are created through the drive.files.insert/update/copy by using the pinned query parameter.
117 "kind": "drive#revision", # This is always drive#revision.
118 "publishedLink": "A String", # A link to the published revision.
119 "publishedOutsideDomain": True or False, # Whether this revision is published outside the domain. This is only populated and can only be modified for Google Docs.
120 "lastModifyingUser": { # The JSON template for a user. # The last user to modify this revision.
121 "picture": { # The user's profile picture.
122 "url": "A String", # A URL that points to a profile picture of this user.
123 },
124 "kind": "drive#user", # This is always drive#user.
John Asmuth614db982014-04-24 15:46:26 -0400125 "displayName": "A String", # A plain text displayable name for this user.
126 "permissionId": "A String", # The user's ID as visible in the permissions collection.
Craig Citro065b5302014-08-14 00:47:23 -0700127 "isAuthenticatedUser": True or False, # Whether this user is the same as the authenticated user for whom the request was made.
128 "emailAddress": "A String", # The email address of the user.
John Asmuth614db982014-04-24 15:46:26 -0400129 },
130 "publishAuto": True or False, # Whether subsequent revisions will be automatically republished. This is only populated and can only be modified for Google Docs.
131 "published": True or False, # Whether this revision is published. This is only populated and can only be modified for Google Docs.
132 "downloadUrl": "A String", # Short term download URL for the file. This will only be populated on files with content stored in Drive.
133 "selfLink": "A String", # A link back to this revision.
134 "etag": "A String", # The ETag of the revision.
135 "fileSize": "A String", # The size of the revision in bytes. This will only be populated on files with content stored in Drive.
136 "exportLinks": { # Links for exporting Google Docs to specific formats.
137 "a_key": "A String", # A mapping from export format to URL
138 },
139 "lastModifyingUserName": "A String", # Name of the last user to modify this revision.
140 "originalFilename": "A String", # The original filename when this revision was created. This will only be populated on files with content stored in Drive.
141 "id": "A String", # The ID of the revision.
142 "md5Checksum": "A String", # An MD5 checksum for the content of this revision. This will only be populated on files with content stored in Drive.
143 "modifiedDate": "A String", # Last time this revision was modified (formatted RFC 3339 timestamp).
144 }</pre>
145</div>
146
147<div class="method">
148 <code class="details" id="list">list(fileId)</code>
149 <pre>Lists a file's revisions.
150
151Args:
152 fileId: string, The ID of the file. (required)
153
154Returns:
155 An object of the form:
156
157 { # A list of revisions of a file.
158 "items": [ # The actual list of revisions.
159 { # A revision of a file.
160 "mimeType": "A String", # The MIME type of the revision.
161 "pinned": True or False, # Whether this revision is pinned to prevent automatic purging. This will only be populated and can only be modified on files with content stored in Drive which are not Google Docs. Revisions can also be pinned when they are created through the drive.files.insert/update/copy by using the pinned query parameter.
162 "kind": "drive#revision", # This is always drive#revision.
163 "publishedLink": "A String", # A link to the published revision.
164 "publishedOutsideDomain": True or False, # Whether this revision is published outside the domain. This is only populated and can only be modified for Google Docs.
165 "lastModifyingUser": { # The JSON template for a user. # The last user to modify this revision.
166 "picture": { # The user's profile picture.
167 "url": "A String", # A URL that points to a profile picture of this user.
168 },
169 "kind": "drive#user", # This is always drive#user.
John Asmuth614db982014-04-24 15:46:26 -0400170 "displayName": "A String", # A plain text displayable name for this user.
171 "permissionId": "A String", # The user's ID as visible in the permissions collection.
Craig Citro065b5302014-08-14 00:47:23 -0700172 "isAuthenticatedUser": True or False, # Whether this user is the same as the authenticated user for whom the request was made.
173 "emailAddress": "A String", # The email address of the user.
John Asmuth614db982014-04-24 15:46:26 -0400174 },
175 "publishAuto": True or False, # Whether subsequent revisions will be automatically republished. This is only populated and can only be modified for Google Docs.
176 "published": True or False, # Whether this revision is published. This is only populated and can only be modified for Google Docs.
177 "downloadUrl": "A String", # Short term download URL for the file. This will only be populated on files with content stored in Drive.
178 "selfLink": "A String", # A link back to this revision.
179 "etag": "A String", # The ETag of the revision.
180 "fileSize": "A String", # The size of the revision in bytes. This will only be populated on files with content stored in Drive.
181 "exportLinks": { # Links for exporting Google Docs to specific formats.
182 "a_key": "A String", # A mapping from export format to URL
183 },
184 "lastModifyingUserName": "A String", # Name of the last user to modify this revision.
185 "originalFilename": "A String", # The original filename when this revision was created. This will only be populated on files with content stored in Drive.
186 "id": "A String", # The ID of the revision.
187 "md5Checksum": "A String", # An MD5 checksum for the content of this revision. This will only be populated on files with content stored in Drive.
188 "modifiedDate": "A String", # Last time this revision was modified (formatted RFC 3339 timestamp).
189 },
190 ],
191 "kind": "drive#revisionList", # This is always drive#revisionList.
192 "etag": "A String", # The ETag of the list.
193 "selfLink": "A String", # A link back to this list.
194 }</pre>
195</div>
196
197<div class="method">
198 <code class="details" id="patch">patch(fileId, revisionId, body)</code>
199 <pre>Updates a revision. This method supports patch semantics.
200
201Args:
202 fileId: string, The ID for the file. (required)
203 revisionId: string, The ID for the revision. (required)
204 body: object, The request body. (required)
205 The object takes the form of:
206
207{ # A revision of a file.
208 "mimeType": "A String", # The MIME type of the revision.
209 "pinned": True or False, # Whether this revision is pinned to prevent automatic purging. This will only be populated and can only be modified on files with content stored in Drive which are not Google Docs. Revisions can also be pinned when they are created through the drive.files.insert/update/copy by using the pinned query parameter.
210 "kind": "drive#revision", # This is always drive#revision.
211 "publishedLink": "A String", # A link to the published revision.
212 "publishedOutsideDomain": True or False, # Whether this revision is published outside the domain. This is only populated and can only be modified for Google Docs.
213 "lastModifyingUser": { # The JSON template for a user. # The last user to modify this revision.
214 "picture": { # The user's profile picture.
215 "url": "A String", # A URL that points to a profile picture of this user.
216 },
217 "kind": "drive#user", # This is always drive#user.
John Asmuth614db982014-04-24 15:46:26 -0400218 "displayName": "A String", # A plain text displayable name for this user.
219 "permissionId": "A String", # The user's ID as visible in the permissions collection.
Craig Citro065b5302014-08-14 00:47:23 -0700220 "isAuthenticatedUser": True or False, # Whether this user is the same as the authenticated user for whom the request was made.
221 "emailAddress": "A String", # The email address of the user.
John Asmuth614db982014-04-24 15:46:26 -0400222 },
223 "publishAuto": True or False, # Whether subsequent revisions will be automatically republished. This is only populated and can only be modified for Google Docs.
224 "published": True or False, # Whether this revision is published. This is only populated and can only be modified for Google Docs.
225 "downloadUrl": "A String", # Short term download URL for the file. This will only be populated on files with content stored in Drive.
226 "selfLink": "A String", # A link back to this revision.
227 "etag": "A String", # The ETag of the revision.
228 "fileSize": "A String", # The size of the revision in bytes. This will only be populated on files with content stored in Drive.
229 "exportLinks": { # Links for exporting Google Docs to specific formats.
230 "a_key": "A String", # A mapping from export format to URL
231 },
232 "lastModifyingUserName": "A String", # Name of the last user to modify this revision.
233 "originalFilename": "A String", # The original filename when this revision was created. This will only be populated on files with content stored in Drive.
234 "id": "A String", # The ID of the revision.
235 "md5Checksum": "A String", # An MD5 checksum for the content of this revision. This will only be populated on files with content stored in Drive.
236 "modifiedDate": "A String", # Last time this revision was modified (formatted RFC 3339 timestamp).
237 }
238
239
240Returns:
241 An object of the form:
242
243 { # A revision of a file.
244 "mimeType": "A String", # The MIME type of the revision.
245 "pinned": True or False, # Whether this revision is pinned to prevent automatic purging. This will only be populated and can only be modified on files with content stored in Drive which are not Google Docs. Revisions can also be pinned when they are created through the drive.files.insert/update/copy by using the pinned query parameter.
246 "kind": "drive#revision", # This is always drive#revision.
247 "publishedLink": "A String", # A link to the published revision.
248 "publishedOutsideDomain": True or False, # Whether this revision is published outside the domain. This is only populated and can only be modified for Google Docs.
249 "lastModifyingUser": { # The JSON template for a user. # The last user to modify this revision.
250 "picture": { # The user's profile picture.
251 "url": "A String", # A URL that points to a profile picture of this user.
252 },
253 "kind": "drive#user", # This is always drive#user.
John Asmuth614db982014-04-24 15:46:26 -0400254 "displayName": "A String", # A plain text displayable name for this user.
255 "permissionId": "A String", # The user's ID as visible in the permissions collection.
Craig Citro065b5302014-08-14 00:47:23 -0700256 "isAuthenticatedUser": True or False, # Whether this user is the same as the authenticated user for whom the request was made.
257 "emailAddress": "A String", # The email address of the user.
John Asmuth614db982014-04-24 15:46:26 -0400258 },
259 "publishAuto": True or False, # Whether subsequent revisions will be automatically republished. This is only populated and can only be modified for Google Docs.
260 "published": True or False, # Whether this revision is published. This is only populated and can only be modified for Google Docs.
261 "downloadUrl": "A String", # Short term download URL for the file. This will only be populated on files with content stored in Drive.
262 "selfLink": "A String", # A link back to this revision.
263 "etag": "A String", # The ETag of the revision.
264 "fileSize": "A String", # The size of the revision in bytes. This will only be populated on files with content stored in Drive.
265 "exportLinks": { # Links for exporting Google Docs to specific formats.
266 "a_key": "A String", # A mapping from export format to URL
267 },
268 "lastModifyingUserName": "A String", # Name of the last user to modify this revision.
269 "originalFilename": "A String", # The original filename when this revision was created. This will only be populated on files with content stored in Drive.
270 "id": "A String", # The ID of the revision.
271 "md5Checksum": "A String", # An MD5 checksum for the content of this revision. This will only be populated on files with content stored in Drive.
272 "modifiedDate": "A String", # Last time this revision was modified (formatted RFC 3339 timestamp).
273 }</pre>
274</div>
275
276<div class="method">
277 <code class="details" id="update">update(fileId, revisionId, body)</code>
278 <pre>Updates a revision.
279
280Args:
281 fileId: string, The ID for the file. (required)
282 revisionId: string, The ID for the revision. (required)
283 body: object, The request body. (required)
284 The object takes the form of:
285
286{ # A revision of a file.
287 "mimeType": "A String", # The MIME type of the revision.
288 "pinned": True or False, # Whether this revision is pinned to prevent automatic purging. This will only be populated and can only be modified on files with content stored in Drive which are not Google Docs. Revisions can also be pinned when they are created through the drive.files.insert/update/copy by using the pinned query parameter.
289 "kind": "drive#revision", # This is always drive#revision.
290 "publishedLink": "A String", # A link to the published revision.
291 "publishedOutsideDomain": True or False, # Whether this revision is published outside the domain. This is only populated and can only be modified for Google Docs.
292 "lastModifyingUser": { # The JSON template for a user. # The last user to modify this revision.
293 "picture": { # The user's profile picture.
294 "url": "A String", # A URL that points to a profile picture of this user.
295 },
296 "kind": "drive#user", # This is always drive#user.
John Asmuth614db982014-04-24 15:46:26 -0400297 "displayName": "A String", # A plain text displayable name for this user.
298 "permissionId": "A String", # The user's ID as visible in the permissions collection.
Craig Citro065b5302014-08-14 00:47:23 -0700299 "isAuthenticatedUser": True or False, # Whether this user is the same as the authenticated user for whom the request was made.
300 "emailAddress": "A String", # The email address of the user.
John Asmuth614db982014-04-24 15:46:26 -0400301 },
302 "publishAuto": True or False, # Whether subsequent revisions will be automatically republished. This is only populated and can only be modified for Google Docs.
303 "published": True or False, # Whether this revision is published. This is only populated and can only be modified for Google Docs.
304 "downloadUrl": "A String", # Short term download URL for the file. This will only be populated on files with content stored in Drive.
305 "selfLink": "A String", # A link back to this revision.
306 "etag": "A String", # The ETag of the revision.
307 "fileSize": "A String", # The size of the revision in bytes. This will only be populated on files with content stored in Drive.
308 "exportLinks": { # Links for exporting Google Docs to specific formats.
309 "a_key": "A String", # A mapping from export format to URL
310 },
311 "lastModifyingUserName": "A String", # Name of the last user to modify this revision.
312 "originalFilename": "A String", # The original filename when this revision was created. This will only be populated on files with content stored in Drive.
313 "id": "A String", # The ID of the revision.
314 "md5Checksum": "A String", # An MD5 checksum for the content of this revision. This will only be populated on files with content stored in Drive.
315 "modifiedDate": "A String", # Last time this revision was modified (formatted RFC 3339 timestamp).
316 }
317
318
319Returns:
320 An object of the form:
321
322 { # A revision of a file.
323 "mimeType": "A String", # The MIME type of the revision.
324 "pinned": True or False, # Whether this revision is pinned to prevent automatic purging. This will only be populated and can only be modified on files with content stored in Drive which are not Google Docs. Revisions can also be pinned when they are created through the drive.files.insert/update/copy by using the pinned query parameter.
325 "kind": "drive#revision", # This is always drive#revision.
326 "publishedLink": "A String", # A link to the published revision.
327 "publishedOutsideDomain": True or False, # Whether this revision is published outside the domain. This is only populated and can only be modified for Google Docs.
328 "lastModifyingUser": { # The JSON template for a user. # The last user to modify this revision.
329 "picture": { # The user's profile picture.
330 "url": "A String", # A URL that points to a profile picture of this user.
331 },
332 "kind": "drive#user", # This is always drive#user.
John Asmuth614db982014-04-24 15:46:26 -0400333 "displayName": "A String", # A plain text displayable name for this user.
334 "permissionId": "A String", # The user's ID as visible in the permissions collection.
Craig Citro065b5302014-08-14 00:47:23 -0700335 "isAuthenticatedUser": True or False, # Whether this user is the same as the authenticated user for whom the request was made.
336 "emailAddress": "A String", # The email address of the user.
John Asmuth614db982014-04-24 15:46:26 -0400337 },
338 "publishAuto": True or False, # Whether subsequent revisions will be automatically republished. This is only populated and can only be modified for Google Docs.
339 "published": True or False, # Whether this revision is published. This is only populated and can only be modified for Google Docs.
340 "downloadUrl": "A String", # Short term download URL for the file. This will only be populated on files with content stored in Drive.
341 "selfLink": "A String", # A link back to this revision.
342 "etag": "A String", # The ETag of the revision.
343 "fileSize": "A String", # The size of the revision in bytes. This will only be populated on files with content stored in Drive.
344 "exportLinks": { # Links for exporting Google Docs to specific formats.
345 "a_key": "A String", # A mapping from export format to URL
346 },
347 "lastModifyingUserName": "A String", # Name of the last user to modify this revision.
348 "originalFilename": "A String", # The original filename when this revision was created. This will only be populated on files with content stored in Drive.
349 "id": "A String", # The ID of the revision.
350 "md5Checksum": "A String", # An MD5 checksum for the content of this revision. This will only be populated on files with content stored in Drive.
351 "modifiedDate": "A String", # Last time this revision was modified (formatted RFC 3339 timestamp).
352 }</pre>
353</div>
354
355</body></html>