blob: 1d9645da0e586015fde1645a7f723b7a5ed1dcc0 [file] [log] [blame]
Joe Gregorio075572b2012-07-09 16:53:09 -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
Joe Gregorio41be8e82013-03-07 10:31:47 -0500114 { # A revision of a file.
Joe Gregorio075572b2012-07-09 16:53:09 -0400115 "mimeType": "A String", # The MIME type of the revision.
Joe Gregorioad8013f2012-08-03 08:44:02 -0400116 "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.
Joe Gregorio075572b2012-07-09 16:53:09 -0400117 "kind": "drive#revision", # This is always drive#revision.
118 "publishedLink": "A String", # A link to the published revision.
Joe Gregorioad8013f2012-08-03 08:44:02 -0400119 "publishedOutsideDomain": True or False, # Whether this revision is published outside the domain. This is only populated and can only be modified for Google Docs.
Joe Gregorio41be8e82013-03-07 10:31:47 -0500120 "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.
125 "isAuthenticatedUser": True or False, # Whether this user is the same as the authenticated user for whom the request was made.
126 "displayName": "A String", # A plain text displayable name for this user.
127 "permissionId": "A String", # The user's ID as visible in the permissions collection.
128 },
Joe Gregorioad8013f2012-08-03 08:44:02 -0400129 "publishAuto": True or False, # Whether subsequent revisions will be automatically republished. This is only populated and can only be modified for Google Docs.
130 "published": True or False, # Whether this revision is published. This is only populated and can only be modified for Google Docs.
Joe Gregorio075572b2012-07-09 16:53:09 -0400131 "downloadUrl": "A String", # Short term download URL for the file. This will only be populated on files with content stored in Drive.
132 "selfLink": "A String", # A link back to this revision.
133 "etag": "A String", # The ETag of the revision.
134 "fileSize": "A String", # The size of the revision in bytes. This will only be populated on files with content stored in Drive.
135 "exportLinks": { # Links for exporting Google Docs to specific formats.
Joe Gregoriofa08c2e2012-07-23 16:52:03 -0400136 "a_key": "A String", # A mapping from export format to URL
Joe Gregorio075572b2012-07-09 16:53:09 -0400137 },
138 "lastModifyingUserName": "A String", # Name of the last user to modify this revision.
139 "originalFilename": "A String", # The original filename when this revision was created. This will only be populated on files with content stored in Drive.
140 "id": "A String", # The ID of the revision.
141 "md5Checksum": "A String", # An MD5 checksum for the content of this revision. This will only be populated on files with content stored in Drive.
142 "modifiedDate": "A String", # Last time this revision was modified (formatted RFC 3339 timestamp).
143 }</pre>
144</div>
145
146<div class="method">
147 <code class="details" id="list">list(fileId)</code>
148 <pre>Lists a file's revisions.
149
150Args:
151 fileId: string, The ID of the file. (required)
152
153Returns:
154 An object of the form:
155
156 { # A list of revisions of a file.
157 "items": [ # The actual list of revisions.
Joe Gregorio41be8e82013-03-07 10:31:47 -0500158 { # A revision of a file.
Joe Gregorio075572b2012-07-09 16:53:09 -0400159 "mimeType": "A String", # The MIME type of the revision.
Joe Gregorioad8013f2012-08-03 08:44:02 -0400160 "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.
Joe Gregorio075572b2012-07-09 16:53:09 -0400161 "kind": "drive#revision", # This is always drive#revision.
162 "publishedLink": "A String", # A link to the published revision.
Joe Gregorioad8013f2012-08-03 08:44:02 -0400163 "publishedOutsideDomain": True or False, # Whether this revision is published outside the domain. This is only populated and can only be modified for Google Docs.
Joe Gregorio41be8e82013-03-07 10:31:47 -0500164 "lastModifyingUser": { # The JSON template for a user. # The last user to modify this revision.
165 "picture": { # The user's profile picture.
166 "url": "A String", # A URL that points to a profile picture of this user.
167 },
168 "kind": "drive#user", # This is always drive#user.
169 "isAuthenticatedUser": True or False, # Whether this user is the same as the authenticated user for whom the request was made.
170 "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.
172 },
Joe Gregorioad8013f2012-08-03 08:44:02 -0400173 "publishAuto": True or False, # Whether subsequent revisions will be automatically republished. This is only populated and can only be modified for Google Docs.
174 "published": True or False, # Whether this revision is published. This is only populated and can only be modified for Google Docs.
Joe Gregorio075572b2012-07-09 16:53:09 -0400175 "downloadUrl": "A String", # Short term download URL for the file. This will only be populated on files with content stored in Drive.
176 "selfLink": "A String", # A link back to this revision.
177 "etag": "A String", # The ETag of the revision.
178 "fileSize": "A String", # The size of the revision in bytes. This will only be populated on files with content stored in Drive.
179 "exportLinks": { # Links for exporting Google Docs to specific formats.
Joe Gregoriofa08c2e2012-07-23 16:52:03 -0400180 "a_key": "A String", # A mapping from export format to URL
Joe Gregorio075572b2012-07-09 16:53:09 -0400181 },
182 "lastModifyingUserName": "A String", # Name of the last user to modify this revision.
183 "originalFilename": "A String", # The original filename when this revision was created. This will only be populated on files with content stored in Drive.
184 "id": "A String", # The ID of the revision.
185 "md5Checksum": "A String", # An MD5 checksum for the content of this revision. This will only be populated on files with content stored in Drive.
186 "modifiedDate": "A String", # Last time this revision was modified (formatted RFC 3339 timestamp).
187 },
188 ],
189 "kind": "drive#revisionList", # This is always drive#revisionList.
190 "etag": "A String", # The ETag of the list.
191 "selfLink": "A String", # A link back to this list.
192 }</pre>
193</div>
194
195<div class="method">
196 <code class="details" id="patch">patch(fileId, revisionId, body)</code>
197 <pre>Updates a revision. This method supports patch semantics.
198
199Args:
200 fileId: string, The ID for the file. (required)
201 revisionId: string, The ID for the revision. (required)
202 body: object, The request body. (required)
203 The object takes the form of:
204
Joe Gregorio41be8e82013-03-07 10:31:47 -0500205{ # A revision of a file.
Joe Gregorio075572b2012-07-09 16:53:09 -0400206 "mimeType": "A String", # The MIME type of the revision.
Joe Gregorioad8013f2012-08-03 08:44:02 -0400207 "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.
Joe Gregorio075572b2012-07-09 16:53:09 -0400208 "kind": "drive#revision", # This is always drive#revision.
209 "publishedLink": "A String", # A link to the published revision.
Joe Gregorioad8013f2012-08-03 08:44:02 -0400210 "publishedOutsideDomain": True or False, # Whether this revision is published outside the domain. This is only populated and can only be modified for Google Docs.
Joe Gregorio41be8e82013-03-07 10:31:47 -0500211 "lastModifyingUser": { # The JSON template for a user. # The last user to modify this revision.
212 "picture": { # The user's profile picture.
213 "url": "A String", # A URL that points to a profile picture of this user.
214 },
215 "kind": "drive#user", # This is always drive#user.
216 "isAuthenticatedUser": True or False, # Whether this user is the same as the authenticated user for whom the request was made.
217 "displayName": "A String", # A plain text displayable name for this user.
218 "permissionId": "A String", # The user's ID as visible in the permissions collection.
219 },
Joe Gregorioad8013f2012-08-03 08:44:02 -0400220 "publishAuto": True or False, # Whether subsequent revisions will be automatically republished. This is only populated and can only be modified for Google Docs.
221 "published": True or False, # Whether this revision is published. This is only populated and can only be modified for Google Docs.
Joe Gregorio075572b2012-07-09 16:53:09 -0400222 "downloadUrl": "A String", # Short term download URL for the file. This will only be populated on files with content stored in Drive.
223 "selfLink": "A String", # A link back to this revision.
224 "etag": "A String", # The ETag of the revision.
225 "fileSize": "A String", # The size of the revision in bytes. This will only be populated on files with content stored in Drive.
226 "exportLinks": { # Links for exporting Google Docs to specific formats.
Joe Gregoriofa08c2e2012-07-23 16:52:03 -0400227 "a_key": "A String", # A mapping from export format to URL
Joe Gregorio075572b2012-07-09 16:53:09 -0400228 },
229 "lastModifyingUserName": "A String", # Name of the last user to modify this revision.
230 "originalFilename": "A String", # The original filename when this revision was created. This will only be populated on files with content stored in Drive.
231 "id": "A String", # The ID of the revision.
232 "md5Checksum": "A String", # An MD5 checksum for the content of this revision. This will only be populated on files with content stored in Drive.
233 "modifiedDate": "A String", # Last time this revision was modified (formatted RFC 3339 timestamp).
234 }
235
236
237Returns:
238 An object of the form:
239
Joe Gregorio41be8e82013-03-07 10:31:47 -0500240 { # A revision of a file.
Joe Gregorio075572b2012-07-09 16:53:09 -0400241 "mimeType": "A String", # The MIME type of the revision.
Joe Gregorioad8013f2012-08-03 08:44:02 -0400242 "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.
Joe Gregorio075572b2012-07-09 16:53:09 -0400243 "kind": "drive#revision", # This is always drive#revision.
244 "publishedLink": "A String", # A link to the published revision.
Joe Gregorioad8013f2012-08-03 08:44:02 -0400245 "publishedOutsideDomain": True or False, # Whether this revision is published outside the domain. This is only populated and can only be modified for Google Docs.
Joe Gregorio41be8e82013-03-07 10:31:47 -0500246 "lastModifyingUser": { # The JSON template for a user. # The last user to modify this revision.
247 "picture": { # The user's profile picture.
248 "url": "A String", # A URL that points to a profile picture of this user.
249 },
250 "kind": "drive#user", # This is always drive#user.
251 "isAuthenticatedUser": True or False, # Whether this user is the same as the authenticated user for whom the request was made.
252 "displayName": "A String", # A plain text displayable name for this user.
253 "permissionId": "A String", # The user's ID as visible in the permissions collection.
254 },
Joe Gregorioad8013f2012-08-03 08:44:02 -0400255 "publishAuto": True or False, # Whether subsequent revisions will be automatically republished. This is only populated and can only be modified for Google Docs.
256 "published": True or False, # Whether this revision is published. This is only populated and can only be modified for Google Docs.
Joe Gregorio075572b2012-07-09 16:53:09 -0400257 "downloadUrl": "A String", # Short term download URL for the file. This will only be populated on files with content stored in Drive.
258 "selfLink": "A String", # A link back to this revision.
259 "etag": "A String", # The ETag of the revision.
260 "fileSize": "A String", # The size of the revision in bytes. This will only be populated on files with content stored in Drive.
261 "exportLinks": { # Links for exporting Google Docs to specific formats.
Joe Gregoriofa08c2e2012-07-23 16:52:03 -0400262 "a_key": "A String", # A mapping from export format to URL
Joe Gregorio075572b2012-07-09 16:53:09 -0400263 },
264 "lastModifyingUserName": "A String", # Name of the last user to modify this revision.
265 "originalFilename": "A String", # The original filename when this revision was created. This will only be populated on files with content stored in Drive.
266 "id": "A String", # The ID of the revision.
267 "md5Checksum": "A String", # An MD5 checksum for the content of this revision. This will only be populated on files with content stored in Drive.
268 "modifiedDate": "A String", # Last time this revision was modified (formatted RFC 3339 timestamp).
269 }</pre>
270</div>
271
272<div class="method">
273 <code class="details" id="update">update(fileId, revisionId, body)</code>
274 <pre>Updates a revision.
275
276Args:
277 fileId: string, The ID for the file. (required)
278 revisionId: string, The ID for the revision. (required)
279 body: object, The request body. (required)
280 The object takes the form of:
281
Joe Gregorio41be8e82013-03-07 10:31:47 -0500282{ # A revision of a file.
Joe Gregorio075572b2012-07-09 16:53:09 -0400283 "mimeType": "A String", # The MIME type of the revision.
Joe Gregorioad8013f2012-08-03 08:44:02 -0400284 "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.
Joe Gregorio075572b2012-07-09 16:53:09 -0400285 "kind": "drive#revision", # This is always drive#revision.
286 "publishedLink": "A String", # A link to the published revision.
Joe Gregorioad8013f2012-08-03 08:44:02 -0400287 "publishedOutsideDomain": True or False, # Whether this revision is published outside the domain. This is only populated and can only be modified for Google Docs.
Joe Gregorio41be8e82013-03-07 10:31:47 -0500288 "lastModifyingUser": { # The JSON template for a user. # The last user to modify this revision.
289 "picture": { # The user's profile picture.
290 "url": "A String", # A URL that points to a profile picture of this user.
291 },
292 "kind": "drive#user", # This is always drive#user.
293 "isAuthenticatedUser": True or False, # Whether this user is the same as the authenticated user for whom the request was made.
294 "displayName": "A String", # A plain text displayable name for this user.
295 "permissionId": "A String", # The user's ID as visible in the permissions collection.
296 },
Joe Gregorioad8013f2012-08-03 08:44:02 -0400297 "publishAuto": True or False, # Whether subsequent revisions will be automatically republished. This is only populated and can only be modified for Google Docs.
298 "published": True or False, # Whether this revision is published. This is only populated and can only be modified for Google Docs.
Joe Gregorio075572b2012-07-09 16:53:09 -0400299 "downloadUrl": "A String", # Short term download URL for the file. This will only be populated on files with content stored in Drive.
300 "selfLink": "A String", # A link back to this revision.
301 "etag": "A String", # The ETag of the revision.
302 "fileSize": "A String", # The size of the revision in bytes. This will only be populated on files with content stored in Drive.
303 "exportLinks": { # Links for exporting Google Docs to specific formats.
Joe Gregoriofa08c2e2012-07-23 16:52:03 -0400304 "a_key": "A String", # A mapping from export format to URL
Joe Gregorio075572b2012-07-09 16:53:09 -0400305 },
306 "lastModifyingUserName": "A String", # Name of the last user to modify this revision.
307 "originalFilename": "A String", # The original filename when this revision was created. This will only be populated on files with content stored in Drive.
308 "id": "A String", # The ID of the revision.
309 "md5Checksum": "A String", # An MD5 checksum for the content of this revision. This will only be populated on files with content stored in Drive.
310 "modifiedDate": "A String", # Last time this revision was modified (formatted RFC 3339 timestamp).
311 }
312
313
314Returns:
315 An object of the form:
316
Joe Gregorio41be8e82013-03-07 10:31:47 -0500317 { # A revision of a file.
Joe Gregorio075572b2012-07-09 16:53:09 -0400318 "mimeType": "A String", # The MIME type of the revision.
Joe Gregorioad8013f2012-08-03 08:44:02 -0400319 "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.
Joe Gregorio075572b2012-07-09 16:53:09 -0400320 "kind": "drive#revision", # This is always drive#revision.
321 "publishedLink": "A String", # A link to the published revision.
Joe Gregorioad8013f2012-08-03 08:44:02 -0400322 "publishedOutsideDomain": True or False, # Whether this revision is published outside the domain. This is only populated and can only be modified for Google Docs.
Joe Gregorio41be8e82013-03-07 10:31:47 -0500323 "lastModifyingUser": { # The JSON template for a user. # The last user to modify this revision.
324 "picture": { # The user's profile picture.
325 "url": "A String", # A URL that points to a profile picture of this user.
326 },
327 "kind": "drive#user", # This is always drive#user.
328 "isAuthenticatedUser": True or False, # Whether this user is the same as the authenticated user for whom the request was made.
329 "displayName": "A String", # A plain text displayable name for this user.
330 "permissionId": "A String", # The user's ID as visible in the permissions collection.
331 },
Joe Gregorioad8013f2012-08-03 08:44:02 -0400332 "publishAuto": True or False, # Whether subsequent revisions will be automatically republished. This is only populated and can only be modified for Google Docs.
333 "published": True or False, # Whether this revision is published. This is only populated and can only be modified for Google Docs.
Joe Gregorio075572b2012-07-09 16:53:09 -0400334 "downloadUrl": "A String", # Short term download URL for the file. This will only be populated on files with content stored in Drive.
335 "selfLink": "A String", # A link back to this revision.
336 "etag": "A String", # The ETag of the revision.
337 "fileSize": "A String", # The size of the revision in bytes. This will only be populated on files with content stored in Drive.
338 "exportLinks": { # Links for exporting Google Docs to specific formats.
Joe Gregoriofa08c2e2012-07-23 16:52:03 -0400339 "a_key": "A String", # A mapping from export format to URL
Joe Gregorio075572b2012-07-09 16:53:09 -0400340 },
341 "lastModifyingUserName": "A String", # Name of the last user to modify this revision.
342 "originalFilename": "A String", # The original filename when this revision was created. This will only be populated on files with content stored in Drive.
343 "id": "A String", # The ID of the revision.
344 "md5Checksum": "A String", # An MD5 checksum for the content of this revision. This will only be populated on files with content stored in Drive.
345 "modifiedDate": "A String", # Last time this revision was modified (formatted RFC 3339 timestamp).
346 }</pre>
347</div>
348
349</body></html>