blob: c234e1a1feab0ef5fa7651eeab4267e1f0992613 [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.files.html">files</a></h1>
76<h2>Instance Methods</h2>
77<p class="toc_element">
Joe Gregorioe7a0c472012-07-12 11:46:04 -040078 <code><a href="#copy">copy(fileId, body, pinned=None, convert=None, ocr=None, sourceLanguage=None, ocrLanguage=None, targetLanguage=None, timedTextTrackName=None, timedTextLanguage=None)</a></code></p>
Joe Gregorio075572b2012-07-09 16:53:09 -040079<p class="firstline">Creates a copy of the specified file.</p>
80<p class="toc_element">
81 <code><a href="#delete">delete(fileId)</a></code></p>
82<p class="firstline">Permanently deletes a file by ID. Skips the trash.</p>
83<p class="toc_element">
84 <code><a href="#get">get(fileId, projection=None, updateViewedDate=None)</a></code></p>
85<p class="firstline">Gets a file's metadata by ID.</p>
86<p class="toc_element">
87 <code><a href="#insert">insert(body=None, media_body=None, convert=None, ocr=None, sourceLanguage=None, ocrLanguage=None, targetLanguage=None, timedTextLanguage=None, timedTextTrackName=None, pinned=None)</a></code></p>
88<p class="firstline">Insert a new file.</p>
89<p class="toc_element">
90 <code><a href="#list">list(q=None, projection=None, pageToken=None, maxResults=None)</a></code></p>
91<p class="firstline">Lists the user's files.</p>
92<p class="toc_element">
93 <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p>
94<p class="firstline">Retrieves the next page of results.</p>
95<p class="toc_element">
96 <code><a href="#patch">patch(fileId, body, newRevision=None, pinned=None, targetLanguage=None, ocrLanguage=None, ocr=None, sourceLanguage=None, updateViewedDate=None, timedTextTrackName=None, convert=None, setModifiedDate=None, timedTextLanguage=None)</a></code></p>
97<p class="firstline">Updates file metadata and/or content. This method supports patch semantics.</p>
98<p class="toc_element">
99 <code><a href="#touch">touch(fileId)</a></code></p>
100<p class="firstline">Set the file's updated time to the current server time.</p>
101<p class="toc_element">
102 <code><a href="#trash">trash(fileId)</a></code></p>
103<p class="firstline">Moves a file to the trash.</p>
104<p class="toc_element">
105 <code><a href="#untrash">untrash(fileId)</a></code></p>
106<p class="firstline">Restores a file from the trash.</p>
107<p class="toc_element">
108 <code><a href="#update">update(fileId, body=None, newRevision=None, media_body=None, targetLanguage=None, ocrLanguage=None, ocr=None, pinned=None, sourceLanguage=None, updateViewedDate=None, timedTextTrackName=None, convert=None, setModifiedDate=None, timedTextLanguage=None)</a></code></p>
109<p class="firstline">Updates file metadata and/or content</p>
110<h3>Method Details</h3>
111<div class="method">
Joe Gregorioe7a0c472012-07-12 11:46:04 -0400112 <code class="details" id="copy">copy(fileId, body, pinned=None, convert=None, ocr=None, sourceLanguage=None, ocrLanguage=None, targetLanguage=None, timedTextTrackName=None, timedTextLanguage=None)</code>
Joe Gregorio075572b2012-07-09 16:53:09 -0400113 <pre>Creates a copy of the specified file.
114
115Args:
116 fileId: string, The ID of the file to copy. (required)
117 body: object, The request body. (required)
118 The object takes the form of:
119
120{ # The metadata for a file.
Joe Gregorioad8013f2012-08-03 08:44:02 -0400121 "mimeType": "A String", # The MIME type of the file. This is only mutable on update when uploading new content. This field can be left blank, and the mimetype will be determined from the uploaded content's MIME type.
Joe Gregorio075572b2012-07-09 16:53:09 -0400122 "thumbnailLink": "A String", # A link to the file's thumbnail.
123 "labels": { # A group of labels for the file.
124 "restricted": True or False, # Whether viewers are prevented from downloading this file.
125 "hidden": True or False, # Whether this file is hidden from the user.
126 "viewed": True or False, # Whether this file has been viewed by this user.
127 "starred": True or False, # Whether this file is starred by the user.
128 "trashed": True or False, # Whether this file has been trashed.
129 },
130 "indexableText": { # Indexable text attributes for the file (can only be written)
131 "text": "A String", # The text to be indexed for this file
132 },
Joe Gregorioad8013f2012-08-03 08:44:02 -0400133 "explicitlyTrashed": True or False, # Whether this file has been explicitly trashed, as opposed to recursively trashed. This will only be populated if the file is trashed.
Joe Gregorio075572b2012-07-09 16:53:09 -0400134 "etag": "A String", # ETag of the file.
135 "lastModifyingUserName": "A String", # Name of the last user to modify this file. This will only be populated if a user has edited this file.
136 "writersCanShare": True or False, # Whether writers can share the document with other users.
137 "id": "A String", # The id of the file.
138 "title": "A String", # The title of this file.
139 "ownerNames": [ # Name(s) of the owner(s) of this file.
140 "A String",
141 ],
142 "sharedWithMeDate": "A String", # Time at which this file was shared with the user (formatted RFC 3339 timestamp).
143 "lastViewedByMeDate": "A String", # Last time this file was viewed by the user (formatted RFC 3339 timestamp).
144 "parents": [ # Collection of parent folders which contain this file.
Joe Gregorioe7a0c472012-07-12 11:46:04 -0400145 # Setting this field will put the file in all of the provided folders. On insert, if no folders are provided, the file will be placed in the default root folder.
Joe Gregorio075572b2012-07-09 16:53:09 -0400146 { # A reference to a file's parent.
147 "selfLink": "A String", # A link back to this reference.
148 "kind": "drive#parentReference", # This is always drive#parentReference.
149 "id": "A String", # The ID of the parent.
150 "isRoot": True or False, # Whether or not the parent is the root folder.
151 "parentLink": "A String", # A link to the parent.
152 },
153 ],
154 "exportLinks": { # Links for exporting Google Docs to specific formats.
Joe Gregoriofa08c2e2012-07-23 16:52:03 -0400155 "a_key": "A String", # A mapping from export format to URL
Joe Gregorio075572b2012-07-09 16:53:09 -0400156 },
Joe Gregorioad8013f2012-08-03 08:44:02 -0400157 "originalFilename": "A String", # The original filename if the file was uploaded manually, or the original title if the file was inserted through the API. Note that renames of the title will not change the original filename. This will only be populated on files with content stored in Drive.
Joe Gregorio075572b2012-07-09 16:53:09 -0400158 "description": "A String", # A short description of the file.
Joe Gregorioad8013f2012-08-03 08:44:02 -0400159 "webContentLink": "A String", # A link for downloading the content of the file in a browser using cookie based authentication. In cases where the content is shared publicly, the content can be downloaded without any credentials.
Joe Gregorio075572b2012-07-09 16:53:09 -0400160 "editable": True or False, # Whether the file can be edited by the current user.
161 "kind": "drive#file", # The type of file. This is always drive#file.
162 "quotaBytesUsed": "A String", # The number of quota bytes used by this file.
163 "fileSize": "A String", # The size of the file in bytes. This will only be populated on files with content stored in Drive.
164 "createdDate": "A String", # Create time for this file (formatted ISO8601 timestamp).
165 "md5Checksum": "A String", # An MD5 checksum for the content of this file. This will only be populated on files with content stored in Drive.
Joe Gregorioad8013f2012-08-03 08:44:02 -0400166 "imageMediaMetadata": { # Metadata about image media. This will only be present for image types, and its contents will depend on what can be parsed from the image content.
167 "width": 42, # The width of the image in pixels.
168 "rotation": 42, # The rotation in clockwise degrees from the image's original orientation.
169 "location": { # Geographic location information stored in the image.
170 "latitude": 3.14, # The latitude stored in the image.
171 "altitude": 3.14, # The altitude stored in the image.
172 "longitude": 3.14, # The longitude stored in the image.
173 },
174 "height": 42, # The height of the image in pixels.
175 },
Joe Gregorio075572b2012-07-09 16:53:09 -0400176 "embedLink": "A String", # A link for embedding the file.
Joe Gregorioad8013f2012-08-03 08:44:02 -0400177 "alternateLink": "A String", # A link for opening the file in using a relevant Google editor or viewer.
178 "modifiedByMeDate": "A String", # Last time this file was modified by the user (formatted RFC 3339 timestamp). Note that setting modifiedDate will also update the modifiedByMe date for the user which set the date.
Joe Gregorio075572b2012-07-09 16:53:09 -0400179 "downloadUrl": "A String", # Short term download URL for the file. This will only be populated on files with content stored in Drive.
180 "userPermission": { # A single permission for a file. # The permissions for the authenticated user on this file.
181 "withLink": True or False, # Whether the link is required for this permission.
182 "kind": "drive#permission", # This is always drive#permission.
183 "name": "A String", # The name for this permission.
184 "value": "A String", # The email address or domain name for the entity. This is not populated in responses.
185 "id": "A String", # The ID of the permission.
186 "authKey": "A String", # The authkey parameter required for this permission.
187 "etag": "A String", # The ETag of the permission.
188 "role": "A String", # The primary role for this user. Allowed values are:
189 # - owner
190 # - reader
191 # - writer
192 "photoLink": "A String", # A link to the profile photo, if available.
193 "type": "A String", # The account type. Allowed values are:
194 # - user
195 # - group
196 # - domain
197 # - anyone
198 "additionalRoles": [ # Additional roles for this user. Only commenter is currently allowed.
199 "A String",
200 ],
201 "selfLink": "A String", # A link back to this permission.
202 },
Joe Gregorioad8013f2012-08-03 08:44:02 -0400203 "fileExtension": "A String", # The file extension used when downloading this file. This field is set from the title when inserting or uploading new content. This will only be populated on files with content stored in Drive.
Joe Gregorio075572b2012-07-09 16:53:09 -0400204 "selfLink": "A String", # A link back to this file.
Joe Gregorioad8013f2012-08-03 08:44:02 -0400205 "modifiedDate": "A String", # Last time this file was modified by anyone (formatted RFC 3339 timestamp). This is only mutable on update when the setModifiedDate parameter is set.
Joe Gregorio075572b2012-07-09 16:53:09 -0400206}
207
Joe Gregorioe7a0c472012-07-12 11:46:04 -0400208 pinned: boolean, Whether to pin the head revision of the new copy.
Joe Gregorio075572b2012-07-09 16:53:09 -0400209 convert: boolean, Whether to convert this file to the corresponding Google Docs format.
Joe Gregorioe7a0c472012-07-12 11:46:04 -0400210 ocr: boolean, Whether to attempt OCR on .jpg, .png, or .gif uploads.
Joe Gregorio075572b2012-07-09 16:53:09 -0400211 sourceLanguage: string, The language of the original file to be translated.
212 ocrLanguage: string, If ocr is true, hints at the language to use. Valid values are ISO 639-1 codes.
Joe Gregorioe7a0c472012-07-12 11:46:04 -0400213 targetLanguage: string, Target language to translate the file to. If no sourceLanguage is provided, the API will attempt to detect the language.
Joe Gregorio075572b2012-07-09 16:53:09 -0400214 timedTextTrackName: string, The timed text track name.
215 timedTextLanguage: string, The language of the timed text.
216
217Returns:
218 An object of the form:
219
220 { # The metadata for a file.
Joe Gregorioad8013f2012-08-03 08:44:02 -0400221 "mimeType": "A String", # The MIME type of the file. This is only mutable on update when uploading new content. This field can be left blank, and the mimetype will be determined from the uploaded content's MIME type.
Joe Gregorio075572b2012-07-09 16:53:09 -0400222 "thumbnailLink": "A String", # A link to the file's thumbnail.
223 "labels": { # A group of labels for the file.
224 "restricted": True or False, # Whether viewers are prevented from downloading this file.
225 "hidden": True or False, # Whether this file is hidden from the user.
226 "viewed": True or False, # Whether this file has been viewed by this user.
227 "starred": True or False, # Whether this file is starred by the user.
228 "trashed": True or False, # Whether this file has been trashed.
229 },
230 "indexableText": { # Indexable text attributes for the file (can only be written)
231 "text": "A String", # The text to be indexed for this file
232 },
Joe Gregorioad8013f2012-08-03 08:44:02 -0400233 "explicitlyTrashed": True or False, # Whether this file has been explicitly trashed, as opposed to recursively trashed. This will only be populated if the file is trashed.
Joe Gregorio075572b2012-07-09 16:53:09 -0400234 "etag": "A String", # ETag of the file.
235 "lastModifyingUserName": "A String", # Name of the last user to modify this file. This will only be populated if a user has edited this file.
236 "writersCanShare": True or False, # Whether writers can share the document with other users.
237 "id": "A String", # The id of the file.
238 "title": "A String", # The title of this file.
239 "ownerNames": [ # Name(s) of the owner(s) of this file.
240 "A String",
241 ],
242 "sharedWithMeDate": "A String", # Time at which this file was shared with the user (formatted RFC 3339 timestamp).
243 "lastViewedByMeDate": "A String", # Last time this file was viewed by the user (formatted RFC 3339 timestamp).
244 "parents": [ # Collection of parent folders which contain this file.
Joe Gregorioe7a0c472012-07-12 11:46:04 -0400245 # Setting this field will put the file in all of the provided folders. On insert, if no folders are provided, the file will be placed in the default root folder.
Joe Gregorio075572b2012-07-09 16:53:09 -0400246 { # A reference to a file's parent.
247 "selfLink": "A String", # A link back to this reference.
248 "kind": "drive#parentReference", # This is always drive#parentReference.
249 "id": "A String", # The ID of the parent.
250 "isRoot": True or False, # Whether or not the parent is the root folder.
251 "parentLink": "A String", # A link to the parent.
252 },
253 ],
254 "exportLinks": { # Links for exporting Google Docs to specific formats.
Joe Gregoriofa08c2e2012-07-23 16:52:03 -0400255 "a_key": "A String", # A mapping from export format to URL
Joe Gregorio075572b2012-07-09 16:53:09 -0400256 },
Joe Gregorioad8013f2012-08-03 08:44:02 -0400257 "originalFilename": "A String", # The original filename if the file was uploaded manually, or the original title if the file was inserted through the API. Note that renames of the title will not change the original filename. This will only be populated on files with content stored in Drive.
Joe Gregorio075572b2012-07-09 16:53:09 -0400258 "description": "A String", # A short description of the file.
Joe Gregorioad8013f2012-08-03 08:44:02 -0400259 "webContentLink": "A String", # A link for downloading the content of the file in a browser using cookie based authentication. In cases where the content is shared publicly, the content can be downloaded without any credentials.
Joe Gregorio075572b2012-07-09 16:53:09 -0400260 "editable": True or False, # Whether the file can be edited by the current user.
261 "kind": "drive#file", # The type of file. This is always drive#file.
262 "quotaBytesUsed": "A String", # The number of quota bytes used by this file.
263 "fileSize": "A String", # The size of the file in bytes. This will only be populated on files with content stored in Drive.
264 "createdDate": "A String", # Create time for this file (formatted ISO8601 timestamp).
265 "md5Checksum": "A String", # An MD5 checksum for the content of this file. This will only be populated on files with content stored in Drive.
Joe Gregorioad8013f2012-08-03 08:44:02 -0400266 "imageMediaMetadata": { # Metadata about image media. This will only be present for image types, and its contents will depend on what can be parsed from the image content.
267 "width": 42, # The width of the image in pixels.
268 "rotation": 42, # The rotation in clockwise degrees from the image's original orientation.
269 "location": { # Geographic location information stored in the image.
270 "latitude": 3.14, # The latitude stored in the image.
271 "altitude": 3.14, # The altitude stored in the image.
272 "longitude": 3.14, # The longitude stored in the image.
273 },
274 "height": 42, # The height of the image in pixels.
275 },
Joe Gregorio075572b2012-07-09 16:53:09 -0400276 "embedLink": "A String", # A link for embedding the file.
Joe Gregorioad8013f2012-08-03 08:44:02 -0400277 "alternateLink": "A String", # A link for opening the file in using a relevant Google editor or viewer.
278 "modifiedByMeDate": "A String", # Last time this file was modified by the user (formatted RFC 3339 timestamp). Note that setting modifiedDate will also update the modifiedByMe date for the user which set the date.
Joe Gregorio075572b2012-07-09 16:53:09 -0400279 "downloadUrl": "A String", # Short term download URL for the file. This will only be populated on files with content stored in Drive.
280 "userPermission": { # A single permission for a file. # The permissions for the authenticated user on this file.
281 "withLink": True or False, # Whether the link is required for this permission.
282 "kind": "drive#permission", # This is always drive#permission.
283 "name": "A String", # The name for this permission.
284 "value": "A String", # The email address or domain name for the entity. This is not populated in responses.
285 "id": "A String", # The ID of the permission.
286 "authKey": "A String", # The authkey parameter required for this permission.
287 "etag": "A String", # The ETag of the permission.
288 "role": "A String", # The primary role for this user. Allowed values are:
289 # - owner
290 # - reader
291 # - writer
292 "photoLink": "A String", # A link to the profile photo, if available.
293 "type": "A String", # The account type. Allowed values are:
294 # - user
295 # - group
296 # - domain
297 # - anyone
298 "additionalRoles": [ # Additional roles for this user. Only commenter is currently allowed.
299 "A String",
300 ],
301 "selfLink": "A String", # A link back to this permission.
302 },
Joe Gregorioad8013f2012-08-03 08:44:02 -0400303 "fileExtension": "A String", # The file extension used when downloading this file. This field is set from the title when inserting or uploading new content. This will only be populated on files with content stored in Drive.
Joe Gregorio075572b2012-07-09 16:53:09 -0400304 "selfLink": "A String", # A link back to this file.
Joe Gregorioad8013f2012-08-03 08:44:02 -0400305 "modifiedDate": "A String", # Last time this file was modified by anyone (formatted RFC 3339 timestamp). This is only mutable on update when the setModifiedDate parameter is set.
Joe Gregorio075572b2012-07-09 16:53:09 -0400306 }</pre>
307</div>
308
309<div class="method">
310 <code class="details" id="delete">delete(fileId)</code>
311 <pre>Permanently deletes a file by ID. Skips the trash.
312
313Args:
314 fileId: string, The ID of the file to delete. (required)
315</pre>
316</div>
317
318<div class="method">
319 <code class="details" id="get">get(fileId, projection=None, updateViewedDate=None)</code>
320 <pre>Gets a file's metadata by ID.
321
322Args:
323 fileId: string, The ID for the file in question. (required)
Joe Gregorioad8013f2012-08-03 08:44:02 -0400324 projection: string, This parameter is deprecated and has no function.
Joe Gregorio075572b2012-07-09 16:53:09 -0400325 Allowed values
Joe Gregorioad8013f2012-08-03 08:44:02 -0400326 BASIC - Deprecated
327 FULL - Deprecated
Joe Gregorio075572b2012-07-09 16:53:09 -0400328 updateViewedDate: boolean, Whether to update the view date after successfully retrieving the file.
329
330Returns:
331 An object of the form:
332
333 { # The metadata for a file.
Joe Gregorioad8013f2012-08-03 08:44:02 -0400334 "mimeType": "A String", # The MIME type of the file. This is only mutable on update when uploading new content. This field can be left blank, and the mimetype will be determined from the uploaded content's MIME type.
Joe Gregorio075572b2012-07-09 16:53:09 -0400335 "thumbnailLink": "A String", # A link to the file's thumbnail.
336 "labels": { # A group of labels for the file.
337 "restricted": True or False, # Whether viewers are prevented from downloading this file.
338 "hidden": True or False, # Whether this file is hidden from the user.
339 "viewed": True or False, # Whether this file has been viewed by this user.
340 "starred": True or False, # Whether this file is starred by the user.
341 "trashed": True or False, # Whether this file has been trashed.
342 },
343 "indexableText": { # Indexable text attributes for the file (can only be written)
344 "text": "A String", # The text to be indexed for this file
345 },
Joe Gregorioad8013f2012-08-03 08:44:02 -0400346 "explicitlyTrashed": True or False, # Whether this file has been explicitly trashed, as opposed to recursively trashed. This will only be populated if the file is trashed.
Joe Gregorio075572b2012-07-09 16:53:09 -0400347 "etag": "A String", # ETag of the file.
348 "lastModifyingUserName": "A String", # Name of the last user to modify this file. This will only be populated if a user has edited this file.
349 "writersCanShare": True or False, # Whether writers can share the document with other users.
350 "id": "A String", # The id of the file.
351 "title": "A String", # The title of this file.
352 "ownerNames": [ # Name(s) of the owner(s) of this file.
353 "A String",
354 ],
355 "sharedWithMeDate": "A String", # Time at which this file was shared with the user (formatted RFC 3339 timestamp).
356 "lastViewedByMeDate": "A String", # Last time this file was viewed by the user (formatted RFC 3339 timestamp).
357 "parents": [ # Collection of parent folders which contain this file.
Joe Gregorioe7a0c472012-07-12 11:46:04 -0400358 # Setting this field will put the file in all of the provided folders. On insert, if no folders are provided, the file will be placed in the default root folder.
Joe Gregorio075572b2012-07-09 16:53:09 -0400359 { # A reference to a file's parent.
360 "selfLink": "A String", # A link back to this reference.
361 "kind": "drive#parentReference", # This is always drive#parentReference.
362 "id": "A String", # The ID of the parent.
363 "isRoot": True or False, # Whether or not the parent is the root folder.
364 "parentLink": "A String", # A link to the parent.
365 },
366 ],
367 "exportLinks": { # Links for exporting Google Docs to specific formats.
Joe Gregoriofa08c2e2012-07-23 16:52:03 -0400368 "a_key": "A String", # A mapping from export format to URL
Joe Gregorio075572b2012-07-09 16:53:09 -0400369 },
Joe Gregorioad8013f2012-08-03 08:44:02 -0400370 "originalFilename": "A String", # The original filename if the file was uploaded manually, or the original title if the file was inserted through the API. Note that renames of the title will not change the original filename. This will only be populated on files with content stored in Drive.
Joe Gregorio075572b2012-07-09 16:53:09 -0400371 "description": "A String", # A short description of the file.
Joe Gregorioad8013f2012-08-03 08:44:02 -0400372 "webContentLink": "A String", # A link for downloading the content of the file in a browser using cookie based authentication. In cases where the content is shared publicly, the content can be downloaded without any credentials.
Joe Gregorio075572b2012-07-09 16:53:09 -0400373 "editable": True or False, # Whether the file can be edited by the current user.
374 "kind": "drive#file", # The type of file. This is always drive#file.
375 "quotaBytesUsed": "A String", # The number of quota bytes used by this file.
376 "fileSize": "A String", # The size of the file in bytes. This will only be populated on files with content stored in Drive.
377 "createdDate": "A String", # Create time for this file (formatted ISO8601 timestamp).
378 "md5Checksum": "A String", # An MD5 checksum for the content of this file. This will only be populated on files with content stored in Drive.
Joe Gregorioad8013f2012-08-03 08:44:02 -0400379 "imageMediaMetadata": { # Metadata about image media. This will only be present for image types, and its contents will depend on what can be parsed from the image content.
380 "width": 42, # The width of the image in pixels.
381 "rotation": 42, # The rotation in clockwise degrees from the image's original orientation.
382 "location": { # Geographic location information stored in the image.
383 "latitude": 3.14, # The latitude stored in the image.
384 "altitude": 3.14, # The altitude stored in the image.
385 "longitude": 3.14, # The longitude stored in the image.
386 },
387 "height": 42, # The height of the image in pixels.
388 },
Joe Gregorio075572b2012-07-09 16:53:09 -0400389 "embedLink": "A String", # A link for embedding the file.
Joe Gregorioad8013f2012-08-03 08:44:02 -0400390 "alternateLink": "A String", # A link for opening the file in using a relevant Google editor or viewer.
391 "modifiedByMeDate": "A String", # Last time this file was modified by the user (formatted RFC 3339 timestamp). Note that setting modifiedDate will also update the modifiedByMe date for the user which set the date.
Joe Gregorio075572b2012-07-09 16:53:09 -0400392 "downloadUrl": "A String", # Short term download URL for the file. This will only be populated on files with content stored in Drive.
393 "userPermission": { # A single permission for a file. # The permissions for the authenticated user on this file.
394 "withLink": True or False, # Whether the link is required for this permission.
395 "kind": "drive#permission", # This is always drive#permission.
396 "name": "A String", # The name for this permission.
397 "value": "A String", # The email address or domain name for the entity. This is not populated in responses.
398 "id": "A String", # The ID of the permission.
399 "authKey": "A String", # The authkey parameter required for this permission.
400 "etag": "A String", # The ETag of the permission.
401 "role": "A String", # The primary role for this user. Allowed values are:
402 # - owner
403 # - reader
404 # - writer
405 "photoLink": "A String", # A link to the profile photo, if available.
406 "type": "A String", # The account type. Allowed values are:
407 # - user
408 # - group
409 # - domain
410 # - anyone
411 "additionalRoles": [ # Additional roles for this user. Only commenter is currently allowed.
412 "A String",
413 ],
414 "selfLink": "A String", # A link back to this permission.
415 },
Joe Gregorioad8013f2012-08-03 08:44:02 -0400416 "fileExtension": "A String", # The file extension used when downloading this file. This field is set from the title when inserting or uploading new content. This will only be populated on files with content stored in Drive.
Joe Gregorio075572b2012-07-09 16:53:09 -0400417 "selfLink": "A String", # A link back to this file.
Joe Gregorioad8013f2012-08-03 08:44:02 -0400418 "modifiedDate": "A String", # Last time this file was modified by anyone (formatted RFC 3339 timestamp). This is only mutable on update when the setModifiedDate parameter is set.
Joe Gregorio075572b2012-07-09 16:53:09 -0400419 }</pre>
420</div>
421
422<div class="method">
423 <code class="details" id="insert">insert(body=None, media_body=None, convert=None, ocr=None, sourceLanguage=None, ocrLanguage=None, targetLanguage=None, timedTextLanguage=None, timedTextTrackName=None, pinned=None)</code>
424 <pre>Insert a new file.
425
426Args:
427 body: object, The request body.
428 The object takes the form of:
429
430{ # The metadata for a file.
Joe Gregorioad8013f2012-08-03 08:44:02 -0400431 "mimeType": "A String", # The MIME type of the file. This is only mutable on update when uploading new content. This field can be left blank, and the mimetype will be determined from the uploaded content's MIME type.
Joe Gregorio075572b2012-07-09 16:53:09 -0400432 "thumbnailLink": "A String", # A link to the file's thumbnail.
433 "labels": { # A group of labels for the file.
434 "restricted": True or False, # Whether viewers are prevented from downloading this file.
435 "hidden": True or False, # Whether this file is hidden from the user.
436 "viewed": True or False, # Whether this file has been viewed by this user.
437 "starred": True or False, # Whether this file is starred by the user.
438 "trashed": True or False, # Whether this file has been trashed.
439 },
440 "indexableText": { # Indexable text attributes for the file (can only be written)
441 "text": "A String", # The text to be indexed for this file
442 },
Joe Gregorioad8013f2012-08-03 08:44:02 -0400443 "explicitlyTrashed": True or False, # Whether this file has been explicitly trashed, as opposed to recursively trashed. This will only be populated if the file is trashed.
Joe Gregorio075572b2012-07-09 16:53:09 -0400444 "etag": "A String", # ETag of the file.
445 "lastModifyingUserName": "A String", # Name of the last user to modify this file. This will only be populated if a user has edited this file.
446 "writersCanShare": True or False, # Whether writers can share the document with other users.
447 "id": "A String", # The id of the file.
448 "title": "A String", # The title of this file.
449 "ownerNames": [ # Name(s) of the owner(s) of this file.
450 "A String",
451 ],
452 "sharedWithMeDate": "A String", # Time at which this file was shared with the user (formatted RFC 3339 timestamp).
453 "lastViewedByMeDate": "A String", # Last time this file was viewed by the user (formatted RFC 3339 timestamp).
454 "parents": [ # Collection of parent folders which contain this file.
Joe Gregorioe7a0c472012-07-12 11:46:04 -0400455 # Setting this field will put the file in all of the provided folders. On insert, if no folders are provided, the file will be placed in the default root folder.
Joe Gregorio075572b2012-07-09 16:53:09 -0400456 { # A reference to a file's parent.
457 "selfLink": "A String", # A link back to this reference.
458 "kind": "drive#parentReference", # This is always drive#parentReference.
459 "id": "A String", # The ID of the parent.
460 "isRoot": True or False, # Whether or not the parent is the root folder.
461 "parentLink": "A String", # A link to the parent.
462 },
463 ],
464 "exportLinks": { # Links for exporting Google Docs to specific formats.
Joe Gregoriofa08c2e2012-07-23 16:52:03 -0400465 "a_key": "A String", # A mapping from export format to URL
Joe Gregorio075572b2012-07-09 16:53:09 -0400466 },
Joe Gregorioad8013f2012-08-03 08:44:02 -0400467 "originalFilename": "A String", # The original filename if the file was uploaded manually, or the original title if the file was inserted through the API. Note that renames of the title will not change the original filename. This will only be populated on files with content stored in Drive.
Joe Gregorio075572b2012-07-09 16:53:09 -0400468 "description": "A String", # A short description of the file.
Joe Gregorioad8013f2012-08-03 08:44:02 -0400469 "webContentLink": "A String", # A link for downloading the content of the file in a browser using cookie based authentication. In cases where the content is shared publicly, the content can be downloaded without any credentials.
Joe Gregorio075572b2012-07-09 16:53:09 -0400470 "editable": True or False, # Whether the file can be edited by the current user.
471 "kind": "drive#file", # The type of file. This is always drive#file.
472 "quotaBytesUsed": "A String", # The number of quota bytes used by this file.
473 "fileSize": "A String", # The size of the file in bytes. This will only be populated on files with content stored in Drive.
474 "createdDate": "A String", # Create time for this file (formatted ISO8601 timestamp).
475 "md5Checksum": "A String", # An MD5 checksum for the content of this file. This will only be populated on files with content stored in Drive.
Joe Gregorioad8013f2012-08-03 08:44:02 -0400476 "imageMediaMetadata": { # Metadata about image media. This will only be present for image types, and its contents will depend on what can be parsed from the image content.
477 "width": 42, # The width of the image in pixels.
478 "rotation": 42, # The rotation in clockwise degrees from the image's original orientation.
479 "location": { # Geographic location information stored in the image.
480 "latitude": 3.14, # The latitude stored in the image.
481 "altitude": 3.14, # The altitude stored in the image.
482 "longitude": 3.14, # The longitude stored in the image.
483 },
484 "height": 42, # The height of the image in pixels.
485 },
Joe Gregorio075572b2012-07-09 16:53:09 -0400486 "embedLink": "A String", # A link for embedding the file.
Joe Gregorioad8013f2012-08-03 08:44:02 -0400487 "alternateLink": "A String", # A link for opening the file in using a relevant Google editor or viewer.
488 "modifiedByMeDate": "A String", # Last time this file was modified by the user (formatted RFC 3339 timestamp). Note that setting modifiedDate will also update the modifiedByMe date for the user which set the date.
Joe Gregorio075572b2012-07-09 16:53:09 -0400489 "downloadUrl": "A String", # Short term download URL for the file. This will only be populated on files with content stored in Drive.
490 "userPermission": { # A single permission for a file. # The permissions for the authenticated user on this file.
491 "withLink": True or False, # Whether the link is required for this permission.
492 "kind": "drive#permission", # This is always drive#permission.
493 "name": "A String", # The name for this permission.
494 "value": "A String", # The email address or domain name for the entity. This is not populated in responses.
495 "id": "A String", # The ID of the permission.
496 "authKey": "A String", # The authkey parameter required for this permission.
497 "etag": "A String", # The ETag of the permission.
498 "role": "A String", # The primary role for this user. Allowed values are:
499 # - owner
500 # - reader
501 # - writer
502 "photoLink": "A String", # A link to the profile photo, if available.
503 "type": "A String", # The account type. Allowed values are:
504 # - user
505 # - group
506 # - domain
507 # - anyone
508 "additionalRoles": [ # Additional roles for this user. Only commenter is currently allowed.
509 "A String",
510 ],
511 "selfLink": "A String", # A link back to this permission.
512 },
Joe Gregorioad8013f2012-08-03 08:44:02 -0400513 "fileExtension": "A String", # The file extension used when downloading this file. This field is set from the title when inserting or uploading new content. This will only be populated on files with content stored in Drive.
Joe Gregorio075572b2012-07-09 16:53:09 -0400514 "selfLink": "A String", # A link back to this file.
Joe Gregorioad8013f2012-08-03 08:44:02 -0400515 "modifiedDate": "A String", # Last time this file was modified by anyone (formatted RFC 3339 timestamp). This is only mutable on update when the setModifiedDate parameter is set.
Joe Gregorio075572b2012-07-09 16:53:09 -0400516}
517
518 media_body: string, The filename of the media request body, or an instance of a MediaUpload object.
519 convert: boolean, Whether to convert this file to the corresponding Google Docs format.
520 ocr: boolean, Whether to attempt OCR on .jpg, .png, or .gif uploads.
521 sourceLanguage: string, The language of the original file to be translated.
522 ocrLanguage: string, If ocr is true, hints at the language to use. Valid values are ISO 639-1 codes.
523 targetLanguage: string, Target language to translate the file to. If no sourceLanguage is provided, the API will attempt to detect the language.
524 timedTextLanguage: string, The language of the timed text.
525 timedTextTrackName: string, The timed text track name.
526 pinned: boolean, Whether to pin the head revision of the uploaded file.
527
528Returns:
529 An object of the form:
530
531 { # The metadata for a file.
Joe Gregorioad8013f2012-08-03 08:44:02 -0400532 "mimeType": "A String", # The MIME type of the file. This is only mutable on update when uploading new content. This field can be left blank, and the mimetype will be determined from the uploaded content's MIME type.
Joe Gregorio075572b2012-07-09 16:53:09 -0400533 "thumbnailLink": "A String", # A link to the file's thumbnail.
534 "labels": { # A group of labels for the file.
535 "restricted": True or False, # Whether viewers are prevented from downloading this file.
536 "hidden": True or False, # Whether this file is hidden from the user.
537 "viewed": True or False, # Whether this file has been viewed by this user.
538 "starred": True or False, # Whether this file is starred by the user.
539 "trashed": True or False, # Whether this file has been trashed.
540 },
541 "indexableText": { # Indexable text attributes for the file (can only be written)
542 "text": "A String", # The text to be indexed for this file
543 },
Joe Gregorioad8013f2012-08-03 08:44:02 -0400544 "explicitlyTrashed": True or False, # Whether this file has been explicitly trashed, as opposed to recursively trashed. This will only be populated if the file is trashed.
Joe Gregorio075572b2012-07-09 16:53:09 -0400545 "etag": "A String", # ETag of the file.
546 "lastModifyingUserName": "A String", # Name of the last user to modify this file. This will only be populated if a user has edited this file.
547 "writersCanShare": True or False, # Whether writers can share the document with other users.
548 "id": "A String", # The id of the file.
549 "title": "A String", # The title of this file.
550 "ownerNames": [ # Name(s) of the owner(s) of this file.
551 "A String",
552 ],
553 "sharedWithMeDate": "A String", # Time at which this file was shared with the user (formatted RFC 3339 timestamp).
554 "lastViewedByMeDate": "A String", # Last time this file was viewed by the user (formatted RFC 3339 timestamp).
555 "parents": [ # Collection of parent folders which contain this file.
Joe Gregorioe7a0c472012-07-12 11:46:04 -0400556 # Setting this field will put the file in all of the provided folders. On insert, if no folders are provided, the file will be placed in the default root folder.
Joe Gregorio075572b2012-07-09 16:53:09 -0400557 { # A reference to a file's parent.
558 "selfLink": "A String", # A link back to this reference.
559 "kind": "drive#parentReference", # This is always drive#parentReference.
560 "id": "A String", # The ID of the parent.
561 "isRoot": True or False, # Whether or not the parent is the root folder.
562 "parentLink": "A String", # A link to the parent.
563 },
564 ],
565 "exportLinks": { # Links for exporting Google Docs to specific formats.
Joe Gregoriofa08c2e2012-07-23 16:52:03 -0400566 "a_key": "A String", # A mapping from export format to URL
Joe Gregorio075572b2012-07-09 16:53:09 -0400567 },
Joe Gregorioad8013f2012-08-03 08:44:02 -0400568 "originalFilename": "A String", # The original filename if the file was uploaded manually, or the original title if the file was inserted through the API. Note that renames of the title will not change the original filename. This will only be populated on files with content stored in Drive.
Joe Gregorio075572b2012-07-09 16:53:09 -0400569 "description": "A String", # A short description of the file.
Joe Gregorioad8013f2012-08-03 08:44:02 -0400570 "webContentLink": "A String", # A link for downloading the content of the file in a browser using cookie based authentication. In cases where the content is shared publicly, the content can be downloaded without any credentials.
Joe Gregorio075572b2012-07-09 16:53:09 -0400571 "editable": True or False, # Whether the file can be edited by the current user.
572 "kind": "drive#file", # The type of file. This is always drive#file.
573 "quotaBytesUsed": "A String", # The number of quota bytes used by this file.
574 "fileSize": "A String", # The size of the file in bytes. This will only be populated on files with content stored in Drive.
575 "createdDate": "A String", # Create time for this file (formatted ISO8601 timestamp).
576 "md5Checksum": "A String", # An MD5 checksum for the content of this file. This will only be populated on files with content stored in Drive.
Joe Gregorioad8013f2012-08-03 08:44:02 -0400577 "imageMediaMetadata": { # Metadata about image media. This will only be present for image types, and its contents will depend on what can be parsed from the image content.
578 "width": 42, # The width of the image in pixels.
579 "rotation": 42, # The rotation in clockwise degrees from the image's original orientation.
580 "location": { # Geographic location information stored in the image.
581 "latitude": 3.14, # The latitude stored in the image.
582 "altitude": 3.14, # The altitude stored in the image.
583 "longitude": 3.14, # The longitude stored in the image.
584 },
585 "height": 42, # The height of the image in pixels.
586 },
Joe Gregorio075572b2012-07-09 16:53:09 -0400587 "embedLink": "A String", # A link for embedding the file.
Joe Gregorioad8013f2012-08-03 08:44:02 -0400588 "alternateLink": "A String", # A link for opening the file in using a relevant Google editor or viewer.
589 "modifiedByMeDate": "A String", # Last time this file was modified by the user (formatted RFC 3339 timestamp). Note that setting modifiedDate will also update the modifiedByMe date for the user which set the date.
Joe Gregorio075572b2012-07-09 16:53:09 -0400590 "downloadUrl": "A String", # Short term download URL for the file. This will only be populated on files with content stored in Drive.
591 "userPermission": { # A single permission for a file. # The permissions for the authenticated user on this file.
592 "withLink": True or False, # Whether the link is required for this permission.
593 "kind": "drive#permission", # This is always drive#permission.
594 "name": "A String", # The name for this permission.
595 "value": "A String", # The email address or domain name for the entity. This is not populated in responses.
596 "id": "A String", # The ID of the permission.
597 "authKey": "A String", # The authkey parameter required for this permission.
598 "etag": "A String", # The ETag of the permission.
599 "role": "A String", # The primary role for this user. Allowed values are:
600 # - owner
601 # - reader
602 # - writer
603 "photoLink": "A String", # A link to the profile photo, if available.
604 "type": "A String", # The account type. Allowed values are:
605 # - user
606 # - group
607 # - domain
608 # - anyone
609 "additionalRoles": [ # Additional roles for this user. Only commenter is currently allowed.
610 "A String",
611 ],
612 "selfLink": "A String", # A link back to this permission.
613 },
Joe Gregorioad8013f2012-08-03 08:44:02 -0400614 "fileExtension": "A String", # The file extension used when downloading this file. This field is set from the title when inserting or uploading new content. This will only be populated on files with content stored in Drive.
Joe Gregorio075572b2012-07-09 16:53:09 -0400615 "selfLink": "A String", # A link back to this file.
Joe Gregorioad8013f2012-08-03 08:44:02 -0400616 "modifiedDate": "A String", # Last time this file was modified by anyone (formatted RFC 3339 timestamp). This is only mutable on update when the setModifiedDate parameter is set.
Joe Gregorio075572b2012-07-09 16:53:09 -0400617 }</pre>
618</div>
619
620<div class="method">
621 <code class="details" id="list">list(q=None, projection=None, pageToken=None, maxResults=None)</code>
622 <pre>Lists the user's files.
623
624Args:
625 q: string, Query string for searching files.
Joe Gregorioad8013f2012-08-03 08:44:02 -0400626 projection: string, This parameter is deprecated and has no function.
Joe Gregorio075572b2012-07-09 16:53:09 -0400627 Allowed values
Joe Gregorioad8013f2012-08-03 08:44:02 -0400628 BASIC - Deprecated
629 FULL - Deprecated
Joe Gregorio075572b2012-07-09 16:53:09 -0400630 pageToken: string, Page token for files.
631 maxResults: integer, Maximum number of files to return.
632
633Returns:
634 An object of the form:
635
636 { # A list of files.
637 "nextPageToken": "A String", # The page token for the next page of files.
638 "kind": "drive#fileList", # This is always drive#fileList.
639 "items": [ # The actual list of files.
640 { # The metadata for a file.
Joe Gregorioad8013f2012-08-03 08:44:02 -0400641 "mimeType": "A String", # The MIME type of the file. This is only mutable on update when uploading new content. This field can be left blank, and the mimetype will be determined from the uploaded content's MIME type.
Joe Gregorio075572b2012-07-09 16:53:09 -0400642 "thumbnailLink": "A String", # A link to the file's thumbnail.
643 "labels": { # A group of labels for the file.
644 "restricted": True or False, # Whether viewers are prevented from downloading this file.
645 "hidden": True or False, # Whether this file is hidden from the user.
646 "viewed": True or False, # Whether this file has been viewed by this user.
647 "starred": True or False, # Whether this file is starred by the user.
648 "trashed": True or False, # Whether this file has been trashed.
649 },
650 "indexableText": { # Indexable text attributes for the file (can only be written)
651 "text": "A String", # The text to be indexed for this file
652 },
Joe Gregorioad8013f2012-08-03 08:44:02 -0400653 "explicitlyTrashed": True or False, # Whether this file has been explicitly trashed, as opposed to recursively trashed. This will only be populated if the file is trashed.
Joe Gregorio075572b2012-07-09 16:53:09 -0400654 "etag": "A String", # ETag of the file.
655 "lastModifyingUserName": "A String", # Name of the last user to modify this file. This will only be populated if a user has edited this file.
656 "writersCanShare": True or False, # Whether writers can share the document with other users.
657 "id": "A String", # The id of the file.
658 "title": "A String", # The title of this file.
659 "ownerNames": [ # Name(s) of the owner(s) of this file.
660 "A String",
661 ],
662 "sharedWithMeDate": "A String", # Time at which this file was shared with the user (formatted RFC 3339 timestamp).
663 "lastViewedByMeDate": "A String", # Last time this file was viewed by the user (formatted RFC 3339 timestamp).
664 "parents": [ # Collection of parent folders which contain this file.
Joe Gregorioe7a0c472012-07-12 11:46:04 -0400665 # Setting this field will put the file in all of the provided folders. On insert, if no folders are provided, the file will be placed in the default root folder.
Joe Gregorio075572b2012-07-09 16:53:09 -0400666 { # A reference to a file's parent.
667 "selfLink": "A String", # A link back to this reference.
668 "kind": "drive#parentReference", # This is always drive#parentReference.
669 "id": "A String", # The ID of the parent.
670 "isRoot": True or False, # Whether or not the parent is the root folder.
671 "parentLink": "A String", # A link to the parent.
672 },
673 ],
674 "exportLinks": { # Links for exporting Google Docs to specific formats.
Joe Gregoriofa08c2e2012-07-23 16:52:03 -0400675 "a_key": "A String", # A mapping from export format to URL
Joe Gregorio075572b2012-07-09 16:53:09 -0400676 },
Joe Gregorioad8013f2012-08-03 08:44:02 -0400677 "originalFilename": "A String", # The original filename if the file was uploaded manually, or the original title if the file was inserted through the API. Note that renames of the title will not change the original filename. This will only be populated on files with content stored in Drive.
Joe Gregorio075572b2012-07-09 16:53:09 -0400678 "description": "A String", # A short description of the file.
Joe Gregorioad8013f2012-08-03 08:44:02 -0400679 "webContentLink": "A String", # A link for downloading the content of the file in a browser using cookie based authentication. In cases where the content is shared publicly, the content can be downloaded without any credentials.
Joe Gregorio075572b2012-07-09 16:53:09 -0400680 "editable": True or False, # Whether the file can be edited by the current user.
681 "kind": "drive#file", # The type of file. This is always drive#file.
682 "quotaBytesUsed": "A String", # The number of quota bytes used by this file.
683 "fileSize": "A String", # The size of the file in bytes. This will only be populated on files with content stored in Drive.
684 "createdDate": "A String", # Create time for this file (formatted ISO8601 timestamp).
685 "md5Checksum": "A String", # An MD5 checksum for the content of this file. This will only be populated on files with content stored in Drive.
Joe Gregorioad8013f2012-08-03 08:44:02 -0400686 "imageMediaMetadata": { # Metadata about image media. This will only be present for image types, and its contents will depend on what can be parsed from the image content.
687 "width": 42, # The width of the image in pixels.
688 "rotation": 42, # The rotation in clockwise degrees from the image's original orientation.
689 "location": { # Geographic location information stored in the image.
690 "latitude": 3.14, # The latitude stored in the image.
691 "altitude": 3.14, # The altitude stored in the image.
692 "longitude": 3.14, # The longitude stored in the image.
693 },
694 "height": 42, # The height of the image in pixels.
695 },
Joe Gregorio075572b2012-07-09 16:53:09 -0400696 "embedLink": "A String", # A link for embedding the file.
Joe Gregorioad8013f2012-08-03 08:44:02 -0400697 "alternateLink": "A String", # A link for opening the file in using a relevant Google editor or viewer.
698 "modifiedByMeDate": "A String", # Last time this file was modified by the user (formatted RFC 3339 timestamp). Note that setting modifiedDate will also update the modifiedByMe date for the user which set the date.
Joe Gregorio075572b2012-07-09 16:53:09 -0400699 "downloadUrl": "A String", # Short term download URL for the file. This will only be populated on files with content stored in Drive.
700 "userPermission": { # A single permission for a file. # The permissions for the authenticated user on this file.
701 "withLink": True or False, # Whether the link is required for this permission.
702 "kind": "drive#permission", # This is always drive#permission.
703 "name": "A String", # The name for this permission.
704 "value": "A String", # The email address or domain name for the entity. This is not populated in responses.
705 "id": "A String", # The ID of the permission.
706 "authKey": "A String", # The authkey parameter required for this permission.
707 "etag": "A String", # The ETag of the permission.
708 "role": "A String", # The primary role for this user. Allowed values are:
709 # - owner
710 # - reader
711 # - writer
712 "photoLink": "A String", # A link to the profile photo, if available.
713 "type": "A String", # The account type. Allowed values are:
714 # - user
715 # - group
716 # - domain
717 # - anyone
718 "additionalRoles": [ # Additional roles for this user. Only commenter is currently allowed.
719 "A String",
720 ],
721 "selfLink": "A String", # A link back to this permission.
722 },
Joe Gregorioad8013f2012-08-03 08:44:02 -0400723 "fileExtension": "A String", # The file extension used when downloading this file. This field is set from the title when inserting or uploading new content. This will only be populated on files with content stored in Drive.
Joe Gregorio075572b2012-07-09 16:53:09 -0400724 "selfLink": "A String", # A link back to this file.
Joe Gregorioad8013f2012-08-03 08:44:02 -0400725 "modifiedDate": "A String", # Last time this file was modified by anyone (formatted RFC 3339 timestamp). This is only mutable on update when the setModifiedDate parameter is set.
Joe Gregorio075572b2012-07-09 16:53:09 -0400726 },
727 ],
728 "nextLink": "A String", # A link to the next page of files.
729 "etag": "A String", # The ETag of the list.
730 "selfLink": "A String", # A link back to this list.
731 }</pre>
732</div>
733
734<div class="method">
735 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
736 <pre>Retrieves the next page of results.
737
738Args:
739 previous_request: The request for the previous page. (required)
740 previous_response: The response from the request for the previous page. (required)
741
742Returns:
743 A request object that you can call 'execute()' on to request the next
744 page. Returns None if there are no more items in the collection.
745 </pre>
746</div>
747
748<div class="method">
749 <code class="details" id="patch">patch(fileId, body, newRevision=None, pinned=None, targetLanguage=None, ocrLanguage=None, ocr=None, sourceLanguage=None, updateViewedDate=None, timedTextTrackName=None, convert=None, setModifiedDate=None, timedTextLanguage=None)</code>
750 <pre>Updates file metadata and/or content. This method supports patch semantics.
751
752Args:
753 fileId: string, The ID of the file to update. (required)
754 body: object, The request body. (required)
755 The object takes the form of:
756
757{ # The metadata for a file.
Joe Gregorioad8013f2012-08-03 08:44:02 -0400758 "mimeType": "A String", # The MIME type of the file. This is only mutable on update when uploading new content. This field can be left blank, and the mimetype will be determined from the uploaded content's MIME type.
Joe Gregorio075572b2012-07-09 16:53:09 -0400759 "thumbnailLink": "A String", # A link to the file's thumbnail.
760 "labels": { # A group of labels for the file.
761 "restricted": True or False, # Whether viewers are prevented from downloading this file.
762 "hidden": True or False, # Whether this file is hidden from the user.
763 "viewed": True or False, # Whether this file has been viewed by this user.
764 "starred": True or False, # Whether this file is starred by the user.
765 "trashed": True or False, # Whether this file has been trashed.
766 },
767 "indexableText": { # Indexable text attributes for the file (can only be written)
768 "text": "A String", # The text to be indexed for this file
769 },
Joe Gregorioad8013f2012-08-03 08:44:02 -0400770 "explicitlyTrashed": True or False, # Whether this file has been explicitly trashed, as opposed to recursively trashed. This will only be populated if the file is trashed.
Joe Gregorio075572b2012-07-09 16:53:09 -0400771 "etag": "A String", # ETag of the file.
772 "lastModifyingUserName": "A String", # Name of the last user to modify this file. This will only be populated if a user has edited this file.
773 "writersCanShare": True or False, # Whether writers can share the document with other users.
774 "id": "A String", # The id of the file.
775 "title": "A String", # The title of this file.
776 "ownerNames": [ # Name(s) of the owner(s) of this file.
777 "A String",
778 ],
779 "sharedWithMeDate": "A String", # Time at which this file was shared with the user (formatted RFC 3339 timestamp).
780 "lastViewedByMeDate": "A String", # Last time this file was viewed by the user (formatted RFC 3339 timestamp).
781 "parents": [ # Collection of parent folders which contain this file.
Joe Gregorioe7a0c472012-07-12 11:46:04 -0400782 # Setting this field will put the file in all of the provided folders. On insert, if no folders are provided, the file will be placed in the default root folder.
Joe Gregorio075572b2012-07-09 16:53:09 -0400783 { # A reference to a file's parent.
784 "selfLink": "A String", # A link back to this reference.
785 "kind": "drive#parentReference", # This is always drive#parentReference.
786 "id": "A String", # The ID of the parent.
787 "isRoot": True or False, # Whether or not the parent is the root folder.
788 "parentLink": "A String", # A link to the parent.
789 },
790 ],
791 "exportLinks": { # Links for exporting Google Docs to specific formats.
Joe Gregoriofa08c2e2012-07-23 16:52:03 -0400792 "a_key": "A String", # A mapping from export format to URL
Joe Gregorio075572b2012-07-09 16:53:09 -0400793 },
Joe Gregorioad8013f2012-08-03 08:44:02 -0400794 "originalFilename": "A String", # The original filename if the file was uploaded manually, or the original title if the file was inserted through the API. Note that renames of the title will not change the original filename. This will only be populated on files with content stored in Drive.
Joe Gregorio075572b2012-07-09 16:53:09 -0400795 "description": "A String", # A short description of the file.
Joe Gregorioad8013f2012-08-03 08:44:02 -0400796 "webContentLink": "A String", # A link for downloading the content of the file in a browser using cookie based authentication. In cases where the content is shared publicly, the content can be downloaded without any credentials.
Joe Gregorio075572b2012-07-09 16:53:09 -0400797 "editable": True or False, # Whether the file can be edited by the current user.
798 "kind": "drive#file", # The type of file. This is always drive#file.
799 "quotaBytesUsed": "A String", # The number of quota bytes used by this file.
800 "fileSize": "A String", # The size of the file in bytes. This will only be populated on files with content stored in Drive.
801 "createdDate": "A String", # Create time for this file (formatted ISO8601 timestamp).
802 "md5Checksum": "A String", # An MD5 checksum for the content of this file. This will only be populated on files with content stored in Drive.
Joe Gregorioad8013f2012-08-03 08:44:02 -0400803 "imageMediaMetadata": { # Metadata about image media. This will only be present for image types, and its contents will depend on what can be parsed from the image content.
804 "width": 42, # The width of the image in pixels.
805 "rotation": 42, # The rotation in clockwise degrees from the image's original orientation.
806 "location": { # Geographic location information stored in the image.
807 "latitude": 3.14, # The latitude stored in the image.
808 "altitude": 3.14, # The altitude stored in the image.
809 "longitude": 3.14, # The longitude stored in the image.
810 },
811 "height": 42, # The height of the image in pixels.
812 },
Joe Gregorio075572b2012-07-09 16:53:09 -0400813 "embedLink": "A String", # A link for embedding the file.
Joe Gregorioad8013f2012-08-03 08:44:02 -0400814 "alternateLink": "A String", # A link for opening the file in using a relevant Google editor or viewer.
815 "modifiedByMeDate": "A String", # Last time this file was modified by the user (formatted RFC 3339 timestamp). Note that setting modifiedDate will also update the modifiedByMe date for the user which set the date.
Joe Gregorio075572b2012-07-09 16:53:09 -0400816 "downloadUrl": "A String", # Short term download URL for the file. This will only be populated on files with content stored in Drive.
817 "userPermission": { # A single permission for a file. # The permissions for the authenticated user on this file.
818 "withLink": True or False, # Whether the link is required for this permission.
819 "kind": "drive#permission", # This is always drive#permission.
820 "name": "A String", # The name for this permission.
821 "value": "A String", # The email address or domain name for the entity. This is not populated in responses.
822 "id": "A String", # The ID of the permission.
823 "authKey": "A String", # The authkey parameter required for this permission.
824 "etag": "A String", # The ETag of the permission.
825 "role": "A String", # The primary role for this user. Allowed values are:
826 # - owner
827 # - reader
828 # - writer
829 "photoLink": "A String", # A link to the profile photo, if available.
830 "type": "A String", # The account type. Allowed values are:
831 # - user
832 # - group
833 # - domain
834 # - anyone
835 "additionalRoles": [ # Additional roles for this user. Only commenter is currently allowed.
836 "A String",
837 ],
838 "selfLink": "A String", # A link back to this permission.
839 },
Joe Gregorioad8013f2012-08-03 08:44:02 -0400840 "fileExtension": "A String", # The file extension used when downloading this file. This field is set from the title when inserting or uploading new content. This will only be populated on files with content stored in Drive.
Joe Gregorio075572b2012-07-09 16:53:09 -0400841 "selfLink": "A String", # A link back to this file.
Joe Gregorioad8013f2012-08-03 08:44:02 -0400842 "modifiedDate": "A String", # Last time this file was modified by anyone (formatted RFC 3339 timestamp). This is only mutable on update when the setModifiedDate parameter is set.
Joe Gregorio075572b2012-07-09 16:53:09 -0400843}
844
845 newRevision: boolean, Whether a blob upload should create a new revision. If false, the blob data in the current head revision will be replaced.
846 pinned: boolean, Whether to pin the new revision.
847 targetLanguage: string, Target language to translate the file to. If no sourceLanguage is provided, the API will attempt to detect the language.
848 ocrLanguage: string, If ocr is true, hints at the language to use. Valid values are ISO 639-1 codes.
849 ocr: boolean, Whether to attempt OCR on .jpg, .png, or .gif uploads.
850 sourceLanguage: string, The language of the original file to be translated.
851 updateViewedDate: boolean, Whether to update the view date after successfully updating the file.
852 timedTextTrackName: string, The timed text track name.
853 convert: boolean, Whether to convert this file to the corresponding Google Docs format.
854 setModifiedDate: boolean, Whether to set the modified date with the supplied modified date.
855 timedTextLanguage: string, The language of the timed text.
856
857Returns:
858 An object of the form:
859
860 { # The metadata for a file.
Joe Gregorioad8013f2012-08-03 08:44:02 -0400861 "mimeType": "A String", # The MIME type of the file. This is only mutable on update when uploading new content. This field can be left blank, and the mimetype will be determined from the uploaded content's MIME type.
Joe Gregorio075572b2012-07-09 16:53:09 -0400862 "thumbnailLink": "A String", # A link to the file's thumbnail.
863 "labels": { # A group of labels for the file.
864 "restricted": True or False, # Whether viewers are prevented from downloading this file.
865 "hidden": True or False, # Whether this file is hidden from the user.
866 "viewed": True or False, # Whether this file has been viewed by this user.
867 "starred": True or False, # Whether this file is starred by the user.
868 "trashed": True or False, # Whether this file has been trashed.
869 },
870 "indexableText": { # Indexable text attributes for the file (can only be written)
871 "text": "A String", # The text to be indexed for this file
872 },
Joe Gregorioad8013f2012-08-03 08:44:02 -0400873 "explicitlyTrashed": True or False, # Whether this file has been explicitly trashed, as opposed to recursively trashed. This will only be populated if the file is trashed.
Joe Gregorio075572b2012-07-09 16:53:09 -0400874 "etag": "A String", # ETag of the file.
875 "lastModifyingUserName": "A String", # Name of the last user to modify this file. This will only be populated if a user has edited this file.
876 "writersCanShare": True or False, # Whether writers can share the document with other users.
877 "id": "A String", # The id of the file.
878 "title": "A String", # The title of this file.
879 "ownerNames": [ # Name(s) of the owner(s) of this file.
880 "A String",
881 ],
882 "sharedWithMeDate": "A String", # Time at which this file was shared with the user (formatted RFC 3339 timestamp).
883 "lastViewedByMeDate": "A String", # Last time this file was viewed by the user (formatted RFC 3339 timestamp).
884 "parents": [ # Collection of parent folders which contain this file.
Joe Gregorioe7a0c472012-07-12 11:46:04 -0400885 # Setting this field will put the file in all of the provided folders. On insert, if no folders are provided, the file will be placed in the default root folder.
Joe Gregorio075572b2012-07-09 16:53:09 -0400886 { # A reference to a file's parent.
887 "selfLink": "A String", # A link back to this reference.
888 "kind": "drive#parentReference", # This is always drive#parentReference.
889 "id": "A String", # The ID of the parent.
890 "isRoot": True or False, # Whether or not the parent is the root folder.
891 "parentLink": "A String", # A link to the parent.
892 },
893 ],
894 "exportLinks": { # Links for exporting Google Docs to specific formats.
Joe Gregoriofa08c2e2012-07-23 16:52:03 -0400895 "a_key": "A String", # A mapping from export format to URL
Joe Gregorio075572b2012-07-09 16:53:09 -0400896 },
Joe Gregorioad8013f2012-08-03 08:44:02 -0400897 "originalFilename": "A String", # The original filename if the file was uploaded manually, or the original title if the file was inserted through the API. Note that renames of the title will not change the original filename. This will only be populated on files with content stored in Drive.
Joe Gregorio075572b2012-07-09 16:53:09 -0400898 "description": "A String", # A short description of the file.
Joe Gregorioad8013f2012-08-03 08:44:02 -0400899 "webContentLink": "A String", # A link for downloading the content of the file in a browser using cookie based authentication. In cases where the content is shared publicly, the content can be downloaded without any credentials.
Joe Gregorio075572b2012-07-09 16:53:09 -0400900 "editable": True or False, # Whether the file can be edited by the current user.
901 "kind": "drive#file", # The type of file. This is always drive#file.
902 "quotaBytesUsed": "A String", # The number of quota bytes used by this file.
903 "fileSize": "A String", # The size of the file in bytes. This will only be populated on files with content stored in Drive.
904 "createdDate": "A String", # Create time for this file (formatted ISO8601 timestamp).
905 "md5Checksum": "A String", # An MD5 checksum for the content of this file. This will only be populated on files with content stored in Drive.
Joe Gregorioad8013f2012-08-03 08:44:02 -0400906 "imageMediaMetadata": { # Metadata about image media. This will only be present for image types, and its contents will depend on what can be parsed from the image content.
907 "width": 42, # The width of the image in pixels.
908 "rotation": 42, # The rotation in clockwise degrees from the image's original orientation.
909 "location": { # Geographic location information stored in the image.
910 "latitude": 3.14, # The latitude stored in the image.
911 "altitude": 3.14, # The altitude stored in the image.
912 "longitude": 3.14, # The longitude stored in the image.
913 },
914 "height": 42, # The height of the image in pixels.
915 },
Joe Gregorio075572b2012-07-09 16:53:09 -0400916 "embedLink": "A String", # A link for embedding the file.
Joe Gregorioad8013f2012-08-03 08:44:02 -0400917 "alternateLink": "A String", # A link for opening the file in using a relevant Google editor or viewer.
918 "modifiedByMeDate": "A String", # Last time this file was modified by the user (formatted RFC 3339 timestamp). Note that setting modifiedDate will also update the modifiedByMe date for the user which set the date.
Joe Gregorio075572b2012-07-09 16:53:09 -0400919 "downloadUrl": "A String", # Short term download URL for the file. This will only be populated on files with content stored in Drive.
920 "userPermission": { # A single permission for a file. # The permissions for the authenticated user on this file.
921 "withLink": True or False, # Whether the link is required for this permission.
922 "kind": "drive#permission", # This is always drive#permission.
923 "name": "A String", # The name for this permission.
924 "value": "A String", # The email address or domain name for the entity. This is not populated in responses.
925 "id": "A String", # The ID of the permission.
926 "authKey": "A String", # The authkey parameter required for this permission.
927 "etag": "A String", # The ETag of the permission.
928 "role": "A String", # The primary role for this user. Allowed values are:
929 # - owner
930 # - reader
931 # - writer
932 "photoLink": "A String", # A link to the profile photo, if available.
933 "type": "A String", # The account type. Allowed values are:
934 # - user
935 # - group
936 # - domain
937 # - anyone
938 "additionalRoles": [ # Additional roles for this user. Only commenter is currently allowed.
939 "A String",
940 ],
941 "selfLink": "A String", # A link back to this permission.
942 },
Joe Gregorioad8013f2012-08-03 08:44:02 -0400943 "fileExtension": "A String", # The file extension used when downloading this file. This field is set from the title when inserting or uploading new content. This will only be populated on files with content stored in Drive.
Joe Gregorio075572b2012-07-09 16:53:09 -0400944 "selfLink": "A String", # A link back to this file.
Joe Gregorioad8013f2012-08-03 08:44:02 -0400945 "modifiedDate": "A String", # Last time this file was modified by anyone (formatted RFC 3339 timestamp). This is only mutable on update when the setModifiedDate parameter is set.
Joe Gregorio075572b2012-07-09 16:53:09 -0400946 }</pre>
947</div>
948
949<div class="method">
950 <code class="details" id="touch">touch(fileId)</code>
951 <pre>Set the file's updated time to the current server time.
952
953Args:
954 fileId: string, The ID of the file to update. (required)
955
956Returns:
957 An object of the form:
958
959 { # The metadata for a file.
Joe Gregorioad8013f2012-08-03 08:44:02 -0400960 "mimeType": "A String", # The MIME type of the file. This is only mutable on update when uploading new content. This field can be left blank, and the mimetype will be determined from the uploaded content's MIME type.
Joe Gregorio075572b2012-07-09 16:53:09 -0400961 "thumbnailLink": "A String", # A link to the file's thumbnail.
962 "labels": { # A group of labels for the file.
963 "restricted": True or False, # Whether viewers are prevented from downloading this file.
964 "hidden": True or False, # Whether this file is hidden from the user.
965 "viewed": True or False, # Whether this file has been viewed by this user.
966 "starred": True or False, # Whether this file is starred by the user.
967 "trashed": True or False, # Whether this file has been trashed.
968 },
969 "indexableText": { # Indexable text attributes for the file (can only be written)
970 "text": "A String", # The text to be indexed for this file
971 },
Joe Gregorioad8013f2012-08-03 08:44:02 -0400972 "explicitlyTrashed": True or False, # Whether this file has been explicitly trashed, as opposed to recursively trashed. This will only be populated if the file is trashed.
Joe Gregorio075572b2012-07-09 16:53:09 -0400973 "etag": "A String", # ETag of the file.
974 "lastModifyingUserName": "A String", # Name of the last user to modify this file. This will only be populated if a user has edited this file.
975 "writersCanShare": True or False, # Whether writers can share the document with other users.
976 "id": "A String", # The id of the file.
977 "title": "A String", # The title of this file.
978 "ownerNames": [ # Name(s) of the owner(s) of this file.
979 "A String",
980 ],
981 "sharedWithMeDate": "A String", # Time at which this file was shared with the user (formatted RFC 3339 timestamp).
982 "lastViewedByMeDate": "A String", # Last time this file was viewed by the user (formatted RFC 3339 timestamp).
983 "parents": [ # Collection of parent folders which contain this file.
Joe Gregorioe7a0c472012-07-12 11:46:04 -0400984 # Setting this field will put the file in all of the provided folders. On insert, if no folders are provided, the file will be placed in the default root folder.
Joe Gregorio075572b2012-07-09 16:53:09 -0400985 { # A reference to a file's parent.
986 "selfLink": "A String", # A link back to this reference.
987 "kind": "drive#parentReference", # This is always drive#parentReference.
988 "id": "A String", # The ID of the parent.
989 "isRoot": True or False, # Whether or not the parent is the root folder.
990 "parentLink": "A String", # A link to the parent.
991 },
992 ],
993 "exportLinks": { # Links for exporting Google Docs to specific formats.
Joe Gregoriofa08c2e2012-07-23 16:52:03 -0400994 "a_key": "A String", # A mapping from export format to URL
Joe Gregorio075572b2012-07-09 16:53:09 -0400995 },
Joe Gregorioad8013f2012-08-03 08:44:02 -0400996 "originalFilename": "A String", # The original filename if the file was uploaded manually, or the original title if the file was inserted through the API. Note that renames of the title will not change the original filename. This will only be populated on files with content stored in Drive.
Joe Gregorio075572b2012-07-09 16:53:09 -0400997 "description": "A String", # A short description of the file.
Joe Gregorioad8013f2012-08-03 08:44:02 -0400998 "webContentLink": "A String", # A link for downloading the content of the file in a browser using cookie based authentication. In cases where the content is shared publicly, the content can be downloaded without any credentials.
Joe Gregorio075572b2012-07-09 16:53:09 -0400999 "editable": True or False, # Whether the file can be edited by the current user.
1000 "kind": "drive#file", # The type of file. This is always drive#file.
1001 "quotaBytesUsed": "A String", # The number of quota bytes used by this file.
1002 "fileSize": "A String", # The size of the file in bytes. This will only be populated on files with content stored in Drive.
1003 "createdDate": "A String", # Create time for this file (formatted ISO8601 timestamp).
1004 "md5Checksum": "A String", # An MD5 checksum for the content of this file. This will only be populated on files with content stored in Drive.
Joe Gregorioad8013f2012-08-03 08:44:02 -04001005 "imageMediaMetadata": { # Metadata about image media. This will only be present for image types, and its contents will depend on what can be parsed from the image content.
1006 "width": 42, # The width of the image in pixels.
1007 "rotation": 42, # The rotation in clockwise degrees from the image's original orientation.
1008 "location": { # Geographic location information stored in the image.
1009 "latitude": 3.14, # The latitude stored in the image.
1010 "altitude": 3.14, # The altitude stored in the image.
1011 "longitude": 3.14, # The longitude stored in the image.
1012 },
1013 "height": 42, # The height of the image in pixels.
1014 },
Joe Gregorio075572b2012-07-09 16:53:09 -04001015 "embedLink": "A String", # A link for embedding the file.
Joe Gregorioad8013f2012-08-03 08:44:02 -04001016 "alternateLink": "A String", # A link for opening the file in using a relevant Google editor or viewer.
1017 "modifiedByMeDate": "A String", # Last time this file was modified by the user (formatted RFC 3339 timestamp). Note that setting modifiedDate will also update the modifiedByMe date for the user which set the date.
Joe Gregorio075572b2012-07-09 16:53:09 -04001018 "downloadUrl": "A String", # Short term download URL for the file. This will only be populated on files with content stored in Drive.
1019 "userPermission": { # A single permission for a file. # The permissions for the authenticated user on this file.
1020 "withLink": True or False, # Whether the link is required for this permission.
1021 "kind": "drive#permission", # This is always drive#permission.
1022 "name": "A String", # The name for this permission.
1023 "value": "A String", # The email address or domain name for the entity. This is not populated in responses.
1024 "id": "A String", # The ID of the permission.
1025 "authKey": "A String", # The authkey parameter required for this permission.
1026 "etag": "A String", # The ETag of the permission.
1027 "role": "A String", # The primary role for this user. Allowed values are:
1028 # - owner
1029 # - reader
1030 # - writer
1031 "photoLink": "A String", # A link to the profile photo, if available.
1032 "type": "A String", # The account type. Allowed values are:
1033 # - user
1034 # - group
1035 # - domain
1036 # - anyone
1037 "additionalRoles": [ # Additional roles for this user. Only commenter is currently allowed.
1038 "A String",
1039 ],
1040 "selfLink": "A String", # A link back to this permission.
1041 },
Joe Gregorioad8013f2012-08-03 08:44:02 -04001042 "fileExtension": "A String", # The file extension used when downloading this file. This field is set from the title when inserting or uploading new content. This will only be populated on files with content stored in Drive.
Joe Gregorio075572b2012-07-09 16:53:09 -04001043 "selfLink": "A String", # A link back to this file.
Joe Gregorioad8013f2012-08-03 08:44:02 -04001044 "modifiedDate": "A String", # Last time this file was modified by anyone (formatted RFC 3339 timestamp). This is only mutable on update when the setModifiedDate parameter is set.
Joe Gregorio075572b2012-07-09 16:53:09 -04001045 }</pre>
1046</div>
1047
1048<div class="method">
1049 <code class="details" id="trash">trash(fileId)</code>
1050 <pre>Moves a file to the trash.
1051
1052Args:
1053 fileId: string, The ID of the file to trash. (required)
1054
1055Returns:
1056 An object of the form:
1057
1058 { # The metadata for a file.
Joe Gregorioad8013f2012-08-03 08:44:02 -04001059 "mimeType": "A String", # The MIME type of the file. This is only mutable on update when uploading new content. This field can be left blank, and the mimetype will be determined from the uploaded content's MIME type.
Joe Gregorio075572b2012-07-09 16:53:09 -04001060 "thumbnailLink": "A String", # A link to the file's thumbnail.
1061 "labels": { # A group of labels for the file.
1062 "restricted": True or False, # Whether viewers are prevented from downloading this file.
1063 "hidden": True or False, # Whether this file is hidden from the user.
1064 "viewed": True or False, # Whether this file has been viewed by this user.
1065 "starred": True or False, # Whether this file is starred by the user.
1066 "trashed": True or False, # Whether this file has been trashed.
1067 },
1068 "indexableText": { # Indexable text attributes for the file (can only be written)
1069 "text": "A String", # The text to be indexed for this file
1070 },
Joe Gregorioad8013f2012-08-03 08:44:02 -04001071 "explicitlyTrashed": True or False, # Whether this file has been explicitly trashed, as opposed to recursively trashed. This will only be populated if the file is trashed.
Joe Gregorio075572b2012-07-09 16:53:09 -04001072 "etag": "A String", # ETag of the file.
1073 "lastModifyingUserName": "A String", # Name of the last user to modify this file. This will only be populated if a user has edited this file.
1074 "writersCanShare": True or False, # Whether writers can share the document with other users.
1075 "id": "A String", # The id of the file.
1076 "title": "A String", # The title of this file.
1077 "ownerNames": [ # Name(s) of the owner(s) of this file.
1078 "A String",
1079 ],
1080 "sharedWithMeDate": "A String", # Time at which this file was shared with the user (formatted RFC 3339 timestamp).
1081 "lastViewedByMeDate": "A String", # Last time this file was viewed by the user (formatted RFC 3339 timestamp).
1082 "parents": [ # Collection of parent folders which contain this file.
Joe Gregorioe7a0c472012-07-12 11:46:04 -04001083 # Setting this field will put the file in all of the provided folders. On insert, if no folders are provided, the file will be placed in the default root folder.
Joe Gregorio075572b2012-07-09 16:53:09 -04001084 { # A reference to a file's parent.
1085 "selfLink": "A String", # A link back to this reference.
1086 "kind": "drive#parentReference", # This is always drive#parentReference.
1087 "id": "A String", # The ID of the parent.
1088 "isRoot": True or False, # Whether or not the parent is the root folder.
1089 "parentLink": "A String", # A link to the parent.
1090 },
1091 ],
1092 "exportLinks": { # Links for exporting Google Docs to specific formats.
Joe Gregoriofa08c2e2012-07-23 16:52:03 -04001093 "a_key": "A String", # A mapping from export format to URL
Joe Gregorio075572b2012-07-09 16:53:09 -04001094 },
Joe Gregorioad8013f2012-08-03 08:44:02 -04001095 "originalFilename": "A String", # The original filename if the file was uploaded manually, or the original title if the file was inserted through the API. Note that renames of the title will not change the original filename. This will only be populated on files with content stored in Drive.
Joe Gregorio075572b2012-07-09 16:53:09 -04001096 "description": "A String", # A short description of the file.
Joe Gregorioad8013f2012-08-03 08:44:02 -04001097 "webContentLink": "A String", # A link for downloading the content of the file in a browser using cookie based authentication. In cases where the content is shared publicly, the content can be downloaded without any credentials.
Joe Gregorio075572b2012-07-09 16:53:09 -04001098 "editable": True or False, # Whether the file can be edited by the current user.
1099 "kind": "drive#file", # The type of file. This is always drive#file.
1100 "quotaBytesUsed": "A String", # The number of quota bytes used by this file.
1101 "fileSize": "A String", # The size of the file in bytes. This will only be populated on files with content stored in Drive.
1102 "createdDate": "A String", # Create time for this file (formatted ISO8601 timestamp).
1103 "md5Checksum": "A String", # An MD5 checksum for the content of this file. This will only be populated on files with content stored in Drive.
Joe Gregorioad8013f2012-08-03 08:44:02 -04001104 "imageMediaMetadata": { # Metadata about image media. This will only be present for image types, and its contents will depend on what can be parsed from the image content.
1105 "width": 42, # The width of the image in pixels.
1106 "rotation": 42, # The rotation in clockwise degrees from the image's original orientation.
1107 "location": { # Geographic location information stored in the image.
1108 "latitude": 3.14, # The latitude stored in the image.
1109 "altitude": 3.14, # The altitude stored in the image.
1110 "longitude": 3.14, # The longitude stored in the image.
1111 },
1112 "height": 42, # The height of the image in pixels.
1113 },
Joe Gregorio075572b2012-07-09 16:53:09 -04001114 "embedLink": "A String", # A link for embedding the file.
Joe Gregorioad8013f2012-08-03 08:44:02 -04001115 "alternateLink": "A String", # A link for opening the file in using a relevant Google editor or viewer.
1116 "modifiedByMeDate": "A String", # Last time this file was modified by the user (formatted RFC 3339 timestamp). Note that setting modifiedDate will also update the modifiedByMe date for the user which set the date.
Joe Gregorio075572b2012-07-09 16:53:09 -04001117 "downloadUrl": "A String", # Short term download URL for the file. This will only be populated on files with content stored in Drive.
1118 "userPermission": { # A single permission for a file. # The permissions for the authenticated user on this file.
1119 "withLink": True or False, # Whether the link is required for this permission.
1120 "kind": "drive#permission", # This is always drive#permission.
1121 "name": "A String", # The name for this permission.
1122 "value": "A String", # The email address or domain name for the entity. This is not populated in responses.
1123 "id": "A String", # The ID of the permission.
1124 "authKey": "A String", # The authkey parameter required for this permission.
1125 "etag": "A String", # The ETag of the permission.
1126 "role": "A String", # The primary role for this user. Allowed values are:
1127 # - owner
1128 # - reader
1129 # - writer
1130 "photoLink": "A String", # A link to the profile photo, if available.
1131 "type": "A String", # The account type. Allowed values are:
1132 # - user
1133 # - group
1134 # - domain
1135 # - anyone
1136 "additionalRoles": [ # Additional roles for this user. Only commenter is currently allowed.
1137 "A String",
1138 ],
1139 "selfLink": "A String", # A link back to this permission.
1140 },
Joe Gregorioad8013f2012-08-03 08:44:02 -04001141 "fileExtension": "A String", # The file extension used when downloading this file. This field is set from the title when inserting or uploading new content. This will only be populated on files with content stored in Drive.
Joe Gregorio075572b2012-07-09 16:53:09 -04001142 "selfLink": "A String", # A link back to this file.
Joe Gregorioad8013f2012-08-03 08:44:02 -04001143 "modifiedDate": "A String", # Last time this file was modified by anyone (formatted RFC 3339 timestamp). This is only mutable on update when the setModifiedDate parameter is set.
Joe Gregorio075572b2012-07-09 16:53:09 -04001144 }</pre>
1145</div>
1146
1147<div class="method">
1148 <code class="details" id="untrash">untrash(fileId)</code>
1149 <pre>Restores a file from the trash.
1150
1151Args:
1152 fileId: string, The ID of the file to untrash. (required)
1153
1154Returns:
1155 An object of the form:
1156
1157 { # The metadata for a file.
Joe Gregorioad8013f2012-08-03 08:44:02 -04001158 "mimeType": "A String", # The MIME type of the file. This is only mutable on update when uploading new content. This field can be left blank, and the mimetype will be determined from the uploaded content's MIME type.
Joe Gregorio075572b2012-07-09 16:53:09 -04001159 "thumbnailLink": "A String", # A link to the file's thumbnail.
1160 "labels": { # A group of labels for the file.
1161 "restricted": True or False, # Whether viewers are prevented from downloading this file.
1162 "hidden": True or False, # Whether this file is hidden from the user.
1163 "viewed": True or False, # Whether this file has been viewed by this user.
1164 "starred": True or False, # Whether this file is starred by the user.
1165 "trashed": True or False, # Whether this file has been trashed.
1166 },
1167 "indexableText": { # Indexable text attributes for the file (can only be written)
1168 "text": "A String", # The text to be indexed for this file
1169 },
Joe Gregorioad8013f2012-08-03 08:44:02 -04001170 "explicitlyTrashed": True or False, # Whether this file has been explicitly trashed, as opposed to recursively trashed. This will only be populated if the file is trashed.
Joe Gregorio075572b2012-07-09 16:53:09 -04001171 "etag": "A String", # ETag of the file.
1172 "lastModifyingUserName": "A String", # Name of the last user to modify this file. This will only be populated if a user has edited this file.
1173 "writersCanShare": True or False, # Whether writers can share the document with other users.
1174 "id": "A String", # The id of the file.
1175 "title": "A String", # The title of this file.
1176 "ownerNames": [ # Name(s) of the owner(s) of this file.
1177 "A String",
1178 ],
1179 "sharedWithMeDate": "A String", # Time at which this file was shared with the user (formatted RFC 3339 timestamp).
1180 "lastViewedByMeDate": "A String", # Last time this file was viewed by the user (formatted RFC 3339 timestamp).
1181 "parents": [ # Collection of parent folders which contain this file.
Joe Gregorioe7a0c472012-07-12 11:46:04 -04001182 # Setting this field will put the file in all of the provided folders. On insert, if no folders are provided, the file will be placed in the default root folder.
Joe Gregorio075572b2012-07-09 16:53:09 -04001183 { # A reference to a file's parent.
1184 "selfLink": "A String", # A link back to this reference.
1185 "kind": "drive#parentReference", # This is always drive#parentReference.
1186 "id": "A String", # The ID of the parent.
1187 "isRoot": True or False, # Whether or not the parent is the root folder.
1188 "parentLink": "A String", # A link to the parent.
1189 },
1190 ],
1191 "exportLinks": { # Links for exporting Google Docs to specific formats.
Joe Gregoriofa08c2e2012-07-23 16:52:03 -04001192 "a_key": "A String", # A mapping from export format to URL
Joe Gregorio075572b2012-07-09 16:53:09 -04001193 },
Joe Gregorioad8013f2012-08-03 08:44:02 -04001194 "originalFilename": "A String", # The original filename if the file was uploaded manually, or the original title if the file was inserted through the API. Note that renames of the title will not change the original filename. This will only be populated on files with content stored in Drive.
Joe Gregorio075572b2012-07-09 16:53:09 -04001195 "description": "A String", # A short description of the file.
Joe Gregorioad8013f2012-08-03 08:44:02 -04001196 "webContentLink": "A String", # A link for downloading the content of the file in a browser using cookie based authentication. In cases where the content is shared publicly, the content can be downloaded without any credentials.
Joe Gregorio075572b2012-07-09 16:53:09 -04001197 "editable": True or False, # Whether the file can be edited by the current user.
1198 "kind": "drive#file", # The type of file. This is always drive#file.
1199 "quotaBytesUsed": "A String", # The number of quota bytes used by this file.
1200 "fileSize": "A String", # The size of the file in bytes. This will only be populated on files with content stored in Drive.
1201 "createdDate": "A String", # Create time for this file (formatted ISO8601 timestamp).
1202 "md5Checksum": "A String", # An MD5 checksum for the content of this file. This will only be populated on files with content stored in Drive.
Joe Gregorioad8013f2012-08-03 08:44:02 -04001203 "imageMediaMetadata": { # Metadata about image media. This will only be present for image types, and its contents will depend on what can be parsed from the image content.
1204 "width": 42, # The width of the image in pixels.
1205 "rotation": 42, # The rotation in clockwise degrees from the image's original orientation.
1206 "location": { # Geographic location information stored in the image.
1207 "latitude": 3.14, # The latitude stored in the image.
1208 "altitude": 3.14, # The altitude stored in the image.
1209 "longitude": 3.14, # The longitude stored in the image.
1210 },
1211 "height": 42, # The height of the image in pixels.
1212 },
Joe Gregorio075572b2012-07-09 16:53:09 -04001213 "embedLink": "A String", # A link for embedding the file.
Joe Gregorioad8013f2012-08-03 08:44:02 -04001214 "alternateLink": "A String", # A link for opening the file in using a relevant Google editor or viewer.
1215 "modifiedByMeDate": "A String", # Last time this file was modified by the user (formatted RFC 3339 timestamp). Note that setting modifiedDate will also update the modifiedByMe date for the user which set the date.
Joe Gregorio075572b2012-07-09 16:53:09 -04001216 "downloadUrl": "A String", # Short term download URL for the file. This will only be populated on files with content stored in Drive.
1217 "userPermission": { # A single permission for a file. # The permissions for the authenticated user on this file.
1218 "withLink": True or False, # Whether the link is required for this permission.
1219 "kind": "drive#permission", # This is always drive#permission.
1220 "name": "A String", # The name for this permission.
1221 "value": "A String", # The email address or domain name for the entity. This is not populated in responses.
1222 "id": "A String", # The ID of the permission.
1223 "authKey": "A String", # The authkey parameter required for this permission.
1224 "etag": "A String", # The ETag of the permission.
1225 "role": "A String", # The primary role for this user. Allowed values are:
1226 # - owner
1227 # - reader
1228 # - writer
1229 "photoLink": "A String", # A link to the profile photo, if available.
1230 "type": "A String", # The account type. Allowed values are:
1231 # - user
1232 # - group
1233 # - domain
1234 # - anyone
1235 "additionalRoles": [ # Additional roles for this user. Only commenter is currently allowed.
1236 "A String",
1237 ],
1238 "selfLink": "A String", # A link back to this permission.
1239 },
Joe Gregorioad8013f2012-08-03 08:44:02 -04001240 "fileExtension": "A String", # The file extension used when downloading this file. This field is set from the title when inserting or uploading new content. This will only be populated on files with content stored in Drive.
Joe Gregorio075572b2012-07-09 16:53:09 -04001241 "selfLink": "A String", # A link back to this file.
Joe Gregorioad8013f2012-08-03 08:44:02 -04001242 "modifiedDate": "A String", # Last time this file was modified by anyone (formatted RFC 3339 timestamp). This is only mutable on update when the setModifiedDate parameter is set.
Joe Gregorio075572b2012-07-09 16:53:09 -04001243 }</pre>
1244</div>
1245
1246<div class="method">
1247 <code class="details" id="update">update(fileId, body=None, newRevision=None, media_body=None, targetLanguage=None, ocrLanguage=None, ocr=None, pinned=None, sourceLanguage=None, updateViewedDate=None, timedTextTrackName=None, convert=None, setModifiedDate=None, timedTextLanguage=None)</code>
1248 <pre>Updates file metadata and/or content
1249
1250Args:
1251 fileId: string, The ID of the file to update. (required)
1252 body: object, The request body.
1253 The object takes the form of:
1254
1255{ # The metadata for a file.
Joe Gregorioad8013f2012-08-03 08:44:02 -04001256 "mimeType": "A String", # The MIME type of the file. This is only mutable on update when uploading new content. This field can be left blank, and the mimetype will be determined from the uploaded content's MIME type.
Joe Gregorio075572b2012-07-09 16:53:09 -04001257 "thumbnailLink": "A String", # A link to the file's thumbnail.
1258 "labels": { # A group of labels for the file.
1259 "restricted": True or False, # Whether viewers are prevented from downloading this file.
1260 "hidden": True or False, # Whether this file is hidden from the user.
1261 "viewed": True or False, # Whether this file has been viewed by this user.
1262 "starred": True or False, # Whether this file is starred by the user.
1263 "trashed": True or False, # Whether this file has been trashed.
1264 },
1265 "indexableText": { # Indexable text attributes for the file (can only be written)
1266 "text": "A String", # The text to be indexed for this file
1267 },
Joe Gregorioad8013f2012-08-03 08:44:02 -04001268 "explicitlyTrashed": True or False, # Whether this file has been explicitly trashed, as opposed to recursively trashed. This will only be populated if the file is trashed.
Joe Gregorio075572b2012-07-09 16:53:09 -04001269 "etag": "A String", # ETag of the file.
1270 "lastModifyingUserName": "A String", # Name of the last user to modify this file. This will only be populated if a user has edited this file.
1271 "writersCanShare": True or False, # Whether writers can share the document with other users.
1272 "id": "A String", # The id of the file.
1273 "title": "A String", # The title of this file.
1274 "ownerNames": [ # Name(s) of the owner(s) of this file.
1275 "A String",
1276 ],
1277 "sharedWithMeDate": "A String", # Time at which this file was shared with the user (formatted RFC 3339 timestamp).
1278 "lastViewedByMeDate": "A String", # Last time this file was viewed by the user (formatted RFC 3339 timestamp).
1279 "parents": [ # Collection of parent folders which contain this file.
Joe Gregorioe7a0c472012-07-12 11:46:04 -04001280 # Setting this field will put the file in all of the provided folders. On insert, if no folders are provided, the file will be placed in the default root folder.
Joe Gregorio075572b2012-07-09 16:53:09 -04001281 { # A reference to a file's parent.
1282 "selfLink": "A String", # A link back to this reference.
1283 "kind": "drive#parentReference", # This is always drive#parentReference.
1284 "id": "A String", # The ID of the parent.
1285 "isRoot": True or False, # Whether or not the parent is the root folder.
1286 "parentLink": "A String", # A link to the parent.
1287 },
1288 ],
1289 "exportLinks": { # Links for exporting Google Docs to specific formats.
Joe Gregoriofa08c2e2012-07-23 16:52:03 -04001290 "a_key": "A String", # A mapping from export format to URL
Joe Gregorio075572b2012-07-09 16:53:09 -04001291 },
Joe Gregorioad8013f2012-08-03 08:44:02 -04001292 "originalFilename": "A String", # The original filename if the file was uploaded manually, or the original title if the file was inserted through the API. Note that renames of the title will not change the original filename. This will only be populated on files with content stored in Drive.
Joe Gregorio075572b2012-07-09 16:53:09 -04001293 "description": "A String", # A short description of the file.
Joe Gregorioad8013f2012-08-03 08:44:02 -04001294 "webContentLink": "A String", # A link for downloading the content of the file in a browser using cookie based authentication. In cases where the content is shared publicly, the content can be downloaded without any credentials.
Joe Gregorio075572b2012-07-09 16:53:09 -04001295 "editable": True or False, # Whether the file can be edited by the current user.
1296 "kind": "drive#file", # The type of file. This is always drive#file.
1297 "quotaBytesUsed": "A String", # The number of quota bytes used by this file.
1298 "fileSize": "A String", # The size of the file in bytes. This will only be populated on files with content stored in Drive.
1299 "createdDate": "A String", # Create time for this file (formatted ISO8601 timestamp).
1300 "md5Checksum": "A String", # An MD5 checksum for the content of this file. This will only be populated on files with content stored in Drive.
Joe Gregorioad8013f2012-08-03 08:44:02 -04001301 "imageMediaMetadata": { # Metadata about image media. This will only be present for image types, and its contents will depend on what can be parsed from the image content.
1302 "width": 42, # The width of the image in pixels.
1303 "rotation": 42, # The rotation in clockwise degrees from the image's original orientation.
1304 "location": { # Geographic location information stored in the image.
1305 "latitude": 3.14, # The latitude stored in the image.
1306 "altitude": 3.14, # The altitude stored in the image.
1307 "longitude": 3.14, # The longitude stored in the image.
1308 },
1309 "height": 42, # The height of the image in pixels.
1310 },
Joe Gregorio075572b2012-07-09 16:53:09 -04001311 "embedLink": "A String", # A link for embedding the file.
Joe Gregorioad8013f2012-08-03 08:44:02 -04001312 "alternateLink": "A String", # A link for opening the file in using a relevant Google editor or viewer.
1313 "modifiedByMeDate": "A String", # Last time this file was modified by the user (formatted RFC 3339 timestamp). Note that setting modifiedDate will also update the modifiedByMe date for the user which set the date.
Joe Gregorio075572b2012-07-09 16:53:09 -04001314 "downloadUrl": "A String", # Short term download URL for the file. This will only be populated on files with content stored in Drive.
1315 "userPermission": { # A single permission for a file. # The permissions for the authenticated user on this file.
1316 "withLink": True or False, # Whether the link is required for this permission.
1317 "kind": "drive#permission", # This is always drive#permission.
1318 "name": "A String", # The name for this permission.
1319 "value": "A String", # The email address or domain name for the entity. This is not populated in responses.
1320 "id": "A String", # The ID of the permission.
1321 "authKey": "A String", # The authkey parameter required for this permission.
1322 "etag": "A String", # The ETag of the permission.
1323 "role": "A String", # The primary role for this user. Allowed values are:
1324 # - owner
1325 # - reader
1326 # - writer
1327 "photoLink": "A String", # A link to the profile photo, if available.
1328 "type": "A String", # The account type. Allowed values are:
1329 # - user
1330 # - group
1331 # - domain
1332 # - anyone
1333 "additionalRoles": [ # Additional roles for this user. Only commenter is currently allowed.
1334 "A String",
1335 ],
1336 "selfLink": "A String", # A link back to this permission.
1337 },
Joe Gregorioad8013f2012-08-03 08:44:02 -04001338 "fileExtension": "A String", # The file extension used when downloading this file. This field is set from the title when inserting or uploading new content. This will only be populated on files with content stored in Drive.
Joe Gregorio075572b2012-07-09 16:53:09 -04001339 "selfLink": "A String", # A link back to this file.
Joe Gregorioad8013f2012-08-03 08:44:02 -04001340 "modifiedDate": "A String", # Last time this file was modified by anyone (formatted RFC 3339 timestamp). This is only mutable on update when the setModifiedDate parameter is set.
Joe Gregorio075572b2012-07-09 16:53:09 -04001341}
1342
1343 newRevision: boolean, Whether a blob upload should create a new revision. If false, the blob data in the current head revision will be replaced.
1344 media_body: string, The filename of the media request body, or an instance of a MediaUpload object.
1345 targetLanguage: string, Target language to translate the file to. If no sourceLanguage is provided, the API will attempt to detect the language.
1346 ocrLanguage: string, If ocr is true, hints at the language to use. Valid values are ISO 639-1 codes.
1347 ocr: boolean, Whether to attempt OCR on .jpg, .png, or .gif uploads.
1348 pinned: boolean, Whether to pin the new revision.
1349 sourceLanguage: string, The language of the original file to be translated.
1350 updateViewedDate: boolean, Whether to update the view date after successfully updating the file.
1351 timedTextTrackName: string, The timed text track name.
1352 convert: boolean, Whether to convert this file to the corresponding Google Docs format.
1353 setModifiedDate: boolean, Whether to set the modified date with the supplied modified date.
1354 timedTextLanguage: string, The language of the timed text.
1355
1356Returns:
1357 An object of the form:
1358
1359 { # The metadata for a file.
Joe Gregorioad8013f2012-08-03 08:44:02 -04001360 "mimeType": "A String", # The MIME type of the file. This is only mutable on update when uploading new content. This field can be left blank, and the mimetype will be determined from the uploaded content's MIME type.
Joe Gregorio075572b2012-07-09 16:53:09 -04001361 "thumbnailLink": "A String", # A link to the file's thumbnail.
1362 "labels": { # A group of labels for the file.
1363 "restricted": True or False, # Whether viewers are prevented from downloading this file.
1364 "hidden": True or False, # Whether this file is hidden from the user.
1365 "viewed": True or False, # Whether this file has been viewed by this user.
1366 "starred": True or False, # Whether this file is starred by the user.
1367 "trashed": True or False, # Whether this file has been trashed.
1368 },
1369 "indexableText": { # Indexable text attributes for the file (can only be written)
1370 "text": "A String", # The text to be indexed for this file
1371 },
Joe Gregorioad8013f2012-08-03 08:44:02 -04001372 "explicitlyTrashed": True or False, # Whether this file has been explicitly trashed, as opposed to recursively trashed. This will only be populated if the file is trashed.
Joe Gregorio075572b2012-07-09 16:53:09 -04001373 "etag": "A String", # ETag of the file.
1374 "lastModifyingUserName": "A String", # Name of the last user to modify this file. This will only be populated if a user has edited this file.
1375 "writersCanShare": True or False, # Whether writers can share the document with other users.
1376 "id": "A String", # The id of the file.
1377 "title": "A String", # The title of this file.
1378 "ownerNames": [ # Name(s) of the owner(s) of this file.
1379 "A String",
1380 ],
1381 "sharedWithMeDate": "A String", # Time at which this file was shared with the user (formatted RFC 3339 timestamp).
1382 "lastViewedByMeDate": "A String", # Last time this file was viewed by the user (formatted RFC 3339 timestamp).
1383 "parents": [ # Collection of parent folders which contain this file.
Joe Gregorioe7a0c472012-07-12 11:46:04 -04001384 # Setting this field will put the file in all of the provided folders. On insert, if no folders are provided, the file will be placed in the default root folder.
Joe Gregorio075572b2012-07-09 16:53:09 -04001385 { # A reference to a file's parent.
1386 "selfLink": "A String", # A link back to this reference.
1387 "kind": "drive#parentReference", # This is always drive#parentReference.
1388 "id": "A String", # The ID of the parent.
1389 "isRoot": True or False, # Whether or not the parent is the root folder.
1390 "parentLink": "A String", # A link to the parent.
1391 },
1392 ],
1393 "exportLinks": { # Links for exporting Google Docs to specific formats.
Joe Gregoriofa08c2e2012-07-23 16:52:03 -04001394 "a_key": "A String", # A mapping from export format to URL
Joe Gregorio075572b2012-07-09 16:53:09 -04001395 },
Joe Gregorioad8013f2012-08-03 08:44:02 -04001396 "originalFilename": "A String", # The original filename if the file was uploaded manually, or the original title if the file was inserted through the API. Note that renames of the title will not change the original filename. This will only be populated on files with content stored in Drive.
Joe Gregorio075572b2012-07-09 16:53:09 -04001397 "description": "A String", # A short description of the file.
Joe Gregorioad8013f2012-08-03 08:44:02 -04001398 "webContentLink": "A String", # A link for downloading the content of the file in a browser using cookie based authentication. In cases where the content is shared publicly, the content can be downloaded without any credentials.
Joe Gregorio075572b2012-07-09 16:53:09 -04001399 "editable": True or False, # Whether the file can be edited by the current user.
1400 "kind": "drive#file", # The type of file. This is always drive#file.
1401 "quotaBytesUsed": "A String", # The number of quota bytes used by this file.
1402 "fileSize": "A String", # The size of the file in bytes. This will only be populated on files with content stored in Drive.
1403 "createdDate": "A String", # Create time for this file (formatted ISO8601 timestamp).
1404 "md5Checksum": "A String", # An MD5 checksum for the content of this file. This will only be populated on files with content stored in Drive.
Joe Gregorioad8013f2012-08-03 08:44:02 -04001405 "imageMediaMetadata": { # Metadata about image media. This will only be present for image types, and its contents will depend on what can be parsed from the image content.
1406 "width": 42, # The width of the image in pixels.
1407 "rotation": 42, # The rotation in clockwise degrees from the image's original orientation.
1408 "location": { # Geographic location information stored in the image.
1409 "latitude": 3.14, # The latitude stored in the image.
1410 "altitude": 3.14, # The altitude stored in the image.
1411 "longitude": 3.14, # The longitude stored in the image.
1412 },
1413 "height": 42, # The height of the image in pixels.
1414 },
Joe Gregorio075572b2012-07-09 16:53:09 -04001415 "embedLink": "A String", # A link for embedding the file.
Joe Gregorioad8013f2012-08-03 08:44:02 -04001416 "alternateLink": "A String", # A link for opening the file in using a relevant Google editor or viewer.
1417 "modifiedByMeDate": "A String", # Last time this file was modified by the user (formatted RFC 3339 timestamp). Note that setting modifiedDate will also update the modifiedByMe date for the user which set the date.
Joe Gregorio075572b2012-07-09 16:53:09 -04001418 "downloadUrl": "A String", # Short term download URL for the file. This will only be populated on files with content stored in Drive.
1419 "userPermission": { # A single permission for a file. # The permissions for the authenticated user on this file.
1420 "withLink": True or False, # Whether the link is required for this permission.
1421 "kind": "drive#permission", # This is always drive#permission.
1422 "name": "A String", # The name for this permission.
1423 "value": "A String", # The email address or domain name for the entity. This is not populated in responses.
1424 "id": "A String", # The ID of the permission.
1425 "authKey": "A String", # The authkey parameter required for this permission.
1426 "etag": "A String", # The ETag of the permission.
1427 "role": "A String", # The primary role for this user. Allowed values are:
1428 # - owner
1429 # - reader
1430 # - writer
1431 "photoLink": "A String", # A link to the profile photo, if available.
1432 "type": "A String", # The account type. Allowed values are:
1433 # - user
1434 # - group
1435 # - domain
1436 # - anyone
1437 "additionalRoles": [ # Additional roles for this user. Only commenter is currently allowed.
1438 "A String",
1439 ],
1440 "selfLink": "A String", # A link back to this permission.
1441 },
Joe Gregorioad8013f2012-08-03 08:44:02 -04001442 "fileExtension": "A String", # The file extension used when downloading this file. This field is set from the title when inserting or uploading new content. This will only be populated on files with content stored in Drive.
Joe Gregorio075572b2012-07-09 16:53:09 -04001443 "selfLink": "A String", # A link back to this file.
Joe Gregorioad8013f2012-08-03 08:44:02 -04001444 "modifiedDate": "A String", # Last time this file was modified by anyone (formatted RFC 3339 timestamp). This is only mutable on update when the setModifiedDate parameter is set.
Joe Gregorio075572b2012-07-09 16:53:09 -04001445 }</pre>
1446</div>
1447
1448</body></html>