blob: 798e3292b64dc76e096ca816cd6641b0cf8e2302 [file] [log] [blame]
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001<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_v3.html">Drive API</a> . <a href="drive_v3.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">Permanently deletes a revision. This method is only applicable to files with binary content in Drive.</p>
80<p class="toc_element">
81 <code><a href="#get">get(fileId, revisionId, acknowledgeAbuse=None)</a></code></p>
82<p class="firstline">Gets a revision's metadata or content by ID.</p>
83<p class="toc_element">
84 <code><a href="#get_media">get_media(fileId, revisionId, acknowledgeAbuse=None)</a></code></p>
85<p class="firstline">Gets a revision's metadata or content by ID.</p>
86<p class="toc_element">
87 <code><a href="#list">list(fileId)</a></code></p>
88<p class="firstline">Lists a file's revisions.</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 with patch semantics.</p>
92<h3>Method Details</h3>
93<div class="method">
94 <code class="details" id="delete">delete(fileId, revisionId)</code>
95 <pre>Permanently deletes a revision. This method is only applicable to files with binary content in Drive.
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, acknowledgeAbuse=None)</code>
105 <pre>Gets a revision's metadata or content by ID.
106
107Args:
108 fileId: string, The ID of the file. (required)
109 revisionId: string, The ID of the revision. (required)
110 acknowledgeAbuse: boolean, Whether the user is acknowledging the risk of downloading known malware or other abusive files. This is only applicable when alt=media.
111
112Returns:
113 An object of the form:
114
115 { # The metadata for a revision to a file.
116 "mimeType": "A String", # The MIME type of the revision.
117 "kind": "drive#revision", # This is always drive#revision.
118 "modifiedTime": "A String", # The last time the revision was modified (RFC 3339 date-time).
119 "lastModifyingUser": { # Information about a Drive user. # The last user to modify this revision.
120 "me": True or False, # Whether this user is the requesting user.
121 "kind": "drive#user", # This is always drive#user.
122 "displayName": "A String", # A plain text displayable name for this user.
123 "permissionId": "A String", # The user's ID as visible in Permission resources.
124 "emailAddress": "A String", # The email address of the user. This may not be present in certain contexts if the user has not made their email address visible to the requester.
125 "photoLink": "A String", # A link to the user's profile photo, if available.
126 },
127 "keepForever": True or False, # Whether to keep this revision forever, even if it is no longer the head revision. If not set, the revision will be automatically purged 30 days after newer content is uploaded. This can be set on a maximum of 200 revisions for a file.
128 # This field is only applicable to files with binary content in Drive.
129 "publishAuto": True or False, # Whether subsequent revisions will be automatically republished. This is only applicable to Google Docs.
130 "originalFilename": "A String", # The original filename used to create this revision. This is only applicable to files with binary content in Drive.
131 "published": True or False, # Whether this revision is published. This is only applicable to Google Docs.
132 "size": "A String", # The size of the revision's content in bytes. This is only applicable to files with binary content in Drive.
133 "id": "A String", # The ID of the revision.
134 "md5Checksum": "A String", # The MD5 checksum of the revision's content. This is only applicable to files with binary content in Drive.
135 "publishedOutsideDomain": True or False, # Whether this revision is published outside the domain. This is only applicable to Google Docs.
136 }</pre>
137</div>
138
139<div class="method">
140 <code class="details" id="get_media">get_media(fileId, revisionId, acknowledgeAbuse=None)</code>
141 <pre>Gets a revision's metadata or content by ID.
142
143Args:
144 fileId: string, The ID of the file. (required)
145 revisionId: string, The ID of the revision. (required)
146 acknowledgeAbuse: boolean, Whether the user is acknowledging the risk of downloading known malware or other abusive files. This is only applicable when alt=media.
147
148Returns:
149 The media object as a string.
150
151 </pre>
152</div>
153
154<div class="method">
155 <code class="details" id="list">list(fileId)</code>
156 <pre>Lists a file's revisions.
157
158Args:
159 fileId: string, The ID of the file. (required)
160
161Returns:
162 An object of the form:
163
164 { # A list of revisions of a file.
165 "kind": "drive#revisionList", # This is always drive#revisionList.
166 "revisions": [ # The full list of revisions.
167 { # The metadata for a revision to a file.
168 "mimeType": "A String", # The MIME type of the revision.
169 "kind": "drive#revision", # This is always drive#revision.
170 "modifiedTime": "A String", # The last time the revision was modified (RFC 3339 date-time).
171 "lastModifyingUser": { # Information about a Drive user. # The last user to modify this revision.
172 "me": True or False, # Whether this user is the requesting user.
173 "kind": "drive#user", # This is always drive#user.
174 "displayName": "A String", # A plain text displayable name for this user.
175 "permissionId": "A String", # The user's ID as visible in Permission resources.
176 "emailAddress": "A String", # The email address of the user. This may not be present in certain contexts if the user has not made their email address visible to the requester.
177 "photoLink": "A String", # A link to the user's profile photo, if available.
178 },
179 "keepForever": True or False, # Whether to keep this revision forever, even if it is no longer the head revision. If not set, the revision will be automatically purged 30 days after newer content is uploaded. This can be set on a maximum of 200 revisions for a file.
180 # This field is only applicable to files with binary content in Drive.
181 "publishAuto": True or False, # Whether subsequent revisions will be automatically republished. This is only applicable to Google Docs.
182 "originalFilename": "A String", # The original filename used to create this revision. This is only applicable to files with binary content in Drive.
183 "published": True or False, # Whether this revision is published. This is only applicable to Google Docs.
184 "size": "A String", # The size of the revision's content in bytes. This is only applicable to files with binary content in Drive.
185 "id": "A String", # The ID of the revision.
186 "md5Checksum": "A String", # The MD5 checksum of the revision's content. This is only applicable to files with binary content in Drive.
187 "publishedOutsideDomain": True or False, # Whether this revision is published outside the domain. This is only applicable to Google Docs.
188 },
189 ],
190 }</pre>
191</div>
192
193<div class="method">
194 <code class="details" id="update">update(fileId, revisionId, body)</code>
195 <pre>Updates a revision with patch semantics.
196
197Args:
198 fileId: string, The ID of the file. (required)
199 revisionId: string, The ID of the revision. (required)
200 body: object, The request body. (required)
201 The object takes the form of:
202
203{ # The metadata for a revision to a file.
204 "mimeType": "A String", # The MIME type of the revision.
205 "kind": "drive#revision", # This is always drive#revision.
206 "modifiedTime": "A String", # The last time the revision was modified (RFC 3339 date-time).
207 "lastModifyingUser": { # Information about a Drive user. # The last user to modify this revision.
208 "me": True or False, # Whether this user is the requesting user.
209 "kind": "drive#user", # This is always drive#user.
210 "displayName": "A String", # A plain text displayable name for this user.
211 "permissionId": "A String", # The user's ID as visible in Permission resources.
212 "emailAddress": "A String", # The email address of the user. This may not be present in certain contexts if the user has not made their email address visible to the requester.
213 "photoLink": "A String", # A link to the user's profile photo, if available.
214 },
215 "keepForever": True or False, # Whether to keep this revision forever, even if it is no longer the head revision. If not set, the revision will be automatically purged 30 days after newer content is uploaded. This can be set on a maximum of 200 revisions for a file.
216 # This field is only applicable to files with binary content in Drive.
217 "publishAuto": True or False, # Whether subsequent revisions will be automatically republished. This is only applicable to Google Docs.
218 "originalFilename": "A String", # The original filename used to create this revision. This is only applicable to files with binary content in Drive.
219 "published": True or False, # Whether this revision is published. This is only applicable to Google Docs.
220 "size": "A String", # The size of the revision's content in bytes. This is only applicable to files with binary content in Drive.
221 "id": "A String", # The ID of the revision.
222 "md5Checksum": "A String", # The MD5 checksum of the revision's content. This is only applicable to files with binary content in Drive.
223 "publishedOutsideDomain": True or False, # Whether this revision is published outside the domain. This is only applicable to Google Docs.
224}
225
226
227Returns:
228 An object of the form:
229
230 { # The metadata for a revision to a file.
231 "mimeType": "A String", # The MIME type of the revision.
232 "kind": "drive#revision", # This is always drive#revision.
233 "modifiedTime": "A String", # The last time the revision was modified (RFC 3339 date-time).
234 "lastModifyingUser": { # Information about a Drive user. # The last user to modify this revision.
235 "me": True or False, # Whether this user is the requesting user.
236 "kind": "drive#user", # This is always drive#user.
237 "displayName": "A String", # A plain text displayable name for this user.
238 "permissionId": "A String", # The user's ID as visible in Permission resources.
239 "emailAddress": "A String", # The email address of the user. This may not be present in certain contexts if the user has not made their email address visible to the requester.
240 "photoLink": "A String", # A link to the user's profile photo, if available.
241 },
242 "keepForever": True or False, # Whether to keep this revision forever, even if it is no longer the head revision. If not set, the revision will be automatically purged 30 days after newer content is uploaded. This can be set on a maximum of 200 revisions for a file.
243 # This field is only applicable to files with binary content in Drive.
244 "publishAuto": True or False, # Whether subsequent revisions will be automatically republished. This is only applicable to Google Docs.
245 "originalFilename": "A String", # The original filename used to create this revision. This is only applicable to files with binary content in Drive.
246 "published": True or False, # Whether this revision is published. This is only applicable to Google Docs.
247 "size": "A String", # The size of the revision's content in bytes. This is only applicable to files with binary content in Drive.
248 "id": "A String", # The ID of the revision.
249 "md5Checksum": "A String", # The MD5 checksum of the revision's content. This is only applicable to files with binary content in Drive.
250 "publishedOutsideDomain": True or False, # Whether this revision is published outside the domain. This is only applicable to Google Docs.
251 }</pre>
252</div>
253
254</body></html>