blob: e7b12a96d9ab0ec1b17da3571f2ee47ce6a09cef [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
114 { # A single revision of a file.
115 "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.
120 "publishAuto": True or False, # Whether subsequent revisions will be automatically republished. This is only populated and can only be modified for Google Docs.
121 "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 -0400122 "downloadUrl": "A String", # Short term download URL for the file. This will only be populated on files with content stored in Drive.
123 "selfLink": "A String", # A link back to this revision.
124 "etag": "A String", # The ETag of the revision.
125 "fileSize": "A String", # The size of the revision in bytes. This will only be populated on files with content stored in Drive.
126 "exportLinks": { # Links for exporting Google Docs to specific formats.
Joe Gregoriofa08c2e2012-07-23 16:52:03 -0400127 "a_key": "A String", # A mapping from export format to URL
Joe Gregorio075572b2012-07-09 16:53:09 -0400128 },
129 "lastModifyingUserName": "A String", # Name of the last user to modify this revision.
130 "originalFilename": "A String", # The original filename when this revision was created. This will only be populated on files with content stored in Drive.
131 "id": "A String", # The ID of the revision.
132 "md5Checksum": "A String", # An MD5 checksum for the content of this revision. This will only be populated on files with content stored in Drive.
133 "modifiedDate": "A String", # Last time this revision was modified (formatted RFC 3339 timestamp).
134 }</pre>
135</div>
136
137<div class="method">
138 <code class="details" id="list">list(fileId)</code>
139 <pre>Lists a file's revisions.
140
141Args:
142 fileId: string, The ID of the file. (required)
143
144Returns:
145 An object of the form:
146
147 { # A list of revisions of a file.
148 "items": [ # The actual list of revisions.
149 { # A single revision of a file.
150 "mimeType": "A String", # The MIME type of the revision.
Joe Gregorioad8013f2012-08-03 08:44:02 -0400151 "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 -0400152 "kind": "drive#revision", # This is always drive#revision.
153 "publishedLink": "A String", # A link to the published revision.
Joe Gregorioad8013f2012-08-03 08:44:02 -0400154 "publishedOutsideDomain": True or False, # Whether this revision is published outside the domain. This is only populated and can only be modified for Google Docs.
155 "publishAuto": True or False, # Whether subsequent revisions will be automatically republished. This is only populated and can only be modified for Google Docs.
156 "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 -0400157 "downloadUrl": "A String", # Short term download URL for the file. This will only be populated on files with content stored in Drive.
158 "selfLink": "A String", # A link back to this revision.
159 "etag": "A String", # The ETag of the revision.
160 "fileSize": "A String", # The size of the revision in bytes. This will only be populated on files with content stored in Drive.
161 "exportLinks": { # Links for exporting Google Docs to specific formats.
Joe Gregoriofa08c2e2012-07-23 16:52:03 -0400162 "a_key": "A String", # A mapping from export format to URL
Joe Gregorio075572b2012-07-09 16:53:09 -0400163 },
164 "lastModifyingUserName": "A String", # Name of the last user to modify this revision.
165 "originalFilename": "A String", # The original filename when this revision was created. This will only be populated on files with content stored in Drive.
166 "id": "A String", # The ID of the revision.
167 "md5Checksum": "A String", # An MD5 checksum for the content of this revision. This will only be populated on files with content stored in Drive.
168 "modifiedDate": "A String", # Last time this revision was modified (formatted RFC 3339 timestamp).
169 },
170 ],
171 "kind": "drive#revisionList", # This is always drive#revisionList.
172 "etag": "A String", # The ETag of the list.
173 "selfLink": "A String", # A link back to this list.
174 }</pre>
175</div>
176
177<div class="method">
178 <code class="details" id="patch">patch(fileId, revisionId, body)</code>
179 <pre>Updates a revision. This method supports patch semantics.
180
181Args:
182 fileId: string, The ID for the file. (required)
183 revisionId: string, The ID for the revision. (required)
184 body: object, The request body. (required)
185 The object takes the form of:
186
187{ # A single revision of a file.
188 "mimeType": "A String", # The MIME type of the revision.
Joe Gregorioad8013f2012-08-03 08:44:02 -0400189 "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 -0400190 "kind": "drive#revision", # This is always drive#revision.
191 "publishedLink": "A String", # A link to the published revision.
Joe Gregorioad8013f2012-08-03 08:44:02 -0400192 "publishedOutsideDomain": True or False, # Whether this revision is published outside the domain. This is only populated and can only be modified for Google Docs.
193 "publishAuto": True or False, # Whether subsequent revisions will be automatically republished. This is only populated and can only be modified for Google Docs.
194 "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 -0400195 "downloadUrl": "A String", # Short term download URL for the file. This will only be populated on files with content stored in Drive.
196 "selfLink": "A String", # A link back to this revision.
197 "etag": "A String", # The ETag of the revision.
198 "fileSize": "A String", # The size of the revision in bytes. This will only be populated on files with content stored in Drive.
199 "exportLinks": { # Links for exporting Google Docs to specific formats.
Joe Gregoriofa08c2e2012-07-23 16:52:03 -0400200 "a_key": "A String", # A mapping from export format to URL
Joe Gregorio075572b2012-07-09 16:53:09 -0400201 },
202 "lastModifyingUserName": "A String", # Name of the last user to modify this revision.
203 "originalFilename": "A String", # The original filename when this revision was created. This will only be populated on files with content stored in Drive.
204 "id": "A String", # The ID of the revision.
205 "md5Checksum": "A String", # An MD5 checksum for the content of this revision. This will only be populated on files with content stored in Drive.
206 "modifiedDate": "A String", # Last time this revision was modified (formatted RFC 3339 timestamp).
207 }
208
209
210Returns:
211 An object of the form:
212
213 { # A single revision of a file.
214 "mimeType": "A String", # The MIME type of the revision.
Joe Gregorioad8013f2012-08-03 08:44:02 -0400215 "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 -0400216 "kind": "drive#revision", # This is always drive#revision.
217 "publishedLink": "A String", # A link to the published revision.
Joe Gregorioad8013f2012-08-03 08:44:02 -0400218 "publishedOutsideDomain": True or False, # Whether this revision is published outside the domain. This is only populated and can only be modified for Google Docs.
219 "publishAuto": True or False, # Whether subsequent revisions will be automatically republished. This is only populated and can only be modified for Google Docs.
220 "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 -0400221 "downloadUrl": "A String", # Short term download URL for the file. This will only be populated on files with content stored in Drive.
222 "selfLink": "A String", # A link back to this revision.
223 "etag": "A String", # The ETag of the revision.
224 "fileSize": "A String", # The size of the revision in bytes. This will only be populated on files with content stored in Drive.
225 "exportLinks": { # Links for exporting Google Docs to specific formats.
Joe Gregoriofa08c2e2012-07-23 16:52:03 -0400226 "a_key": "A String", # A mapping from export format to URL
Joe Gregorio075572b2012-07-09 16:53:09 -0400227 },
228 "lastModifyingUserName": "A String", # Name of the last user to modify this revision.
229 "originalFilename": "A String", # The original filename when this revision was created. This will only be populated on files with content stored in Drive.
230 "id": "A String", # The ID of the revision.
231 "md5Checksum": "A String", # An MD5 checksum for the content of this revision. This will only be populated on files with content stored in Drive.
232 "modifiedDate": "A String", # Last time this revision was modified (formatted RFC 3339 timestamp).
233 }</pre>
234</div>
235
236<div class="method">
237 <code class="details" id="update">update(fileId, revisionId, body)</code>
238 <pre>Updates a revision.
239
240Args:
241 fileId: string, The ID for the file. (required)
242 revisionId: string, The ID for the revision. (required)
243 body: object, The request body. (required)
244 The object takes the form of:
245
246{ # A single revision of a file.
247 "mimeType": "A String", # The MIME type of the revision.
Joe Gregorioad8013f2012-08-03 08:44:02 -0400248 "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 -0400249 "kind": "drive#revision", # This is always drive#revision.
250 "publishedLink": "A String", # A link to the published revision.
Joe Gregorioad8013f2012-08-03 08:44:02 -0400251 "publishedOutsideDomain": True or False, # Whether this revision is published outside the domain. This is only populated and can only be modified for Google Docs.
252 "publishAuto": True or False, # Whether subsequent revisions will be automatically republished. This is only populated and can only be modified for Google Docs.
253 "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 -0400254 "downloadUrl": "A String", # Short term download URL for the file. This will only be populated on files with content stored in Drive.
255 "selfLink": "A String", # A link back to this revision.
256 "etag": "A String", # The ETag of the revision.
257 "fileSize": "A String", # The size of the revision in bytes. This will only be populated on files with content stored in Drive.
258 "exportLinks": { # Links for exporting Google Docs to specific formats.
Joe Gregoriofa08c2e2012-07-23 16:52:03 -0400259 "a_key": "A String", # A mapping from export format to URL
Joe Gregorio075572b2012-07-09 16:53:09 -0400260 },
261 "lastModifyingUserName": "A String", # Name of the last user to modify this revision.
262 "originalFilename": "A String", # The original filename when this revision was created. This will only be populated on files with content stored in Drive.
263 "id": "A String", # The ID of the revision.
264 "md5Checksum": "A String", # An MD5 checksum for the content of this revision. This will only be populated on files with content stored in Drive.
265 "modifiedDate": "A String", # Last time this revision was modified (formatted RFC 3339 timestamp).
266 }
267
268
269Returns:
270 An object of the form:
271
272 { # A single revision of a file.
273 "mimeType": "A String", # The MIME type of the revision.
Joe Gregorioad8013f2012-08-03 08:44:02 -0400274 "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 -0400275 "kind": "drive#revision", # This is always drive#revision.
276 "publishedLink": "A String", # A link to the published revision.
Joe Gregorioad8013f2012-08-03 08:44:02 -0400277 "publishedOutsideDomain": True or False, # Whether this revision is published outside the domain. This is only populated and can only be modified for Google Docs.
278 "publishAuto": True or False, # Whether subsequent revisions will be automatically republished. This is only populated and can only be modified for Google Docs.
279 "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 -0400280 "downloadUrl": "A String", # Short term download URL for the file. This will only be populated on files with content stored in Drive.
281 "selfLink": "A String", # A link back to this revision.
282 "etag": "A String", # The ETag of the revision.
283 "fileSize": "A String", # The size of the revision in bytes. This will only be populated on files with content stored in Drive.
284 "exportLinks": { # Links for exporting Google Docs to specific formats.
Joe Gregoriofa08c2e2012-07-23 16:52:03 -0400285 "a_key": "A String", # A mapping from export format to URL
Joe Gregorio075572b2012-07-09 16:53:09 -0400286 },
287 "lastModifyingUserName": "A String", # Name of the last user to modify this revision.
288 "originalFilename": "A String", # The original filename when this revision was created. This will only be populated on files with content stored in Drive.
289 "id": "A String", # The ID of the revision.
290 "md5Checksum": "A String", # An MD5 checksum for the content of this revision. This will only be populated on files with content stored in Drive.
291 "modifiedDate": "A String", # Last time this revision was modified (formatted RFC 3339 timestamp).
292 }</pre>
293</div>
294
295</body></html>