blob: 1d9645da0e586015fde1645a7f723b7a5ed1dcc0 [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.
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 },
129 "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.
131 "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.
136 "a_key": "A String", # A mapping from export format to URL
137 },
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.
158 { # A revision of a file.
159 "mimeType": "A String", # The MIME type of the revision.
160 "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.
161 "kind": "drive#revision", # This is always drive#revision.
162 "publishedLink": "A String", # A link to the published revision.
163 "publishedOutsideDomain": True or False, # Whether this revision is published outside the domain. This is only populated and can only be modified for Google Docs.
164 "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 },
173 "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.
175 "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.
180 "a_key": "A String", # A mapping from export format to URL
181 },
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
205{ # A revision of a file.
206 "mimeType": "A String", # The MIME type of the revision.
207 "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.
208 "kind": "drive#revision", # This is always drive#revision.
209 "publishedLink": "A String", # A link to the published revision.
210 "publishedOutsideDomain": True or False, # Whether this revision is published outside the domain. This is only populated and can only be modified for Google Docs.
211 "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 },
220 "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.
222 "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.
227 "a_key": "A String", # A mapping from export format to URL
228 },
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
240 { # A revision of a file.
241 "mimeType": "A String", # The MIME type of the revision.
242 "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.
243 "kind": "drive#revision", # This is always drive#revision.
244 "publishedLink": "A String", # A link to the published revision.
245 "publishedOutsideDomain": True or False, # Whether this revision is published outside the domain. This is only populated and can only be modified for Google Docs.
246 "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 },
255 "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.
257 "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.
262 "a_key": "A String", # A mapping from export format to URL
263 },
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
282{ # A revision of a file.
283 "mimeType": "A String", # The MIME type of the revision.
284 "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.
285 "kind": "drive#revision", # This is always drive#revision.
286 "publishedLink": "A String", # A link to the published revision.
287 "publishedOutsideDomain": True or False, # Whether this revision is published outside the domain. This is only populated and can only be modified for Google Docs.
288 "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 },
297 "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.
299 "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.
304 "a_key": "A String", # A mapping from export format to URL
305 },
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
317 { # A revision of a file.
318 "mimeType": "A String", # The MIME type of the revision.
319 "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.
320 "kind": "drive#revision", # This is always drive#revision.
321 "publishedLink": "A String", # A link to the published revision.
322 "publishedOutsideDomain": True or False, # Whether this revision is published outside the domain. This is only populated and can only be modified for Google Docs.
323 "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 },
332 "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.
334 "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.
339 "a_key": "A String", # A mapping from export format to URL
340 },
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>