• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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_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, pageToken=None, maxResults=None)</a></code></p>
85<p class="firstline">Lists a file's revisions.</p>
86<p class="toc_element">
87  <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p>
88<p class="firstline">Retrieves the next page of results.</p>
89<p class="toc_element">
90  <code><a href="#patch">patch(fileId, revisionId, body)</a></code></p>
91<p class="firstline">Updates a revision. This method supports patch semantics.</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.</p>
95<h3>Method Details</h3>
96<div class="method">
97    <code class="details" id="delete">delete(fileId, revisionId)</code>
98  <pre>Removes a revision.
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)</code>
108  <pre>Gets a specific revision.
109
110Args:
111  fileId: string, The ID of the file. (required)
112  revisionId: string, The ID of the revision. (required)
113
114Returns:
115  An object of the form:
116
117    { # A revision of a file.
118      "mimeType": "A String", # The MIME type of the revision.
119      "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.
120      "kind": "drive#revision", # This is always drive#revision.
121      "publishedLink": "A String", # A link to the published revision.
122      "publishedOutsideDomain": True or False, # Whether this revision is published outside the domain. This is only populated and can only be modified for Google Docs.
123      "lastModifyingUser": { # Information about a Drive user. # The last user to modify this revision.
124        "picture": { # The user's profile picture.
125          "url": "A String", # A URL that points to a profile picture of this user.
126        },
127        "kind": "drive#user", # This is always drive#user.
128        "displayName": "A String", # A plain text displayable name for this user.
129        "permissionId": "A String", # The user's ID as visible in the permissions collection.
130        "isAuthenticatedUser": True or False, # Whether this user is the same as the authenticated user for whom the request was made.
131        "emailAddress": "A String", # The email address of the user.
132      },
133      "publishAuto": True or False, # Whether subsequent revisions will be automatically republished. This is only populated and can only be modified for Google Docs.
134      "published": True or False, # Whether this revision is published. This is only populated and can only be modified for Google Docs.
135      "downloadUrl": "A String", # Short term download URL for the file. This will only be populated on files with content stored in Drive.
136      "selfLink": "A String", # A link back to this revision.
137      "etag": "A String", # The ETag of the revision.
138      "fileSize": "A String", # The size of the revision in bytes. This will only be populated on files with content stored in Drive.
139      "exportLinks": { # Links for exporting Google Docs to specific formats.
140        "a_key": "A String", # A mapping from export format to URL
141      },
142      "lastModifyingUserName": "A String", # Name of the last user to modify this revision.
143      "originalFilename": "A String", # The original filename when this revision was created. This will only be populated on files with content stored in Drive.
144      "id": "A String", # The ID of the revision.
145      "md5Checksum": "A String", # An MD5 checksum for the content of this revision. This will only be populated on files with content stored in Drive.
146      "modifiedDate": "A String", # Last time this revision was modified (formatted RFC 3339 timestamp).
147    }</pre>
148</div>
149
150<div class="method">
151    <code class="details" id="list">list(fileId, pageToken=None, maxResults=None)</code>
152  <pre>Lists a file's revisions.
153
154Args:
155  fileId: string, The ID of the file. (required)
156  pageToken: string, Page token for revisions. To get the next page of results, set this parameter to the value of "nextPageToken" from the previous response.
157  maxResults: integer, Maximum number of revisions to return.
158
159Returns:
160  An object of the form:
161
162    { # A list of revisions of a file.
163    "nextPageToken": "A String", # The page token for the next page of revisions. This field will be absent if the end of the revisions list has been reached. If the token is rejected for any reason, it should be discarded and pagination should be restarted from the first page of results.
164    "items": [ # The list of revisions. If nextPageToken is populated, then this list may be incomplete and an additional page of results should be fetched.
165      { # A revision of a file.
166          "mimeType": "A String", # The MIME type of the revision.
167          "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.
168          "kind": "drive#revision", # This is always drive#revision.
169          "publishedLink": "A String", # A link to the published revision.
170          "publishedOutsideDomain": True or False, # Whether this revision is published outside the domain. This is only populated and can only be modified for Google Docs.
171          "lastModifyingUser": { # Information about a Drive user. # The last user to modify this revision.
172            "picture": { # The user's profile picture.
173              "url": "A String", # A URL that points to a profile picture of this user.
174            },
175            "kind": "drive#user", # This is always drive#user.
176            "displayName": "A String", # A plain text displayable name for this user.
177            "permissionId": "A String", # The user's ID as visible in the permissions collection.
178            "isAuthenticatedUser": True or False, # Whether this user is the same as the authenticated user for whom the request was made.
179            "emailAddress": "A String", # The email address of the user.
180          },
181          "publishAuto": True or False, # Whether subsequent revisions will be automatically republished. This is only populated and can only be modified for Google Docs.
182          "published": True or False, # Whether this revision is published. This is only populated and can only be modified for Google Docs.
183          "downloadUrl": "A String", # Short term download URL for the file. This will only be populated on files with content stored in Drive.
184          "selfLink": "A String", # A link back to this revision.
185          "etag": "A String", # The ETag of the revision.
186          "fileSize": "A String", # The size of the revision in bytes. This will only be populated on files with content stored in Drive.
187          "exportLinks": { # Links for exporting Google Docs to specific formats.
188            "a_key": "A String", # A mapping from export format to URL
189          },
190          "lastModifyingUserName": "A String", # Name of the last user to modify this revision.
191          "originalFilename": "A String", # The original filename when this revision was created. This will only be populated on files with content stored in Drive.
192          "id": "A String", # The ID of the revision.
193          "md5Checksum": "A String", # An MD5 checksum for the content of this revision. This will only be populated on files with content stored in Drive.
194          "modifiedDate": "A String", # Last time this revision was modified (formatted RFC 3339 timestamp).
195        },
196    ],
197    "kind": "drive#revisionList", # This is always drive#revisionList.
198    "etag": "A String", # The ETag of the list.
199    "selfLink": "A String", # A link back to this list.
200  }</pre>
201</div>
202
203<div class="method">
204    <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
205  <pre>Retrieves the next page of results.
206
207Args:
208  previous_request: The request for the previous page. (required)
209  previous_response: The response from the request for the previous page. (required)
210
211Returns:
212  A request object that you can call 'execute()' on to request the next
213  page. Returns None if there are no more items in the collection.
214    </pre>
215</div>
216
217<div class="method">
218    <code class="details" id="patch">patch(fileId, revisionId, body)</code>
219  <pre>Updates a revision. This method supports patch semantics.
220
221Args:
222  fileId: string, The ID for the file. (required)
223  revisionId: string, The ID for the revision. (required)
224  body: object, The request body. (required)
225    The object takes the form of:
226
227{ # A revision of a file.
228    "mimeType": "A String", # The MIME type of the revision.
229    "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.
230    "kind": "drive#revision", # This is always drive#revision.
231    "publishedLink": "A String", # A link to the published revision.
232    "publishedOutsideDomain": True or False, # Whether this revision is published outside the domain. This is only populated and can only be modified for Google Docs.
233    "lastModifyingUser": { # Information about a Drive user. # The last user to modify this revision.
234      "picture": { # The user's profile picture.
235        "url": "A String", # A URL that points to a profile picture of this user.
236      },
237      "kind": "drive#user", # This is always drive#user.
238      "displayName": "A String", # A plain text displayable name for this user.
239      "permissionId": "A String", # The user's ID as visible in the permissions collection.
240      "isAuthenticatedUser": True or False, # Whether this user is the same as the authenticated user for whom the request was made.
241      "emailAddress": "A String", # The email address of the user.
242    },
243    "publishAuto": True or False, # Whether subsequent revisions will be automatically republished. This is only populated and can only be modified for Google Docs.
244    "published": True or False, # Whether this revision is published. This is only populated and can only be modified for Google Docs.
245    "downloadUrl": "A String", # Short term download URL for the file. This will only be populated on files with content stored in Drive.
246    "selfLink": "A String", # A link back to this revision.
247    "etag": "A String", # The ETag of the revision.
248    "fileSize": "A String", # The size of the revision in bytes. This will only be populated on files with content stored in Drive.
249    "exportLinks": { # Links for exporting Google Docs to specific formats.
250      "a_key": "A String", # A mapping from export format to URL
251    },
252    "lastModifyingUserName": "A String", # Name of the last user to modify this revision.
253    "originalFilename": "A String", # The original filename when this revision was created. This will only be populated on files with content stored in Drive.
254    "id": "A String", # The ID of the revision.
255    "md5Checksum": "A String", # An MD5 checksum for the content of this revision. This will only be populated on files with content stored in Drive.
256    "modifiedDate": "A String", # Last time this revision was modified (formatted RFC 3339 timestamp).
257  }
258
259
260Returns:
261  An object of the form:
262
263    { # A revision of a file.
264      "mimeType": "A String", # The MIME type of the revision.
265      "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.
266      "kind": "drive#revision", # This is always drive#revision.
267      "publishedLink": "A String", # A link to the published revision.
268      "publishedOutsideDomain": True or False, # Whether this revision is published outside the domain. This is only populated and can only be modified for Google Docs.
269      "lastModifyingUser": { # Information about a Drive user. # The last user to modify this revision.
270        "picture": { # The user's profile picture.
271          "url": "A String", # A URL that points to a profile picture of this user.
272        },
273        "kind": "drive#user", # This is always drive#user.
274        "displayName": "A String", # A plain text displayable name for this user.
275        "permissionId": "A String", # The user's ID as visible in the permissions collection.
276        "isAuthenticatedUser": True or False, # Whether this user is the same as the authenticated user for whom the request was made.
277        "emailAddress": "A String", # The email address of the user.
278      },
279      "publishAuto": True or False, # Whether subsequent revisions will be automatically republished. This is only populated and can only be modified for Google Docs.
280      "published": True or False, # Whether this revision is published. This is only populated and can only be modified for Google Docs.
281      "downloadUrl": "A String", # Short term download URL for the file. This will only be populated on files with content stored in Drive.
282      "selfLink": "A String", # A link back to this revision.
283      "etag": "A String", # The ETag of the revision.
284      "fileSize": "A String", # The size of the revision in bytes. This will only be populated on files with content stored in Drive.
285      "exportLinks": { # Links for exporting Google Docs to specific formats.
286        "a_key": "A String", # A mapping from export format to URL
287      },
288      "lastModifyingUserName": "A String", # Name of the last user to modify this revision.
289      "originalFilename": "A String", # The original filename when this revision was created. This will only be populated on files with content stored in Drive.
290      "id": "A String", # The ID of the revision.
291      "md5Checksum": "A String", # An MD5 checksum for the content of this revision. This will only be populated on files with content stored in Drive.
292      "modifiedDate": "A String", # Last time this revision was modified (formatted RFC 3339 timestamp).
293    }</pre>
294</div>
295
296<div class="method">
297    <code class="details" id="update">update(fileId, revisionId, body)</code>
298  <pre>Updates a revision.
299
300Args:
301  fileId: string, The ID for the file. (required)
302  revisionId: string, The ID for the revision. (required)
303  body: object, The request body. (required)
304    The object takes the form of:
305
306{ # A revision of a file.
307    "mimeType": "A String", # The MIME type of the revision.
308    "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.
309    "kind": "drive#revision", # This is always drive#revision.
310    "publishedLink": "A String", # A link to the published revision.
311    "publishedOutsideDomain": True or False, # Whether this revision is published outside the domain. This is only populated and can only be modified for Google Docs.
312    "lastModifyingUser": { # Information about a Drive user. # The last user to modify this revision.
313      "picture": { # The user's profile picture.
314        "url": "A String", # A URL that points to a profile picture of this user.
315      },
316      "kind": "drive#user", # This is always drive#user.
317      "displayName": "A String", # A plain text displayable name for this user.
318      "permissionId": "A String", # The user's ID as visible in the permissions collection.
319      "isAuthenticatedUser": True or False, # Whether this user is the same as the authenticated user for whom the request was made.
320      "emailAddress": "A String", # The email address of the user.
321    },
322    "publishAuto": True or False, # Whether subsequent revisions will be automatically republished. This is only populated and can only be modified for Google Docs.
323    "published": True or False, # Whether this revision is published. This is only populated and can only be modified for Google Docs.
324    "downloadUrl": "A String", # Short term download URL for the file. This will only be populated on files with content stored in Drive.
325    "selfLink": "A String", # A link back to this revision.
326    "etag": "A String", # The ETag of the revision.
327    "fileSize": "A String", # The size of the revision in bytes. This will only be populated on files with content stored in Drive.
328    "exportLinks": { # Links for exporting Google Docs to specific formats.
329      "a_key": "A String", # A mapping from export format to URL
330    },
331    "lastModifyingUserName": "A String", # Name of the last user to modify this revision.
332    "originalFilename": "A String", # The original filename when this revision was created. This will only be populated on files with content stored in Drive.
333    "id": "A String", # The ID of the revision.
334    "md5Checksum": "A String", # An MD5 checksum for the content of this revision. This will only be populated on files with content stored in Drive.
335    "modifiedDate": "A String", # Last time this revision was modified (formatted RFC 3339 timestamp).
336  }
337
338
339Returns:
340  An object of the form:
341
342    { # A revision of a file.
343      "mimeType": "A String", # The MIME type of the revision.
344      "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.
345      "kind": "drive#revision", # This is always drive#revision.
346      "publishedLink": "A String", # A link to the published revision.
347      "publishedOutsideDomain": True or False, # Whether this revision is published outside the domain. This is only populated and can only be modified for Google Docs.
348      "lastModifyingUser": { # Information about a Drive user. # The last user to modify this revision.
349        "picture": { # The user's profile picture.
350          "url": "A String", # A URL that points to a profile picture of this user.
351        },
352        "kind": "drive#user", # This is always drive#user.
353        "displayName": "A String", # A plain text displayable name for this user.
354        "permissionId": "A String", # The user's ID as visible in the permissions collection.
355        "isAuthenticatedUser": True or False, # Whether this user is the same as the authenticated user for whom the request was made.
356        "emailAddress": "A String", # The email address of the user.
357      },
358      "publishAuto": True or False, # Whether subsequent revisions will be automatically republished. This is only populated and can only be modified for Google Docs.
359      "published": True or False, # Whether this revision is published. This is only populated and can only be modified for Google Docs.
360      "downloadUrl": "A String", # Short term download URL for the file. This will only be populated on files with content stored in Drive.
361      "selfLink": "A String", # A link back to this revision.
362      "etag": "A String", # The ETag of the revision.
363      "fileSize": "A String", # The size of the revision in bytes. This will only be populated on files with content stored in Drive.
364      "exportLinks": { # Links for exporting Google Docs to specific formats.
365        "a_key": "A String", # A mapping from export format to URL
366      },
367      "lastModifyingUserName": "A String", # Name of the last user to modify this revision.
368      "originalFilename": "A String", # The original filename when this revision was created. This will only be populated on files with content stored in Drive.
369      "id": "A String", # The ID of the revision.
370      "md5Checksum": "A String", # An MD5 checksum for the content of this revision. This will only be populated on files with content stored in Drive.
371      "modifiedDate": "A String", # Last time this revision was modified (formatted RFC 3339 timestamp).
372    }</pre>
373</div>
374
375</body></html>