blob: 407b827901ee668975f1e0bd72d44add83cff41c [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 Gregorio52a5c532013-01-24 16:19:07 -050078 <code><a href="#copy">copy(fileId, body, pinned=None, convert=None, ocrLanguage=None, ocr=None, timedTextLanguage=None, timedTextTrackName=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">
Joe Gregorio41be8e82013-03-07 10:31:47 -050087 <code><a href="#insert">insert(body=None, media_body=None, convert=None, useContentAsIndexableText=None, ocrLanguage=None, ocr=None, timedTextLanguage=None, timedTextTrackName=None, pinned=None)</a></code></p>
Joe Gregorio075572b2012-07-09 16:53:09 -040088<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">
Joe Gregorio41be8e82013-03-07 10:31:47 -050096 <code><a href="#patch">patch(fileId, body, newRevision=None, pinned=None, ocrLanguage=None, ocr=None, updateViewedDate=None, timedTextTrackName=None, convert=None, useContentAsIndexableText=None, setModifiedDate=None, timedTextLanguage=None)</a></code></p>
Joe Gregorio075572b2012-07-09 16:53:09 -040097<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">
Joe Gregorio41be8e82013-03-07 10:31:47 -0500108 <code><a href="#update">update(fileId, body=None, newRevision=None, media_body=None, ocrLanguage=None, ocr=None, pinned=None, updateViewedDate=None, timedTextTrackName=None, convert=None, useContentAsIndexableText=None, setModifiedDate=None, timedTextLanguage=None)</a></code></p>
109<p class="firstline">Updates file metadata and/or content.</p>
Joe Gregorio075572b2012-07-09 16:53:09 -0400110<h3>Method Details</h3>
111<div class="method">
Joe Gregorio52a5c532013-01-24 16:19:07 -0500112 <code class="details" id="copy">copy(fileId, body, pinned=None, convert=None, ocrLanguage=None, ocr=None, timedTextLanguage=None, timedTextTrackName=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)
Joe Gregorio41be8e82013-03-07 10:31:47 -0500131 "text": "A String", # The text to be indexed for this file.
Joe Gregorio075572b2012-07-09 16:53:09 -0400132 },
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.
Joe Gregorio41be8e82013-03-07 10:31:47 -0500135 "lastModifyingUserName": "A String", # Name of the last user to modify this file.
Joe Gregorio075572b2012-07-09 16:53:09 -0400136 "writersCanShare": True or False, # Whether writers can share the document with other users.
Joe Gregorio41be8e82013-03-07 10:31:47 -0500137 "owners": [ # The owner(s) of this file.
138 { # The JSON template for a user.
139 "picture": { # The user's profile picture.
140 "url": "A String", # A URL that points to a profile picture of this user.
141 },
142 "kind": "drive#user", # This is always drive#user.
143 "isAuthenticatedUser": True or False, # Whether this user is the same as the authenticated user for whom the request was made.
144 "displayName": "A String", # A plain text displayable name for this user.
145 "permissionId": "A String", # The user's ID as visible in the permissions collection.
146 },
147 ],
148 "id": "A String", # The ID of the file.
149 "lastModifyingUser": { # The JSON template for a user. # The last user to modify this file.
150 "picture": { # The user's profile picture.
151 "url": "A String", # A URL that points to a profile picture of this user.
152 },
153 "kind": "drive#user", # This is always drive#user.
154 "isAuthenticatedUser": True or False, # Whether this user is the same as the authenticated user for whom the request was made.
155 "displayName": "A String", # A plain text displayable name for this user.
156 "permissionId": "A String", # The user's ID as visible in the permissions collection.
157 },
Joe Gregorio075572b2012-07-09 16:53:09 -0400158 "title": "A String", # The title of this file.
159 "ownerNames": [ # Name(s) of the owner(s) of this file.
160 "A String",
161 ],
162 "sharedWithMeDate": "A String", # Time at which this file was shared with the user (formatted RFC 3339 timestamp).
Joe Gregorio52a5c532013-01-24 16:19:07 -0500163 "webViewLink": "A String", # A link only available on public folders for viewing their static web assets (HTML, CSS, JS, etc) via Google Drive's Website Hosting.
Joe Gregorio075572b2012-07-09 16:53:09 -0400164 "lastViewedByMeDate": "A String", # Last time this file was viewed by the user (formatted RFC 3339 timestamp).
165 "parents": [ # Collection of parent folders which contain this file.
Joe Gregorioe7a0c472012-07-12 11:46:04 -0400166 # 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 -0400167 { # A reference to a file's parent.
168 "selfLink": "A String", # A link back to this reference.
169 "kind": "drive#parentReference", # This is always drive#parentReference.
170 "id": "A String", # The ID of the parent.
171 "isRoot": True or False, # Whether or not the parent is the root folder.
172 "parentLink": "A String", # A link to the parent.
173 },
174 ],
175 "exportLinks": { # Links for exporting Google Docs to specific formats.
Joe Gregoriofa08c2e2012-07-23 16:52:03 -0400176 "a_key": "A String", # A mapping from export format to URL
Joe Gregorio075572b2012-07-09 16:53:09 -0400177 },
Joe Gregorio52a5c532013-01-24 16:19:07 -0500178 "shared": True or False, # Whether the file has been shared.
Joe Gregoriod67010d2012-11-05 08:57:06 -0500179 "thumbnail": { # Thumbnail for the file. Only accepted on upload and for files that are not already thumbnailed by Google.
180 "mimeType": "A String", # The MIME type of the thumbnail.
181 "image": "A String", # The URL-safe Base64 encoded bytes of the thumbnail image.
182 },
Joe Gregorioad8013f2012-08-03 08:44:02 -0400183 "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 -0400184 "description": "A String", # A short description of the file.
Joe Gregorioad8013f2012-08-03 08:44:02 -0400185 "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 -0400186 "editable": True or False, # Whether the file can be edited by the current user.
187 "kind": "drive#file", # The type of file. This is always drive#file.
188 "quotaBytesUsed": "A String", # The number of quota bytes used by this file.
Joe Gregorio41be8e82013-03-07 10:31:47 -0500189 "fileSize": "A String", # The size of the file in bytes. This is only populated for files with content stored in Drive.
Joe Gregorio075572b2012-07-09 16:53:09 -0400190 "createdDate": "A String", # Create time for this file (formatted ISO8601 timestamp).
Joe Gregorio41be8e82013-03-07 10:31:47 -0500191 "md5Checksum": "A String", # An MD5 checksum for the content of this file. This is populated only for files with content stored in Drive.
Joe Gregorio52a5c532013-01-24 16:19:07 -0500192 "iconLink": "A String", # A link to the file's icon.
Joe Gregorioad8013f2012-08-03 08:44:02 -0400193 "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.
Joe Gregorio52a5c532013-01-24 16:19:07 -0500194 "exposureBias": 3.14, # The exposure bias of the photo (APEX value).
Joe Gregoriod67010d2012-11-05 08:57:06 -0500195 "exposureTime": 3.14, # The length of the exposure, in seconds.
196 "cameraMake": "A String", # The make of the camera used to create the photo.
Joe Gregorio52a5c532013-01-24 16:19:07 -0500197 "maxApertureValue": 3.14, # The smallest f-number of the lens at the focal length used to create the photo (APEX value).
Joe Gregoriod67010d2012-11-05 08:57:06 -0500198 "isoSpeed": 42, # The ISO speed used to create the photo.
199 "focalLength": 3.14, # The focal length used to create the photo, in millimeters.
Joe Gregorio52a5c532013-01-24 16:19:07 -0500200 "exposureMode": "A String", # The exposure mode used to create the photo.
201 "colorSpace": "A String", # The color space of the photo.
Joe Gregorioad8013f2012-08-03 08:44:02 -0400202 "location": { # Geographic location information stored in the image.
203 "latitude": 3.14, # The latitude stored in the image.
204 "altitude": 3.14, # The altitude stored in the image.
205 "longitude": 3.14, # The longitude stored in the image.
206 },
Joe Gregorio52a5c532013-01-24 16:19:07 -0500207 "subjectDistance": 42, # The distance to the subject of the photo, in meters.
208 "height": 42, # The height of the image in pixels.
209 "lens": "A String", # The lens used to create the photo.
210 "date": "A String", # The date and time the photo was taken (EXIF format timestamp).
211 "width": 42, # The width of the image in pixels.
212 "meteringMode": "A String", # The metering mode used to create the photo.
213 "flashUsed": True or False, # Whether a flash was used to create the photo.
Joe Gregoriod67010d2012-11-05 08:57:06 -0500214 "aperture": 3.14, # The aperture used to create the photo (f-number).
215 "rotation": 42, # The rotation in clockwise degrees from the image's original orientation.
Joe Gregorio52a5c532013-01-24 16:19:07 -0500216 "sensor": "A String", # The type of sensor used to create the photo.
217 "whiteBalance": "A String", # The white balance mode used to create the photo.
Joe Gregoriod67010d2012-11-05 08:57:06 -0500218 "cameraModel": "A String", # The model of the camera used to create the photo.
Joe Gregorioad8013f2012-08-03 08:44:02 -0400219 },
Joe Gregorio075572b2012-07-09 16:53:09 -0400220 "embedLink": "A String", # A link for embedding the file.
Joe Gregorioad8013f2012-08-03 08:44:02 -0400221 "alternateLink": "A String", # A link for opening the file in using a relevant Google editor or viewer.
222 "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 Gregorio41be8e82013-03-07 10:31:47 -0500223 "downloadUrl": "A String", # Short lived download URL for the file. This is only populated for files with content stored in Drive.
224 "userPermission": { # A permission for a file. # The permissions for the authenticated user on this file.
Joe Gregorio075572b2012-07-09 16:53:09 -0400225 "withLink": True or False, # Whether the link is required for this permission.
226 "kind": "drive#permission", # This is always drive#permission.
227 "name": "A String", # The name for this permission.
228 "value": "A String", # The email address or domain name for the entity. This is not populated in responses.
229 "id": "A String", # The ID of the permission.
230 "authKey": "A String", # The authkey parameter required for this permission.
231 "etag": "A String", # The ETag of the permission.
232 "role": "A String", # The primary role for this user. Allowed values are:
233 # - owner
234 # - reader
235 # - writer
236 "photoLink": "A String", # A link to the profile photo, if available.
237 "type": "A String", # The account type. Allowed values are:
238 # - user
239 # - group
240 # - domain
241 # - anyone
242 "additionalRoles": [ # Additional roles for this user. Only commenter is currently allowed.
243 "A String",
244 ],
245 "selfLink": "A String", # A link back to this permission.
246 },
Joe Gregorio41be8e82013-03-07 10:31:47 -0500247 "fileExtension": "A String", # The file extension used when downloading this file. This field is read only. To set the extension, include it in the title when creating the file. This is only populated for files with content stored in Drive.
Joe Gregorio075572b2012-07-09 16:53:09 -0400248 "selfLink": "A String", # A link back to this file.
Joe Gregorioad8013f2012-08-03 08:44:02 -0400249 "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 -0400250}
251
Joe Gregorioe7a0c472012-07-12 11:46:04 -0400252 pinned: boolean, Whether to pin the head revision of the new copy.
Joe Gregorio075572b2012-07-09 16:53:09 -0400253 convert: boolean, Whether to convert this file to the corresponding Google Docs format.
Joe Gregorio075572b2012-07-09 16:53:09 -0400254 ocrLanguage: string, If ocr is true, hints at the language to use. Valid values are ISO 639-1 codes.
Joe Gregorio52a5c532013-01-24 16:19:07 -0500255 ocr: boolean, Whether to attempt OCR on .jpg, .png, .gif, or .pdf uploads.
Joe Gregorio075572b2012-07-09 16:53:09 -0400256 timedTextLanguage: string, The language of the timed text.
Joe Gregorio52a5c532013-01-24 16:19:07 -0500257 timedTextTrackName: string, The timed text track name.
Joe Gregorio075572b2012-07-09 16:53:09 -0400258
259Returns:
260 An object of the form:
261
262 { # The metadata for a file.
Joe Gregorioad8013f2012-08-03 08:44:02 -0400263 "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 -0400264 "thumbnailLink": "A String", # A link to the file's thumbnail.
265 "labels": { # A group of labels for the file.
266 "restricted": True or False, # Whether viewers are prevented from downloading this file.
267 "hidden": True or False, # Whether this file is hidden from the user.
268 "viewed": True or False, # Whether this file has been viewed by this user.
269 "starred": True or False, # Whether this file is starred by the user.
270 "trashed": True or False, # Whether this file has been trashed.
271 },
272 "indexableText": { # Indexable text attributes for the file (can only be written)
Joe Gregorio41be8e82013-03-07 10:31:47 -0500273 "text": "A String", # The text to be indexed for this file.
Joe Gregorio075572b2012-07-09 16:53:09 -0400274 },
Joe Gregorioad8013f2012-08-03 08:44:02 -0400275 "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 -0400276 "etag": "A String", # ETag of the file.
Joe Gregorio41be8e82013-03-07 10:31:47 -0500277 "lastModifyingUserName": "A String", # Name of the last user to modify this file.
Joe Gregorio075572b2012-07-09 16:53:09 -0400278 "writersCanShare": True or False, # Whether writers can share the document with other users.
Joe Gregorio41be8e82013-03-07 10:31:47 -0500279 "owners": [ # The owner(s) of this file.
280 { # The JSON template for a user.
281 "picture": { # The user's profile picture.
282 "url": "A String", # A URL that points to a profile picture of this user.
283 },
284 "kind": "drive#user", # This is always drive#user.
285 "isAuthenticatedUser": True or False, # Whether this user is the same as the authenticated user for whom the request was made.
286 "displayName": "A String", # A plain text displayable name for this user.
287 "permissionId": "A String", # The user's ID as visible in the permissions collection.
288 },
289 ],
290 "id": "A String", # The ID of the file.
291 "lastModifyingUser": { # The JSON template for a user. # The last user to modify this file.
292 "picture": { # The user's profile picture.
293 "url": "A String", # A URL that points to a profile picture of this user.
294 },
295 "kind": "drive#user", # This is always drive#user.
296 "isAuthenticatedUser": True or False, # Whether this user is the same as the authenticated user for whom the request was made.
297 "displayName": "A String", # A plain text displayable name for this user.
298 "permissionId": "A String", # The user's ID as visible in the permissions collection.
299 },
Joe Gregorio075572b2012-07-09 16:53:09 -0400300 "title": "A String", # The title of this file.
301 "ownerNames": [ # Name(s) of the owner(s) of this file.
302 "A String",
303 ],
304 "sharedWithMeDate": "A String", # Time at which this file was shared with the user (formatted RFC 3339 timestamp).
Joe Gregorio52a5c532013-01-24 16:19:07 -0500305 "webViewLink": "A String", # A link only available on public folders for viewing their static web assets (HTML, CSS, JS, etc) via Google Drive's Website Hosting.
Joe Gregorio075572b2012-07-09 16:53:09 -0400306 "lastViewedByMeDate": "A String", # Last time this file was viewed by the user (formatted RFC 3339 timestamp).
307 "parents": [ # Collection of parent folders which contain this file.
Joe Gregorioe7a0c472012-07-12 11:46:04 -0400308 # 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 -0400309 { # A reference to a file's parent.
310 "selfLink": "A String", # A link back to this reference.
311 "kind": "drive#parentReference", # This is always drive#parentReference.
312 "id": "A String", # The ID of the parent.
313 "isRoot": True or False, # Whether or not the parent is the root folder.
314 "parentLink": "A String", # A link to the parent.
315 },
316 ],
317 "exportLinks": { # Links for exporting Google Docs to specific formats.
Joe Gregoriofa08c2e2012-07-23 16:52:03 -0400318 "a_key": "A String", # A mapping from export format to URL
Joe Gregorio075572b2012-07-09 16:53:09 -0400319 },
Joe Gregorio52a5c532013-01-24 16:19:07 -0500320 "shared": True or False, # Whether the file has been shared.
Joe Gregoriod67010d2012-11-05 08:57:06 -0500321 "thumbnail": { # Thumbnail for the file. Only accepted on upload and for files that are not already thumbnailed by Google.
322 "mimeType": "A String", # The MIME type of the thumbnail.
323 "image": "A String", # The URL-safe Base64 encoded bytes of the thumbnail image.
324 },
Joe Gregorioad8013f2012-08-03 08:44:02 -0400325 "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 -0400326 "description": "A String", # A short description of the file.
Joe Gregorioad8013f2012-08-03 08:44:02 -0400327 "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 -0400328 "editable": True or False, # Whether the file can be edited by the current user.
329 "kind": "drive#file", # The type of file. This is always drive#file.
330 "quotaBytesUsed": "A String", # The number of quota bytes used by this file.
Joe Gregorio41be8e82013-03-07 10:31:47 -0500331 "fileSize": "A String", # The size of the file in bytes. This is only populated for files with content stored in Drive.
Joe Gregorio075572b2012-07-09 16:53:09 -0400332 "createdDate": "A String", # Create time for this file (formatted ISO8601 timestamp).
Joe Gregorio41be8e82013-03-07 10:31:47 -0500333 "md5Checksum": "A String", # An MD5 checksum for the content of this file. This is populated only for files with content stored in Drive.
Joe Gregorio52a5c532013-01-24 16:19:07 -0500334 "iconLink": "A String", # A link to the file's icon.
Joe Gregorioad8013f2012-08-03 08:44:02 -0400335 "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.
Joe Gregorio52a5c532013-01-24 16:19:07 -0500336 "exposureBias": 3.14, # The exposure bias of the photo (APEX value).
Joe Gregoriod67010d2012-11-05 08:57:06 -0500337 "exposureTime": 3.14, # The length of the exposure, in seconds.
338 "cameraMake": "A String", # The make of the camera used to create the photo.
Joe Gregorio52a5c532013-01-24 16:19:07 -0500339 "maxApertureValue": 3.14, # The smallest f-number of the lens at the focal length used to create the photo (APEX value).
Joe Gregoriod67010d2012-11-05 08:57:06 -0500340 "isoSpeed": 42, # The ISO speed used to create the photo.
341 "focalLength": 3.14, # The focal length used to create the photo, in millimeters.
Joe Gregorio52a5c532013-01-24 16:19:07 -0500342 "exposureMode": "A String", # The exposure mode used to create the photo.
343 "colorSpace": "A String", # The color space of the photo.
Joe Gregorioad8013f2012-08-03 08:44:02 -0400344 "location": { # Geographic location information stored in the image.
345 "latitude": 3.14, # The latitude stored in the image.
346 "altitude": 3.14, # The altitude stored in the image.
347 "longitude": 3.14, # The longitude stored in the image.
348 },
Joe Gregorio52a5c532013-01-24 16:19:07 -0500349 "subjectDistance": 42, # The distance to the subject of the photo, in meters.
350 "height": 42, # The height of the image in pixels.
351 "lens": "A String", # The lens used to create the photo.
352 "date": "A String", # The date and time the photo was taken (EXIF format timestamp).
353 "width": 42, # The width of the image in pixels.
354 "meteringMode": "A String", # The metering mode used to create the photo.
355 "flashUsed": True or False, # Whether a flash was used to create the photo.
Joe Gregoriod67010d2012-11-05 08:57:06 -0500356 "aperture": 3.14, # The aperture used to create the photo (f-number).
357 "rotation": 42, # The rotation in clockwise degrees from the image's original orientation.
Joe Gregorio52a5c532013-01-24 16:19:07 -0500358 "sensor": "A String", # The type of sensor used to create the photo.
359 "whiteBalance": "A String", # The white balance mode used to create the photo.
Joe Gregoriod67010d2012-11-05 08:57:06 -0500360 "cameraModel": "A String", # The model of the camera used to create the photo.
Joe Gregorioad8013f2012-08-03 08:44:02 -0400361 },
Joe Gregorio075572b2012-07-09 16:53:09 -0400362 "embedLink": "A String", # A link for embedding the file.
Joe Gregorioad8013f2012-08-03 08:44:02 -0400363 "alternateLink": "A String", # A link for opening the file in using a relevant Google editor or viewer.
364 "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 Gregorio41be8e82013-03-07 10:31:47 -0500365 "downloadUrl": "A String", # Short lived download URL for the file. This is only populated for files with content stored in Drive.
366 "userPermission": { # A permission for a file. # The permissions for the authenticated user on this file.
Joe Gregorio075572b2012-07-09 16:53:09 -0400367 "withLink": True or False, # Whether the link is required for this permission.
368 "kind": "drive#permission", # This is always drive#permission.
369 "name": "A String", # The name for this permission.
370 "value": "A String", # The email address or domain name for the entity. This is not populated in responses.
371 "id": "A String", # The ID of the permission.
372 "authKey": "A String", # The authkey parameter required for this permission.
373 "etag": "A String", # The ETag of the permission.
374 "role": "A String", # The primary role for this user. Allowed values are:
375 # - owner
376 # - reader
377 # - writer
378 "photoLink": "A String", # A link to the profile photo, if available.
379 "type": "A String", # The account type. Allowed values are:
380 # - user
381 # - group
382 # - domain
383 # - anyone
384 "additionalRoles": [ # Additional roles for this user. Only commenter is currently allowed.
385 "A String",
386 ],
387 "selfLink": "A String", # A link back to this permission.
388 },
Joe Gregorio41be8e82013-03-07 10:31:47 -0500389 "fileExtension": "A String", # The file extension used when downloading this file. This field is read only. To set the extension, include it in the title when creating the file. This is only populated for files with content stored in Drive.
Joe Gregorio075572b2012-07-09 16:53:09 -0400390 "selfLink": "A String", # A link back to this file.
Joe Gregorioad8013f2012-08-03 08:44:02 -0400391 "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 -0400392 }</pre>
393</div>
394
395<div class="method">
396 <code class="details" id="delete">delete(fileId)</code>
397 <pre>Permanently deletes a file by ID. Skips the trash.
398
399Args:
400 fileId: string, The ID of the file to delete. (required)
401</pre>
402</div>
403
404<div class="method">
405 <code class="details" id="get">get(fileId, projection=None, updateViewedDate=None)</code>
406 <pre>Gets a file's metadata by ID.
407
408Args:
409 fileId: string, The ID for the file in question. (required)
Joe Gregorioad8013f2012-08-03 08:44:02 -0400410 projection: string, This parameter is deprecated and has no function.
Joe Gregorio075572b2012-07-09 16:53:09 -0400411 Allowed values
Joe Gregorioad8013f2012-08-03 08:44:02 -0400412 BASIC - Deprecated
413 FULL - Deprecated
Joe Gregorio075572b2012-07-09 16:53:09 -0400414 updateViewedDate: boolean, Whether to update the view date after successfully retrieving the file.
415
416Returns:
417 An object of the form:
418
419 { # The metadata for a file.
Joe Gregorioad8013f2012-08-03 08:44:02 -0400420 "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 -0400421 "thumbnailLink": "A String", # A link to the file's thumbnail.
422 "labels": { # A group of labels for the file.
423 "restricted": True or False, # Whether viewers are prevented from downloading this file.
424 "hidden": True or False, # Whether this file is hidden from the user.
425 "viewed": True or False, # Whether this file has been viewed by this user.
426 "starred": True or False, # Whether this file is starred by the user.
427 "trashed": True or False, # Whether this file has been trashed.
428 },
429 "indexableText": { # Indexable text attributes for the file (can only be written)
Joe Gregorio41be8e82013-03-07 10:31:47 -0500430 "text": "A String", # The text to be indexed for this file.
Joe Gregorio075572b2012-07-09 16:53:09 -0400431 },
Joe Gregorioad8013f2012-08-03 08:44:02 -0400432 "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 -0400433 "etag": "A String", # ETag of the file.
Joe Gregorio41be8e82013-03-07 10:31:47 -0500434 "lastModifyingUserName": "A String", # Name of the last user to modify this file.
Joe Gregorio075572b2012-07-09 16:53:09 -0400435 "writersCanShare": True or False, # Whether writers can share the document with other users.
Joe Gregorio41be8e82013-03-07 10:31:47 -0500436 "owners": [ # The owner(s) of this file.
437 { # The JSON template for a user.
438 "picture": { # The user's profile picture.
439 "url": "A String", # A URL that points to a profile picture of this user.
440 },
441 "kind": "drive#user", # This is always drive#user.
442 "isAuthenticatedUser": True or False, # Whether this user is the same as the authenticated user for whom the request was made.
443 "displayName": "A String", # A plain text displayable name for this user.
444 "permissionId": "A String", # The user's ID as visible in the permissions collection.
445 },
446 ],
447 "id": "A String", # The ID of the file.
448 "lastModifyingUser": { # The JSON template for a user. # The last user to modify this file.
449 "picture": { # The user's profile picture.
450 "url": "A String", # A URL that points to a profile picture of this user.
451 },
452 "kind": "drive#user", # This is always drive#user.
453 "isAuthenticatedUser": True or False, # Whether this user is the same as the authenticated user for whom the request was made.
454 "displayName": "A String", # A plain text displayable name for this user.
455 "permissionId": "A String", # The user's ID as visible in the permissions collection.
456 },
Joe Gregorio075572b2012-07-09 16:53:09 -0400457 "title": "A String", # The title of this file.
458 "ownerNames": [ # Name(s) of the owner(s) of this file.
459 "A String",
460 ],
461 "sharedWithMeDate": "A String", # Time at which this file was shared with the user (formatted RFC 3339 timestamp).
Joe Gregorio52a5c532013-01-24 16:19:07 -0500462 "webViewLink": "A String", # A link only available on public folders for viewing their static web assets (HTML, CSS, JS, etc) via Google Drive's Website Hosting.
Joe Gregorio075572b2012-07-09 16:53:09 -0400463 "lastViewedByMeDate": "A String", # Last time this file was viewed by the user (formatted RFC 3339 timestamp).
464 "parents": [ # Collection of parent folders which contain this file.
Joe Gregorioe7a0c472012-07-12 11:46:04 -0400465 # 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 -0400466 { # A reference to a file's parent.
467 "selfLink": "A String", # A link back to this reference.
468 "kind": "drive#parentReference", # This is always drive#parentReference.
469 "id": "A String", # The ID of the parent.
470 "isRoot": True or False, # Whether or not the parent is the root folder.
471 "parentLink": "A String", # A link to the parent.
472 },
473 ],
474 "exportLinks": { # Links for exporting Google Docs to specific formats.
Joe Gregoriofa08c2e2012-07-23 16:52:03 -0400475 "a_key": "A String", # A mapping from export format to URL
Joe Gregorio075572b2012-07-09 16:53:09 -0400476 },
Joe Gregorio52a5c532013-01-24 16:19:07 -0500477 "shared": True or False, # Whether the file has been shared.
Joe Gregoriod67010d2012-11-05 08:57:06 -0500478 "thumbnail": { # Thumbnail for the file. Only accepted on upload and for files that are not already thumbnailed by Google.
479 "mimeType": "A String", # The MIME type of the thumbnail.
480 "image": "A String", # The URL-safe Base64 encoded bytes of the thumbnail image.
481 },
Joe Gregorioad8013f2012-08-03 08:44:02 -0400482 "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 -0400483 "description": "A String", # A short description of the file.
Joe Gregorioad8013f2012-08-03 08:44:02 -0400484 "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 -0400485 "editable": True or False, # Whether the file can be edited by the current user.
486 "kind": "drive#file", # The type of file. This is always drive#file.
487 "quotaBytesUsed": "A String", # The number of quota bytes used by this file.
Joe Gregorio41be8e82013-03-07 10:31:47 -0500488 "fileSize": "A String", # The size of the file in bytes. This is only populated for files with content stored in Drive.
Joe Gregorio075572b2012-07-09 16:53:09 -0400489 "createdDate": "A String", # Create time for this file (formatted ISO8601 timestamp).
Joe Gregorio41be8e82013-03-07 10:31:47 -0500490 "md5Checksum": "A String", # An MD5 checksum for the content of this file. This is populated only for files with content stored in Drive.
Joe Gregorio52a5c532013-01-24 16:19:07 -0500491 "iconLink": "A String", # A link to the file's icon.
Joe Gregorioad8013f2012-08-03 08:44:02 -0400492 "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.
Joe Gregorio52a5c532013-01-24 16:19:07 -0500493 "exposureBias": 3.14, # The exposure bias of the photo (APEX value).
Joe Gregoriod67010d2012-11-05 08:57:06 -0500494 "exposureTime": 3.14, # The length of the exposure, in seconds.
495 "cameraMake": "A String", # The make of the camera used to create the photo.
Joe Gregorio52a5c532013-01-24 16:19:07 -0500496 "maxApertureValue": 3.14, # The smallest f-number of the lens at the focal length used to create the photo (APEX value).
Joe Gregoriod67010d2012-11-05 08:57:06 -0500497 "isoSpeed": 42, # The ISO speed used to create the photo.
498 "focalLength": 3.14, # The focal length used to create the photo, in millimeters.
Joe Gregorio52a5c532013-01-24 16:19:07 -0500499 "exposureMode": "A String", # The exposure mode used to create the photo.
500 "colorSpace": "A String", # The color space of the photo.
Joe Gregorioad8013f2012-08-03 08:44:02 -0400501 "location": { # Geographic location information stored in the image.
502 "latitude": 3.14, # The latitude stored in the image.
503 "altitude": 3.14, # The altitude stored in the image.
504 "longitude": 3.14, # The longitude stored in the image.
505 },
Joe Gregorio52a5c532013-01-24 16:19:07 -0500506 "subjectDistance": 42, # The distance to the subject of the photo, in meters.
507 "height": 42, # The height of the image in pixels.
508 "lens": "A String", # The lens used to create the photo.
509 "date": "A String", # The date and time the photo was taken (EXIF format timestamp).
510 "width": 42, # The width of the image in pixels.
511 "meteringMode": "A String", # The metering mode used to create the photo.
512 "flashUsed": True or False, # Whether a flash was used to create the photo.
Joe Gregoriod67010d2012-11-05 08:57:06 -0500513 "aperture": 3.14, # The aperture used to create the photo (f-number).
514 "rotation": 42, # The rotation in clockwise degrees from the image's original orientation.
Joe Gregorio52a5c532013-01-24 16:19:07 -0500515 "sensor": "A String", # The type of sensor used to create the photo.
516 "whiteBalance": "A String", # The white balance mode used to create the photo.
Joe Gregoriod67010d2012-11-05 08:57:06 -0500517 "cameraModel": "A String", # The model of the camera used to create the photo.
Joe Gregorioad8013f2012-08-03 08:44:02 -0400518 },
Joe Gregorio075572b2012-07-09 16:53:09 -0400519 "embedLink": "A String", # A link for embedding the file.
Joe Gregorioad8013f2012-08-03 08:44:02 -0400520 "alternateLink": "A String", # A link for opening the file in using a relevant Google editor or viewer.
521 "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 Gregorio41be8e82013-03-07 10:31:47 -0500522 "downloadUrl": "A String", # Short lived download URL for the file. This is only populated for files with content stored in Drive.
523 "userPermission": { # A permission for a file. # The permissions for the authenticated user on this file.
Joe Gregorio075572b2012-07-09 16:53:09 -0400524 "withLink": True or False, # Whether the link is required for this permission.
525 "kind": "drive#permission", # This is always drive#permission.
526 "name": "A String", # The name for this permission.
527 "value": "A String", # The email address or domain name for the entity. This is not populated in responses.
528 "id": "A String", # The ID of the permission.
529 "authKey": "A String", # The authkey parameter required for this permission.
530 "etag": "A String", # The ETag of the permission.
531 "role": "A String", # The primary role for this user. Allowed values are:
532 # - owner
533 # - reader
534 # - writer
535 "photoLink": "A String", # A link to the profile photo, if available.
536 "type": "A String", # The account type. Allowed values are:
537 # - user
538 # - group
539 # - domain
540 # - anyone
541 "additionalRoles": [ # Additional roles for this user. Only commenter is currently allowed.
542 "A String",
543 ],
544 "selfLink": "A String", # A link back to this permission.
545 },
Joe Gregorio41be8e82013-03-07 10:31:47 -0500546 "fileExtension": "A String", # The file extension used when downloading this file. This field is read only. To set the extension, include it in the title when creating the file. This is only populated for files with content stored in Drive.
Joe Gregorio075572b2012-07-09 16:53:09 -0400547 "selfLink": "A String", # A link back to this file.
Joe Gregorioad8013f2012-08-03 08:44:02 -0400548 "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 -0400549 }</pre>
550</div>
551
552<div class="method">
Joe Gregorio41be8e82013-03-07 10:31:47 -0500553 <code class="details" id="insert">insert(body=None, media_body=None, convert=None, useContentAsIndexableText=None, ocrLanguage=None, ocr=None, timedTextLanguage=None, timedTextTrackName=None, pinned=None)</code>
Joe Gregorio075572b2012-07-09 16:53:09 -0400554 <pre>Insert a new file.
555
556Args:
557 body: object, The request body.
558 The object takes the form of:
559
560{ # The metadata for a file.
Joe Gregorioad8013f2012-08-03 08:44:02 -0400561 "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 -0400562 "thumbnailLink": "A String", # A link to the file's thumbnail.
563 "labels": { # A group of labels for the file.
564 "restricted": True or False, # Whether viewers are prevented from downloading this file.
565 "hidden": True or False, # Whether this file is hidden from the user.
566 "viewed": True or False, # Whether this file has been viewed by this user.
567 "starred": True or False, # Whether this file is starred by the user.
568 "trashed": True or False, # Whether this file has been trashed.
569 },
570 "indexableText": { # Indexable text attributes for the file (can only be written)
Joe Gregorio41be8e82013-03-07 10:31:47 -0500571 "text": "A String", # The text to be indexed for this file.
Joe Gregorio075572b2012-07-09 16:53:09 -0400572 },
Joe Gregorioad8013f2012-08-03 08:44:02 -0400573 "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 -0400574 "etag": "A String", # ETag of the file.
Joe Gregorio41be8e82013-03-07 10:31:47 -0500575 "lastModifyingUserName": "A String", # Name of the last user to modify this file.
Joe Gregorio075572b2012-07-09 16:53:09 -0400576 "writersCanShare": True or False, # Whether writers can share the document with other users.
Joe Gregorio41be8e82013-03-07 10:31:47 -0500577 "owners": [ # The owner(s) of this file.
578 { # The JSON template for a user.
579 "picture": { # The user's profile picture.
580 "url": "A String", # A URL that points to a profile picture of this user.
581 },
582 "kind": "drive#user", # This is always drive#user.
583 "isAuthenticatedUser": True or False, # Whether this user is the same as the authenticated user for whom the request was made.
584 "displayName": "A String", # A plain text displayable name for this user.
585 "permissionId": "A String", # The user's ID as visible in the permissions collection.
586 },
587 ],
588 "id": "A String", # The ID of the file.
589 "lastModifyingUser": { # The JSON template for a user. # The last user to modify this file.
590 "picture": { # The user's profile picture.
591 "url": "A String", # A URL that points to a profile picture of this user.
592 },
593 "kind": "drive#user", # This is always drive#user.
594 "isAuthenticatedUser": True or False, # Whether this user is the same as the authenticated user for whom the request was made.
595 "displayName": "A String", # A plain text displayable name for this user.
596 "permissionId": "A String", # The user's ID as visible in the permissions collection.
597 },
Joe Gregorio075572b2012-07-09 16:53:09 -0400598 "title": "A String", # The title of this file.
599 "ownerNames": [ # Name(s) of the owner(s) of this file.
600 "A String",
601 ],
602 "sharedWithMeDate": "A String", # Time at which this file was shared with the user (formatted RFC 3339 timestamp).
Joe Gregorio52a5c532013-01-24 16:19:07 -0500603 "webViewLink": "A String", # A link only available on public folders for viewing their static web assets (HTML, CSS, JS, etc) via Google Drive's Website Hosting.
Joe Gregorio075572b2012-07-09 16:53:09 -0400604 "lastViewedByMeDate": "A String", # Last time this file was viewed by the user (formatted RFC 3339 timestamp).
605 "parents": [ # Collection of parent folders which contain this file.
Joe Gregorioe7a0c472012-07-12 11:46:04 -0400606 # 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 -0400607 { # A reference to a file's parent.
608 "selfLink": "A String", # A link back to this reference.
609 "kind": "drive#parentReference", # This is always drive#parentReference.
610 "id": "A String", # The ID of the parent.
611 "isRoot": True or False, # Whether or not the parent is the root folder.
612 "parentLink": "A String", # A link to the parent.
613 },
614 ],
615 "exportLinks": { # Links for exporting Google Docs to specific formats.
Joe Gregoriofa08c2e2012-07-23 16:52:03 -0400616 "a_key": "A String", # A mapping from export format to URL
Joe Gregorio075572b2012-07-09 16:53:09 -0400617 },
Joe Gregorio52a5c532013-01-24 16:19:07 -0500618 "shared": True or False, # Whether the file has been shared.
Joe Gregoriod67010d2012-11-05 08:57:06 -0500619 "thumbnail": { # Thumbnail for the file. Only accepted on upload and for files that are not already thumbnailed by Google.
620 "mimeType": "A String", # The MIME type of the thumbnail.
621 "image": "A String", # The URL-safe Base64 encoded bytes of the thumbnail image.
622 },
Joe Gregorioad8013f2012-08-03 08:44:02 -0400623 "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 -0400624 "description": "A String", # A short description of the file.
Joe Gregorioad8013f2012-08-03 08:44:02 -0400625 "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 -0400626 "editable": True or False, # Whether the file can be edited by the current user.
627 "kind": "drive#file", # The type of file. This is always drive#file.
628 "quotaBytesUsed": "A String", # The number of quota bytes used by this file.
Joe Gregorio41be8e82013-03-07 10:31:47 -0500629 "fileSize": "A String", # The size of the file in bytes. This is only populated for files with content stored in Drive.
Joe Gregorio075572b2012-07-09 16:53:09 -0400630 "createdDate": "A String", # Create time for this file (formatted ISO8601 timestamp).
Joe Gregorio41be8e82013-03-07 10:31:47 -0500631 "md5Checksum": "A String", # An MD5 checksum for the content of this file. This is populated only for files with content stored in Drive.
Joe Gregorio52a5c532013-01-24 16:19:07 -0500632 "iconLink": "A String", # A link to the file's icon.
Joe Gregorioad8013f2012-08-03 08:44:02 -0400633 "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.
Joe Gregorio52a5c532013-01-24 16:19:07 -0500634 "exposureBias": 3.14, # The exposure bias of the photo (APEX value).
Joe Gregoriod67010d2012-11-05 08:57:06 -0500635 "exposureTime": 3.14, # The length of the exposure, in seconds.
636 "cameraMake": "A String", # The make of the camera used to create the photo.
Joe Gregorio52a5c532013-01-24 16:19:07 -0500637 "maxApertureValue": 3.14, # The smallest f-number of the lens at the focal length used to create the photo (APEX value).
Joe Gregoriod67010d2012-11-05 08:57:06 -0500638 "isoSpeed": 42, # The ISO speed used to create the photo.
639 "focalLength": 3.14, # The focal length used to create the photo, in millimeters.
Joe Gregorio52a5c532013-01-24 16:19:07 -0500640 "exposureMode": "A String", # The exposure mode used to create the photo.
641 "colorSpace": "A String", # The color space of the photo.
Joe Gregorioad8013f2012-08-03 08:44:02 -0400642 "location": { # Geographic location information stored in the image.
643 "latitude": 3.14, # The latitude stored in the image.
644 "altitude": 3.14, # The altitude stored in the image.
645 "longitude": 3.14, # The longitude stored in the image.
646 },
Joe Gregorio52a5c532013-01-24 16:19:07 -0500647 "subjectDistance": 42, # The distance to the subject of the photo, in meters.
648 "height": 42, # The height of the image in pixels.
649 "lens": "A String", # The lens used to create the photo.
650 "date": "A String", # The date and time the photo was taken (EXIF format timestamp).
651 "width": 42, # The width of the image in pixels.
652 "meteringMode": "A String", # The metering mode used to create the photo.
653 "flashUsed": True or False, # Whether a flash was used to create the photo.
Joe Gregoriod67010d2012-11-05 08:57:06 -0500654 "aperture": 3.14, # The aperture used to create the photo (f-number).
655 "rotation": 42, # The rotation in clockwise degrees from the image's original orientation.
Joe Gregorio52a5c532013-01-24 16:19:07 -0500656 "sensor": "A String", # The type of sensor used to create the photo.
657 "whiteBalance": "A String", # The white balance mode used to create the photo.
Joe Gregoriod67010d2012-11-05 08:57:06 -0500658 "cameraModel": "A String", # The model of the camera used to create the photo.
Joe Gregorioad8013f2012-08-03 08:44:02 -0400659 },
Joe Gregorio075572b2012-07-09 16:53:09 -0400660 "embedLink": "A String", # A link for embedding the file.
Joe Gregorioad8013f2012-08-03 08:44:02 -0400661 "alternateLink": "A String", # A link for opening the file in using a relevant Google editor or viewer.
662 "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 Gregorio41be8e82013-03-07 10:31:47 -0500663 "downloadUrl": "A String", # Short lived download URL for the file. This is only populated for files with content stored in Drive.
664 "userPermission": { # A permission for a file. # The permissions for the authenticated user on this file.
Joe Gregorio075572b2012-07-09 16:53:09 -0400665 "withLink": True or False, # Whether the link is required for this permission.
666 "kind": "drive#permission", # This is always drive#permission.
667 "name": "A String", # The name for this permission.
668 "value": "A String", # The email address or domain name for the entity. This is not populated in responses.
669 "id": "A String", # The ID of the permission.
670 "authKey": "A String", # The authkey parameter required for this permission.
671 "etag": "A String", # The ETag of the permission.
672 "role": "A String", # The primary role for this user. Allowed values are:
673 # - owner
674 # - reader
675 # - writer
676 "photoLink": "A String", # A link to the profile photo, if available.
677 "type": "A String", # The account type. Allowed values are:
678 # - user
679 # - group
680 # - domain
681 # - anyone
682 "additionalRoles": [ # Additional roles for this user. Only commenter is currently allowed.
683 "A String",
684 ],
685 "selfLink": "A String", # A link back to this permission.
686 },
Joe Gregorio41be8e82013-03-07 10:31:47 -0500687 "fileExtension": "A String", # The file extension used when downloading this file. This field is read only. To set the extension, include it in the title when creating the file. This is only populated for files with content stored in Drive.
Joe Gregorio075572b2012-07-09 16:53:09 -0400688 "selfLink": "A String", # A link back to this file.
Joe Gregorioad8013f2012-08-03 08:44:02 -0400689 "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 -0400690}
691
692 media_body: string, The filename of the media request body, or an instance of a MediaUpload object.
693 convert: boolean, Whether to convert this file to the corresponding Google Docs format.
Joe Gregorio41be8e82013-03-07 10:31:47 -0500694 useContentAsIndexableText: boolean, Whether to use the content as indexable text.
Joe Gregorio075572b2012-07-09 16:53:09 -0400695 ocrLanguage: string, If ocr is true, hints at the language to use. Valid values are ISO 639-1 codes.
Joe Gregorio52a5c532013-01-24 16:19:07 -0500696 ocr: boolean, Whether to attempt OCR on .jpg, .png, .gif, or .pdf uploads.
Joe Gregorio075572b2012-07-09 16:53:09 -0400697 timedTextLanguage: string, The language of the timed text.
698 timedTextTrackName: string, The timed text track name.
699 pinned: boolean, Whether to pin the head revision of the uploaded file.
700
701Returns:
702 An object of the form:
703
704 { # The metadata for a file.
Joe Gregorioad8013f2012-08-03 08:44:02 -0400705 "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 -0400706 "thumbnailLink": "A String", # A link to the file's thumbnail.
707 "labels": { # A group of labels for the file.
708 "restricted": True or False, # Whether viewers are prevented from downloading this file.
709 "hidden": True or False, # Whether this file is hidden from the user.
710 "viewed": True or False, # Whether this file has been viewed by this user.
711 "starred": True or False, # Whether this file is starred by the user.
712 "trashed": True or False, # Whether this file has been trashed.
713 },
714 "indexableText": { # Indexable text attributes for the file (can only be written)
Joe Gregorio41be8e82013-03-07 10:31:47 -0500715 "text": "A String", # The text to be indexed for this file.
Joe Gregorio075572b2012-07-09 16:53:09 -0400716 },
Joe Gregorioad8013f2012-08-03 08:44:02 -0400717 "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 -0400718 "etag": "A String", # ETag of the file.
Joe Gregorio41be8e82013-03-07 10:31:47 -0500719 "lastModifyingUserName": "A String", # Name of the last user to modify this file.
Joe Gregorio075572b2012-07-09 16:53:09 -0400720 "writersCanShare": True or False, # Whether writers can share the document with other users.
Joe Gregorio41be8e82013-03-07 10:31:47 -0500721 "owners": [ # The owner(s) of this file.
722 { # The JSON template for a user.
723 "picture": { # The user's profile picture.
724 "url": "A String", # A URL that points to a profile picture of this user.
725 },
726 "kind": "drive#user", # This is always drive#user.
727 "isAuthenticatedUser": True or False, # Whether this user is the same as the authenticated user for whom the request was made.
728 "displayName": "A String", # A plain text displayable name for this user.
729 "permissionId": "A String", # The user's ID as visible in the permissions collection.
730 },
731 ],
732 "id": "A String", # The ID of the file.
733 "lastModifyingUser": { # The JSON template for a user. # The last user to modify this file.
734 "picture": { # The user's profile picture.
735 "url": "A String", # A URL that points to a profile picture of this user.
736 },
737 "kind": "drive#user", # This is always drive#user.
738 "isAuthenticatedUser": True or False, # Whether this user is the same as the authenticated user for whom the request was made.
739 "displayName": "A String", # A plain text displayable name for this user.
740 "permissionId": "A String", # The user's ID as visible in the permissions collection.
741 },
Joe Gregorio075572b2012-07-09 16:53:09 -0400742 "title": "A String", # The title of this file.
743 "ownerNames": [ # Name(s) of the owner(s) of this file.
744 "A String",
745 ],
746 "sharedWithMeDate": "A String", # Time at which this file was shared with the user (formatted RFC 3339 timestamp).
Joe Gregorio52a5c532013-01-24 16:19:07 -0500747 "webViewLink": "A String", # A link only available on public folders for viewing their static web assets (HTML, CSS, JS, etc) via Google Drive's Website Hosting.
Joe Gregorio075572b2012-07-09 16:53:09 -0400748 "lastViewedByMeDate": "A String", # Last time this file was viewed by the user (formatted RFC 3339 timestamp).
749 "parents": [ # Collection of parent folders which contain this file.
Joe Gregorioe7a0c472012-07-12 11:46:04 -0400750 # 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 -0400751 { # A reference to a file's parent.
752 "selfLink": "A String", # A link back to this reference.
753 "kind": "drive#parentReference", # This is always drive#parentReference.
754 "id": "A String", # The ID of the parent.
755 "isRoot": True or False, # Whether or not the parent is the root folder.
756 "parentLink": "A String", # A link to the parent.
757 },
758 ],
759 "exportLinks": { # Links for exporting Google Docs to specific formats.
Joe Gregoriofa08c2e2012-07-23 16:52:03 -0400760 "a_key": "A String", # A mapping from export format to URL
Joe Gregorio075572b2012-07-09 16:53:09 -0400761 },
Joe Gregorio52a5c532013-01-24 16:19:07 -0500762 "shared": True or False, # Whether the file has been shared.
Joe Gregoriod67010d2012-11-05 08:57:06 -0500763 "thumbnail": { # Thumbnail for the file. Only accepted on upload and for files that are not already thumbnailed by Google.
764 "mimeType": "A String", # The MIME type of the thumbnail.
765 "image": "A String", # The URL-safe Base64 encoded bytes of the thumbnail image.
766 },
Joe Gregorioad8013f2012-08-03 08:44:02 -0400767 "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 -0400768 "description": "A String", # A short description of the file.
Joe Gregorioad8013f2012-08-03 08:44:02 -0400769 "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 -0400770 "editable": True or False, # Whether the file can be edited by the current user.
771 "kind": "drive#file", # The type of file. This is always drive#file.
772 "quotaBytesUsed": "A String", # The number of quota bytes used by this file.
Joe Gregorio41be8e82013-03-07 10:31:47 -0500773 "fileSize": "A String", # The size of the file in bytes. This is only populated for files with content stored in Drive.
Joe Gregorio075572b2012-07-09 16:53:09 -0400774 "createdDate": "A String", # Create time for this file (formatted ISO8601 timestamp).
Joe Gregorio41be8e82013-03-07 10:31:47 -0500775 "md5Checksum": "A String", # An MD5 checksum for the content of this file. This is populated only for files with content stored in Drive.
Joe Gregorio52a5c532013-01-24 16:19:07 -0500776 "iconLink": "A String", # A link to the file's icon.
Joe Gregorioad8013f2012-08-03 08:44:02 -0400777 "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.
Joe Gregorio52a5c532013-01-24 16:19:07 -0500778 "exposureBias": 3.14, # The exposure bias of the photo (APEX value).
Joe Gregoriod67010d2012-11-05 08:57:06 -0500779 "exposureTime": 3.14, # The length of the exposure, in seconds.
780 "cameraMake": "A String", # The make of the camera used to create the photo.
Joe Gregorio52a5c532013-01-24 16:19:07 -0500781 "maxApertureValue": 3.14, # The smallest f-number of the lens at the focal length used to create the photo (APEX value).
Joe Gregoriod67010d2012-11-05 08:57:06 -0500782 "isoSpeed": 42, # The ISO speed used to create the photo.
783 "focalLength": 3.14, # The focal length used to create the photo, in millimeters.
Joe Gregorio52a5c532013-01-24 16:19:07 -0500784 "exposureMode": "A String", # The exposure mode used to create the photo.
785 "colorSpace": "A String", # The color space of the photo.
Joe Gregorioad8013f2012-08-03 08:44:02 -0400786 "location": { # Geographic location information stored in the image.
787 "latitude": 3.14, # The latitude stored in the image.
788 "altitude": 3.14, # The altitude stored in the image.
789 "longitude": 3.14, # The longitude stored in the image.
790 },
Joe Gregorio52a5c532013-01-24 16:19:07 -0500791 "subjectDistance": 42, # The distance to the subject of the photo, in meters.
792 "height": 42, # The height of the image in pixels.
793 "lens": "A String", # The lens used to create the photo.
794 "date": "A String", # The date and time the photo was taken (EXIF format timestamp).
795 "width": 42, # The width of the image in pixels.
796 "meteringMode": "A String", # The metering mode used to create the photo.
797 "flashUsed": True or False, # Whether a flash was used to create the photo.
Joe Gregoriod67010d2012-11-05 08:57:06 -0500798 "aperture": 3.14, # The aperture used to create the photo (f-number).
799 "rotation": 42, # The rotation in clockwise degrees from the image's original orientation.
Joe Gregorio52a5c532013-01-24 16:19:07 -0500800 "sensor": "A String", # The type of sensor used to create the photo.
801 "whiteBalance": "A String", # The white balance mode used to create the photo.
Joe Gregoriod67010d2012-11-05 08:57:06 -0500802 "cameraModel": "A String", # The model of the camera used to create the photo.
Joe Gregorioad8013f2012-08-03 08:44:02 -0400803 },
Joe Gregorio075572b2012-07-09 16:53:09 -0400804 "embedLink": "A String", # A link for embedding the file.
Joe Gregorioad8013f2012-08-03 08:44:02 -0400805 "alternateLink": "A String", # A link for opening the file in using a relevant Google editor or viewer.
806 "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 Gregorio41be8e82013-03-07 10:31:47 -0500807 "downloadUrl": "A String", # Short lived download URL for the file. This is only populated for files with content stored in Drive.
808 "userPermission": { # A permission for a file. # The permissions for the authenticated user on this file.
Joe Gregorio075572b2012-07-09 16:53:09 -0400809 "withLink": True or False, # Whether the link is required for this permission.
810 "kind": "drive#permission", # This is always drive#permission.
811 "name": "A String", # The name for this permission.
812 "value": "A String", # The email address or domain name for the entity. This is not populated in responses.
813 "id": "A String", # The ID of the permission.
814 "authKey": "A String", # The authkey parameter required for this permission.
815 "etag": "A String", # The ETag of the permission.
816 "role": "A String", # The primary role for this user. Allowed values are:
817 # - owner
818 # - reader
819 # - writer
820 "photoLink": "A String", # A link to the profile photo, if available.
821 "type": "A String", # The account type. Allowed values are:
822 # - user
823 # - group
824 # - domain
825 # - anyone
826 "additionalRoles": [ # Additional roles for this user. Only commenter is currently allowed.
827 "A String",
828 ],
829 "selfLink": "A String", # A link back to this permission.
830 },
Joe Gregorio41be8e82013-03-07 10:31:47 -0500831 "fileExtension": "A String", # The file extension used when downloading this file. This field is read only. To set the extension, include it in the title when creating the file. This is only populated for files with content stored in Drive.
Joe Gregorio075572b2012-07-09 16:53:09 -0400832 "selfLink": "A String", # A link back to this file.
Joe Gregorioad8013f2012-08-03 08:44:02 -0400833 "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 -0400834 }</pre>
835</div>
836
837<div class="method">
838 <code class="details" id="list">list(q=None, projection=None, pageToken=None, maxResults=None)</code>
839 <pre>Lists the user's files.
840
841Args:
842 q: string, Query string for searching files.
Joe Gregorioad8013f2012-08-03 08:44:02 -0400843 projection: string, This parameter is deprecated and has no function.
Joe Gregorio075572b2012-07-09 16:53:09 -0400844 Allowed values
Joe Gregorioad8013f2012-08-03 08:44:02 -0400845 BASIC - Deprecated
846 FULL - Deprecated
Joe Gregorio075572b2012-07-09 16:53:09 -0400847 pageToken: string, Page token for files.
848 maxResults: integer, Maximum number of files to return.
849
850Returns:
851 An object of the form:
852
853 { # A list of files.
854 "nextPageToken": "A String", # The page token for the next page of files.
855 "kind": "drive#fileList", # This is always drive#fileList.
856 "items": [ # The actual list of files.
857 { # The metadata for a file.
Joe Gregorioad8013f2012-08-03 08:44:02 -0400858 "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 -0400859 "thumbnailLink": "A String", # A link to the file's thumbnail.
860 "labels": { # A group of labels for the file.
861 "restricted": True or False, # Whether viewers are prevented from downloading this file.
862 "hidden": True or False, # Whether this file is hidden from the user.
863 "viewed": True or False, # Whether this file has been viewed by this user.
864 "starred": True or False, # Whether this file is starred by the user.
865 "trashed": True or False, # Whether this file has been trashed.
866 },
867 "indexableText": { # Indexable text attributes for the file (can only be written)
Joe Gregorio41be8e82013-03-07 10:31:47 -0500868 "text": "A String", # The text to be indexed for this file.
Joe Gregorio075572b2012-07-09 16:53:09 -0400869 },
Joe Gregorioad8013f2012-08-03 08:44:02 -0400870 "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 -0400871 "etag": "A String", # ETag of the file.
Joe Gregorio41be8e82013-03-07 10:31:47 -0500872 "lastModifyingUserName": "A String", # Name of the last user to modify this file.
Joe Gregorio075572b2012-07-09 16:53:09 -0400873 "writersCanShare": True or False, # Whether writers can share the document with other users.
Joe Gregorio41be8e82013-03-07 10:31:47 -0500874 "owners": [ # The owner(s) of this file.
875 { # The JSON template for a user.
876 "picture": { # The user's profile picture.
877 "url": "A String", # A URL that points to a profile picture of this user.
878 },
879 "kind": "drive#user", # This is always drive#user.
880 "isAuthenticatedUser": True or False, # Whether this user is the same as the authenticated user for whom the request was made.
881 "displayName": "A String", # A plain text displayable name for this user.
882 "permissionId": "A String", # The user's ID as visible in the permissions collection.
883 },
884 ],
885 "id": "A String", # The ID of the file.
886 "lastModifyingUser": { # The JSON template for a user. # The last user to modify this file.
887 "picture": { # The user's profile picture.
888 "url": "A String", # A URL that points to a profile picture of this user.
889 },
890 "kind": "drive#user", # This is always drive#user.
891 "isAuthenticatedUser": True or False, # Whether this user is the same as the authenticated user for whom the request was made.
892 "displayName": "A String", # A plain text displayable name for this user.
893 "permissionId": "A String", # The user's ID as visible in the permissions collection.
894 },
Joe Gregorio075572b2012-07-09 16:53:09 -0400895 "title": "A String", # The title of this file.
896 "ownerNames": [ # Name(s) of the owner(s) of this file.
897 "A String",
898 ],
899 "sharedWithMeDate": "A String", # Time at which this file was shared with the user (formatted RFC 3339 timestamp).
Joe Gregorio52a5c532013-01-24 16:19:07 -0500900 "webViewLink": "A String", # A link only available on public folders for viewing their static web assets (HTML, CSS, JS, etc) via Google Drive's Website Hosting.
Joe Gregorio075572b2012-07-09 16:53:09 -0400901 "lastViewedByMeDate": "A String", # Last time this file was viewed by the user (formatted RFC 3339 timestamp).
902 "parents": [ # Collection of parent folders which contain this file.
Joe Gregorioe7a0c472012-07-12 11:46:04 -0400903 # 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 -0400904 { # A reference to a file's parent.
905 "selfLink": "A String", # A link back to this reference.
906 "kind": "drive#parentReference", # This is always drive#parentReference.
907 "id": "A String", # The ID of the parent.
908 "isRoot": True or False, # Whether or not the parent is the root folder.
909 "parentLink": "A String", # A link to the parent.
910 },
911 ],
912 "exportLinks": { # Links for exporting Google Docs to specific formats.
Joe Gregoriofa08c2e2012-07-23 16:52:03 -0400913 "a_key": "A String", # A mapping from export format to URL
Joe Gregorio075572b2012-07-09 16:53:09 -0400914 },
Joe Gregorio52a5c532013-01-24 16:19:07 -0500915 "shared": True or False, # Whether the file has been shared.
Joe Gregoriod67010d2012-11-05 08:57:06 -0500916 "thumbnail": { # Thumbnail for the file. Only accepted on upload and for files that are not already thumbnailed by Google.
917 "mimeType": "A String", # The MIME type of the thumbnail.
918 "image": "A String", # The URL-safe Base64 encoded bytes of the thumbnail image.
919 },
Joe Gregorioad8013f2012-08-03 08:44:02 -0400920 "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 -0400921 "description": "A String", # A short description of the file.
Joe Gregorioad8013f2012-08-03 08:44:02 -0400922 "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 -0400923 "editable": True or False, # Whether the file can be edited by the current user.
924 "kind": "drive#file", # The type of file. This is always drive#file.
925 "quotaBytesUsed": "A String", # The number of quota bytes used by this file.
Joe Gregorio41be8e82013-03-07 10:31:47 -0500926 "fileSize": "A String", # The size of the file in bytes. This is only populated for files with content stored in Drive.
Joe Gregorio075572b2012-07-09 16:53:09 -0400927 "createdDate": "A String", # Create time for this file (formatted ISO8601 timestamp).
Joe Gregorio41be8e82013-03-07 10:31:47 -0500928 "md5Checksum": "A String", # An MD5 checksum for the content of this file. This is populated only for files with content stored in Drive.
Joe Gregorio52a5c532013-01-24 16:19:07 -0500929 "iconLink": "A String", # A link to the file's icon.
Joe Gregorioad8013f2012-08-03 08:44:02 -0400930 "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.
Joe Gregorio52a5c532013-01-24 16:19:07 -0500931 "exposureBias": 3.14, # The exposure bias of the photo (APEX value).
Joe Gregoriod67010d2012-11-05 08:57:06 -0500932 "exposureTime": 3.14, # The length of the exposure, in seconds.
933 "cameraMake": "A String", # The make of the camera used to create the photo.
Joe Gregorio52a5c532013-01-24 16:19:07 -0500934 "maxApertureValue": 3.14, # The smallest f-number of the lens at the focal length used to create the photo (APEX value).
Joe Gregoriod67010d2012-11-05 08:57:06 -0500935 "isoSpeed": 42, # The ISO speed used to create the photo.
936 "focalLength": 3.14, # The focal length used to create the photo, in millimeters.
Joe Gregorio52a5c532013-01-24 16:19:07 -0500937 "exposureMode": "A String", # The exposure mode used to create the photo.
938 "colorSpace": "A String", # The color space of the photo.
Joe Gregorioad8013f2012-08-03 08:44:02 -0400939 "location": { # Geographic location information stored in the image.
940 "latitude": 3.14, # The latitude stored in the image.
941 "altitude": 3.14, # The altitude stored in the image.
942 "longitude": 3.14, # The longitude stored in the image.
943 },
Joe Gregorio52a5c532013-01-24 16:19:07 -0500944 "subjectDistance": 42, # The distance to the subject of the photo, in meters.
945 "height": 42, # The height of the image in pixels.
946 "lens": "A String", # The lens used to create the photo.
947 "date": "A String", # The date and time the photo was taken (EXIF format timestamp).
948 "width": 42, # The width of the image in pixels.
949 "meteringMode": "A String", # The metering mode used to create the photo.
950 "flashUsed": True or False, # Whether a flash was used to create the photo.
Joe Gregoriod67010d2012-11-05 08:57:06 -0500951 "aperture": 3.14, # The aperture used to create the photo (f-number).
952 "rotation": 42, # The rotation in clockwise degrees from the image's original orientation.
Joe Gregorio52a5c532013-01-24 16:19:07 -0500953 "sensor": "A String", # The type of sensor used to create the photo.
954 "whiteBalance": "A String", # The white balance mode used to create the photo.
Joe Gregoriod67010d2012-11-05 08:57:06 -0500955 "cameraModel": "A String", # The model of the camera used to create the photo.
Joe Gregorioad8013f2012-08-03 08:44:02 -0400956 },
Joe Gregorio075572b2012-07-09 16:53:09 -0400957 "embedLink": "A String", # A link for embedding the file.
Joe Gregorioad8013f2012-08-03 08:44:02 -0400958 "alternateLink": "A String", # A link for opening the file in using a relevant Google editor or viewer.
959 "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 Gregorio41be8e82013-03-07 10:31:47 -0500960 "downloadUrl": "A String", # Short lived download URL for the file. This is only populated for files with content stored in Drive.
961 "userPermission": { # A permission for a file. # The permissions for the authenticated user on this file.
Joe Gregorio075572b2012-07-09 16:53:09 -0400962 "withLink": True or False, # Whether the link is required for this permission.
963 "kind": "drive#permission", # This is always drive#permission.
964 "name": "A String", # The name for this permission.
965 "value": "A String", # The email address or domain name for the entity. This is not populated in responses.
966 "id": "A String", # The ID of the permission.
967 "authKey": "A String", # The authkey parameter required for this permission.
968 "etag": "A String", # The ETag of the permission.
969 "role": "A String", # The primary role for this user. Allowed values are:
970 # - owner
971 # - reader
972 # - writer
973 "photoLink": "A String", # A link to the profile photo, if available.
974 "type": "A String", # The account type. Allowed values are:
975 # - user
976 # - group
977 # - domain
978 # - anyone
979 "additionalRoles": [ # Additional roles for this user. Only commenter is currently allowed.
980 "A String",
981 ],
982 "selfLink": "A String", # A link back to this permission.
983 },
Joe Gregorio41be8e82013-03-07 10:31:47 -0500984 "fileExtension": "A String", # The file extension used when downloading this file. This field is read only. To set the extension, include it in the title when creating the file. This is only populated for files with content stored in Drive.
Joe Gregorio075572b2012-07-09 16:53:09 -0400985 "selfLink": "A String", # A link back to this file.
Joe Gregorioad8013f2012-08-03 08:44:02 -0400986 "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 -0400987 },
988 ],
989 "nextLink": "A String", # A link to the next page of files.
990 "etag": "A String", # The ETag of the list.
991 "selfLink": "A String", # A link back to this list.
992 }</pre>
993</div>
994
995<div class="method">
996 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
997 <pre>Retrieves the next page of results.
998
999Args:
1000 previous_request: The request for the previous page. (required)
1001 previous_response: The response from the request for the previous page. (required)
1002
1003Returns:
1004 A request object that you can call 'execute()' on to request the next
1005 page. Returns None if there are no more items in the collection.
Joe Gregorio52a5c532013-01-24 16:19:07 -05001006 </pre>
Joe Gregorio075572b2012-07-09 16:53:09 -04001007</div>
1008
1009<div class="method">
Joe Gregorio41be8e82013-03-07 10:31:47 -05001010 <code class="details" id="patch">patch(fileId, body, newRevision=None, pinned=None, ocrLanguage=None, ocr=None, updateViewedDate=None, timedTextTrackName=None, convert=None, useContentAsIndexableText=None, setModifiedDate=None, timedTextLanguage=None)</code>
Joe Gregorio075572b2012-07-09 16:53:09 -04001011 <pre>Updates file metadata and/or content. This method supports patch semantics.
1012
1013Args:
1014 fileId: string, The ID of the file to update. (required)
1015 body: object, The request body. (required)
1016 The object takes the form of:
1017
1018{ # The metadata for a file.
Joe Gregorioad8013f2012-08-03 08:44:02 -04001019 "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 -04001020 "thumbnailLink": "A String", # A link to the file's thumbnail.
1021 "labels": { # A group of labels for the file.
1022 "restricted": True or False, # Whether viewers are prevented from downloading this file.
1023 "hidden": True or False, # Whether this file is hidden from the user.
1024 "viewed": True or False, # Whether this file has been viewed by this user.
1025 "starred": True or False, # Whether this file is starred by the user.
1026 "trashed": True or False, # Whether this file has been trashed.
1027 },
1028 "indexableText": { # Indexable text attributes for the file (can only be written)
Joe Gregorio41be8e82013-03-07 10:31:47 -05001029 "text": "A String", # The text to be indexed for this file.
Joe Gregorio075572b2012-07-09 16:53:09 -04001030 },
Joe Gregorioad8013f2012-08-03 08:44:02 -04001031 "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 -04001032 "etag": "A String", # ETag of the file.
Joe Gregorio41be8e82013-03-07 10:31:47 -05001033 "lastModifyingUserName": "A String", # Name of the last user to modify this file.
Joe Gregorio075572b2012-07-09 16:53:09 -04001034 "writersCanShare": True or False, # Whether writers can share the document with other users.
Joe Gregorio41be8e82013-03-07 10:31:47 -05001035 "owners": [ # The owner(s) of this file.
1036 { # The JSON template for a user.
1037 "picture": { # The user's profile picture.
1038 "url": "A String", # A URL that points to a profile picture of this user.
1039 },
1040 "kind": "drive#user", # This is always drive#user.
1041 "isAuthenticatedUser": True or False, # Whether this user is the same as the authenticated user for whom the request was made.
1042 "displayName": "A String", # A plain text displayable name for this user.
1043 "permissionId": "A String", # The user's ID as visible in the permissions collection.
1044 },
1045 ],
1046 "id": "A String", # The ID of the file.
1047 "lastModifyingUser": { # The JSON template for a user. # The last user to modify this file.
1048 "picture": { # The user's profile picture.
1049 "url": "A String", # A URL that points to a profile picture of this user.
1050 },
1051 "kind": "drive#user", # This is always drive#user.
1052 "isAuthenticatedUser": True or False, # Whether this user is the same as the authenticated user for whom the request was made.
1053 "displayName": "A String", # A plain text displayable name for this user.
1054 "permissionId": "A String", # The user's ID as visible in the permissions collection.
1055 },
Joe Gregorio075572b2012-07-09 16:53:09 -04001056 "title": "A String", # The title of this file.
1057 "ownerNames": [ # Name(s) of the owner(s) of this file.
1058 "A String",
1059 ],
1060 "sharedWithMeDate": "A String", # Time at which this file was shared with the user (formatted RFC 3339 timestamp).
Joe Gregorio52a5c532013-01-24 16:19:07 -05001061 "webViewLink": "A String", # A link only available on public folders for viewing their static web assets (HTML, CSS, JS, etc) via Google Drive's Website Hosting.
Joe Gregorio075572b2012-07-09 16:53:09 -04001062 "lastViewedByMeDate": "A String", # Last time this file was viewed by the user (formatted RFC 3339 timestamp).
1063 "parents": [ # Collection of parent folders which contain this file.
Joe Gregorioe7a0c472012-07-12 11:46:04 -04001064 # 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 -04001065 { # A reference to a file's parent.
1066 "selfLink": "A String", # A link back to this reference.
1067 "kind": "drive#parentReference", # This is always drive#parentReference.
1068 "id": "A String", # The ID of the parent.
1069 "isRoot": True or False, # Whether or not the parent is the root folder.
1070 "parentLink": "A String", # A link to the parent.
1071 },
1072 ],
1073 "exportLinks": { # Links for exporting Google Docs to specific formats.
Joe Gregoriofa08c2e2012-07-23 16:52:03 -04001074 "a_key": "A String", # A mapping from export format to URL
Joe Gregorio075572b2012-07-09 16:53:09 -04001075 },
Joe Gregorio52a5c532013-01-24 16:19:07 -05001076 "shared": True or False, # Whether the file has been shared.
Joe Gregoriod67010d2012-11-05 08:57:06 -05001077 "thumbnail": { # Thumbnail for the file. Only accepted on upload and for files that are not already thumbnailed by Google.
1078 "mimeType": "A String", # The MIME type of the thumbnail.
1079 "image": "A String", # The URL-safe Base64 encoded bytes of the thumbnail image.
1080 },
Joe Gregorioad8013f2012-08-03 08:44:02 -04001081 "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 -04001082 "description": "A String", # A short description of the file.
Joe Gregorioad8013f2012-08-03 08:44:02 -04001083 "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 -04001084 "editable": True or False, # Whether the file can be edited by the current user.
1085 "kind": "drive#file", # The type of file. This is always drive#file.
1086 "quotaBytesUsed": "A String", # The number of quota bytes used by this file.
Joe Gregorio41be8e82013-03-07 10:31:47 -05001087 "fileSize": "A String", # The size of the file in bytes. This is only populated for files with content stored in Drive.
Joe Gregorio075572b2012-07-09 16:53:09 -04001088 "createdDate": "A String", # Create time for this file (formatted ISO8601 timestamp).
Joe Gregorio41be8e82013-03-07 10:31:47 -05001089 "md5Checksum": "A String", # An MD5 checksum for the content of this file. This is populated only for files with content stored in Drive.
Joe Gregorio52a5c532013-01-24 16:19:07 -05001090 "iconLink": "A String", # A link to the file's icon.
Joe Gregorioad8013f2012-08-03 08:44:02 -04001091 "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.
Joe Gregorio52a5c532013-01-24 16:19:07 -05001092 "exposureBias": 3.14, # The exposure bias of the photo (APEX value).
Joe Gregoriod67010d2012-11-05 08:57:06 -05001093 "exposureTime": 3.14, # The length of the exposure, in seconds.
1094 "cameraMake": "A String", # The make of the camera used to create the photo.
Joe Gregorio52a5c532013-01-24 16:19:07 -05001095 "maxApertureValue": 3.14, # The smallest f-number of the lens at the focal length used to create the photo (APEX value).
Joe Gregoriod67010d2012-11-05 08:57:06 -05001096 "isoSpeed": 42, # The ISO speed used to create the photo.
1097 "focalLength": 3.14, # The focal length used to create the photo, in millimeters.
Joe Gregorio52a5c532013-01-24 16:19:07 -05001098 "exposureMode": "A String", # The exposure mode used to create the photo.
1099 "colorSpace": "A String", # The color space of the photo.
Joe Gregorioad8013f2012-08-03 08:44:02 -04001100 "location": { # Geographic location information stored in the image.
1101 "latitude": 3.14, # The latitude stored in the image.
1102 "altitude": 3.14, # The altitude stored in the image.
1103 "longitude": 3.14, # The longitude stored in the image.
1104 },
Joe Gregorio52a5c532013-01-24 16:19:07 -05001105 "subjectDistance": 42, # The distance to the subject of the photo, in meters.
1106 "height": 42, # The height of the image in pixels.
1107 "lens": "A String", # The lens used to create the photo.
1108 "date": "A String", # The date and time the photo was taken (EXIF format timestamp).
1109 "width": 42, # The width of the image in pixels.
1110 "meteringMode": "A String", # The metering mode used to create the photo.
1111 "flashUsed": True or False, # Whether a flash was used to create the photo.
Joe Gregoriod67010d2012-11-05 08:57:06 -05001112 "aperture": 3.14, # The aperture used to create the photo (f-number).
1113 "rotation": 42, # The rotation in clockwise degrees from the image's original orientation.
Joe Gregorio52a5c532013-01-24 16:19:07 -05001114 "sensor": "A String", # The type of sensor used to create the photo.
1115 "whiteBalance": "A String", # The white balance mode used to create the photo.
Joe Gregoriod67010d2012-11-05 08:57:06 -05001116 "cameraModel": "A String", # The model of the camera used to create the photo.
Joe Gregorioad8013f2012-08-03 08:44:02 -04001117 },
Joe Gregorio075572b2012-07-09 16:53:09 -04001118 "embedLink": "A String", # A link for embedding the file.
Joe Gregorioad8013f2012-08-03 08:44:02 -04001119 "alternateLink": "A String", # A link for opening the file in using a relevant Google editor or viewer.
1120 "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 Gregorio41be8e82013-03-07 10:31:47 -05001121 "downloadUrl": "A String", # Short lived download URL for the file. This is only populated for files with content stored in Drive.
1122 "userPermission": { # A permission for a file. # The permissions for the authenticated user on this file.
Joe Gregorio075572b2012-07-09 16:53:09 -04001123 "withLink": True or False, # Whether the link is required for this permission.
1124 "kind": "drive#permission", # This is always drive#permission.
1125 "name": "A String", # The name for this permission.
1126 "value": "A String", # The email address or domain name for the entity. This is not populated in responses.
1127 "id": "A String", # The ID of the permission.
1128 "authKey": "A String", # The authkey parameter required for this permission.
1129 "etag": "A String", # The ETag of the permission.
1130 "role": "A String", # The primary role for this user. Allowed values are:
1131 # - owner
1132 # - reader
1133 # - writer
1134 "photoLink": "A String", # A link to the profile photo, if available.
1135 "type": "A String", # The account type. Allowed values are:
1136 # - user
1137 # - group
1138 # - domain
1139 # - anyone
1140 "additionalRoles": [ # Additional roles for this user. Only commenter is currently allowed.
1141 "A String",
1142 ],
1143 "selfLink": "A String", # A link back to this permission.
1144 },
Joe Gregorio41be8e82013-03-07 10:31:47 -05001145 "fileExtension": "A String", # The file extension used when downloading this file. This field is read only. To set the extension, include it in the title when creating the file. This is only populated for files with content stored in Drive.
Joe Gregorio075572b2012-07-09 16:53:09 -04001146 "selfLink": "A String", # A link back to this file.
Joe Gregorioad8013f2012-08-03 08:44:02 -04001147 "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 -04001148}
1149
Joe Gregorio41be8e82013-03-07 10:31:47 -05001150 newRevision: boolean, Whether a blob upload should create a new revision. If not set or false, the blob data in the current head revision is replaced. If true, a new blob is created as head revision, and previous revisions are preserved (causing increased use of the user's data storage quota).
Joe Gregorio075572b2012-07-09 16:53:09 -04001151 pinned: boolean, Whether to pin the new revision.
Joe Gregorio075572b2012-07-09 16:53:09 -04001152 ocrLanguage: string, If ocr is true, hints at the language to use. Valid values are ISO 639-1 codes.
Joe Gregoriod67010d2012-11-05 08:57:06 -05001153 ocr: boolean, Whether to attempt OCR on .jpg, .png, .gif, or .pdf uploads.
Joe Gregorio075572b2012-07-09 16:53:09 -04001154 updateViewedDate: boolean, Whether to update the view date after successfully updating the file.
1155 timedTextTrackName: string, The timed text track name.
1156 convert: boolean, Whether to convert this file to the corresponding Google Docs format.
Joe Gregorio41be8e82013-03-07 10:31:47 -05001157 useContentAsIndexableText: boolean, Whether to use the content as indexable text.
Joe Gregorio075572b2012-07-09 16:53:09 -04001158 setModifiedDate: boolean, Whether to set the modified date with the supplied modified date.
1159 timedTextLanguage: string, The language of the timed text.
1160
1161Returns:
1162 An object of the form:
1163
1164 { # The metadata for a file.
Joe Gregorioad8013f2012-08-03 08:44:02 -04001165 "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 -04001166 "thumbnailLink": "A String", # A link to the file's thumbnail.
1167 "labels": { # A group of labels for the file.
1168 "restricted": True or False, # Whether viewers are prevented from downloading this file.
1169 "hidden": True or False, # Whether this file is hidden from the user.
1170 "viewed": True or False, # Whether this file has been viewed by this user.
1171 "starred": True or False, # Whether this file is starred by the user.
1172 "trashed": True or False, # Whether this file has been trashed.
1173 },
1174 "indexableText": { # Indexable text attributes for the file (can only be written)
Joe Gregorio41be8e82013-03-07 10:31:47 -05001175 "text": "A String", # The text to be indexed for this file.
Joe Gregorio075572b2012-07-09 16:53:09 -04001176 },
Joe Gregorioad8013f2012-08-03 08:44:02 -04001177 "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 -04001178 "etag": "A String", # ETag of the file.
Joe Gregorio41be8e82013-03-07 10:31:47 -05001179 "lastModifyingUserName": "A String", # Name of the last user to modify this file.
Joe Gregorio075572b2012-07-09 16:53:09 -04001180 "writersCanShare": True or False, # Whether writers can share the document with other users.
Joe Gregorio41be8e82013-03-07 10:31:47 -05001181 "owners": [ # The owner(s) of this file.
1182 { # The JSON template for a user.
1183 "picture": { # The user's profile picture.
1184 "url": "A String", # A URL that points to a profile picture of this user.
1185 },
1186 "kind": "drive#user", # This is always drive#user.
1187 "isAuthenticatedUser": True or False, # Whether this user is the same as the authenticated user for whom the request was made.
1188 "displayName": "A String", # A plain text displayable name for this user.
1189 "permissionId": "A String", # The user's ID as visible in the permissions collection.
1190 },
1191 ],
1192 "id": "A String", # The ID of the file.
1193 "lastModifyingUser": { # The JSON template for a user. # The last user to modify this file.
1194 "picture": { # The user's profile picture.
1195 "url": "A String", # A URL that points to a profile picture of this user.
1196 },
1197 "kind": "drive#user", # This is always drive#user.
1198 "isAuthenticatedUser": True or False, # Whether this user is the same as the authenticated user for whom the request was made.
1199 "displayName": "A String", # A plain text displayable name for this user.
1200 "permissionId": "A String", # The user's ID as visible in the permissions collection.
1201 },
Joe Gregorio075572b2012-07-09 16:53:09 -04001202 "title": "A String", # The title of this file.
1203 "ownerNames": [ # Name(s) of the owner(s) of this file.
1204 "A String",
1205 ],
1206 "sharedWithMeDate": "A String", # Time at which this file was shared with the user (formatted RFC 3339 timestamp).
Joe Gregorio52a5c532013-01-24 16:19:07 -05001207 "webViewLink": "A String", # A link only available on public folders for viewing their static web assets (HTML, CSS, JS, etc) via Google Drive's Website Hosting.
Joe Gregorio075572b2012-07-09 16:53:09 -04001208 "lastViewedByMeDate": "A String", # Last time this file was viewed by the user (formatted RFC 3339 timestamp).
1209 "parents": [ # Collection of parent folders which contain this file.
Joe Gregorioe7a0c472012-07-12 11:46:04 -04001210 # 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 -04001211 { # A reference to a file's parent.
1212 "selfLink": "A String", # A link back to this reference.
1213 "kind": "drive#parentReference", # This is always drive#parentReference.
1214 "id": "A String", # The ID of the parent.
1215 "isRoot": True or False, # Whether or not the parent is the root folder.
1216 "parentLink": "A String", # A link to the parent.
1217 },
1218 ],
1219 "exportLinks": { # Links for exporting Google Docs to specific formats.
Joe Gregoriofa08c2e2012-07-23 16:52:03 -04001220 "a_key": "A String", # A mapping from export format to URL
Joe Gregorio075572b2012-07-09 16:53:09 -04001221 },
Joe Gregorio52a5c532013-01-24 16:19:07 -05001222 "shared": True or False, # Whether the file has been shared.
Joe Gregoriod67010d2012-11-05 08:57:06 -05001223 "thumbnail": { # Thumbnail for the file. Only accepted on upload and for files that are not already thumbnailed by Google.
1224 "mimeType": "A String", # The MIME type of the thumbnail.
1225 "image": "A String", # The URL-safe Base64 encoded bytes of the thumbnail image.
1226 },
Joe Gregorioad8013f2012-08-03 08:44:02 -04001227 "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 -04001228 "description": "A String", # A short description of the file.
Joe Gregorioad8013f2012-08-03 08:44:02 -04001229 "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 -04001230 "editable": True or False, # Whether the file can be edited by the current user.
1231 "kind": "drive#file", # The type of file. This is always drive#file.
1232 "quotaBytesUsed": "A String", # The number of quota bytes used by this file.
Joe Gregorio41be8e82013-03-07 10:31:47 -05001233 "fileSize": "A String", # The size of the file in bytes. This is only populated for files with content stored in Drive.
Joe Gregorio075572b2012-07-09 16:53:09 -04001234 "createdDate": "A String", # Create time for this file (formatted ISO8601 timestamp).
Joe Gregorio41be8e82013-03-07 10:31:47 -05001235 "md5Checksum": "A String", # An MD5 checksum for the content of this file. This is populated only for files with content stored in Drive.
Joe Gregorio52a5c532013-01-24 16:19:07 -05001236 "iconLink": "A String", # A link to the file's icon.
Joe Gregorioad8013f2012-08-03 08:44:02 -04001237 "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.
Joe Gregorio52a5c532013-01-24 16:19:07 -05001238 "exposureBias": 3.14, # The exposure bias of the photo (APEX value).
Joe Gregoriod67010d2012-11-05 08:57:06 -05001239 "exposureTime": 3.14, # The length of the exposure, in seconds.
1240 "cameraMake": "A String", # The make of the camera used to create the photo.
Joe Gregorio52a5c532013-01-24 16:19:07 -05001241 "maxApertureValue": 3.14, # The smallest f-number of the lens at the focal length used to create the photo (APEX value).
Joe Gregoriod67010d2012-11-05 08:57:06 -05001242 "isoSpeed": 42, # The ISO speed used to create the photo.
1243 "focalLength": 3.14, # The focal length used to create the photo, in millimeters.
Joe Gregorio52a5c532013-01-24 16:19:07 -05001244 "exposureMode": "A String", # The exposure mode used to create the photo.
1245 "colorSpace": "A String", # The color space of the photo.
Joe Gregorioad8013f2012-08-03 08:44:02 -04001246 "location": { # Geographic location information stored in the image.
1247 "latitude": 3.14, # The latitude stored in the image.
1248 "altitude": 3.14, # The altitude stored in the image.
1249 "longitude": 3.14, # The longitude stored in the image.
1250 },
Joe Gregorio52a5c532013-01-24 16:19:07 -05001251 "subjectDistance": 42, # The distance to the subject of the photo, in meters.
1252 "height": 42, # The height of the image in pixels.
1253 "lens": "A String", # The lens used to create the photo.
1254 "date": "A String", # The date and time the photo was taken (EXIF format timestamp).
1255 "width": 42, # The width of the image in pixels.
1256 "meteringMode": "A String", # The metering mode used to create the photo.
1257 "flashUsed": True or False, # Whether a flash was used to create the photo.
Joe Gregoriod67010d2012-11-05 08:57:06 -05001258 "aperture": 3.14, # The aperture used to create the photo (f-number).
1259 "rotation": 42, # The rotation in clockwise degrees from the image's original orientation.
Joe Gregorio52a5c532013-01-24 16:19:07 -05001260 "sensor": "A String", # The type of sensor used to create the photo.
1261 "whiteBalance": "A String", # The white balance mode used to create the photo.
Joe Gregoriod67010d2012-11-05 08:57:06 -05001262 "cameraModel": "A String", # The model of the camera used to create the photo.
Joe Gregorioad8013f2012-08-03 08:44:02 -04001263 },
Joe Gregorio075572b2012-07-09 16:53:09 -04001264 "embedLink": "A String", # A link for embedding the file.
Joe Gregorioad8013f2012-08-03 08:44:02 -04001265 "alternateLink": "A String", # A link for opening the file in using a relevant Google editor or viewer.
1266 "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 Gregorio41be8e82013-03-07 10:31:47 -05001267 "downloadUrl": "A String", # Short lived download URL for the file. This is only populated for files with content stored in Drive.
1268 "userPermission": { # A permission for a file. # The permissions for the authenticated user on this file.
Joe Gregorio075572b2012-07-09 16:53:09 -04001269 "withLink": True or False, # Whether the link is required for this permission.
1270 "kind": "drive#permission", # This is always drive#permission.
1271 "name": "A String", # The name for this permission.
1272 "value": "A String", # The email address or domain name for the entity. This is not populated in responses.
1273 "id": "A String", # The ID of the permission.
1274 "authKey": "A String", # The authkey parameter required for this permission.
1275 "etag": "A String", # The ETag of the permission.
1276 "role": "A String", # The primary role for this user. Allowed values are:
1277 # - owner
1278 # - reader
1279 # - writer
1280 "photoLink": "A String", # A link to the profile photo, if available.
1281 "type": "A String", # The account type. Allowed values are:
1282 # - user
1283 # - group
1284 # - domain
1285 # - anyone
1286 "additionalRoles": [ # Additional roles for this user. Only commenter is currently allowed.
1287 "A String",
1288 ],
1289 "selfLink": "A String", # A link back to this permission.
1290 },
Joe Gregorio41be8e82013-03-07 10:31:47 -05001291 "fileExtension": "A String", # The file extension used when downloading this file. This field is read only. To set the extension, include it in the title when creating the file. This is only populated for files with content stored in Drive.
Joe Gregorio075572b2012-07-09 16:53:09 -04001292 "selfLink": "A String", # A link back to this file.
Joe Gregorioad8013f2012-08-03 08:44:02 -04001293 "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 -04001294 }</pre>
1295</div>
1296
1297<div class="method">
1298 <code class="details" id="touch">touch(fileId)</code>
1299 <pre>Set the file's updated time to the current server time.
1300
1301Args:
1302 fileId: string, The ID of the file to update. (required)
1303
1304Returns:
1305 An object of the form:
1306
1307 { # The metadata for a file.
Joe Gregorioad8013f2012-08-03 08:44:02 -04001308 "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 -04001309 "thumbnailLink": "A String", # A link to the file's thumbnail.
1310 "labels": { # A group of labels for the file.
1311 "restricted": True or False, # Whether viewers are prevented from downloading this file.
1312 "hidden": True or False, # Whether this file is hidden from the user.
1313 "viewed": True or False, # Whether this file has been viewed by this user.
1314 "starred": True or False, # Whether this file is starred by the user.
1315 "trashed": True or False, # Whether this file has been trashed.
1316 },
1317 "indexableText": { # Indexable text attributes for the file (can only be written)
Joe Gregorio41be8e82013-03-07 10:31:47 -05001318 "text": "A String", # The text to be indexed for this file.
Joe Gregorio075572b2012-07-09 16:53:09 -04001319 },
Joe Gregorioad8013f2012-08-03 08:44:02 -04001320 "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 -04001321 "etag": "A String", # ETag of the file.
Joe Gregorio41be8e82013-03-07 10:31:47 -05001322 "lastModifyingUserName": "A String", # Name of the last user to modify this file.
Joe Gregorio075572b2012-07-09 16:53:09 -04001323 "writersCanShare": True or False, # Whether writers can share the document with other users.
Joe Gregorio41be8e82013-03-07 10:31:47 -05001324 "owners": [ # The owner(s) of this file.
1325 { # The JSON template for a user.
1326 "picture": { # The user's profile picture.
1327 "url": "A String", # A URL that points to a profile picture of this user.
1328 },
1329 "kind": "drive#user", # This is always drive#user.
1330 "isAuthenticatedUser": True or False, # Whether this user is the same as the authenticated user for whom the request was made.
1331 "displayName": "A String", # A plain text displayable name for this user.
1332 "permissionId": "A String", # The user's ID as visible in the permissions collection.
1333 },
1334 ],
1335 "id": "A String", # The ID of the file.
1336 "lastModifyingUser": { # The JSON template for a user. # The last user to modify this file.
1337 "picture": { # The user's profile picture.
1338 "url": "A String", # A URL that points to a profile picture of this user.
1339 },
1340 "kind": "drive#user", # This is always drive#user.
1341 "isAuthenticatedUser": True or False, # Whether this user is the same as the authenticated user for whom the request was made.
1342 "displayName": "A String", # A plain text displayable name for this user.
1343 "permissionId": "A String", # The user's ID as visible in the permissions collection.
1344 },
Joe Gregorio075572b2012-07-09 16:53:09 -04001345 "title": "A String", # The title of this file.
1346 "ownerNames": [ # Name(s) of the owner(s) of this file.
1347 "A String",
1348 ],
1349 "sharedWithMeDate": "A String", # Time at which this file was shared with the user (formatted RFC 3339 timestamp).
Joe Gregorio52a5c532013-01-24 16:19:07 -05001350 "webViewLink": "A String", # A link only available on public folders for viewing their static web assets (HTML, CSS, JS, etc) via Google Drive's Website Hosting.
Joe Gregorio075572b2012-07-09 16:53:09 -04001351 "lastViewedByMeDate": "A String", # Last time this file was viewed by the user (formatted RFC 3339 timestamp).
1352 "parents": [ # Collection of parent folders which contain this file.
Joe Gregorioe7a0c472012-07-12 11:46:04 -04001353 # 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 -04001354 { # A reference to a file's parent.
1355 "selfLink": "A String", # A link back to this reference.
1356 "kind": "drive#parentReference", # This is always drive#parentReference.
1357 "id": "A String", # The ID of the parent.
1358 "isRoot": True or False, # Whether or not the parent is the root folder.
1359 "parentLink": "A String", # A link to the parent.
1360 },
1361 ],
1362 "exportLinks": { # Links for exporting Google Docs to specific formats.
Joe Gregoriofa08c2e2012-07-23 16:52:03 -04001363 "a_key": "A String", # A mapping from export format to URL
Joe Gregorio075572b2012-07-09 16:53:09 -04001364 },
Joe Gregorio52a5c532013-01-24 16:19:07 -05001365 "shared": True or False, # Whether the file has been shared.
Joe Gregoriod67010d2012-11-05 08:57:06 -05001366 "thumbnail": { # Thumbnail for the file. Only accepted on upload and for files that are not already thumbnailed by Google.
1367 "mimeType": "A String", # The MIME type of the thumbnail.
1368 "image": "A String", # The URL-safe Base64 encoded bytes of the thumbnail image.
1369 },
Joe Gregorioad8013f2012-08-03 08:44:02 -04001370 "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 -04001371 "description": "A String", # A short description of the file.
Joe Gregorioad8013f2012-08-03 08:44:02 -04001372 "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 -04001373 "editable": True or False, # Whether the file can be edited by the current user.
1374 "kind": "drive#file", # The type of file. This is always drive#file.
1375 "quotaBytesUsed": "A String", # The number of quota bytes used by this file.
Joe Gregorio41be8e82013-03-07 10:31:47 -05001376 "fileSize": "A String", # The size of the file in bytes. This is only populated for files with content stored in Drive.
Joe Gregorio075572b2012-07-09 16:53:09 -04001377 "createdDate": "A String", # Create time for this file (formatted ISO8601 timestamp).
Joe Gregorio41be8e82013-03-07 10:31:47 -05001378 "md5Checksum": "A String", # An MD5 checksum for the content of this file. This is populated only for files with content stored in Drive.
Joe Gregorio52a5c532013-01-24 16:19:07 -05001379 "iconLink": "A String", # A link to the file's icon.
Joe Gregorioad8013f2012-08-03 08:44:02 -04001380 "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.
Joe Gregorio52a5c532013-01-24 16:19:07 -05001381 "exposureBias": 3.14, # The exposure bias of the photo (APEX value).
Joe Gregoriod67010d2012-11-05 08:57:06 -05001382 "exposureTime": 3.14, # The length of the exposure, in seconds.
1383 "cameraMake": "A String", # The make of the camera used to create the photo.
Joe Gregorio52a5c532013-01-24 16:19:07 -05001384 "maxApertureValue": 3.14, # The smallest f-number of the lens at the focal length used to create the photo (APEX value).
Joe Gregoriod67010d2012-11-05 08:57:06 -05001385 "isoSpeed": 42, # The ISO speed used to create the photo.
1386 "focalLength": 3.14, # The focal length used to create the photo, in millimeters.
Joe Gregorio52a5c532013-01-24 16:19:07 -05001387 "exposureMode": "A String", # The exposure mode used to create the photo.
1388 "colorSpace": "A String", # The color space of the photo.
Joe Gregorioad8013f2012-08-03 08:44:02 -04001389 "location": { # Geographic location information stored in the image.
1390 "latitude": 3.14, # The latitude stored in the image.
1391 "altitude": 3.14, # The altitude stored in the image.
1392 "longitude": 3.14, # The longitude stored in the image.
1393 },
Joe Gregorio52a5c532013-01-24 16:19:07 -05001394 "subjectDistance": 42, # The distance to the subject of the photo, in meters.
1395 "height": 42, # The height of the image in pixels.
1396 "lens": "A String", # The lens used to create the photo.
1397 "date": "A String", # The date and time the photo was taken (EXIF format timestamp).
1398 "width": 42, # The width of the image in pixels.
1399 "meteringMode": "A String", # The metering mode used to create the photo.
1400 "flashUsed": True or False, # Whether a flash was used to create the photo.
Joe Gregoriod67010d2012-11-05 08:57:06 -05001401 "aperture": 3.14, # The aperture used to create the photo (f-number).
1402 "rotation": 42, # The rotation in clockwise degrees from the image's original orientation.
Joe Gregorio52a5c532013-01-24 16:19:07 -05001403 "sensor": "A String", # The type of sensor used to create the photo.
1404 "whiteBalance": "A String", # The white balance mode used to create the photo.
Joe Gregoriod67010d2012-11-05 08:57:06 -05001405 "cameraModel": "A String", # The model of the camera used to create the photo.
Joe Gregorioad8013f2012-08-03 08:44:02 -04001406 },
Joe Gregorio075572b2012-07-09 16:53:09 -04001407 "embedLink": "A String", # A link for embedding the file.
Joe Gregorioad8013f2012-08-03 08:44:02 -04001408 "alternateLink": "A String", # A link for opening the file in using a relevant Google editor or viewer.
1409 "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 Gregorio41be8e82013-03-07 10:31:47 -05001410 "downloadUrl": "A String", # Short lived download URL for the file. This is only populated for files with content stored in Drive.
1411 "userPermission": { # A permission for a file. # The permissions for the authenticated user on this file.
Joe Gregorio075572b2012-07-09 16:53:09 -04001412 "withLink": True or False, # Whether the link is required for this permission.
1413 "kind": "drive#permission", # This is always drive#permission.
1414 "name": "A String", # The name for this permission.
1415 "value": "A String", # The email address or domain name for the entity. This is not populated in responses.
1416 "id": "A String", # The ID of the permission.
1417 "authKey": "A String", # The authkey parameter required for this permission.
1418 "etag": "A String", # The ETag of the permission.
1419 "role": "A String", # The primary role for this user. Allowed values are:
1420 # - owner
1421 # - reader
1422 # - writer
1423 "photoLink": "A String", # A link to the profile photo, if available.
1424 "type": "A String", # The account type. Allowed values are:
1425 # - user
1426 # - group
1427 # - domain
1428 # - anyone
1429 "additionalRoles": [ # Additional roles for this user. Only commenter is currently allowed.
1430 "A String",
1431 ],
1432 "selfLink": "A String", # A link back to this permission.
1433 },
Joe Gregorio41be8e82013-03-07 10:31:47 -05001434 "fileExtension": "A String", # The file extension used when downloading this file. This field is read only. To set the extension, include it in the title when creating the file. This is only populated for files with content stored in Drive.
Joe Gregorio075572b2012-07-09 16:53:09 -04001435 "selfLink": "A String", # A link back to this file.
Joe Gregorioad8013f2012-08-03 08:44:02 -04001436 "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 -04001437 }</pre>
1438</div>
1439
1440<div class="method">
1441 <code class="details" id="trash">trash(fileId)</code>
1442 <pre>Moves a file to the trash.
1443
1444Args:
1445 fileId: string, The ID of the file to trash. (required)
1446
1447Returns:
1448 An object of the form:
1449
1450 { # The metadata for a file.
Joe Gregorioad8013f2012-08-03 08:44:02 -04001451 "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 -04001452 "thumbnailLink": "A String", # A link to the file's thumbnail.
1453 "labels": { # A group of labels for the file.
1454 "restricted": True or False, # Whether viewers are prevented from downloading this file.
1455 "hidden": True or False, # Whether this file is hidden from the user.
1456 "viewed": True or False, # Whether this file has been viewed by this user.
1457 "starred": True or False, # Whether this file is starred by the user.
1458 "trashed": True or False, # Whether this file has been trashed.
1459 },
1460 "indexableText": { # Indexable text attributes for the file (can only be written)
Joe Gregorio41be8e82013-03-07 10:31:47 -05001461 "text": "A String", # The text to be indexed for this file.
Joe Gregorio075572b2012-07-09 16:53:09 -04001462 },
Joe Gregorioad8013f2012-08-03 08:44:02 -04001463 "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 -04001464 "etag": "A String", # ETag of the file.
Joe Gregorio41be8e82013-03-07 10:31:47 -05001465 "lastModifyingUserName": "A String", # Name of the last user to modify this file.
Joe Gregorio075572b2012-07-09 16:53:09 -04001466 "writersCanShare": True or False, # Whether writers can share the document with other users.
Joe Gregorio41be8e82013-03-07 10:31:47 -05001467 "owners": [ # The owner(s) of this file.
1468 { # The JSON template for a user.
1469 "picture": { # The user's profile picture.
1470 "url": "A String", # A URL that points to a profile picture of this user.
1471 },
1472 "kind": "drive#user", # This is always drive#user.
1473 "isAuthenticatedUser": True or False, # Whether this user is the same as the authenticated user for whom the request was made.
1474 "displayName": "A String", # A plain text displayable name for this user.
1475 "permissionId": "A String", # The user's ID as visible in the permissions collection.
1476 },
1477 ],
1478 "id": "A String", # The ID of the file.
1479 "lastModifyingUser": { # The JSON template for a user. # The last user to modify this file.
1480 "picture": { # The user's profile picture.
1481 "url": "A String", # A URL that points to a profile picture of this user.
1482 },
1483 "kind": "drive#user", # This is always drive#user.
1484 "isAuthenticatedUser": True or False, # Whether this user is the same as the authenticated user for whom the request was made.
1485 "displayName": "A String", # A plain text displayable name for this user.
1486 "permissionId": "A String", # The user's ID as visible in the permissions collection.
1487 },
Joe Gregorio075572b2012-07-09 16:53:09 -04001488 "title": "A String", # The title of this file.
1489 "ownerNames": [ # Name(s) of the owner(s) of this file.
1490 "A String",
1491 ],
1492 "sharedWithMeDate": "A String", # Time at which this file was shared with the user (formatted RFC 3339 timestamp).
Joe Gregorio52a5c532013-01-24 16:19:07 -05001493 "webViewLink": "A String", # A link only available on public folders for viewing their static web assets (HTML, CSS, JS, etc) via Google Drive's Website Hosting.
Joe Gregorio075572b2012-07-09 16:53:09 -04001494 "lastViewedByMeDate": "A String", # Last time this file was viewed by the user (formatted RFC 3339 timestamp).
1495 "parents": [ # Collection of parent folders which contain this file.
Joe Gregorioe7a0c472012-07-12 11:46:04 -04001496 # 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 -04001497 { # A reference to a file's parent.
1498 "selfLink": "A String", # A link back to this reference.
1499 "kind": "drive#parentReference", # This is always drive#parentReference.
1500 "id": "A String", # The ID of the parent.
1501 "isRoot": True or False, # Whether or not the parent is the root folder.
1502 "parentLink": "A String", # A link to the parent.
1503 },
1504 ],
1505 "exportLinks": { # Links for exporting Google Docs to specific formats.
Joe Gregoriofa08c2e2012-07-23 16:52:03 -04001506 "a_key": "A String", # A mapping from export format to URL
Joe Gregorio075572b2012-07-09 16:53:09 -04001507 },
Joe Gregorio52a5c532013-01-24 16:19:07 -05001508 "shared": True or False, # Whether the file has been shared.
Joe Gregoriod67010d2012-11-05 08:57:06 -05001509 "thumbnail": { # Thumbnail for the file. Only accepted on upload and for files that are not already thumbnailed by Google.
1510 "mimeType": "A String", # The MIME type of the thumbnail.
1511 "image": "A String", # The URL-safe Base64 encoded bytes of the thumbnail image.
1512 },
Joe Gregorioad8013f2012-08-03 08:44:02 -04001513 "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 -04001514 "description": "A String", # A short description of the file.
Joe Gregorioad8013f2012-08-03 08:44:02 -04001515 "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 -04001516 "editable": True or False, # Whether the file can be edited by the current user.
1517 "kind": "drive#file", # The type of file. This is always drive#file.
1518 "quotaBytesUsed": "A String", # The number of quota bytes used by this file.
Joe Gregorio41be8e82013-03-07 10:31:47 -05001519 "fileSize": "A String", # The size of the file in bytes. This is only populated for files with content stored in Drive.
Joe Gregorio075572b2012-07-09 16:53:09 -04001520 "createdDate": "A String", # Create time for this file (formatted ISO8601 timestamp).
Joe Gregorio41be8e82013-03-07 10:31:47 -05001521 "md5Checksum": "A String", # An MD5 checksum for the content of this file. This is populated only for files with content stored in Drive.
Joe Gregorio52a5c532013-01-24 16:19:07 -05001522 "iconLink": "A String", # A link to the file's icon.
Joe Gregorioad8013f2012-08-03 08:44:02 -04001523 "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.
Joe Gregorio52a5c532013-01-24 16:19:07 -05001524 "exposureBias": 3.14, # The exposure bias of the photo (APEX value).
Joe Gregoriod67010d2012-11-05 08:57:06 -05001525 "exposureTime": 3.14, # The length of the exposure, in seconds.
1526 "cameraMake": "A String", # The make of the camera used to create the photo.
Joe Gregorio52a5c532013-01-24 16:19:07 -05001527 "maxApertureValue": 3.14, # The smallest f-number of the lens at the focal length used to create the photo (APEX value).
Joe Gregoriod67010d2012-11-05 08:57:06 -05001528 "isoSpeed": 42, # The ISO speed used to create the photo.
1529 "focalLength": 3.14, # The focal length used to create the photo, in millimeters.
Joe Gregorio52a5c532013-01-24 16:19:07 -05001530 "exposureMode": "A String", # The exposure mode used to create the photo.
1531 "colorSpace": "A String", # The color space of the photo.
Joe Gregorioad8013f2012-08-03 08:44:02 -04001532 "location": { # Geographic location information stored in the image.
1533 "latitude": 3.14, # The latitude stored in the image.
1534 "altitude": 3.14, # The altitude stored in the image.
1535 "longitude": 3.14, # The longitude stored in the image.
1536 },
Joe Gregorio52a5c532013-01-24 16:19:07 -05001537 "subjectDistance": 42, # The distance to the subject of the photo, in meters.
1538 "height": 42, # The height of the image in pixels.
1539 "lens": "A String", # The lens used to create the photo.
1540 "date": "A String", # The date and time the photo was taken (EXIF format timestamp).
1541 "width": 42, # The width of the image in pixels.
1542 "meteringMode": "A String", # The metering mode used to create the photo.
1543 "flashUsed": True or False, # Whether a flash was used to create the photo.
Joe Gregoriod67010d2012-11-05 08:57:06 -05001544 "aperture": 3.14, # The aperture used to create the photo (f-number).
1545 "rotation": 42, # The rotation in clockwise degrees from the image's original orientation.
Joe Gregorio52a5c532013-01-24 16:19:07 -05001546 "sensor": "A String", # The type of sensor used to create the photo.
1547 "whiteBalance": "A String", # The white balance mode used to create the photo.
Joe Gregoriod67010d2012-11-05 08:57:06 -05001548 "cameraModel": "A String", # The model of the camera used to create the photo.
Joe Gregorioad8013f2012-08-03 08:44:02 -04001549 },
Joe Gregorio075572b2012-07-09 16:53:09 -04001550 "embedLink": "A String", # A link for embedding the file.
Joe Gregorioad8013f2012-08-03 08:44:02 -04001551 "alternateLink": "A String", # A link for opening the file in using a relevant Google editor or viewer.
1552 "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 Gregorio41be8e82013-03-07 10:31:47 -05001553 "downloadUrl": "A String", # Short lived download URL for the file. This is only populated for files with content stored in Drive.
1554 "userPermission": { # A permission for a file. # The permissions for the authenticated user on this file.
Joe Gregorio075572b2012-07-09 16:53:09 -04001555 "withLink": True or False, # Whether the link is required for this permission.
1556 "kind": "drive#permission", # This is always drive#permission.
1557 "name": "A String", # The name for this permission.
1558 "value": "A String", # The email address or domain name for the entity. This is not populated in responses.
1559 "id": "A String", # The ID of the permission.
1560 "authKey": "A String", # The authkey parameter required for this permission.
1561 "etag": "A String", # The ETag of the permission.
1562 "role": "A String", # The primary role for this user. Allowed values are:
1563 # - owner
1564 # - reader
1565 # - writer
1566 "photoLink": "A String", # A link to the profile photo, if available.
1567 "type": "A String", # The account type. Allowed values are:
1568 # - user
1569 # - group
1570 # - domain
1571 # - anyone
1572 "additionalRoles": [ # Additional roles for this user. Only commenter is currently allowed.
1573 "A String",
1574 ],
1575 "selfLink": "A String", # A link back to this permission.
1576 },
Joe Gregorio41be8e82013-03-07 10:31:47 -05001577 "fileExtension": "A String", # The file extension used when downloading this file. This field is read only. To set the extension, include it in the title when creating the file. This is only populated for files with content stored in Drive.
Joe Gregorio075572b2012-07-09 16:53:09 -04001578 "selfLink": "A String", # A link back to this file.
Joe Gregorioad8013f2012-08-03 08:44:02 -04001579 "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 -04001580 }</pre>
1581</div>
1582
1583<div class="method">
1584 <code class="details" id="untrash">untrash(fileId)</code>
1585 <pre>Restores a file from the trash.
1586
1587Args:
1588 fileId: string, The ID of the file to untrash. (required)
1589
1590Returns:
1591 An object of the form:
1592
1593 { # The metadata for a file.
Joe Gregorioad8013f2012-08-03 08:44:02 -04001594 "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 -04001595 "thumbnailLink": "A String", # A link to the file's thumbnail.
1596 "labels": { # A group of labels for the file.
1597 "restricted": True or False, # Whether viewers are prevented from downloading this file.
1598 "hidden": True or False, # Whether this file is hidden from the user.
1599 "viewed": True or False, # Whether this file has been viewed by this user.
1600 "starred": True or False, # Whether this file is starred by the user.
1601 "trashed": True or False, # Whether this file has been trashed.
1602 },
1603 "indexableText": { # Indexable text attributes for the file (can only be written)
Joe Gregorio41be8e82013-03-07 10:31:47 -05001604 "text": "A String", # The text to be indexed for this file.
Joe Gregorio075572b2012-07-09 16:53:09 -04001605 },
Joe Gregorioad8013f2012-08-03 08:44:02 -04001606 "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 -04001607 "etag": "A String", # ETag of the file.
Joe Gregorio41be8e82013-03-07 10:31:47 -05001608 "lastModifyingUserName": "A String", # Name of the last user to modify this file.
Joe Gregorio075572b2012-07-09 16:53:09 -04001609 "writersCanShare": True or False, # Whether writers can share the document with other users.
Joe Gregorio41be8e82013-03-07 10:31:47 -05001610 "owners": [ # The owner(s) of this file.
1611 { # The JSON template for a user.
1612 "picture": { # The user's profile picture.
1613 "url": "A String", # A URL that points to a profile picture of this user.
1614 },
1615 "kind": "drive#user", # This is always drive#user.
1616 "isAuthenticatedUser": True or False, # Whether this user is the same as the authenticated user for whom the request was made.
1617 "displayName": "A String", # A plain text displayable name for this user.
1618 "permissionId": "A String", # The user's ID as visible in the permissions collection.
1619 },
1620 ],
1621 "id": "A String", # The ID of the file.
1622 "lastModifyingUser": { # The JSON template for a user. # The last user to modify this file.
1623 "picture": { # The user's profile picture.
1624 "url": "A String", # A URL that points to a profile picture of this user.
1625 },
1626 "kind": "drive#user", # This is always drive#user.
1627 "isAuthenticatedUser": True or False, # Whether this user is the same as the authenticated user for whom the request was made.
1628 "displayName": "A String", # A plain text displayable name for this user.
1629 "permissionId": "A String", # The user's ID as visible in the permissions collection.
1630 },
Joe Gregorio075572b2012-07-09 16:53:09 -04001631 "title": "A String", # The title of this file.
1632 "ownerNames": [ # Name(s) of the owner(s) of this file.
1633 "A String",
1634 ],
1635 "sharedWithMeDate": "A String", # Time at which this file was shared with the user (formatted RFC 3339 timestamp).
Joe Gregorio52a5c532013-01-24 16:19:07 -05001636 "webViewLink": "A String", # A link only available on public folders for viewing their static web assets (HTML, CSS, JS, etc) via Google Drive's Website Hosting.
Joe Gregorio075572b2012-07-09 16:53:09 -04001637 "lastViewedByMeDate": "A String", # Last time this file was viewed by the user (formatted RFC 3339 timestamp).
1638 "parents": [ # Collection of parent folders which contain this file.
Joe Gregorioe7a0c472012-07-12 11:46:04 -04001639 # 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 -04001640 { # A reference to a file's parent.
1641 "selfLink": "A String", # A link back to this reference.
1642 "kind": "drive#parentReference", # This is always drive#parentReference.
1643 "id": "A String", # The ID of the parent.
1644 "isRoot": True or False, # Whether or not the parent is the root folder.
1645 "parentLink": "A String", # A link to the parent.
1646 },
1647 ],
1648 "exportLinks": { # Links for exporting Google Docs to specific formats.
Joe Gregoriofa08c2e2012-07-23 16:52:03 -04001649 "a_key": "A String", # A mapping from export format to URL
Joe Gregorio075572b2012-07-09 16:53:09 -04001650 },
Joe Gregorio52a5c532013-01-24 16:19:07 -05001651 "shared": True or False, # Whether the file has been shared.
Joe Gregoriod67010d2012-11-05 08:57:06 -05001652 "thumbnail": { # Thumbnail for the file. Only accepted on upload and for files that are not already thumbnailed by Google.
1653 "mimeType": "A String", # The MIME type of the thumbnail.
1654 "image": "A String", # The URL-safe Base64 encoded bytes of the thumbnail image.
1655 },
Joe Gregorioad8013f2012-08-03 08:44:02 -04001656 "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 -04001657 "description": "A String", # A short description of the file.
Joe Gregorioad8013f2012-08-03 08:44:02 -04001658 "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 -04001659 "editable": True or False, # Whether the file can be edited by the current user.
1660 "kind": "drive#file", # The type of file. This is always drive#file.
1661 "quotaBytesUsed": "A String", # The number of quota bytes used by this file.
Joe Gregorio41be8e82013-03-07 10:31:47 -05001662 "fileSize": "A String", # The size of the file in bytes. This is only populated for files with content stored in Drive.
Joe Gregorio075572b2012-07-09 16:53:09 -04001663 "createdDate": "A String", # Create time for this file (formatted ISO8601 timestamp).
Joe Gregorio41be8e82013-03-07 10:31:47 -05001664 "md5Checksum": "A String", # An MD5 checksum for the content of this file. This is populated only for files with content stored in Drive.
Joe Gregorio52a5c532013-01-24 16:19:07 -05001665 "iconLink": "A String", # A link to the file's icon.
Joe Gregorioad8013f2012-08-03 08:44:02 -04001666 "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.
Joe Gregorio52a5c532013-01-24 16:19:07 -05001667 "exposureBias": 3.14, # The exposure bias of the photo (APEX value).
Joe Gregoriod67010d2012-11-05 08:57:06 -05001668 "exposureTime": 3.14, # The length of the exposure, in seconds.
1669 "cameraMake": "A String", # The make of the camera used to create the photo.
Joe Gregorio52a5c532013-01-24 16:19:07 -05001670 "maxApertureValue": 3.14, # The smallest f-number of the lens at the focal length used to create the photo (APEX value).
Joe Gregoriod67010d2012-11-05 08:57:06 -05001671 "isoSpeed": 42, # The ISO speed used to create the photo.
1672 "focalLength": 3.14, # The focal length used to create the photo, in millimeters.
Joe Gregorio52a5c532013-01-24 16:19:07 -05001673 "exposureMode": "A String", # The exposure mode used to create the photo.
1674 "colorSpace": "A String", # The color space of the photo.
Joe Gregorioad8013f2012-08-03 08:44:02 -04001675 "location": { # Geographic location information stored in the image.
1676 "latitude": 3.14, # The latitude stored in the image.
1677 "altitude": 3.14, # The altitude stored in the image.
1678 "longitude": 3.14, # The longitude stored in the image.
1679 },
Joe Gregorio52a5c532013-01-24 16:19:07 -05001680 "subjectDistance": 42, # The distance to the subject of the photo, in meters.
1681 "height": 42, # The height of the image in pixels.
1682 "lens": "A String", # The lens used to create the photo.
1683 "date": "A String", # The date and time the photo was taken (EXIF format timestamp).
1684 "width": 42, # The width of the image in pixels.
1685 "meteringMode": "A String", # The metering mode used to create the photo.
1686 "flashUsed": True or False, # Whether a flash was used to create the photo.
Joe Gregoriod67010d2012-11-05 08:57:06 -05001687 "aperture": 3.14, # The aperture used to create the photo (f-number).
1688 "rotation": 42, # The rotation in clockwise degrees from the image's original orientation.
Joe Gregorio52a5c532013-01-24 16:19:07 -05001689 "sensor": "A String", # The type of sensor used to create the photo.
1690 "whiteBalance": "A String", # The white balance mode used to create the photo.
Joe Gregoriod67010d2012-11-05 08:57:06 -05001691 "cameraModel": "A String", # The model of the camera used to create the photo.
Joe Gregorioad8013f2012-08-03 08:44:02 -04001692 },
Joe Gregorio075572b2012-07-09 16:53:09 -04001693 "embedLink": "A String", # A link for embedding the file.
Joe Gregorioad8013f2012-08-03 08:44:02 -04001694 "alternateLink": "A String", # A link for opening the file in using a relevant Google editor or viewer.
1695 "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 Gregorio41be8e82013-03-07 10:31:47 -05001696 "downloadUrl": "A String", # Short lived download URL for the file. This is only populated for files with content stored in Drive.
1697 "userPermission": { # A permission for a file. # The permissions for the authenticated user on this file.
Joe Gregorio075572b2012-07-09 16:53:09 -04001698 "withLink": True or False, # Whether the link is required for this permission.
1699 "kind": "drive#permission", # This is always drive#permission.
1700 "name": "A String", # The name for this permission.
1701 "value": "A String", # The email address or domain name for the entity. This is not populated in responses.
1702 "id": "A String", # The ID of the permission.
1703 "authKey": "A String", # The authkey parameter required for this permission.
1704 "etag": "A String", # The ETag of the permission.
1705 "role": "A String", # The primary role for this user. Allowed values are:
1706 # - owner
1707 # - reader
1708 # - writer
1709 "photoLink": "A String", # A link to the profile photo, if available.
1710 "type": "A String", # The account type. Allowed values are:
1711 # - user
1712 # - group
1713 # - domain
1714 # - anyone
1715 "additionalRoles": [ # Additional roles for this user. Only commenter is currently allowed.
1716 "A String",
1717 ],
1718 "selfLink": "A String", # A link back to this permission.
1719 },
Joe Gregorio41be8e82013-03-07 10:31:47 -05001720 "fileExtension": "A String", # The file extension used when downloading this file. This field is read only. To set the extension, include it in the title when creating the file. This is only populated for files with content stored in Drive.
Joe Gregorio075572b2012-07-09 16:53:09 -04001721 "selfLink": "A String", # A link back to this file.
Joe Gregorioad8013f2012-08-03 08:44:02 -04001722 "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 -04001723 }</pre>
1724</div>
1725
1726<div class="method">
Joe Gregorio41be8e82013-03-07 10:31:47 -05001727 <code class="details" id="update">update(fileId, body=None, newRevision=None, media_body=None, ocrLanguage=None, ocr=None, pinned=None, updateViewedDate=None, timedTextTrackName=None, convert=None, useContentAsIndexableText=None, setModifiedDate=None, timedTextLanguage=None)</code>
1728 <pre>Updates file metadata and/or content.
Joe Gregorio075572b2012-07-09 16:53:09 -04001729
1730Args:
1731 fileId: string, The ID of the file to update. (required)
1732 body: object, The request body.
1733 The object takes the form of:
1734
1735{ # The metadata for a file.
Joe Gregorioad8013f2012-08-03 08:44:02 -04001736 "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 -04001737 "thumbnailLink": "A String", # A link to the file's thumbnail.
1738 "labels": { # A group of labels for the file.
1739 "restricted": True or False, # Whether viewers are prevented from downloading this file.
1740 "hidden": True or False, # Whether this file is hidden from the user.
1741 "viewed": True or False, # Whether this file has been viewed by this user.
1742 "starred": True or False, # Whether this file is starred by the user.
1743 "trashed": True or False, # Whether this file has been trashed.
1744 },
1745 "indexableText": { # Indexable text attributes for the file (can only be written)
Joe Gregorio41be8e82013-03-07 10:31:47 -05001746 "text": "A String", # The text to be indexed for this file.
Joe Gregorio075572b2012-07-09 16:53:09 -04001747 },
Joe Gregorioad8013f2012-08-03 08:44:02 -04001748 "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 -04001749 "etag": "A String", # ETag of the file.
Joe Gregorio41be8e82013-03-07 10:31:47 -05001750 "lastModifyingUserName": "A String", # Name of the last user to modify this file.
Joe Gregorio075572b2012-07-09 16:53:09 -04001751 "writersCanShare": True or False, # Whether writers can share the document with other users.
Joe Gregorio41be8e82013-03-07 10:31:47 -05001752 "owners": [ # The owner(s) of this file.
1753 { # The JSON template for a user.
1754 "picture": { # The user's profile picture.
1755 "url": "A String", # A URL that points to a profile picture of this user.
1756 },
1757 "kind": "drive#user", # This is always drive#user.
1758 "isAuthenticatedUser": True or False, # Whether this user is the same as the authenticated user for whom the request was made.
1759 "displayName": "A String", # A plain text displayable name for this user.
1760 "permissionId": "A String", # The user's ID as visible in the permissions collection.
1761 },
1762 ],
1763 "id": "A String", # The ID of the file.
1764 "lastModifyingUser": { # The JSON template for a user. # The last user to modify this file.
1765 "picture": { # The user's profile picture.
1766 "url": "A String", # A URL that points to a profile picture of this user.
1767 },
1768 "kind": "drive#user", # This is always drive#user.
1769 "isAuthenticatedUser": True or False, # Whether this user is the same as the authenticated user for whom the request was made.
1770 "displayName": "A String", # A plain text displayable name for this user.
1771 "permissionId": "A String", # The user's ID as visible in the permissions collection.
1772 },
Joe Gregorio075572b2012-07-09 16:53:09 -04001773 "title": "A String", # The title of this file.
1774 "ownerNames": [ # Name(s) of the owner(s) of this file.
1775 "A String",
1776 ],
1777 "sharedWithMeDate": "A String", # Time at which this file was shared with the user (formatted RFC 3339 timestamp).
Joe Gregorio52a5c532013-01-24 16:19:07 -05001778 "webViewLink": "A String", # A link only available on public folders for viewing their static web assets (HTML, CSS, JS, etc) via Google Drive's Website Hosting.
Joe Gregorio075572b2012-07-09 16:53:09 -04001779 "lastViewedByMeDate": "A String", # Last time this file was viewed by the user (formatted RFC 3339 timestamp).
1780 "parents": [ # Collection of parent folders which contain this file.
Joe Gregorioe7a0c472012-07-12 11:46:04 -04001781 # 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 -04001782 { # A reference to a file's parent.
1783 "selfLink": "A String", # A link back to this reference.
1784 "kind": "drive#parentReference", # This is always drive#parentReference.
1785 "id": "A String", # The ID of the parent.
1786 "isRoot": True or False, # Whether or not the parent is the root folder.
1787 "parentLink": "A String", # A link to the parent.
1788 },
1789 ],
1790 "exportLinks": { # Links for exporting Google Docs to specific formats.
Joe Gregoriofa08c2e2012-07-23 16:52:03 -04001791 "a_key": "A String", # A mapping from export format to URL
Joe Gregorio075572b2012-07-09 16:53:09 -04001792 },
Joe Gregorio52a5c532013-01-24 16:19:07 -05001793 "shared": True or False, # Whether the file has been shared.
Joe Gregoriod67010d2012-11-05 08:57:06 -05001794 "thumbnail": { # Thumbnail for the file. Only accepted on upload and for files that are not already thumbnailed by Google.
1795 "mimeType": "A String", # The MIME type of the thumbnail.
1796 "image": "A String", # The URL-safe Base64 encoded bytes of the thumbnail image.
1797 },
Joe Gregorioad8013f2012-08-03 08:44:02 -04001798 "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 -04001799 "description": "A String", # A short description of the file.
Joe Gregorioad8013f2012-08-03 08:44:02 -04001800 "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 -04001801 "editable": True or False, # Whether the file can be edited by the current user.
1802 "kind": "drive#file", # The type of file. This is always drive#file.
1803 "quotaBytesUsed": "A String", # The number of quota bytes used by this file.
Joe Gregorio41be8e82013-03-07 10:31:47 -05001804 "fileSize": "A String", # The size of the file in bytes. This is only populated for files with content stored in Drive.
Joe Gregorio075572b2012-07-09 16:53:09 -04001805 "createdDate": "A String", # Create time for this file (formatted ISO8601 timestamp).
Joe Gregorio41be8e82013-03-07 10:31:47 -05001806 "md5Checksum": "A String", # An MD5 checksum for the content of this file. This is populated only for files with content stored in Drive.
Joe Gregorio52a5c532013-01-24 16:19:07 -05001807 "iconLink": "A String", # A link to the file's icon.
Joe Gregorioad8013f2012-08-03 08:44:02 -04001808 "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.
Joe Gregorio52a5c532013-01-24 16:19:07 -05001809 "exposureBias": 3.14, # The exposure bias of the photo (APEX value).
Joe Gregoriod67010d2012-11-05 08:57:06 -05001810 "exposureTime": 3.14, # The length of the exposure, in seconds.
1811 "cameraMake": "A String", # The make of the camera used to create the photo.
Joe Gregorio52a5c532013-01-24 16:19:07 -05001812 "maxApertureValue": 3.14, # The smallest f-number of the lens at the focal length used to create the photo (APEX value).
Joe Gregoriod67010d2012-11-05 08:57:06 -05001813 "isoSpeed": 42, # The ISO speed used to create the photo.
1814 "focalLength": 3.14, # The focal length used to create the photo, in millimeters.
Joe Gregorio52a5c532013-01-24 16:19:07 -05001815 "exposureMode": "A String", # The exposure mode used to create the photo.
1816 "colorSpace": "A String", # The color space of the photo.
Joe Gregorioad8013f2012-08-03 08:44:02 -04001817 "location": { # Geographic location information stored in the image.
1818 "latitude": 3.14, # The latitude stored in the image.
1819 "altitude": 3.14, # The altitude stored in the image.
1820 "longitude": 3.14, # The longitude stored in the image.
1821 },
Joe Gregorio52a5c532013-01-24 16:19:07 -05001822 "subjectDistance": 42, # The distance to the subject of the photo, in meters.
1823 "height": 42, # The height of the image in pixels.
1824 "lens": "A String", # The lens used to create the photo.
1825 "date": "A String", # The date and time the photo was taken (EXIF format timestamp).
1826 "width": 42, # The width of the image in pixels.
1827 "meteringMode": "A String", # The metering mode used to create the photo.
1828 "flashUsed": True or False, # Whether a flash was used to create the photo.
Joe Gregoriod67010d2012-11-05 08:57:06 -05001829 "aperture": 3.14, # The aperture used to create the photo (f-number).
1830 "rotation": 42, # The rotation in clockwise degrees from the image's original orientation.
Joe Gregorio52a5c532013-01-24 16:19:07 -05001831 "sensor": "A String", # The type of sensor used to create the photo.
1832 "whiteBalance": "A String", # The white balance mode used to create the photo.
Joe Gregoriod67010d2012-11-05 08:57:06 -05001833 "cameraModel": "A String", # The model of the camera used to create the photo.
Joe Gregorioad8013f2012-08-03 08:44:02 -04001834 },
Joe Gregorio075572b2012-07-09 16:53:09 -04001835 "embedLink": "A String", # A link for embedding the file.
Joe Gregorioad8013f2012-08-03 08:44:02 -04001836 "alternateLink": "A String", # A link for opening the file in using a relevant Google editor or viewer.
1837 "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 Gregorio41be8e82013-03-07 10:31:47 -05001838 "downloadUrl": "A String", # Short lived download URL for the file. This is only populated for files with content stored in Drive.
1839 "userPermission": { # A permission for a file. # The permissions for the authenticated user on this file.
Joe Gregorio075572b2012-07-09 16:53:09 -04001840 "withLink": True or False, # Whether the link is required for this permission.
1841 "kind": "drive#permission", # This is always drive#permission.
1842 "name": "A String", # The name for this permission.
1843 "value": "A String", # The email address or domain name for the entity. This is not populated in responses.
1844 "id": "A String", # The ID of the permission.
1845 "authKey": "A String", # The authkey parameter required for this permission.
1846 "etag": "A String", # The ETag of the permission.
1847 "role": "A String", # The primary role for this user. Allowed values are:
1848 # - owner
1849 # - reader
1850 # - writer
1851 "photoLink": "A String", # A link to the profile photo, if available.
1852 "type": "A String", # The account type. Allowed values are:
1853 # - user
1854 # - group
1855 # - domain
1856 # - anyone
1857 "additionalRoles": [ # Additional roles for this user. Only commenter is currently allowed.
1858 "A String",
1859 ],
1860 "selfLink": "A String", # A link back to this permission.
1861 },
Joe Gregorio41be8e82013-03-07 10:31:47 -05001862 "fileExtension": "A String", # The file extension used when downloading this file. This field is read only. To set the extension, include it in the title when creating the file. This is only populated for files with content stored in Drive.
Joe Gregorio075572b2012-07-09 16:53:09 -04001863 "selfLink": "A String", # A link back to this file.
Joe Gregorioad8013f2012-08-03 08:44:02 -04001864 "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 -04001865}
1866
Joe Gregorio41be8e82013-03-07 10:31:47 -05001867 newRevision: boolean, Whether a blob upload should create a new revision. If not set or false, the blob data in the current head revision is replaced. If true, a new blob is created as head revision, and previous revisions are preserved (causing increased use of the user's data storage quota).
Joe Gregorio075572b2012-07-09 16:53:09 -04001868 media_body: string, The filename of the media request body, or an instance of a MediaUpload object.
Joe Gregorio075572b2012-07-09 16:53:09 -04001869 ocrLanguage: string, If ocr is true, hints at the language to use. Valid values are ISO 639-1 codes.
Joe Gregoriod67010d2012-11-05 08:57:06 -05001870 ocr: boolean, Whether to attempt OCR on .jpg, .png, .gif, or .pdf uploads.
Joe Gregorio075572b2012-07-09 16:53:09 -04001871 pinned: boolean, Whether to pin the new revision.
Joe Gregorio075572b2012-07-09 16:53:09 -04001872 updateViewedDate: boolean, Whether to update the view date after successfully updating the file.
1873 timedTextTrackName: string, The timed text track name.
1874 convert: boolean, Whether to convert this file to the corresponding Google Docs format.
Joe Gregorio41be8e82013-03-07 10:31:47 -05001875 useContentAsIndexableText: boolean, Whether to use the content as indexable text.
Joe Gregorio075572b2012-07-09 16:53:09 -04001876 setModifiedDate: boolean, Whether to set the modified date with the supplied modified date.
1877 timedTextLanguage: string, The language of the timed text.
1878
1879Returns:
1880 An object of the form:
1881
1882 { # The metadata for a file.
Joe Gregorioad8013f2012-08-03 08:44:02 -04001883 "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 -04001884 "thumbnailLink": "A String", # A link to the file's thumbnail.
1885 "labels": { # A group of labels for the file.
1886 "restricted": True or False, # Whether viewers are prevented from downloading this file.
1887 "hidden": True or False, # Whether this file is hidden from the user.
1888 "viewed": True or False, # Whether this file has been viewed by this user.
1889 "starred": True or False, # Whether this file is starred by the user.
1890 "trashed": True or False, # Whether this file has been trashed.
1891 },
1892 "indexableText": { # Indexable text attributes for the file (can only be written)
Joe Gregorio41be8e82013-03-07 10:31:47 -05001893 "text": "A String", # The text to be indexed for this file.
Joe Gregorio075572b2012-07-09 16:53:09 -04001894 },
Joe Gregorioad8013f2012-08-03 08:44:02 -04001895 "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 -04001896 "etag": "A String", # ETag of the file.
Joe Gregorio41be8e82013-03-07 10:31:47 -05001897 "lastModifyingUserName": "A String", # Name of the last user to modify this file.
Joe Gregorio075572b2012-07-09 16:53:09 -04001898 "writersCanShare": True or False, # Whether writers can share the document with other users.
Joe Gregorio41be8e82013-03-07 10:31:47 -05001899 "owners": [ # The owner(s) of this file.
1900 { # The JSON template for a user.
1901 "picture": { # The user's profile picture.
1902 "url": "A String", # A URL that points to a profile picture of this user.
1903 },
1904 "kind": "drive#user", # This is always drive#user.
1905 "isAuthenticatedUser": True or False, # Whether this user is the same as the authenticated user for whom the request was made.
1906 "displayName": "A String", # A plain text displayable name for this user.
1907 "permissionId": "A String", # The user's ID as visible in the permissions collection.
1908 },
1909 ],
1910 "id": "A String", # The ID of the file.
1911 "lastModifyingUser": { # The JSON template for a user. # The last user to modify this file.
1912 "picture": { # The user's profile picture.
1913 "url": "A String", # A URL that points to a profile picture of this user.
1914 },
1915 "kind": "drive#user", # This is always drive#user.
1916 "isAuthenticatedUser": True or False, # Whether this user is the same as the authenticated user for whom the request was made.
1917 "displayName": "A String", # A plain text displayable name for this user.
1918 "permissionId": "A String", # The user's ID as visible in the permissions collection.
1919 },
Joe Gregorio075572b2012-07-09 16:53:09 -04001920 "title": "A String", # The title of this file.
1921 "ownerNames": [ # Name(s) of the owner(s) of this file.
1922 "A String",
1923 ],
1924 "sharedWithMeDate": "A String", # Time at which this file was shared with the user (formatted RFC 3339 timestamp).
Joe Gregorio52a5c532013-01-24 16:19:07 -05001925 "webViewLink": "A String", # A link only available on public folders for viewing their static web assets (HTML, CSS, JS, etc) via Google Drive's Website Hosting.
Joe Gregorio075572b2012-07-09 16:53:09 -04001926 "lastViewedByMeDate": "A String", # Last time this file was viewed by the user (formatted RFC 3339 timestamp).
1927 "parents": [ # Collection of parent folders which contain this file.
Joe Gregorioe7a0c472012-07-12 11:46:04 -04001928 # 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 -04001929 { # A reference to a file's parent.
1930 "selfLink": "A String", # A link back to this reference.
1931 "kind": "drive#parentReference", # This is always drive#parentReference.
1932 "id": "A String", # The ID of the parent.
1933 "isRoot": True or False, # Whether or not the parent is the root folder.
1934 "parentLink": "A String", # A link to the parent.
1935 },
1936 ],
1937 "exportLinks": { # Links for exporting Google Docs to specific formats.
Joe Gregoriofa08c2e2012-07-23 16:52:03 -04001938 "a_key": "A String", # A mapping from export format to URL
Joe Gregorio075572b2012-07-09 16:53:09 -04001939 },
Joe Gregorio52a5c532013-01-24 16:19:07 -05001940 "shared": True or False, # Whether the file has been shared.
Joe Gregoriod67010d2012-11-05 08:57:06 -05001941 "thumbnail": { # Thumbnail for the file. Only accepted on upload and for files that are not already thumbnailed by Google.
1942 "mimeType": "A String", # The MIME type of the thumbnail.
1943 "image": "A String", # The URL-safe Base64 encoded bytes of the thumbnail image.
1944 },
Joe Gregorioad8013f2012-08-03 08:44:02 -04001945 "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 -04001946 "description": "A String", # A short description of the file.
Joe Gregorioad8013f2012-08-03 08:44:02 -04001947 "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 -04001948 "editable": True or False, # Whether the file can be edited by the current user.
1949 "kind": "drive#file", # The type of file. This is always drive#file.
1950 "quotaBytesUsed": "A String", # The number of quota bytes used by this file.
Joe Gregorio41be8e82013-03-07 10:31:47 -05001951 "fileSize": "A String", # The size of the file in bytes. This is only populated for files with content stored in Drive.
Joe Gregorio075572b2012-07-09 16:53:09 -04001952 "createdDate": "A String", # Create time for this file (formatted ISO8601 timestamp).
Joe Gregorio41be8e82013-03-07 10:31:47 -05001953 "md5Checksum": "A String", # An MD5 checksum for the content of this file. This is populated only for files with content stored in Drive.
Joe Gregorio52a5c532013-01-24 16:19:07 -05001954 "iconLink": "A String", # A link to the file's icon.
Joe Gregorioad8013f2012-08-03 08:44:02 -04001955 "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.
Joe Gregorio52a5c532013-01-24 16:19:07 -05001956 "exposureBias": 3.14, # The exposure bias of the photo (APEX value).
Joe Gregoriod67010d2012-11-05 08:57:06 -05001957 "exposureTime": 3.14, # The length of the exposure, in seconds.
1958 "cameraMake": "A String", # The make of the camera used to create the photo.
Joe Gregorio52a5c532013-01-24 16:19:07 -05001959 "maxApertureValue": 3.14, # The smallest f-number of the lens at the focal length used to create the photo (APEX value).
Joe Gregoriod67010d2012-11-05 08:57:06 -05001960 "isoSpeed": 42, # The ISO speed used to create the photo.
1961 "focalLength": 3.14, # The focal length used to create the photo, in millimeters.
Joe Gregorio52a5c532013-01-24 16:19:07 -05001962 "exposureMode": "A String", # The exposure mode used to create the photo.
1963 "colorSpace": "A String", # The color space of the photo.
Joe Gregorioad8013f2012-08-03 08:44:02 -04001964 "location": { # Geographic location information stored in the image.
1965 "latitude": 3.14, # The latitude stored in the image.
1966 "altitude": 3.14, # The altitude stored in the image.
1967 "longitude": 3.14, # The longitude stored in the image.
1968 },
Joe Gregorio52a5c532013-01-24 16:19:07 -05001969 "subjectDistance": 42, # The distance to the subject of the photo, in meters.
1970 "height": 42, # The height of the image in pixels.
1971 "lens": "A String", # The lens used to create the photo.
1972 "date": "A String", # The date and time the photo was taken (EXIF format timestamp).
1973 "width": 42, # The width of the image in pixels.
1974 "meteringMode": "A String", # The metering mode used to create the photo.
1975 "flashUsed": True or False, # Whether a flash was used to create the photo.
Joe Gregoriod67010d2012-11-05 08:57:06 -05001976 "aperture": 3.14, # The aperture used to create the photo (f-number).
1977 "rotation": 42, # The rotation in clockwise degrees from the image's original orientation.
Joe Gregorio52a5c532013-01-24 16:19:07 -05001978 "sensor": "A String", # The type of sensor used to create the photo.
1979 "whiteBalance": "A String", # The white balance mode used to create the photo.
Joe Gregoriod67010d2012-11-05 08:57:06 -05001980 "cameraModel": "A String", # The model of the camera used to create the photo.
Joe Gregorioad8013f2012-08-03 08:44:02 -04001981 },
Joe Gregorio075572b2012-07-09 16:53:09 -04001982 "embedLink": "A String", # A link for embedding the file.
Joe Gregorioad8013f2012-08-03 08:44:02 -04001983 "alternateLink": "A String", # A link for opening the file in using a relevant Google editor or viewer.
1984 "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 Gregorio41be8e82013-03-07 10:31:47 -05001985 "downloadUrl": "A String", # Short lived download URL for the file. This is only populated for files with content stored in Drive.
1986 "userPermission": { # A permission for a file. # The permissions for the authenticated user on this file.
Joe Gregorio075572b2012-07-09 16:53:09 -04001987 "withLink": True or False, # Whether the link is required for this permission.
1988 "kind": "drive#permission", # This is always drive#permission.
1989 "name": "A String", # The name for this permission.
1990 "value": "A String", # The email address or domain name for the entity. This is not populated in responses.
1991 "id": "A String", # The ID of the permission.
1992 "authKey": "A String", # The authkey parameter required for this permission.
1993 "etag": "A String", # The ETag of the permission.
1994 "role": "A String", # The primary role for this user. Allowed values are:
1995 # - owner
1996 # - reader
1997 # - writer
1998 "photoLink": "A String", # A link to the profile photo, if available.
1999 "type": "A String", # The account type. Allowed values are:
2000 # - user
2001 # - group
2002 # - domain
2003 # - anyone
2004 "additionalRoles": [ # Additional roles for this user. Only commenter is currently allowed.
2005 "A String",
2006 ],
2007 "selfLink": "A String", # A link back to this permission.
2008 },
Joe Gregorio41be8e82013-03-07 10:31:47 -05002009 "fileExtension": "A String", # The file extension used when downloading this file. This field is read only. To set the extension, include it in the title when creating the file. This is only populated for files with content stored in Drive.
Joe Gregorio075572b2012-07-09 16:53:09 -04002010 "selfLink": "A String", # A link back to this file.
Joe Gregorioad8013f2012-08-03 08:44:02 -04002011 "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 -04002012 }</pre>
2013</div>
2014
2015</body></html>