blob: 87cbc06ab9f8259c7997c652defbed530c293f16 [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 Gregorio52a5c532013-01-24 16:19:07 -050087 <code><a href="#insert">insert(body=None, media_body=None, convert=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 Gregorio52a5c532013-01-24 16:19:07 -050096 <code><a href="#patch">patch(fileId, body, newRevision=None, pinned=None, ocrLanguage=None, ocr=None, updateViewedDate=None, timedTextTrackName=None, convert=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 Gregorio52a5c532013-01-24 16:19:07 -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, setModifiedDate=None, timedTextLanguage=None)</a></code></p>
Joe Gregorio075572b2012-07-09 16:53:09 -0400109<p class="firstline">Updates file metadata and/or content</p>
110<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 Gregorio52a5c532013-01-24 16:19:07 -0500122 "appDataContents": True or False, # Whether this file is in the appdata folder.
Joe Gregorio075572b2012-07-09 16:53:09 -0400123 "thumbnailLink": "A String", # A link to the file's thumbnail.
124 "labels": { # A group of labels for the file.
125 "restricted": True or False, # Whether viewers are prevented from downloading this file.
126 "hidden": True or False, # Whether this file is hidden from the user.
127 "viewed": True or False, # Whether this file has been viewed by this user.
128 "starred": True or False, # Whether this file is starred by the user.
129 "trashed": True or False, # Whether this file has been trashed.
130 },
131 "indexableText": { # Indexable text attributes for the file (can only be written)
132 "text": "A String", # The text to be indexed for this file
133 },
Joe Gregorioad8013f2012-08-03 08:44:02 -0400134 "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 -0400135 "etag": "A String", # ETag of the file.
136 "lastModifyingUserName": "A String", # Name of the last user to modify this file. This will only be populated if a user has edited this file.
137 "writersCanShare": True or False, # Whether writers can share the document with other users.
138 "id": "A String", # The id of the file.
139 "title": "A String", # The title of this file.
140 "ownerNames": [ # Name(s) of the owner(s) of this file.
141 "A String",
142 ],
143 "sharedWithMeDate": "A String", # Time at which this file was shared with the user (formatted RFC 3339 timestamp).
Joe Gregorio52a5c532013-01-24 16:19:07 -0500144 "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 -0400145 "lastViewedByMeDate": "A String", # Last time this file was viewed by the user (formatted RFC 3339 timestamp).
146 "parents": [ # Collection of parent folders which contain this file.
Joe Gregorioe7a0c472012-07-12 11:46:04 -0400147 # 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 -0400148 { # A reference to a file's parent.
149 "selfLink": "A String", # A link back to this reference.
150 "kind": "drive#parentReference", # This is always drive#parentReference.
151 "id": "A String", # The ID of the parent.
152 "isRoot": True or False, # Whether or not the parent is the root folder.
153 "parentLink": "A String", # A link to the parent.
154 },
155 ],
156 "exportLinks": { # Links for exporting Google Docs to specific formats.
Joe Gregoriofa08c2e2012-07-23 16:52:03 -0400157 "a_key": "A String", # A mapping from export format to URL
Joe Gregorio075572b2012-07-09 16:53:09 -0400158 },
Joe Gregorio52a5c532013-01-24 16:19:07 -0500159 "shared": True or False, # Whether the file has been shared.
Joe Gregoriod67010d2012-11-05 08:57:06 -0500160 "thumbnail": { # Thumbnail for the file. Only accepted on upload and for files that are not already thumbnailed by Google.
161 "mimeType": "A String", # The MIME type of the thumbnail.
162 "image": "A String", # The URL-safe Base64 encoded bytes of the thumbnail image.
163 },
Joe Gregorioad8013f2012-08-03 08:44:02 -0400164 "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 -0400165 "description": "A String", # A short description of the file.
Joe Gregorioad8013f2012-08-03 08:44:02 -0400166 "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 -0400167 "editable": True or False, # Whether the file can be edited by the current user.
168 "kind": "drive#file", # The type of file. This is always drive#file.
169 "quotaBytesUsed": "A String", # The number of quota bytes used by this file.
170 "fileSize": "A String", # The size of the file in bytes. This will only be populated on files with content stored in Drive.
171 "createdDate": "A String", # Create time for this file (formatted ISO8601 timestamp).
172 "md5Checksum": "A String", # An MD5 checksum for the content of this file. This will only be populated on files with content stored in Drive.
Joe Gregorio52a5c532013-01-24 16:19:07 -0500173 "iconLink": "A String", # A link to the file's icon.
Joe Gregorioad8013f2012-08-03 08:44:02 -0400174 "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 -0500175 "exposureBias": 3.14, # The exposure bias of the photo (APEX value).
Joe Gregoriod67010d2012-11-05 08:57:06 -0500176 "exposureTime": 3.14, # The length of the exposure, in seconds.
177 "cameraMake": "A String", # The make of the camera used to create the photo.
Joe Gregorio52a5c532013-01-24 16:19:07 -0500178 "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 -0500179 "isoSpeed": 42, # The ISO speed used to create the photo.
180 "focalLength": 3.14, # The focal length used to create the photo, in millimeters.
Joe Gregorio52a5c532013-01-24 16:19:07 -0500181 "exposureMode": "A String", # The exposure mode used to create the photo.
182 "colorSpace": "A String", # The color space of the photo.
Joe Gregorioad8013f2012-08-03 08:44:02 -0400183 "location": { # Geographic location information stored in the image.
184 "latitude": 3.14, # The latitude stored in the image.
185 "altitude": 3.14, # The altitude stored in the image.
186 "longitude": 3.14, # The longitude stored in the image.
187 },
Joe Gregorio52a5c532013-01-24 16:19:07 -0500188 "subjectDistance": 42, # The distance to the subject of the photo, in meters.
189 "height": 42, # The height of the image in pixels.
190 "lens": "A String", # The lens used to create the photo.
191 "date": "A String", # The date and time the photo was taken (EXIF format timestamp).
192 "width": 42, # The width of the image in pixels.
193 "meteringMode": "A String", # The metering mode used to create the photo.
194 "flashUsed": True or False, # Whether a flash was used to create the photo.
Joe Gregoriod67010d2012-11-05 08:57:06 -0500195 "aperture": 3.14, # The aperture used to create the photo (f-number).
196 "rotation": 42, # The rotation in clockwise degrees from the image's original orientation.
Joe Gregorio52a5c532013-01-24 16:19:07 -0500197 "sensor": "A String", # The type of sensor used to create the photo.
198 "whiteBalance": "A String", # The white balance mode used to create the photo.
Joe Gregoriod67010d2012-11-05 08:57:06 -0500199 "cameraModel": "A String", # The model of the camera used to create the photo.
Joe Gregorioad8013f2012-08-03 08:44:02 -0400200 },
Joe Gregorio075572b2012-07-09 16:53:09 -0400201 "embedLink": "A String", # A link for embedding the file.
Joe Gregorioad8013f2012-08-03 08:44:02 -0400202 "alternateLink": "A String", # A link for opening the file in using a relevant Google editor or viewer.
203 "modifiedByMeDate": "A String", # Last time this file was modified by the user (formatted RFC 3339 timestamp). Note that setting modifiedDate will also update the modifiedByMe date for the user which set the date.
Joe Gregorio075572b2012-07-09 16:53:09 -0400204 "downloadUrl": "A String", # Short term download URL for the file. This will only be populated on files with content stored in Drive.
Joe Gregorio52a5c532013-01-24 16:19:07 -0500205 "userPermission": { # A single permission for a file.
Joe Gregorio075572b2012-07-09 16:53:09 -0400206 "withLink": True or False, # Whether the link is required for this permission.
207 "kind": "drive#permission", # This is always drive#permission.
208 "name": "A String", # The name for this permission.
209 "value": "A String", # The email address or domain name for the entity. This is not populated in responses.
210 "id": "A String", # The ID of the permission.
211 "authKey": "A String", # The authkey parameter required for this permission.
212 "etag": "A String", # The ETag of the permission.
213 "role": "A String", # The primary role for this user. Allowed values are:
214 # - owner
215 # - reader
216 # - writer
217 "photoLink": "A String", # A link to the profile photo, if available.
218 "type": "A String", # The account type. Allowed values are:
219 # - user
220 # - group
221 # - domain
222 # - anyone
223 "additionalRoles": [ # Additional roles for this user. Only commenter is currently allowed.
224 "A String",
225 ],
226 "selfLink": "A String", # A link back to this permission.
227 },
Joe Gregorioad8013f2012-08-03 08:44:02 -0400228 "fileExtension": "A String", # The file extension used when downloading this file. This field is set from the title when inserting or uploading new content. This will only be populated on files with content stored in Drive.
Joe Gregorio075572b2012-07-09 16:53:09 -0400229 "selfLink": "A String", # A link back to this file.
Joe Gregorioad8013f2012-08-03 08:44:02 -0400230 "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 -0400231}
232
Joe Gregorioe7a0c472012-07-12 11:46:04 -0400233 pinned: boolean, Whether to pin the head revision of the new copy.
Joe Gregorio075572b2012-07-09 16:53:09 -0400234 convert: boolean, Whether to convert this file to the corresponding Google Docs format.
Joe Gregorio075572b2012-07-09 16:53:09 -0400235 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 -0500236 ocr: boolean, Whether to attempt OCR on .jpg, .png, .gif, or .pdf uploads.
Joe Gregorio075572b2012-07-09 16:53:09 -0400237 timedTextLanguage: string, The language of the timed text.
Joe Gregorio52a5c532013-01-24 16:19:07 -0500238 timedTextTrackName: string, The timed text track name.
Joe Gregorio075572b2012-07-09 16:53:09 -0400239
240Returns:
241 An object of the form:
242
243 { # The metadata for a file.
Joe Gregorioad8013f2012-08-03 08:44:02 -0400244 "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 Gregorio52a5c532013-01-24 16:19:07 -0500245 "appDataContents": True or False, # Whether this file is in the appdata folder.
Joe Gregorio075572b2012-07-09 16:53:09 -0400246 "thumbnailLink": "A String", # A link to the file's thumbnail.
247 "labels": { # A group of labels for the file.
248 "restricted": True or False, # Whether viewers are prevented from downloading this file.
249 "hidden": True or False, # Whether this file is hidden from the user.
250 "viewed": True or False, # Whether this file has been viewed by this user.
251 "starred": True or False, # Whether this file is starred by the user.
252 "trashed": True or False, # Whether this file has been trashed.
253 },
254 "indexableText": { # Indexable text attributes for the file (can only be written)
255 "text": "A String", # The text to be indexed for this file
256 },
Joe Gregorioad8013f2012-08-03 08:44:02 -0400257 "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 -0400258 "etag": "A String", # ETag of the file.
259 "lastModifyingUserName": "A String", # Name of the last user to modify this file. This will only be populated if a user has edited this file.
260 "writersCanShare": True or False, # Whether writers can share the document with other users.
261 "id": "A String", # The id of the file.
262 "title": "A String", # The title of this file.
263 "ownerNames": [ # Name(s) of the owner(s) of this file.
264 "A String",
265 ],
266 "sharedWithMeDate": "A String", # Time at which this file was shared with the user (formatted RFC 3339 timestamp).
Joe Gregorio52a5c532013-01-24 16:19:07 -0500267 "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 -0400268 "lastViewedByMeDate": "A String", # Last time this file was viewed by the user (formatted RFC 3339 timestamp).
269 "parents": [ # Collection of parent folders which contain this file.
Joe Gregorioe7a0c472012-07-12 11:46:04 -0400270 # 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 -0400271 { # A reference to a file's parent.
272 "selfLink": "A String", # A link back to this reference.
273 "kind": "drive#parentReference", # This is always drive#parentReference.
274 "id": "A String", # The ID of the parent.
275 "isRoot": True or False, # Whether or not the parent is the root folder.
276 "parentLink": "A String", # A link to the parent.
277 },
278 ],
279 "exportLinks": { # Links for exporting Google Docs to specific formats.
Joe Gregoriofa08c2e2012-07-23 16:52:03 -0400280 "a_key": "A String", # A mapping from export format to URL
Joe Gregorio075572b2012-07-09 16:53:09 -0400281 },
Joe Gregorio52a5c532013-01-24 16:19:07 -0500282 "shared": True or False, # Whether the file has been shared.
Joe Gregoriod67010d2012-11-05 08:57:06 -0500283 "thumbnail": { # Thumbnail for the file. Only accepted on upload and for files that are not already thumbnailed by Google.
284 "mimeType": "A String", # The MIME type of the thumbnail.
285 "image": "A String", # The URL-safe Base64 encoded bytes of the thumbnail image.
286 },
Joe Gregorioad8013f2012-08-03 08:44:02 -0400287 "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 -0400288 "description": "A String", # A short description of the file.
Joe Gregorioad8013f2012-08-03 08:44:02 -0400289 "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 -0400290 "editable": True or False, # Whether the file can be edited by the current user.
291 "kind": "drive#file", # The type of file. This is always drive#file.
292 "quotaBytesUsed": "A String", # The number of quota bytes used by this file.
293 "fileSize": "A String", # The size of the file in bytes. This will only be populated on files with content stored in Drive.
294 "createdDate": "A String", # Create time for this file (formatted ISO8601 timestamp).
295 "md5Checksum": "A String", # An MD5 checksum for the content of this file. This will only be populated on files with content stored in Drive.
Joe Gregorio52a5c532013-01-24 16:19:07 -0500296 "iconLink": "A String", # A link to the file's icon.
Joe Gregorioad8013f2012-08-03 08:44:02 -0400297 "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 -0500298 "exposureBias": 3.14, # The exposure bias of the photo (APEX value).
Joe Gregoriod67010d2012-11-05 08:57:06 -0500299 "exposureTime": 3.14, # The length of the exposure, in seconds.
300 "cameraMake": "A String", # The make of the camera used to create the photo.
Joe Gregorio52a5c532013-01-24 16:19:07 -0500301 "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 -0500302 "isoSpeed": 42, # The ISO speed used to create the photo.
303 "focalLength": 3.14, # The focal length used to create the photo, in millimeters.
Joe Gregorio52a5c532013-01-24 16:19:07 -0500304 "exposureMode": "A String", # The exposure mode used to create the photo.
305 "colorSpace": "A String", # The color space of the photo.
Joe Gregorioad8013f2012-08-03 08:44:02 -0400306 "location": { # Geographic location information stored in the image.
307 "latitude": 3.14, # The latitude stored in the image.
308 "altitude": 3.14, # The altitude stored in the image.
309 "longitude": 3.14, # The longitude stored in the image.
310 },
Joe Gregorio52a5c532013-01-24 16:19:07 -0500311 "subjectDistance": 42, # The distance to the subject of the photo, in meters.
312 "height": 42, # The height of the image in pixels.
313 "lens": "A String", # The lens used to create the photo.
314 "date": "A String", # The date and time the photo was taken (EXIF format timestamp).
315 "width": 42, # The width of the image in pixels.
316 "meteringMode": "A String", # The metering mode used to create the photo.
317 "flashUsed": True or False, # Whether a flash was used to create the photo.
Joe Gregoriod67010d2012-11-05 08:57:06 -0500318 "aperture": 3.14, # The aperture used to create the photo (f-number).
319 "rotation": 42, # The rotation in clockwise degrees from the image's original orientation.
Joe Gregorio52a5c532013-01-24 16:19:07 -0500320 "sensor": "A String", # The type of sensor used to create the photo.
321 "whiteBalance": "A String", # The white balance mode used to create the photo.
Joe Gregoriod67010d2012-11-05 08:57:06 -0500322 "cameraModel": "A String", # The model of the camera used to create the photo.
Joe Gregorioad8013f2012-08-03 08:44:02 -0400323 },
Joe Gregorio075572b2012-07-09 16:53:09 -0400324 "embedLink": "A String", # A link for embedding the file.
Joe Gregorioad8013f2012-08-03 08:44:02 -0400325 "alternateLink": "A String", # A link for opening the file in using a relevant Google editor or viewer.
326 "modifiedByMeDate": "A String", # Last time this file was modified by the user (formatted RFC 3339 timestamp). Note that setting modifiedDate will also update the modifiedByMe date for the user which set the date.
Joe Gregorio075572b2012-07-09 16:53:09 -0400327 "downloadUrl": "A String", # Short term download URL for the file. This will only be populated on files with content stored in Drive.
Joe Gregorio52a5c532013-01-24 16:19:07 -0500328 "userPermission": { # A single permission for a file.
Joe Gregorio075572b2012-07-09 16:53:09 -0400329 "withLink": True or False, # Whether the link is required for this permission.
330 "kind": "drive#permission", # This is always drive#permission.
331 "name": "A String", # The name for this permission.
332 "value": "A String", # The email address or domain name for the entity. This is not populated in responses.
333 "id": "A String", # The ID of the permission.
334 "authKey": "A String", # The authkey parameter required for this permission.
335 "etag": "A String", # The ETag of the permission.
336 "role": "A String", # The primary role for this user. Allowed values are:
337 # - owner
338 # - reader
339 # - writer
340 "photoLink": "A String", # A link to the profile photo, if available.
341 "type": "A String", # The account type. Allowed values are:
342 # - user
343 # - group
344 # - domain
345 # - anyone
346 "additionalRoles": [ # Additional roles for this user. Only commenter is currently allowed.
347 "A String",
348 ],
349 "selfLink": "A String", # A link back to this permission.
350 },
Joe Gregorioad8013f2012-08-03 08:44:02 -0400351 "fileExtension": "A String", # The file extension used when downloading this file. This field is set from the title when inserting or uploading new content. This will only be populated on files with content stored in Drive.
Joe Gregorio075572b2012-07-09 16:53:09 -0400352 "selfLink": "A String", # A link back to this file.
Joe Gregorioad8013f2012-08-03 08:44:02 -0400353 "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 -0400354 }</pre>
355</div>
356
357<div class="method">
358 <code class="details" id="delete">delete(fileId)</code>
359 <pre>Permanently deletes a file by ID. Skips the trash.
360
361Args:
362 fileId: string, The ID of the file to delete. (required)
363</pre>
364</div>
365
366<div class="method">
367 <code class="details" id="get">get(fileId, projection=None, updateViewedDate=None)</code>
368 <pre>Gets a file's metadata by ID.
369
370Args:
371 fileId: string, The ID for the file in question. (required)
Joe Gregorioad8013f2012-08-03 08:44:02 -0400372 projection: string, This parameter is deprecated and has no function.
Joe Gregorio075572b2012-07-09 16:53:09 -0400373 Allowed values
Joe Gregorioad8013f2012-08-03 08:44:02 -0400374 BASIC - Deprecated
375 FULL - Deprecated
Joe Gregorio075572b2012-07-09 16:53:09 -0400376 updateViewedDate: boolean, Whether to update the view date after successfully retrieving the file.
377
378Returns:
379 An object of the form:
380
381 { # The metadata for a file.
Joe Gregorioad8013f2012-08-03 08:44:02 -0400382 "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 Gregorio52a5c532013-01-24 16:19:07 -0500383 "appDataContents": True or False, # Whether this file is in the appdata folder.
Joe Gregorio075572b2012-07-09 16:53:09 -0400384 "thumbnailLink": "A String", # A link to the file's thumbnail.
385 "labels": { # A group of labels for the file.
386 "restricted": True or False, # Whether viewers are prevented from downloading this file.
387 "hidden": True or False, # Whether this file is hidden from the user.
388 "viewed": True or False, # Whether this file has been viewed by this user.
389 "starred": True or False, # Whether this file is starred by the user.
390 "trashed": True or False, # Whether this file has been trashed.
391 },
392 "indexableText": { # Indexable text attributes for the file (can only be written)
393 "text": "A String", # The text to be indexed for this file
394 },
Joe Gregorioad8013f2012-08-03 08:44:02 -0400395 "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 -0400396 "etag": "A String", # ETag of the file.
397 "lastModifyingUserName": "A String", # Name of the last user to modify this file. This will only be populated if a user has edited this file.
398 "writersCanShare": True or False, # Whether writers can share the document with other users.
399 "id": "A String", # The id of the file.
400 "title": "A String", # The title of this file.
401 "ownerNames": [ # Name(s) of the owner(s) of this file.
402 "A String",
403 ],
404 "sharedWithMeDate": "A String", # Time at which this file was shared with the user (formatted RFC 3339 timestamp).
Joe Gregorio52a5c532013-01-24 16:19:07 -0500405 "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 -0400406 "lastViewedByMeDate": "A String", # Last time this file was viewed by the user (formatted RFC 3339 timestamp).
407 "parents": [ # Collection of parent folders which contain this file.
Joe Gregorioe7a0c472012-07-12 11:46:04 -0400408 # 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 -0400409 { # A reference to a file's parent.
410 "selfLink": "A String", # A link back to this reference.
411 "kind": "drive#parentReference", # This is always drive#parentReference.
412 "id": "A String", # The ID of the parent.
413 "isRoot": True or False, # Whether or not the parent is the root folder.
414 "parentLink": "A String", # A link to the parent.
415 },
416 ],
417 "exportLinks": { # Links for exporting Google Docs to specific formats.
Joe Gregoriofa08c2e2012-07-23 16:52:03 -0400418 "a_key": "A String", # A mapping from export format to URL
Joe Gregorio075572b2012-07-09 16:53:09 -0400419 },
Joe Gregorio52a5c532013-01-24 16:19:07 -0500420 "shared": True or False, # Whether the file has been shared.
Joe Gregoriod67010d2012-11-05 08:57:06 -0500421 "thumbnail": { # Thumbnail for the file. Only accepted on upload and for files that are not already thumbnailed by Google.
422 "mimeType": "A String", # The MIME type of the thumbnail.
423 "image": "A String", # The URL-safe Base64 encoded bytes of the thumbnail image.
424 },
Joe Gregorioad8013f2012-08-03 08:44:02 -0400425 "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 -0400426 "description": "A String", # A short description of the file.
Joe Gregorioad8013f2012-08-03 08:44:02 -0400427 "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 -0400428 "editable": True or False, # Whether the file can be edited by the current user.
429 "kind": "drive#file", # The type of file. This is always drive#file.
430 "quotaBytesUsed": "A String", # The number of quota bytes used by this file.
431 "fileSize": "A String", # The size of the file in bytes. This will only be populated on files with content stored in Drive.
432 "createdDate": "A String", # Create time for this file (formatted ISO8601 timestamp).
433 "md5Checksum": "A String", # An MD5 checksum for the content of this file. This will only be populated on files with content stored in Drive.
Joe Gregorio52a5c532013-01-24 16:19:07 -0500434 "iconLink": "A String", # A link to the file's icon.
Joe Gregorioad8013f2012-08-03 08:44:02 -0400435 "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 -0500436 "exposureBias": 3.14, # The exposure bias of the photo (APEX value).
Joe Gregoriod67010d2012-11-05 08:57:06 -0500437 "exposureTime": 3.14, # The length of the exposure, in seconds.
438 "cameraMake": "A String", # The make of the camera used to create the photo.
Joe Gregorio52a5c532013-01-24 16:19:07 -0500439 "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 -0500440 "isoSpeed": 42, # The ISO speed used to create the photo.
441 "focalLength": 3.14, # The focal length used to create the photo, in millimeters.
Joe Gregorio52a5c532013-01-24 16:19:07 -0500442 "exposureMode": "A String", # The exposure mode used to create the photo.
443 "colorSpace": "A String", # The color space of the photo.
Joe Gregorioad8013f2012-08-03 08:44:02 -0400444 "location": { # Geographic location information stored in the image.
445 "latitude": 3.14, # The latitude stored in the image.
446 "altitude": 3.14, # The altitude stored in the image.
447 "longitude": 3.14, # The longitude stored in the image.
448 },
Joe Gregorio52a5c532013-01-24 16:19:07 -0500449 "subjectDistance": 42, # The distance to the subject of the photo, in meters.
450 "height": 42, # The height of the image in pixels.
451 "lens": "A String", # The lens used to create the photo.
452 "date": "A String", # The date and time the photo was taken (EXIF format timestamp).
453 "width": 42, # The width of the image in pixels.
454 "meteringMode": "A String", # The metering mode used to create the photo.
455 "flashUsed": True or False, # Whether a flash was used to create the photo.
Joe Gregoriod67010d2012-11-05 08:57:06 -0500456 "aperture": 3.14, # The aperture used to create the photo (f-number).
457 "rotation": 42, # The rotation in clockwise degrees from the image's original orientation.
Joe Gregorio52a5c532013-01-24 16:19:07 -0500458 "sensor": "A String", # The type of sensor used to create the photo.
459 "whiteBalance": "A String", # The white balance mode used to create the photo.
Joe Gregoriod67010d2012-11-05 08:57:06 -0500460 "cameraModel": "A String", # The model of the camera used to create the photo.
Joe Gregorioad8013f2012-08-03 08:44:02 -0400461 },
Joe Gregorio075572b2012-07-09 16:53:09 -0400462 "embedLink": "A String", # A link for embedding the file.
Joe Gregorioad8013f2012-08-03 08:44:02 -0400463 "alternateLink": "A String", # A link for opening the file in using a relevant Google editor or viewer.
464 "modifiedByMeDate": "A String", # Last time this file was modified by the user (formatted RFC 3339 timestamp). Note that setting modifiedDate will also update the modifiedByMe date for the user which set the date.
Joe Gregorio075572b2012-07-09 16:53:09 -0400465 "downloadUrl": "A String", # Short term download URL for the file. This will only be populated on files with content stored in Drive.
Joe Gregorio52a5c532013-01-24 16:19:07 -0500466 "userPermission": { # A single permission for a file.
Joe Gregorio075572b2012-07-09 16:53:09 -0400467 "withLink": True or False, # Whether the link is required for this permission.
468 "kind": "drive#permission", # This is always drive#permission.
469 "name": "A String", # The name for this permission.
470 "value": "A String", # The email address or domain name for the entity. This is not populated in responses.
471 "id": "A String", # The ID of the permission.
472 "authKey": "A String", # The authkey parameter required for this permission.
473 "etag": "A String", # The ETag of the permission.
474 "role": "A String", # The primary role for this user. Allowed values are:
475 # - owner
476 # - reader
477 # - writer
478 "photoLink": "A String", # A link to the profile photo, if available.
479 "type": "A String", # The account type. Allowed values are:
480 # - user
481 # - group
482 # - domain
483 # - anyone
484 "additionalRoles": [ # Additional roles for this user. Only commenter is currently allowed.
485 "A String",
486 ],
487 "selfLink": "A String", # A link back to this permission.
488 },
Joe Gregorioad8013f2012-08-03 08:44:02 -0400489 "fileExtension": "A String", # The file extension used when downloading this file. This field is set from the title when inserting or uploading new content. This will only be populated on files with content stored in Drive.
Joe Gregorio075572b2012-07-09 16:53:09 -0400490 "selfLink": "A String", # A link back to this file.
Joe Gregorioad8013f2012-08-03 08:44:02 -0400491 "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 -0400492 }</pre>
493</div>
494
495<div class="method">
Joe Gregorio52a5c532013-01-24 16:19:07 -0500496 <code class="details" id="insert">insert(body=None, media_body=None, convert=None, ocrLanguage=None, ocr=None, timedTextLanguage=None, timedTextTrackName=None, pinned=None)</code>
Joe Gregorio075572b2012-07-09 16:53:09 -0400497 <pre>Insert a new file.
498
499Args:
500 body: object, The request body.
501 The object takes the form of:
502
503{ # The metadata for a file.
Joe Gregorioad8013f2012-08-03 08:44:02 -0400504 "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 Gregorio52a5c532013-01-24 16:19:07 -0500505 "appDataContents": True or False, # Whether this file is in the appdata folder.
Joe Gregorio075572b2012-07-09 16:53:09 -0400506 "thumbnailLink": "A String", # A link to the file's thumbnail.
507 "labels": { # A group of labels for the file.
508 "restricted": True or False, # Whether viewers are prevented from downloading this file.
509 "hidden": True or False, # Whether this file is hidden from the user.
510 "viewed": True or False, # Whether this file has been viewed by this user.
511 "starred": True or False, # Whether this file is starred by the user.
512 "trashed": True or False, # Whether this file has been trashed.
513 },
514 "indexableText": { # Indexable text attributes for the file (can only be written)
515 "text": "A String", # The text to be indexed for this file
516 },
Joe Gregorioad8013f2012-08-03 08:44:02 -0400517 "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 -0400518 "etag": "A String", # ETag of the file.
519 "lastModifyingUserName": "A String", # Name of the last user to modify this file. This will only be populated if a user has edited this file.
520 "writersCanShare": True or False, # Whether writers can share the document with other users.
521 "id": "A String", # The id of the file.
522 "title": "A String", # The title of this file.
523 "ownerNames": [ # Name(s) of the owner(s) of this file.
524 "A String",
525 ],
526 "sharedWithMeDate": "A String", # Time at which this file was shared with the user (formatted RFC 3339 timestamp).
Joe Gregorio52a5c532013-01-24 16:19:07 -0500527 "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 -0400528 "lastViewedByMeDate": "A String", # Last time this file was viewed by the user (formatted RFC 3339 timestamp).
529 "parents": [ # Collection of parent folders which contain this file.
Joe Gregorioe7a0c472012-07-12 11:46:04 -0400530 # 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 -0400531 { # A reference to a file's parent.
532 "selfLink": "A String", # A link back to this reference.
533 "kind": "drive#parentReference", # This is always drive#parentReference.
534 "id": "A String", # The ID of the parent.
535 "isRoot": True or False, # Whether or not the parent is the root folder.
536 "parentLink": "A String", # A link to the parent.
537 },
538 ],
539 "exportLinks": { # Links for exporting Google Docs to specific formats.
Joe Gregoriofa08c2e2012-07-23 16:52:03 -0400540 "a_key": "A String", # A mapping from export format to URL
Joe Gregorio075572b2012-07-09 16:53:09 -0400541 },
Joe Gregorio52a5c532013-01-24 16:19:07 -0500542 "shared": True or False, # Whether the file has been shared.
Joe Gregoriod67010d2012-11-05 08:57:06 -0500543 "thumbnail": { # Thumbnail for the file. Only accepted on upload and for files that are not already thumbnailed by Google.
544 "mimeType": "A String", # The MIME type of the thumbnail.
545 "image": "A String", # The URL-safe Base64 encoded bytes of the thumbnail image.
546 },
Joe Gregorioad8013f2012-08-03 08:44:02 -0400547 "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 -0400548 "description": "A String", # A short description of the file.
Joe Gregorioad8013f2012-08-03 08:44:02 -0400549 "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 -0400550 "editable": True or False, # Whether the file can be edited by the current user.
551 "kind": "drive#file", # The type of file. This is always drive#file.
552 "quotaBytesUsed": "A String", # The number of quota bytes used by this file.
553 "fileSize": "A String", # The size of the file in bytes. This will only be populated on files with content stored in Drive.
554 "createdDate": "A String", # Create time for this file (formatted ISO8601 timestamp).
555 "md5Checksum": "A String", # An MD5 checksum for the content of this file. This will only be populated on files with content stored in Drive.
Joe Gregorio52a5c532013-01-24 16:19:07 -0500556 "iconLink": "A String", # A link to the file's icon.
Joe Gregorioad8013f2012-08-03 08:44:02 -0400557 "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 -0500558 "exposureBias": 3.14, # The exposure bias of the photo (APEX value).
Joe Gregoriod67010d2012-11-05 08:57:06 -0500559 "exposureTime": 3.14, # The length of the exposure, in seconds.
560 "cameraMake": "A String", # The make of the camera used to create the photo.
Joe Gregorio52a5c532013-01-24 16:19:07 -0500561 "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 -0500562 "isoSpeed": 42, # The ISO speed used to create the photo.
563 "focalLength": 3.14, # The focal length used to create the photo, in millimeters.
Joe Gregorio52a5c532013-01-24 16:19:07 -0500564 "exposureMode": "A String", # The exposure mode used to create the photo.
565 "colorSpace": "A String", # The color space of the photo.
Joe Gregorioad8013f2012-08-03 08:44:02 -0400566 "location": { # Geographic location information stored in the image.
567 "latitude": 3.14, # The latitude stored in the image.
568 "altitude": 3.14, # The altitude stored in the image.
569 "longitude": 3.14, # The longitude stored in the image.
570 },
Joe Gregorio52a5c532013-01-24 16:19:07 -0500571 "subjectDistance": 42, # The distance to the subject of the photo, in meters.
572 "height": 42, # The height of the image in pixels.
573 "lens": "A String", # The lens used to create the photo.
574 "date": "A String", # The date and time the photo was taken (EXIF format timestamp).
575 "width": 42, # The width of the image in pixels.
576 "meteringMode": "A String", # The metering mode used to create the photo.
577 "flashUsed": True or False, # Whether a flash was used to create the photo.
Joe Gregoriod67010d2012-11-05 08:57:06 -0500578 "aperture": 3.14, # The aperture used to create the photo (f-number).
579 "rotation": 42, # The rotation in clockwise degrees from the image's original orientation.
Joe Gregorio52a5c532013-01-24 16:19:07 -0500580 "sensor": "A String", # The type of sensor used to create the photo.
581 "whiteBalance": "A String", # The white balance mode used to create the photo.
Joe Gregoriod67010d2012-11-05 08:57:06 -0500582 "cameraModel": "A String", # The model of the camera used to create the photo.
Joe Gregorioad8013f2012-08-03 08:44:02 -0400583 },
Joe Gregorio075572b2012-07-09 16:53:09 -0400584 "embedLink": "A String", # A link for embedding the file.
Joe Gregorioad8013f2012-08-03 08:44:02 -0400585 "alternateLink": "A String", # A link for opening the file in using a relevant Google editor or viewer.
586 "modifiedByMeDate": "A String", # Last time this file was modified by the user (formatted RFC 3339 timestamp). Note that setting modifiedDate will also update the modifiedByMe date for the user which set the date.
Joe Gregorio075572b2012-07-09 16:53:09 -0400587 "downloadUrl": "A String", # Short term download URL for the file. This will only be populated on files with content stored in Drive.
Joe Gregorio52a5c532013-01-24 16:19:07 -0500588 "userPermission": { # A single permission for a file.
Joe Gregorio075572b2012-07-09 16:53:09 -0400589 "withLink": True or False, # Whether the link is required for this permission.
590 "kind": "drive#permission", # This is always drive#permission.
591 "name": "A String", # The name for this permission.
592 "value": "A String", # The email address or domain name for the entity. This is not populated in responses.
593 "id": "A String", # The ID of the permission.
594 "authKey": "A String", # The authkey parameter required for this permission.
595 "etag": "A String", # The ETag of the permission.
596 "role": "A String", # The primary role for this user. Allowed values are:
597 # - owner
598 # - reader
599 # - writer
600 "photoLink": "A String", # A link to the profile photo, if available.
601 "type": "A String", # The account type. Allowed values are:
602 # - user
603 # - group
604 # - domain
605 # - anyone
606 "additionalRoles": [ # Additional roles for this user. Only commenter is currently allowed.
607 "A String",
608 ],
609 "selfLink": "A String", # A link back to this permission.
610 },
Joe Gregorioad8013f2012-08-03 08:44:02 -0400611 "fileExtension": "A String", # The file extension used when downloading this file. This field is set from the title when inserting or uploading new content. This will only be populated on files with content stored in Drive.
Joe Gregorio075572b2012-07-09 16:53:09 -0400612 "selfLink": "A String", # A link back to this file.
Joe Gregorioad8013f2012-08-03 08:44:02 -0400613 "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 -0400614}
615
616 media_body: string, The filename of the media request body, or an instance of a MediaUpload object.
617 convert: boolean, Whether to convert this file to the corresponding Google Docs format.
Joe Gregorio075572b2012-07-09 16:53:09 -0400618 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 -0500619 ocr: boolean, Whether to attempt OCR on .jpg, .png, .gif, or .pdf uploads.
Joe Gregorio075572b2012-07-09 16:53:09 -0400620 timedTextLanguage: string, The language of the timed text.
621 timedTextTrackName: string, The timed text track name.
622 pinned: boolean, Whether to pin the head revision of the uploaded file.
623
624Returns:
625 An object of the form:
626
627 { # The metadata for a file.
Joe Gregorioad8013f2012-08-03 08:44:02 -0400628 "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 Gregorio52a5c532013-01-24 16:19:07 -0500629 "appDataContents": True or False, # Whether this file is in the appdata folder.
Joe Gregorio075572b2012-07-09 16:53:09 -0400630 "thumbnailLink": "A String", # A link to the file's thumbnail.
631 "labels": { # A group of labels for the file.
632 "restricted": True or False, # Whether viewers are prevented from downloading this file.
633 "hidden": True or False, # Whether this file is hidden from the user.
634 "viewed": True or False, # Whether this file has been viewed by this user.
635 "starred": True or False, # Whether this file is starred by the user.
636 "trashed": True or False, # Whether this file has been trashed.
637 },
638 "indexableText": { # Indexable text attributes for the file (can only be written)
639 "text": "A String", # The text to be indexed for this file
640 },
Joe Gregorioad8013f2012-08-03 08:44:02 -0400641 "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 -0400642 "etag": "A String", # ETag of the file.
643 "lastModifyingUserName": "A String", # Name of the last user to modify this file. This will only be populated if a user has edited this file.
644 "writersCanShare": True or False, # Whether writers can share the document with other users.
645 "id": "A String", # The id of the file.
646 "title": "A String", # The title of this file.
647 "ownerNames": [ # Name(s) of the owner(s) of this file.
648 "A String",
649 ],
650 "sharedWithMeDate": "A String", # Time at which this file was shared with the user (formatted RFC 3339 timestamp).
Joe Gregorio52a5c532013-01-24 16:19:07 -0500651 "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 -0400652 "lastViewedByMeDate": "A String", # Last time this file was viewed by the user (formatted RFC 3339 timestamp).
653 "parents": [ # Collection of parent folders which contain this file.
Joe Gregorioe7a0c472012-07-12 11:46:04 -0400654 # 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 -0400655 { # A reference to a file's parent.
656 "selfLink": "A String", # A link back to this reference.
657 "kind": "drive#parentReference", # This is always drive#parentReference.
658 "id": "A String", # The ID of the parent.
659 "isRoot": True or False, # Whether or not the parent is the root folder.
660 "parentLink": "A String", # A link to the parent.
661 },
662 ],
663 "exportLinks": { # Links for exporting Google Docs to specific formats.
Joe Gregoriofa08c2e2012-07-23 16:52:03 -0400664 "a_key": "A String", # A mapping from export format to URL
Joe Gregorio075572b2012-07-09 16:53:09 -0400665 },
Joe Gregorio52a5c532013-01-24 16:19:07 -0500666 "shared": True or False, # Whether the file has been shared.
Joe Gregoriod67010d2012-11-05 08:57:06 -0500667 "thumbnail": { # Thumbnail for the file. Only accepted on upload and for files that are not already thumbnailed by Google.
668 "mimeType": "A String", # The MIME type of the thumbnail.
669 "image": "A String", # The URL-safe Base64 encoded bytes of the thumbnail image.
670 },
Joe Gregorioad8013f2012-08-03 08:44:02 -0400671 "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 -0400672 "description": "A String", # A short description of the file.
Joe Gregorioad8013f2012-08-03 08:44:02 -0400673 "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 -0400674 "editable": True or False, # Whether the file can be edited by the current user.
675 "kind": "drive#file", # The type of file. This is always drive#file.
676 "quotaBytesUsed": "A String", # The number of quota bytes used by this file.
677 "fileSize": "A String", # The size of the file in bytes. This will only be populated on files with content stored in Drive.
678 "createdDate": "A String", # Create time for this file (formatted ISO8601 timestamp).
679 "md5Checksum": "A String", # An MD5 checksum for the content of this file. This will only be populated on files with content stored in Drive.
Joe Gregorio52a5c532013-01-24 16:19:07 -0500680 "iconLink": "A String", # A link to the file's icon.
Joe Gregorioad8013f2012-08-03 08:44:02 -0400681 "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 -0500682 "exposureBias": 3.14, # The exposure bias of the photo (APEX value).
Joe Gregoriod67010d2012-11-05 08:57:06 -0500683 "exposureTime": 3.14, # The length of the exposure, in seconds.
684 "cameraMake": "A String", # The make of the camera used to create the photo.
Joe Gregorio52a5c532013-01-24 16:19:07 -0500685 "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 -0500686 "isoSpeed": 42, # The ISO speed used to create the photo.
687 "focalLength": 3.14, # The focal length used to create the photo, in millimeters.
Joe Gregorio52a5c532013-01-24 16:19:07 -0500688 "exposureMode": "A String", # The exposure mode used to create the photo.
689 "colorSpace": "A String", # The color space of the photo.
Joe Gregorioad8013f2012-08-03 08:44:02 -0400690 "location": { # Geographic location information stored in the image.
691 "latitude": 3.14, # The latitude stored in the image.
692 "altitude": 3.14, # The altitude stored in the image.
693 "longitude": 3.14, # The longitude stored in the image.
694 },
Joe Gregorio52a5c532013-01-24 16:19:07 -0500695 "subjectDistance": 42, # The distance to the subject of the photo, in meters.
696 "height": 42, # The height of the image in pixels.
697 "lens": "A String", # The lens used to create the photo.
698 "date": "A String", # The date and time the photo was taken (EXIF format timestamp).
699 "width": 42, # The width of the image in pixels.
700 "meteringMode": "A String", # The metering mode used to create the photo.
701 "flashUsed": True or False, # Whether a flash was used to create the photo.
Joe Gregoriod67010d2012-11-05 08:57:06 -0500702 "aperture": 3.14, # The aperture used to create the photo (f-number).
703 "rotation": 42, # The rotation in clockwise degrees from the image's original orientation.
Joe Gregorio52a5c532013-01-24 16:19:07 -0500704 "sensor": "A String", # The type of sensor used to create the photo.
705 "whiteBalance": "A String", # The white balance mode used to create the photo.
Joe Gregoriod67010d2012-11-05 08:57:06 -0500706 "cameraModel": "A String", # The model of the camera used to create the photo.
Joe Gregorioad8013f2012-08-03 08:44:02 -0400707 },
Joe Gregorio075572b2012-07-09 16:53:09 -0400708 "embedLink": "A String", # A link for embedding the file.
Joe Gregorioad8013f2012-08-03 08:44:02 -0400709 "alternateLink": "A String", # A link for opening the file in using a relevant Google editor or viewer.
710 "modifiedByMeDate": "A String", # Last time this file was modified by the user (formatted RFC 3339 timestamp). Note that setting modifiedDate will also update the modifiedByMe date for the user which set the date.
Joe Gregorio075572b2012-07-09 16:53:09 -0400711 "downloadUrl": "A String", # Short term download URL for the file. This will only be populated on files with content stored in Drive.
Joe Gregorio52a5c532013-01-24 16:19:07 -0500712 "userPermission": { # A single permission for a file.
Joe Gregorio075572b2012-07-09 16:53:09 -0400713 "withLink": True or False, # Whether the link is required for this permission.
714 "kind": "drive#permission", # This is always drive#permission.
715 "name": "A String", # The name for this permission.
716 "value": "A String", # The email address or domain name for the entity. This is not populated in responses.
717 "id": "A String", # The ID of the permission.
718 "authKey": "A String", # The authkey parameter required for this permission.
719 "etag": "A String", # The ETag of the permission.
720 "role": "A String", # The primary role for this user. Allowed values are:
721 # - owner
722 # - reader
723 # - writer
724 "photoLink": "A String", # A link to the profile photo, if available.
725 "type": "A String", # The account type. Allowed values are:
726 # - user
727 # - group
728 # - domain
729 # - anyone
730 "additionalRoles": [ # Additional roles for this user. Only commenter is currently allowed.
731 "A String",
732 ],
733 "selfLink": "A String", # A link back to this permission.
734 },
Joe Gregorioad8013f2012-08-03 08:44:02 -0400735 "fileExtension": "A String", # The file extension used when downloading this file. This field is set from the title when inserting or uploading new content. This will only be populated on files with content stored in Drive.
Joe Gregorio075572b2012-07-09 16:53:09 -0400736 "selfLink": "A String", # A link back to this file.
Joe Gregorioad8013f2012-08-03 08:44:02 -0400737 "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 -0400738 }</pre>
739</div>
740
741<div class="method">
742 <code class="details" id="list">list(q=None, projection=None, pageToken=None, maxResults=None)</code>
743 <pre>Lists the user's files.
744
745Args:
746 q: string, Query string for searching files.
Joe Gregorioad8013f2012-08-03 08:44:02 -0400747 projection: string, This parameter is deprecated and has no function.
Joe Gregorio075572b2012-07-09 16:53:09 -0400748 Allowed values
Joe Gregorioad8013f2012-08-03 08:44:02 -0400749 BASIC - Deprecated
750 FULL - Deprecated
Joe Gregorio075572b2012-07-09 16:53:09 -0400751 pageToken: string, Page token for files.
752 maxResults: integer, Maximum number of files to return.
753
754Returns:
755 An object of the form:
756
757 { # A list of files.
758 "nextPageToken": "A String", # The page token for the next page of files.
759 "kind": "drive#fileList", # This is always drive#fileList.
760 "items": [ # The actual list of files.
761 { # The metadata for a file.
Joe Gregorioad8013f2012-08-03 08:44:02 -0400762 "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 Gregorio52a5c532013-01-24 16:19:07 -0500763 "appDataContents": True or False, # Whether this file is in the appdata folder.
Joe Gregorio075572b2012-07-09 16:53:09 -0400764 "thumbnailLink": "A String", # A link to the file's thumbnail.
765 "labels": { # A group of labels for the file.
766 "restricted": True or False, # Whether viewers are prevented from downloading this file.
767 "hidden": True or False, # Whether this file is hidden from the user.
768 "viewed": True or False, # Whether this file has been viewed by this user.
769 "starred": True or False, # Whether this file is starred by the user.
770 "trashed": True or False, # Whether this file has been trashed.
771 },
772 "indexableText": { # Indexable text attributes for the file (can only be written)
773 "text": "A String", # The text to be indexed for this file
774 },
Joe Gregorioad8013f2012-08-03 08:44:02 -0400775 "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 -0400776 "etag": "A String", # ETag of the file.
777 "lastModifyingUserName": "A String", # Name of the last user to modify this file. This will only be populated if a user has edited this file.
778 "writersCanShare": True or False, # Whether writers can share the document with other users.
779 "id": "A String", # The id of the file.
780 "title": "A String", # The title of this file.
781 "ownerNames": [ # Name(s) of the owner(s) of this file.
782 "A String",
783 ],
784 "sharedWithMeDate": "A String", # Time at which this file was shared with the user (formatted RFC 3339 timestamp).
Joe Gregorio52a5c532013-01-24 16:19:07 -0500785 "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 -0400786 "lastViewedByMeDate": "A String", # Last time this file was viewed by the user (formatted RFC 3339 timestamp).
787 "parents": [ # Collection of parent folders which contain this file.
Joe Gregorioe7a0c472012-07-12 11:46:04 -0400788 # 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 -0400789 { # A reference to a file's parent.
790 "selfLink": "A String", # A link back to this reference.
791 "kind": "drive#parentReference", # This is always drive#parentReference.
792 "id": "A String", # The ID of the parent.
793 "isRoot": True or False, # Whether or not the parent is the root folder.
794 "parentLink": "A String", # A link to the parent.
795 },
796 ],
797 "exportLinks": { # Links for exporting Google Docs to specific formats.
Joe Gregoriofa08c2e2012-07-23 16:52:03 -0400798 "a_key": "A String", # A mapping from export format to URL
Joe Gregorio075572b2012-07-09 16:53:09 -0400799 },
Joe Gregorio52a5c532013-01-24 16:19:07 -0500800 "shared": True or False, # Whether the file has been shared.
Joe Gregoriod67010d2012-11-05 08:57:06 -0500801 "thumbnail": { # Thumbnail for the file. Only accepted on upload and for files that are not already thumbnailed by Google.
802 "mimeType": "A String", # The MIME type of the thumbnail.
803 "image": "A String", # The URL-safe Base64 encoded bytes of the thumbnail image.
804 },
Joe Gregorioad8013f2012-08-03 08:44:02 -0400805 "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 -0400806 "description": "A String", # A short description of the file.
Joe Gregorioad8013f2012-08-03 08:44:02 -0400807 "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 -0400808 "editable": True or False, # Whether the file can be edited by the current user.
809 "kind": "drive#file", # The type of file. This is always drive#file.
810 "quotaBytesUsed": "A String", # The number of quota bytes used by this file.
811 "fileSize": "A String", # The size of the file in bytes. This will only be populated on files with content stored in Drive.
812 "createdDate": "A String", # Create time for this file (formatted ISO8601 timestamp).
813 "md5Checksum": "A String", # An MD5 checksum for the content of this file. This will only be populated on files with content stored in Drive.
Joe Gregorio52a5c532013-01-24 16:19:07 -0500814 "iconLink": "A String", # A link to the file's icon.
Joe Gregorioad8013f2012-08-03 08:44:02 -0400815 "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 -0500816 "exposureBias": 3.14, # The exposure bias of the photo (APEX value).
Joe Gregoriod67010d2012-11-05 08:57:06 -0500817 "exposureTime": 3.14, # The length of the exposure, in seconds.
818 "cameraMake": "A String", # The make of the camera used to create the photo.
Joe Gregorio52a5c532013-01-24 16:19:07 -0500819 "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 -0500820 "isoSpeed": 42, # The ISO speed used to create the photo.
821 "focalLength": 3.14, # The focal length used to create the photo, in millimeters.
Joe Gregorio52a5c532013-01-24 16:19:07 -0500822 "exposureMode": "A String", # The exposure mode used to create the photo.
823 "colorSpace": "A String", # The color space of the photo.
Joe Gregorioad8013f2012-08-03 08:44:02 -0400824 "location": { # Geographic location information stored in the image.
825 "latitude": 3.14, # The latitude stored in the image.
826 "altitude": 3.14, # The altitude stored in the image.
827 "longitude": 3.14, # The longitude stored in the image.
828 },
Joe Gregorio52a5c532013-01-24 16:19:07 -0500829 "subjectDistance": 42, # The distance to the subject of the photo, in meters.
830 "height": 42, # The height of the image in pixels.
831 "lens": "A String", # The lens used to create the photo.
832 "date": "A String", # The date and time the photo was taken (EXIF format timestamp).
833 "width": 42, # The width of the image in pixels.
834 "meteringMode": "A String", # The metering mode used to create the photo.
835 "flashUsed": True or False, # Whether a flash was used to create the photo.
Joe Gregoriod67010d2012-11-05 08:57:06 -0500836 "aperture": 3.14, # The aperture used to create the photo (f-number).
837 "rotation": 42, # The rotation in clockwise degrees from the image's original orientation.
Joe Gregorio52a5c532013-01-24 16:19:07 -0500838 "sensor": "A String", # The type of sensor used to create the photo.
839 "whiteBalance": "A String", # The white balance mode used to create the photo.
Joe Gregoriod67010d2012-11-05 08:57:06 -0500840 "cameraModel": "A String", # The model of the camera used to create the photo.
Joe Gregorioad8013f2012-08-03 08:44:02 -0400841 },
Joe Gregorio075572b2012-07-09 16:53:09 -0400842 "embedLink": "A String", # A link for embedding the file.
Joe Gregorioad8013f2012-08-03 08:44:02 -0400843 "alternateLink": "A String", # A link for opening the file in using a relevant Google editor or viewer.
844 "modifiedByMeDate": "A String", # Last time this file was modified by the user (formatted RFC 3339 timestamp). Note that setting modifiedDate will also update the modifiedByMe date for the user which set the date.
Joe Gregorio075572b2012-07-09 16:53:09 -0400845 "downloadUrl": "A String", # Short term download URL for the file. This will only be populated on files with content stored in Drive.
Joe Gregorio52a5c532013-01-24 16:19:07 -0500846 "userPermission": { # A single permission for a file.
Joe Gregorio075572b2012-07-09 16:53:09 -0400847 "withLink": True or False, # Whether the link is required for this permission.
848 "kind": "drive#permission", # This is always drive#permission.
849 "name": "A String", # The name for this permission.
850 "value": "A String", # The email address or domain name for the entity. This is not populated in responses.
851 "id": "A String", # The ID of the permission.
852 "authKey": "A String", # The authkey parameter required for this permission.
853 "etag": "A String", # The ETag of the permission.
854 "role": "A String", # The primary role for this user. Allowed values are:
855 # - owner
856 # - reader
857 # - writer
858 "photoLink": "A String", # A link to the profile photo, if available.
859 "type": "A String", # The account type. Allowed values are:
860 # - user
861 # - group
862 # - domain
863 # - anyone
864 "additionalRoles": [ # Additional roles for this user. Only commenter is currently allowed.
865 "A String",
866 ],
867 "selfLink": "A String", # A link back to this permission.
868 },
Joe Gregorioad8013f2012-08-03 08:44:02 -0400869 "fileExtension": "A String", # The file extension used when downloading this file. This field is set from the title when inserting or uploading new content. This will only be populated on files with content stored in Drive.
Joe Gregorio075572b2012-07-09 16:53:09 -0400870 "selfLink": "A String", # A link back to this file.
Joe Gregorioad8013f2012-08-03 08:44:02 -0400871 "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 -0400872 },
873 ],
874 "nextLink": "A String", # A link to the next page of files.
875 "etag": "A String", # The ETag of the list.
876 "selfLink": "A String", # A link back to this list.
877 }</pre>
878</div>
879
880<div class="method">
881 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
882 <pre>Retrieves the next page of results.
883
884Args:
885 previous_request: The request for the previous page. (required)
886 previous_response: The response from the request for the previous page. (required)
887
888Returns:
889 A request object that you can call 'execute()' on to request the next
890 page. Returns None if there are no more items in the collection.
Joe Gregorio52a5c532013-01-24 16:19:07 -0500891 </pre>
Joe Gregorio075572b2012-07-09 16:53:09 -0400892</div>
893
894<div class="method">
Joe Gregorio52a5c532013-01-24 16:19:07 -0500895 <code class="details" id="patch">patch(fileId, body, newRevision=None, pinned=None, ocrLanguage=None, ocr=None, updateViewedDate=None, timedTextTrackName=None, convert=None, setModifiedDate=None, timedTextLanguage=None)</code>
Joe Gregorio075572b2012-07-09 16:53:09 -0400896 <pre>Updates file metadata and/or content. This method supports patch semantics.
897
898Args:
899 fileId: string, The ID of the file to update. (required)
900 body: object, The request body. (required)
901 The object takes the form of:
902
903{ # The metadata for a file.
Joe Gregorioad8013f2012-08-03 08:44:02 -0400904 "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 Gregorio52a5c532013-01-24 16:19:07 -0500905 "appDataContents": True or False, # Whether this file is in the appdata folder.
Joe Gregorio075572b2012-07-09 16:53:09 -0400906 "thumbnailLink": "A String", # A link to the file's thumbnail.
907 "labels": { # A group of labels for the file.
908 "restricted": True or False, # Whether viewers are prevented from downloading this file.
909 "hidden": True or False, # Whether this file is hidden from the user.
910 "viewed": True or False, # Whether this file has been viewed by this user.
911 "starred": True or False, # Whether this file is starred by the user.
912 "trashed": True or False, # Whether this file has been trashed.
913 },
914 "indexableText": { # Indexable text attributes for the file (can only be written)
915 "text": "A String", # The text to be indexed for this file
916 },
Joe Gregorioad8013f2012-08-03 08:44:02 -0400917 "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 -0400918 "etag": "A String", # ETag of the file.
919 "lastModifyingUserName": "A String", # Name of the last user to modify this file. This will only be populated if a user has edited this file.
920 "writersCanShare": True or False, # Whether writers can share the document with other users.
921 "id": "A String", # The id of the file.
922 "title": "A String", # The title of this file.
923 "ownerNames": [ # Name(s) of the owner(s) of this file.
924 "A String",
925 ],
926 "sharedWithMeDate": "A String", # Time at which this file was shared with the user (formatted RFC 3339 timestamp).
Joe Gregorio52a5c532013-01-24 16:19:07 -0500927 "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 -0400928 "lastViewedByMeDate": "A String", # Last time this file was viewed by the user (formatted RFC 3339 timestamp).
929 "parents": [ # Collection of parent folders which contain this file.
Joe Gregorioe7a0c472012-07-12 11:46:04 -0400930 # 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 -0400931 { # A reference to a file's parent.
932 "selfLink": "A String", # A link back to this reference.
933 "kind": "drive#parentReference", # This is always drive#parentReference.
934 "id": "A String", # The ID of the parent.
935 "isRoot": True or False, # Whether or not the parent is the root folder.
936 "parentLink": "A String", # A link to the parent.
937 },
938 ],
939 "exportLinks": { # Links for exporting Google Docs to specific formats.
Joe Gregoriofa08c2e2012-07-23 16:52:03 -0400940 "a_key": "A String", # A mapping from export format to URL
Joe Gregorio075572b2012-07-09 16:53:09 -0400941 },
Joe Gregorio52a5c532013-01-24 16:19:07 -0500942 "shared": True or False, # Whether the file has been shared.
Joe Gregoriod67010d2012-11-05 08:57:06 -0500943 "thumbnail": { # Thumbnail for the file. Only accepted on upload and for files that are not already thumbnailed by Google.
944 "mimeType": "A String", # The MIME type of the thumbnail.
945 "image": "A String", # The URL-safe Base64 encoded bytes of the thumbnail image.
946 },
Joe Gregorioad8013f2012-08-03 08:44:02 -0400947 "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 -0400948 "description": "A String", # A short description of the file.
Joe Gregorioad8013f2012-08-03 08:44:02 -0400949 "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 -0400950 "editable": True or False, # Whether the file can be edited by the current user.
951 "kind": "drive#file", # The type of file. This is always drive#file.
952 "quotaBytesUsed": "A String", # The number of quota bytes used by this file.
953 "fileSize": "A String", # The size of the file in bytes. This will only be populated on files with content stored in Drive.
954 "createdDate": "A String", # Create time for this file (formatted ISO8601 timestamp).
955 "md5Checksum": "A String", # An MD5 checksum for the content of this file. This will only be populated on files with content stored in Drive.
Joe Gregorio52a5c532013-01-24 16:19:07 -0500956 "iconLink": "A String", # A link to the file's icon.
Joe Gregorioad8013f2012-08-03 08:44:02 -0400957 "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 -0500958 "exposureBias": 3.14, # The exposure bias of the photo (APEX value).
Joe Gregoriod67010d2012-11-05 08:57:06 -0500959 "exposureTime": 3.14, # The length of the exposure, in seconds.
960 "cameraMake": "A String", # The make of the camera used to create the photo.
Joe Gregorio52a5c532013-01-24 16:19:07 -0500961 "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 -0500962 "isoSpeed": 42, # The ISO speed used to create the photo.
963 "focalLength": 3.14, # The focal length used to create the photo, in millimeters.
Joe Gregorio52a5c532013-01-24 16:19:07 -0500964 "exposureMode": "A String", # The exposure mode used to create the photo.
965 "colorSpace": "A String", # The color space of the photo.
Joe Gregorioad8013f2012-08-03 08:44:02 -0400966 "location": { # Geographic location information stored in the image.
967 "latitude": 3.14, # The latitude stored in the image.
968 "altitude": 3.14, # The altitude stored in the image.
969 "longitude": 3.14, # The longitude stored in the image.
970 },
Joe Gregorio52a5c532013-01-24 16:19:07 -0500971 "subjectDistance": 42, # The distance to the subject of the photo, in meters.
972 "height": 42, # The height of the image in pixels.
973 "lens": "A String", # The lens used to create the photo.
974 "date": "A String", # The date and time the photo was taken (EXIF format timestamp).
975 "width": 42, # The width of the image in pixels.
976 "meteringMode": "A String", # The metering mode used to create the photo.
977 "flashUsed": True or False, # Whether a flash was used to create the photo.
Joe Gregoriod67010d2012-11-05 08:57:06 -0500978 "aperture": 3.14, # The aperture used to create the photo (f-number).
979 "rotation": 42, # The rotation in clockwise degrees from the image's original orientation.
Joe Gregorio52a5c532013-01-24 16:19:07 -0500980 "sensor": "A String", # The type of sensor used to create the photo.
981 "whiteBalance": "A String", # The white balance mode used to create the photo.
Joe Gregoriod67010d2012-11-05 08:57:06 -0500982 "cameraModel": "A String", # The model of the camera used to create the photo.
Joe Gregorioad8013f2012-08-03 08:44:02 -0400983 },
Joe Gregorio075572b2012-07-09 16:53:09 -0400984 "embedLink": "A String", # A link for embedding the file.
Joe Gregorioad8013f2012-08-03 08:44:02 -0400985 "alternateLink": "A String", # A link for opening the file in using a relevant Google editor or viewer.
986 "modifiedByMeDate": "A String", # Last time this file was modified by the user (formatted RFC 3339 timestamp). Note that setting modifiedDate will also update the modifiedByMe date for the user which set the date.
Joe Gregorio075572b2012-07-09 16:53:09 -0400987 "downloadUrl": "A String", # Short term download URL for the file. This will only be populated on files with content stored in Drive.
Joe Gregorio52a5c532013-01-24 16:19:07 -0500988 "userPermission": { # A single permission for a file.
Joe Gregorio075572b2012-07-09 16:53:09 -0400989 "withLink": True or False, # Whether the link is required for this permission.
990 "kind": "drive#permission", # This is always drive#permission.
991 "name": "A String", # The name for this permission.
992 "value": "A String", # The email address or domain name for the entity. This is not populated in responses.
993 "id": "A String", # The ID of the permission.
994 "authKey": "A String", # The authkey parameter required for this permission.
995 "etag": "A String", # The ETag of the permission.
996 "role": "A String", # The primary role for this user. Allowed values are:
997 # - owner
998 # - reader
999 # - writer
1000 "photoLink": "A String", # A link to the profile photo, if available.
1001 "type": "A String", # The account type. Allowed values are:
1002 # - user
1003 # - group
1004 # - domain
1005 # - anyone
1006 "additionalRoles": [ # Additional roles for this user. Only commenter is currently allowed.
1007 "A String",
1008 ],
1009 "selfLink": "A String", # A link back to this permission.
1010 },
Joe Gregorioad8013f2012-08-03 08:44:02 -04001011 "fileExtension": "A String", # The file extension used when downloading this file. This field is set from the title when inserting or uploading new content. This will only be populated on files with content stored in Drive.
Joe Gregorio075572b2012-07-09 16:53:09 -04001012 "selfLink": "A String", # A link back to this file.
Joe Gregorioad8013f2012-08-03 08:44:02 -04001013 "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 -04001014}
1015
1016 newRevision: boolean, Whether a blob upload should create a new revision. If false, the blob data in the current head revision will be replaced.
1017 pinned: boolean, Whether to pin the new revision.
Joe Gregorio075572b2012-07-09 16:53:09 -04001018 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 -05001019 ocr: boolean, Whether to attempt OCR on .jpg, .png, .gif, or .pdf uploads.
Joe Gregorio075572b2012-07-09 16:53:09 -04001020 updateViewedDate: boolean, Whether to update the view date after successfully updating the file.
1021 timedTextTrackName: string, The timed text track name.
1022 convert: boolean, Whether to convert this file to the corresponding Google Docs format.
1023 setModifiedDate: boolean, Whether to set the modified date with the supplied modified date.
1024 timedTextLanguage: string, The language of the timed text.
1025
1026Returns:
1027 An object of the form:
1028
1029 { # The metadata for a file.
Joe Gregorioad8013f2012-08-03 08:44:02 -04001030 "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 Gregorio52a5c532013-01-24 16:19:07 -05001031 "appDataContents": True or False, # Whether this file is in the appdata folder.
Joe Gregorio075572b2012-07-09 16:53:09 -04001032 "thumbnailLink": "A String", # A link to the file's thumbnail.
1033 "labels": { # A group of labels for the file.
1034 "restricted": True or False, # Whether viewers are prevented from downloading this file.
1035 "hidden": True or False, # Whether this file is hidden from the user.
1036 "viewed": True or False, # Whether this file has been viewed by this user.
1037 "starred": True or False, # Whether this file is starred by the user.
1038 "trashed": True or False, # Whether this file has been trashed.
1039 },
1040 "indexableText": { # Indexable text attributes for the file (can only be written)
1041 "text": "A String", # The text to be indexed for this file
1042 },
Joe Gregorioad8013f2012-08-03 08:44:02 -04001043 "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 -04001044 "etag": "A String", # ETag of the file.
1045 "lastModifyingUserName": "A String", # Name of the last user to modify this file. This will only be populated if a user has edited this file.
1046 "writersCanShare": True or False, # Whether writers can share the document with other users.
1047 "id": "A String", # The id of the file.
1048 "title": "A String", # The title of this file.
1049 "ownerNames": [ # Name(s) of the owner(s) of this file.
1050 "A String",
1051 ],
1052 "sharedWithMeDate": "A String", # Time at which this file was shared with the user (formatted RFC 3339 timestamp).
Joe Gregorio52a5c532013-01-24 16:19:07 -05001053 "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 -04001054 "lastViewedByMeDate": "A String", # Last time this file was viewed by the user (formatted RFC 3339 timestamp).
1055 "parents": [ # Collection of parent folders which contain this file.
Joe Gregorioe7a0c472012-07-12 11:46:04 -04001056 # 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 -04001057 { # A reference to a file's parent.
1058 "selfLink": "A String", # A link back to this reference.
1059 "kind": "drive#parentReference", # This is always drive#parentReference.
1060 "id": "A String", # The ID of the parent.
1061 "isRoot": True or False, # Whether or not the parent is the root folder.
1062 "parentLink": "A String", # A link to the parent.
1063 },
1064 ],
1065 "exportLinks": { # Links for exporting Google Docs to specific formats.
Joe Gregoriofa08c2e2012-07-23 16:52:03 -04001066 "a_key": "A String", # A mapping from export format to URL
Joe Gregorio075572b2012-07-09 16:53:09 -04001067 },
Joe Gregorio52a5c532013-01-24 16:19:07 -05001068 "shared": True or False, # Whether the file has been shared.
Joe Gregoriod67010d2012-11-05 08:57:06 -05001069 "thumbnail": { # Thumbnail for the file. Only accepted on upload and for files that are not already thumbnailed by Google.
1070 "mimeType": "A String", # The MIME type of the thumbnail.
1071 "image": "A String", # The URL-safe Base64 encoded bytes of the thumbnail image.
1072 },
Joe Gregorioad8013f2012-08-03 08:44:02 -04001073 "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 -04001074 "description": "A String", # A short description of the file.
Joe Gregorioad8013f2012-08-03 08:44:02 -04001075 "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 -04001076 "editable": True or False, # Whether the file can be edited by the current user.
1077 "kind": "drive#file", # The type of file. This is always drive#file.
1078 "quotaBytesUsed": "A String", # The number of quota bytes used by this file.
1079 "fileSize": "A String", # The size of the file in bytes. This will only be populated on files with content stored in Drive.
1080 "createdDate": "A String", # Create time for this file (formatted ISO8601 timestamp).
1081 "md5Checksum": "A String", # An MD5 checksum for the content of this file. This will only be populated on files with content stored in Drive.
Joe Gregorio52a5c532013-01-24 16:19:07 -05001082 "iconLink": "A String", # A link to the file's icon.
Joe Gregorioad8013f2012-08-03 08:44:02 -04001083 "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 -05001084 "exposureBias": 3.14, # The exposure bias of the photo (APEX value).
Joe Gregoriod67010d2012-11-05 08:57:06 -05001085 "exposureTime": 3.14, # The length of the exposure, in seconds.
1086 "cameraMake": "A String", # The make of the camera used to create the photo.
Joe Gregorio52a5c532013-01-24 16:19:07 -05001087 "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 -05001088 "isoSpeed": 42, # The ISO speed used to create the photo.
1089 "focalLength": 3.14, # The focal length used to create the photo, in millimeters.
Joe Gregorio52a5c532013-01-24 16:19:07 -05001090 "exposureMode": "A String", # The exposure mode used to create the photo.
1091 "colorSpace": "A String", # The color space of the photo.
Joe Gregorioad8013f2012-08-03 08:44:02 -04001092 "location": { # Geographic location information stored in the image.
1093 "latitude": 3.14, # The latitude stored in the image.
1094 "altitude": 3.14, # The altitude stored in the image.
1095 "longitude": 3.14, # The longitude stored in the image.
1096 },
Joe Gregorio52a5c532013-01-24 16:19:07 -05001097 "subjectDistance": 42, # The distance to the subject of the photo, in meters.
1098 "height": 42, # The height of the image in pixels.
1099 "lens": "A String", # The lens used to create the photo.
1100 "date": "A String", # The date and time the photo was taken (EXIF format timestamp).
1101 "width": 42, # The width of the image in pixels.
1102 "meteringMode": "A String", # The metering mode used to create the photo.
1103 "flashUsed": True or False, # Whether a flash was used to create the photo.
Joe Gregoriod67010d2012-11-05 08:57:06 -05001104 "aperture": 3.14, # The aperture used to create the photo (f-number).
1105 "rotation": 42, # The rotation in clockwise degrees from the image's original orientation.
Joe Gregorio52a5c532013-01-24 16:19:07 -05001106 "sensor": "A String", # The type of sensor used to create the photo.
1107 "whiteBalance": "A String", # The white balance mode used to create the photo.
Joe Gregoriod67010d2012-11-05 08:57:06 -05001108 "cameraModel": "A String", # The model of the camera used to create the photo.
Joe Gregorioad8013f2012-08-03 08:44:02 -04001109 },
Joe Gregorio075572b2012-07-09 16:53:09 -04001110 "embedLink": "A String", # A link for embedding the file.
Joe Gregorioad8013f2012-08-03 08:44:02 -04001111 "alternateLink": "A String", # A link for opening the file in using a relevant Google editor or viewer.
1112 "modifiedByMeDate": "A String", # Last time this file was modified by the user (formatted RFC 3339 timestamp). Note that setting modifiedDate will also update the modifiedByMe date for the user which set the date.
Joe Gregorio075572b2012-07-09 16:53:09 -04001113 "downloadUrl": "A String", # Short term download URL for the file. This will only be populated on files with content stored in Drive.
Joe Gregorio52a5c532013-01-24 16:19:07 -05001114 "userPermission": { # A single permission for a file.
Joe Gregorio075572b2012-07-09 16:53:09 -04001115 "withLink": True or False, # Whether the link is required for this permission.
1116 "kind": "drive#permission", # This is always drive#permission.
1117 "name": "A String", # The name for this permission.
1118 "value": "A String", # The email address or domain name for the entity. This is not populated in responses.
1119 "id": "A String", # The ID of the permission.
1120 "authKey": "A String", # The authkey parameter required for this permission.
1121 "etag": "A String", # The ETag of the permission.
1122 "role": "A String", # The primary role for this user. Allowed values are:
1123 # - owner
1124 # - reader
1125 # - writer
1126 "photoLink": "A String", # A link to the profile photo, if available.
1127 "type": "A String", # The account type. Allowed values are:
1128 # - user
1129 # - group
1130 # - domain
1131 # - anyone
1132 "additionalRoles": [ # Additional roles for this user. Only commenter is currently allowed.
1133 "A String",
1134 ],
1135 "selfLink": "A String", # A link back to this permission.
1136 },
Joe Gregorioad8013f2012-08-03 08:44:02 -04001137 "fileExtension": "A String", # The file extension used when downloading this file. This field is set from the title when inserting or uploading new content. This will only be populated on files with content stored in Drive.
Joe Gregorio075572b2012-07-09 16:53:09 -04001138 "selfLink": "A String", # A link back to this file.
Joe Gregorioad8013f2012-08-03 08:44:02 -04001139 "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 -04001140 }</pre>
1141</div>
1142
1143<div class="method">
1144 <code class="details" id="touch">touch(fileId)</code>
1145 <pre>Set the file's updated time to the current server time.
1146
1147Args:
1148 fileId: string, The ID of the file to update. (required)
1149
1150Returns:
1151 An object of the form:
1152
1153 { # The metadata for a file.
Joe Gregorioad8013f2012-08-03 08:44:02 -04001154 "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 Gregorio52a5c532013-01-24 16:19:07 -05001155 "appDataContents": True or False, # Whether this file is in the appdata folder.
Joe Gregorio075572b2012-07-09 16:53:09 -04001156 "thumbnailLink": "A String", # A link to the file's thumbnail.
1157 "labels": { # A group of labels for the file.
1158 "restricted": True or False, # Whether viewers are prevented from downloading this file.
1159 "hidden": True or False, # Whether this file is hidden from the user.
1160 "viewed": True or False, # Whether this file has been viewed by this user.
1161 "starred": True or False, # Whether this file is starred by the user.
1162 "trashed": True or False, # Whether this file has been trashed.
1163 },
1164 "indexableText": { # Indexable text attributes for the file (can only be written)
1165 "text": "A String", # The text to be indexed for this file
1166 },
Joe Gregorioad8013f2012-08-03 08:44:02 -04001167 "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 -04001168 "etag": "A String", # ETag of the file.
1169 "lastModifyingUserName": "A String", # Name of the last user to modify this file. This will only be populated if a user has edited this file.
1170 "writersCanShare": True or False, # Whether writers can share the document with other users.
1171 "id": "A String", # The id of the file.
1172 "title": "A String", # The title of this file.
1173 "ownerNames": [ # Name(s) of the owner(s) of this file.
1174 "A String",
1175 ],
1176 "sharedWithMeDate": "A String", # Time at which this file was shared with the user (formatted RFC 3339 timestamp).
Joe Gregorio52a5c532013-01-24 16:19:07 -05001177 "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 -04001178 "lastViewedByMeDate": "A String", # Last time this file was viewed by the user (formatted RFC 3339 timestamp).
1179 "parents": [ # Collection of parent folders which contain this file.
Joe Gregorioe7a0c472012-07-12 11:46:04 -04001180 # 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 -04001181 { # A reference to a file's parent.
1182 "selfLink": "A String", # A link back to this reference.
1183 "kind": "drive#parentReference", # This is always drive#parentReference.
1184 "id": "A String", # The ID of the parent.
1185 "isRoot": True or False, # Whether or not the parent is the root folder.
1186 "parentLink": "A String", # A link to the parent.
1187 },
1188 ],
1189 "exportLinks": { # Links for exporting Google Docs to specific formats.
Joe Gregoriofa08c2e2012-07-23 16:52:03 -04001190 "a_key": "A String", # A mapping from export format to URL
Joe Gregorio075572b2012-07-09 16:53:09 -04001191 },
Joe Gregorio52a5c532013-01-24 16:19:07 -05001192 "shared": True or False, # Whether the file has been shared.
Joe Gregoriod67010d2012-11-05 08:57:06 -05001193 "thumbnail": { # Thumbnail for the file. Only accepted on upload and for files that are not already thumbnailed by Google.
1194 "mimeType": "A String", # The MIME type of the thumbnail.
1195 "image": "A String", # The URL-safe Base64 encoded bytes of the thumbnail image.
1196 },
Joe Gregorioad8013f2012-08-03 08:44:02 -04001197 "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 -04001198 "description": "A String", # A short description of the file.
Joe Gregorioad8013f2012-08-03 08:44:02 -04001199 "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 -04001200 "editable": True or False, # Whether the file can be edited by the current user.
1201 "kind": "drive#file", # The type of file. This is always drive#file.
1202 "quotaBytesUsed": "A String", # The number of quota bytes used by this file.
1203 "fileSize": "A String", # The size of the file in bytes. This will only be populated on files with content stored in Drive.
1204 "createdDate": "A String", # Create time for this file (formatted ISO8601 timestamp).
1205 "md5Checksum": "A String", # An MD5 checksum for the content of this file. This will only be populated on files with content stored in Drive.
Joe Gregorio52a5c532013-01-24 16:19:07 -05001206 "iconLink": "A String", # A link to the file's icon.
Joe Gregorioad8013f2012-08-03 08:44:02 -04001207 "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 -05001208 "exposureBias": 3.14, # The exposure bias of the photo (APEX value).
Joe Gregoriod67010d2012-11-05 08:57:06 -05001209 "exposureTime": 3.14, # The length of the exposure, in seconds.
1210 "cameraMake": "A String", # The make of the camera used to create the photo.
Joe Gregorio52a5c532013-01-24 16:19:07 -05001211 "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 -05001212 "isoSpeed": 42, # The ISO speed used to create the photo.
1213 "focalLength": 3.14, # The focal length used to create the photo, in millimeters.
Joe Gregorio52a5c532013-01-24 16:19:07 -05001214 "exposureMode": "A String", # The exposure mode used to create the photo.
1215 "colorSpace": "A String", # The color space of the photo.
Joe Gregorioad8013f2012-08-03 08:44:02 -04001216 "location": { # Geographic location information stored in the image.
1217 "latitude": 3.14, # The latitude stored in the image.
1218 "altitude": 3.14, # The altitude stored in the image.
1219 "longitude": 3.14, # The longitude stored in the image.
1220 },
Joe Gregorio52a5c532013-01-24 16:19:07 -05001221 "subjectDistance": 42, # The distance to the subject of the photo, in meters.
1222 "height": 42, # The height of the image in pixels.
1223 "lens": "A String", # The lens used to create the photo.
1224 "date": "A String", # The date and time the photo was taken (EXIF format timestamp).
1225 "width": 42, # The width of the image in pixels.
1226 "meteringMode": "A String", # The metering mode used to create the photo.
1227 "flashUsed": True or False, # Whether a flash was used to create the photo.
Joe Gregoriod67010d2012-11-05 08:57:06 -05001228 "aperture": 3.14, # The aperture used to create the photo (f-number).
1229 "rotation": 42, # The rotation in clockwise degrees from the image's original orientation.
Joe Gregorio52a5c532013-01-24 16:19:07 -05001230 "sensor": "A String", # The type of sensor used to create the photo.
1231 "whiteBalance": "A String", # The white balance mode used to create the photo.
Joe Gregoriod67010d2012-11-05 08:57:06 -05001232 "cameraModel": "A String", # The model of the camera used to create the photo.
Joe Gregorioad8013f2012-08-03 08:44:02 -04001233 },
Joe Gregorio075572b2012-07-09 16:53:09 -04001234 "embedLink": "A String", # A link for embedding the file.
Joe Gregorioad8013f2012-08-03 08:44:02 -04001235 "alternateLink": "A String", # A link for opening the file in using a relevant Google editor or viewer.
1236 "modifiedByMeDate": "A String", # Last time this file was modified by the user (formatted RFC 3339 timestamp). Note that setting modifiedDate will also update the modifiedByMe date for the user which set the date.
Joe Gregorio075572b2012-07-09 16:53:09 -04001237 "downloadUrl": "A String", # Short term download URL for the file. This will only be populated on files with content stored in Drive.
Joe Gregorio52a5c532013-01-24 16:19:07 -05001238 "userPermission": { # A single permission for a file.
Joe Gregorio075572b2012-07-09 16:53:09 -04001239 "withLink": True or False, # Whether the link is required for this permission.
1240 "kind": "drive#permission", # This is always drive#permission.
1241 "name": "A String", # The name for this permission.
1242 "value": "A String", # The email address or domain name for the entity. This is not populated in responses.
1243 "id": "A String", # The ID of the permission.
1244 "authKey": "A String", # The authkey parameter required for this permission.
1245 "etag": "A String", # The ETag of the permission.
1246 "role": "A String", # The primary role for this user. Allowed values are:
1247 # - owner
1248 # - reader
1249 # - writer
1250 "photoLink": "A String", # A link to the profile photo, if available.
1251 "type": "A String", # The account type. Allowed values are:
1252 # - user
1253 # - group
1254 # - domain
1255 # - anyone
1256 "additionalRoles": [ # Additional roles for this user. Only commenter is currently allowed.
1257 "A String",
1258 ],
1259 "selfLink": "A String", # A link back to this permission.
1260 },
Joe Gregorioad8013f2012-08-03 08:44:02 -04001261 "fileExtension": "A String", # The file extension used when downloading this file. This field is set from the title when inserting or uploading new content. This will only be populated on files with content stored in Drive.
Joe Gregorio075572b2012-07-09 16:53:09 -04001262 "selfLink": "A String", # A link back to this file.
Joe Gregorioad8013f2012-08-03 08:44:02 -04001263 "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 -04001264 }</pre>
1265</div>
1266
1267<div class="method">
1268 <code class="details" id="trash">trash(fileId)</code>
1269 <pre>Moves a file to the trash.
1270
1271Args:
1272 fileId: string, The ID of the file to trash. (required)
1273
1274Returns:
1275 An object of the form:
1276
1277 { # The metadata for a file.
Joe Gregorioad8013f2012-08-03 08:44:02 -04001278 "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 Gregorio52a5c532013-01-24 16:19:07 -05001279 "appDataContents": True or False, # Whether this file is in the appdata folder.
Joe Gregorio075572b2012-07-09 16:53:09 -04001280 "thumbnailLink": "A String", # A link to the file's thumbnail.
1281 "labels": { # A group of labels for the file.
1282 "restricted": True or False, # Whether viewers are prevented from downloading this file.
1283 "hidden": True or False, # Whether this file is hidden from the user.
1284 "viewed": True or False, # Whether this file has been viewed by this user.
1285 "starred": True or False, # Whether this file is starred by the user.
1286 "trashed": True or False, # Whether this file has been trashed.
1287 },
1288 "indexableText": { # Indexable text attributes for the file (can only be written)
1289 "text": "A String", # The text to be indexed for this file
1290 },
Joe Gregorioad8013f2012-08-03 08:44:02 -04001291 "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 -04001292 "etag": "A String", # ETag of the file.
1293 "lastModifyingUserName": "A String", # Name of the last user to modify this file. This will only be populated if a user has edited this file.
1294 "writersCanShare": True or False, # Whether writers can share the document with other users.
1295 "id": "A String", # The id of the file.
1296 "title": "A String", # The title of this file.
1297 "ownerNames": [ # Name(s) of the owner(s) of this file.
1298 "A String",
1299 ],
1300 "sharedWithMeDate": "A String", # Time at which this file was shared with the user (formatted RFC 3339 timestamp).
Joe Gregorio52a5c532013-01-24 16:19:07 -05001301 "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 -04001302 "lastViewedByMeDate": "A String", # Last time this file was viewed by the user (formatted RFC 3339 timestamp).
1303 "parents": [ # Collection of parent folders which contain this file.
Joe Gregorioe7a0c472012-07-12 11:46:04 -04001304 # 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 -04001305 { # A reference to a file's parent.
1306 "selfLink": "A String", # A link back to this reference.
1307 "kind": "drive#parentReference", # This is always drive#parentReference.
1308 "id": "A String", # The ID of the parent.
1309 "isRoot": True or False, # Whether or not the parent is the root folder.
1310 "parentLink": "A String", # A link to the parent.
1311 },
1312 ],
1313 "exportLinks": { # Links for exporting Google Docs to specific formats.
Joe Gregoriofa08c2e2012-07-23 16:52:03 -04001314 "a_key": "A String", # A mapping from export format to URL
Joe Gregorio075572b2012-07-09 16:53:09 -04001315 },
Joe Gregorio52a5c532013-01-24 16:19:07 -05001316 "shared": True or False, # Whether the file has been shared.
Joe Gregoriod67010d2012-11-05 08:57:06 -05001317 "thumbnail": { # Thumbnail for the file. Only accepted on upload and for files that are not already thumbnailed by Google.
1318 "mimeType": "A String", # The MIME type of the thumbnail.
1319 "image": "A String", # The URL-safe Base64 encoded bytes of the thumbnail image.
1320 },
Joe Gregorioad8013f2012-08-03 08:44:02 -04001321 "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 -04001322 "description": "A String", # A short description of the file.
Joe Gregorioad8013f2012-08-03 08:44:02 -04001323 "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 -04001324 "editable": True or False, # Whether the file can be edited by the current user.
1325 "kind": "drive#file", # The type of file. This is always drive#file.
1326 "quotaBytesUsed": "A String", # The number of quota bytes used by this file.
1327 "fileSize": "A String", # The size of the file in bytes. This will only be populated on files with content stored in Drive.
1328 "createdDate": "A String", # Create time for this file (formatted ISO8601 timestamp).
1329 "md5Checksum": "A String", # An MD5 checksum for the content of this file. This will only be populated on files with content stored in Drive.
Joe Gregorio52a5c532013-01-24 16:19:07 -05001330 "iconLink": "A String", # A link to the file's icon.
Joe Gregorioad8013f2012-08-03 08:44:02 -04001331 "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 -05001332 "exposureBias": 3.14, # The exposure bias of the photo (APEX value).
Joe Gregoriod67010d2012-11-05 08:57:06 -05001333 "exposureTime": 3.14, # The length of the exposure, in seconds.
1334 "cameraMake": "A String", # The make of the camera used to create the photo.
Joe Gregorio52a5c532013-01-24 16:19:07 -05001335 "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 -05001336 "isoSpeed": 42, # The ISO speed used to create the photo.
1337 "focalLength": 3.14, # The focal length used to create the photo, in millimeters.
Joe Gregorio52a5c532013-01-24 16:19:07 -05001338 "exposureMode": "A String", # The exposure mode used to create the photo.
1339 "colorSpace": "A String", # The color space of the photo.
Joe Gregorioad8013f2012-08-03 08:44:02 -04001340 "location": { # Geographic location information stored in the image.
1341 "latitude": 3.14, # The latitude stored in the image.
1342 "altitude": 3.14, # The altitude stored in the image.
1343 "longitude": 3.14, # The longitude stored in the image.
1344 },
Joe Gregorio52a5c532013-01-24 16:19:07 -05001345 "subjectDistance": 42, # The distance to the subject of the photo, in meters.
1346 "height": 42, # The height of the image in pixels.
1347 "lens": "A String", # The lens used to create the photo.
1348 "date": "A String", # The date and time the photo was taken (EXIF format timestamp).
1349 "width": 42, # The width of the image in pixels.
1350 "meteringMode": "A String", # The metering mode used to create the photo.
1351 "flashUsed": True or False, # Whether a flash was used to create the photo.
Joe Gregoriod67010d2012-11-05 08:57:06 -05001352 "aperture": 3.14, # The aperture used to create the photo (f-number).
1353 "rotation": 42, # The rotation in clockwise degrees from the image's original orientation.
Joe Gregorio52a5c532013-01-24 16:19:07 -05001354 "sensor": "A String", # The type of sensor used to create the photo.
1355 "whiteBalance": "A String", # The white balance mode used to create the photo.
Joe Gregoriod67010d2012-11-05 08:57:06 -05001356 "cameraModel": "A String", # The model of the camera used to create the photo.
Joe Gregorioad8013f2012-08-03 08:44:02 -04001357 },
Joe Gregorio075572b2012-07-09 16:53:09 -04001358 "embedLink": "A String", # A link for embedding the file.
Joe Gregorioad8013f2012-08-03 08:44:02 -04001359 "alternateLink": "A String", # A link for opening the file in using a relevant Google editor or viewer.
1360 "modifiedByMeDate": "A String", # Last time this file was modified by the user (formatted RFC 3339 timestamp). Note that setting modifiedDate will also update the modifiedByMe date for the user which set the date.
Joe Gregorio075572b2012-07-09 16:53:09 -04001361 "downloadUrl": "A String", # Short term download URL for the file. This will only be populated on files with content stored in Drive.
Joe Gregorio52a5c532013-01-24 16:19:07 -05001362 "userPermission": { # A single permission for a file.
Joe Gregorio075572b2012-07-09 16:53:09 -04001363 "withLink": True or False, # Whether the link is required for this permission.
1364 "kind": "drive#permission", # This is always drive#permission.
1365 "name": "A String", # The name for this permission.
1366 "value": "A String", # The email address or domain name for the entity. This is not populated in responses.
1367 "id": "A String", # The ID of the permission.
1368 "authKey": "A String", # The authkey parameter required for this permission.
1369 "etag": "A String", # The ETag of the permission.
1370 "role": "A String", # The primary role for this user. Allowed values are:
1371 # - owner
1372 # - reader
1373 # - writer
1374 "photoLink": "A String", # A link to the profile photo, if available.
1375 "type": "A String", # The account type. Allowed values are:
1376 # - user
1377 # - group
1378 # - domain
1379 # - anyone
1380 "additionalRoles": [ # Additional roles for this user. Only commenter is currently allowed.
1381 "A String",
1382 ],
1383 "selfLink": "A String", # A link back to this permission.
1384 },
Joe Gregorioad8013f2012-08-03 08:44:02 -04001385 "fileExtension": "A String", # The file extension used when downloading this file. This field is set from the title when inserting or uploading new content. This will only be populated on files with content stored in Drive.
Joe Gregorio075572b2012-07-09 16:53:09 -04001386 "selfLink": "A String", # A link back to this file.
Joe Gregorioad8013f2012-08-03 08:44:02 -04001387 "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 -04001388 }</pre>
1389</div>
1390
1391<div class="method">
1392 <code class="details" id="untrash">untrash(fileId)</code>
1393 <pre>Restores a file from the trash.
1394
1395Args:
1396 fileId: string, The ID of the file to untrash. (required)
1397
1398Returns:
1399 An object of the form:
1400
1401 { # The metadata for a file.
Joe Gregorioad8013f2012-08-03 08:44:02 -04001402 "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 Gregorio52a5c532013-01-24 16:19:07 -05001403 "appDataContents": True or False, # Whether this file is in the appdata folder.
Joe Gregorio075572b2012-07-09 16:53:09 -04001404 "thumbnailLink": "A String", # A link to the file's thumbnail.
1405 "labels": { # A group of labels for the file.
1406 "restricted": True or False, # Whether viewers are prevented from downloading this file.
1407 "hidden": True or False, # Whether this file is hidden from the user.
1408 "viewed": True or False, # Whether this file has been viewed by this user.
1409 "starred": True or False, # Whether this file is starred by the user.
1410 "trashed": True or False, # Whether this file has been trashed.
1411 },
1412 "indexableText": { # Indexable text attributes for the file (can only be written)
1413 "text": "A String", # The text to be indexed for this file
1414 },
Joe Gregorioad8013f2012-08-03 08:44:02 -04001415 "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 -04001416 "etag": "A String", # ETag of the file.
1417 "lastModifyingUserName": "A String", # Name of the last user to modify this file. This will only be populated if a user has edited this file.
1418 "writersCanShare": True or False, # Whether writers can share the document with other users.
1419 "id": "A String", # The id of the file.
1420 "title": "A String", # The title of this file.
1421 "ownerNames": [ # Name(s) of the owner(s) of this file.
1422 "A String",
1423 ],
1424 "sharedWithMeDate": "A String", # Time at which this file was shared with the user (formatted RFC 3339 timestamp).
Joe Gregorio52a5c532013-01-24 16:19:07 -05001425 "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 -04001426 "lastViewedByMeDate": "A String", # Last time this file was viewed by the user (formatted RFC 3339 timestamp).
1427 "parents": [ # Collection of parent folders which contain this file.
Joe Gregorioe7a0c472012-07-12 11:46:04 -04001428 # 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 -04001429 { # A reference to a file's parent.
1430 "selfLink": "A String", # A link back to this reference.
1431 "kind": "drive#parentReference", # This is always drive#parentReference.
1432 "id": "A String", # The ID of the parent.
1433 "isRoot": True or False, # Whether or not the parent is the root folder.
1434 "parentLink": "A String", # A link to the parent.
1435 },
1436 ],
1437 "exportLinks": { # Links for exporting Google Docs to specific formats.
Joe Gregoriofa08c2e2012-07-23 16:52:03 -04001438 "a_key": "A String", # A mapping from export format to URL
Joe Gregorio075572b2012-07-09 16:53:09 -04001439 },
Joe Gregorio52a5c532013-01-24 16:19:07 -05001440 "shared": True or False, # Whether the file has been shared.
Joe Gregoriod67010d2012-11-05 08:57:06 -05001441 "thumbnail": { # Thumbnail for the file. Only accepted on upload and for files that are not already thumbnailed by Google.
1442 "mimeType": "A String", # The MIME type of the thumbnail.
1443 "image": "A String", # The URL-safe Base64 encoded bytes of the thumbnail image.
1444 },
Joe Gregorioad8013f2012-08-03 08:44:02 -04001445 "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 -04001446 "description": "A String", # A short description of the file.
Joe Gregorioad8013f2012-08-03 08:44:02 -04001447 "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 -04001448 "editable": True or False, # Whether the file can be edited by the current user.
1449 "kind": "drive#file", # The type of file. This is always drive#file.
1450 "quotaBytesUsed": "A String", # The number of quota bytes used by this file.
1451 "fileSize": "A String", # The size of the file in bytes. This will only be populated on files with content stored in Drive.
1452 "createdDate": "A String", # Create time for this file (formatted ISO8601 timestamp).
1453 "md5Checksum": "A String", # An MD5 checksum for the content of this file. This will only be populated on files with content stored in Drive.
Joe Gregorio52a5c532013-01-24 16:19:07 -05001454 "iconLink": "A String", # A link to the file's icon.
Joe Gregorioad8013f2012-08-03 08:44:02 -04001455 "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 -05001456 "exposureBias": 3.14, # The exposure bias of the photo (APEX value).
Joe Gregoriod67010d2012-11-05 08:57:06 -05001457 "exposureTime": 3.14, # The length of the exposure, in seconds.
1458 "cameraMake": "A String", # The make of the camera used to create the photo.
Joe Gregorio52a5c532013-01-24 16:19:07 -05001459 "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 -05001460 "isoSpeed": 42, # The ISO speed used to create the photo.
1461 "focalLength": 3.14, # The focal length used to create the photo, in millimeters.
Joe Gregorio52a5c532013-01-24 16:19:07 -05001462 "exposureMode": "A String", # The exposure mode used to create the photo.
1463 "colorSpace": "A String", # The color space of the photo.
Joe Gregorioad8013f2012-08-03 08:44:02 -04001464 "location": { # Geographic location information stored in the image.
1465 "latitude": 3.14, # The latitude stored in the image.
1466 "altitude": 3.14, # The altitude stored in the image.
1467 "longitude": 3.14, # The longitude stored in the image.
1468 },
Joe Gregorio52a5c532013-01-24 16:19:07 -05001469 "subjectDistance": 42, # The distance to the subject of the photo, in meters.
1470 "height": 42, # The height of the image in pixels.
1471 "lens": "A String", # The lens used to create the photo.
1472 "date": "A String", # The date and time the photo was taken (EXIF format timestamp).
1473 "width": 42, # The width of the image in pixels.
1474 "meteringMode": "A String", # The metering mode used to create the photo.
1475 "flashUsed": True or False, # Whether a flash was used to create the photo.
Joe Gregoriod67010d2012-11-05 08:57:06 -05001476 "aperture": 3.14, # The aperture used to create the photo (f-number).
1477 "rotation": 42, # The rotation in clockwise degrees from the image's original orientation.
Joe Gregorio52a5c532013-01-24 16:19:07 -05001478 "sensor": "A String", # The type of sensor used to create the photo.
1479 "whiteBalance": "A String", # The white balance mode used to create the photo.
Joe Gregoriod67010d2012-11-05 08:57:06 -05001480 "cameraModel": "A String", # The model of the camera used to create the photo.
Joe Gregorioad8013f2012-08-03 08:44:02 -04001481 },
Joe Gregorio075572b2012-07-09 16:53:09 -04001482 "embedLink": "A String", # A link for embedding the file.
Joe Gregorioad8013f2012-08-03 08:44:02 -04001483 "alternateLink": "A String", # A link for opening the file in using a relevant Google editor or viewer.
1484 "modifiedByMeDate": "A String", # Last time this file was modified by the user (formatted RFC 3339 timestamp). Note that setting modifiedDate will also update the modifiedByMe date for the user which set the date.
Joe Gregorio075572b2012-07-09 16:53:09 -04001485 "downloadUrl": "A String", # Short term download URL for the file. This will only be populated on files with content stored in Drive.
Joe Gregorio52a5c532013-01-24 16:19:07 -05001486 "userPermission": { # A single permission for a file.
Joe Gregorio075572b2012-07-09 16:53:09 -04001487 "withLink": True or False, # Whether the link is required for this permission.
1488 "kind": "drive#permission", # This is always drive#permission.
1489 "name": "A String", # The name for this permission.
1490 "value": "A String", # The email address or domain name for the entity. This is not populated in responses.
1491 "id": "A String", # The ID of the permission.
1492 "authKey": "A String", # The authkey parameter required for this permission.
1493 "etag": "A String", # The ETag of the permission.
1494 "role": "A String", # The primary role for this user. Allowed values are:
1495 # - owner
1496 # - reader
1497 # - writer
1498 "photoLink": "A String", # A link to the profile photo, if available.
1499 "type": "A String", # The account type. Allowed values are:
1500 # - user
1501 # - group
1502 # - domain
1503 # - anyone
1504 "additionalRoles": [ # Additional roles for this user. Only commenter is currently allowed.
1505 "A String",
1506 ],
1507 "selfLink": "A String", # A link back to this permission.
1508 },
Joe Gregorioad8013f2012-08-03 08:44:02 -04001509 "fileExtension": "A String", # The file extension used when downloading this file. This field is set from the title when inserting or uploading new content. This will only be populated on files with content stored in Drive.
Joe Gregorio075572b2012-07-09 16:53:09 -04001510 "selfLink": "A String", # A link back to this file.
Joe Gregorioad8013f2012-08-03 08:44:02 -04001511 "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 -04001512 }</pre>
1513</div>
1514
1515<div class="method">
Joe Gregorio52a5c532013-01-24 16:19:07 -05001516 <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, setModifiedDate=None, timedTextLanguage=None)</code>
Joe Gregorio075572b2012-07-09 16:53:09 -04001517 <pre>Updates file metadata and/or content
1518
1519Args:
1520 fileId: string, The ID of the file to update. (required)
1521 body: object, The request body.
1522 The object takes the form of:
1523
1524{ # The metadata for a file.
Joe Gregorioad8013f2012-08-03 08:44:02 -04001525 "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 Gregorio52a5c532013-01-24 16:19:07 -05001526 "appDataContents": True or False, # Whether this file is in the appdata folder.
Joe Gregorio075572b2012-07-09 16:53:09 -04001527 "thumbnailLink": "A String", # A link to the file's thumbnail.
1528 "labels": { # A group of labels for the file.
1529 "restricted": True or False, # Whether viewers are prevented from downloading this file.
1530 "hidden": True or False, # Whether this file is hidden from the user.
1531 "viewed": True or False, # Whether this file has been viewed by this user.
1532 "starred": True or False, # Whether this file is starred by the user.
1533 "trashed": True or False, # Whether this file has been trashed.
1534 },
1535 "indexableText": { # Indexable text attributes for the file (can only be written)
1536 "text": "A String", # The text to be indexed for this file
1537 },
Joe Gregorioad8013f2012-08-03 08:44:02 -04001538 "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 -04001539 "etag": "A String", # ETag of the file.
1540 "lastModifyingUserName": "A String", # Name of the last user to modify this file. This will only be populated if a user has edited this file.
1541 "writersCanShare": True or False, # Whether writers can share the document with other users.
1542 "id": "A String", # The id of the file.
1543 "title": "A String", # The title of this file.
1544 "ownerNames": [ # Name(s) of the owner(s) of this file.
1545 "A String",
1546 ],
1547 "sharedWithMeDate": "A String", # Time at which this file was shared with the user (formatted RFC 3339 timestamp).
Joe Gregorio52a5c532013-01-24 16:19:07 -05001548 "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 -04001549 "lastViewedByMeDate": "A String", # Last time this file was viewed by the user (formatted RFC 3339 timestamp).
1550 "parents": [ # Collection of parent folders which contain this file.
Joe Gregorioe7a0c472012-07-12 11:46:04 -04001551 # 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 -04001552 { # A reference to a file's parent.
1553 "selfLink": "A String", # A link back to this reference.
1554 "kind": "drive#parentReference", # This is always drive#parentReference.
1555 "id": "A String", # The ID of the parent.
1556 "isRoot": True or False, # Whether or not the parent is the root folder.
1557 "parentLink": "A String", # A link to the parent.
1558 },
1559 ],
1560 "exportLinks": { # Links for exporting Google Docs to specific formats.
Joe Gregoriofa08c2e2012-07-23 16:52:03 -04001561 "a_key": "A String", # A mapping from export format to URL
Joe Gregorio075572b2012-07-09 16:53:09 -04001562 },
Joe Gregorio52a5c532013-01-24 16:19:07 -05001563 "shared": True or False, # Whether the file has been shared.
Joe Gregoriod67010d2012-11-05 08:57:06 -05001564 "thumbnail": { # Thumbnail for the file. Only accepted on upload and for files that are not already thumbnailed by Google.
1565 "mimeType": "A String", # The MIME type of the thumbnail.
1566 "image": "A String", # The URL-safe Base64 encoded bytes of the thumbnail image.
1567 },
Joe Gregorioad8013f2012-08-03 08:44:02 -04001568 "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 -04001569 "description": "A String", # A short description of the file.
Joe Gregorioad8013f2012-08-03 08:44:02 -04001570 "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 -04001571 "editable": True or False, # Whether the file can be edited by the current user.
1572 "kind": "drive#file", # The type of file. This is always drive#file.
1573 "quotaBytesUsed": "A String", # The number of quota bytes used by this file.
1574 "fileSize": "A String", # The size of the file in bytes. This will only be populated on files with content stored in Drive.
1575 "createdDate": "A String", # Create time for this file (formatted ISO8601 timestamp).
1576 "md5Checksum": "A String", # An MD5 checksum for the content of this file. This will only be populated on files with content stored in Drive.
Joe Gregorio52a5c532013-01-24 16:19:07 -05001577 "iconLink": "A String", # A link to the file's icon.
Joe Gregorioad8013f2012-08-03 08:44:02 -04001578 "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 -05001579 "exposureBias": 3.14, # The exposure bias of the photo (APEX value).
Joe Gregoriod67010d2012-11-05 08:57:06 -05001580 "exposureTime": 3.14, # The length of the exposure, in seconds.
1581 "cameraMake": "A String", # The make of the camera used to create the photo.
Joe Gregorio52a5c532013-01-24 16:19:07 -05001582 "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 -05001583 "isoSpeed": 42, # The ISO speed used to create the photo.
1584 "focalLength": 3.14, # The focal length used to create the photo, in millimeters.
Joe Gregorio52a5c532013-01-24 16:19:07 -05001585 "exposureMode": "A String", # The exposure mode used to create the photo.
1586 "colorSpace": "A String", # The color space of the photo.
Joe Gregorioad8013f2012-08-03 08:44:02 -04001587 "location": { # Geographic location information stored in the image.
1588 "latitude": 3.14, # The latitude stored in the image.
1589 "altitude": 3.14, # The altitude stored in the image.
1590 "longitude": 3.14, # The longitude stored in the image.
1591 },
Joe Gregorio52a5c532013-01-24 16:19:07 -05001592 "subjectDistance": 42, # The distance to the subject of the photo, in meters.
1593 "height": 42, # The height of the image in pixels.
1594 "lens": "A String", # The lens used to create the photo.
1595 "date": "A String", # The date and time the photo was taken (EXIF format timestamp).
1596 "width": 42, # The width of the image in pixels.
1597 "meteringMode": "A String", # The metering mode used to create the photo.
1598 "flashUsed": True or False, # Whether a flash was used to create the photo.
Joe Gregoriod67010d2012-11-05 08:57:06 -05001599 "aperture": 3.14, # The aperture used to create the photo (f-number).
1600 "rotation": 42, # The rotation in clockwise degrees from the image's original orientation.
Joe Gregorio52a5c532013-01-24 16:19:07 -05001601 "sensor": "A String", # The type of sensor used to create the photo.
1602 "whiteBalance": "A String", # The white balance mode used to create the photo.
Joe Gregoriod67010d2012-11-05 08:57:06 -05001603 "cameraModel": "A String", # The model of the camera used to create the photo.
Joe Gregorioad8013f2012-08-03 08:44:02 -04001604 },
Joe Gregorio075572b2012-07-09 16:53:09 -04001605 "embedLink": "A String", # A link for embedding the file.
Joe Gregorioad8013f2012-08-03 08:44:02 -04001606 "alternateLink": "A String", # A link for opening the file in using a relevant Google editor or viewer.
1607 "modifiedByMeDate": "A String", # Last time this file was modified by the user (formatted RFC 3339 timestamp). Note that setting modifiedDate will also update the modifiedByMe date for the user which set the date.
Joe Gregorio075572b2012-07-09 16:53:09 -04001608 "downloadUrl": "A String", # Short term download URL for the file. This will only be populated on files with content stored in Drive.
Joe Gregorio52a5c532013-01-24 16:19:07 -05001609 "userPermission": { # A single permission for a file.
Joe Gregorio075572b2012-07-09 16:53:09 -04001610 "withLink": True or False, # Whether the link is required for this permission.
1611 "kind": "drive#permission", # This is always drive#permission.
1612 "name": "A String", # The name for this permission.
1613 "value": "A String", # The email address or domain name for the entity. This is not populated in responses.
1614 "id": "A String", # The ID of the permission.
1615 "authKey": "A String", # The authkey parameter required for this permission.
1616 "etag": "A String", # The ETag of the permission.
1617 "role": "A String", # The primary role for this user. Allowed values are:
1618 # - owner
1619 # - reader
1620 # - writer
1621 "photoLink": "A String", # A link to the profile photo, if available.
1622 "type": "A String", # The account type. Allowed values are:
1623 # - user
1624 # - group
1625 # - domain
1626 # - anyone
1627 "additionalRoles": [ # Additional roles for this user. Only commenter is currently allowed.
1628 "A String",
1629 ],
1630 "selfLink": "A String", # A link back to this permission.
1631 },
Joe Gregorioad8013f2012-08-03 08:44:02 -04001632 "fileExtension": "A String", # The file extension used when downloading this file. This field is set from the title when inserting or uploading new content. This will only be populated on files with content stored in Drive.
Joe Gregorio075572b2012-07-09 16:53:09 -04001633 "selfLink": "A String", # A link back to this file.
Joe Gregorioad8013f2012-08-03 08:44:02 -04001634 "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 -04001635}
1636
1637 newRevision: boolean, Whether a blob upload should create a new revision. If false, the blob data in the current head revision will be replaced.
1638 media_body: string, The filename of the media request body, or an instance of a MediaUpload object.
Joe Gregorio075572b2012-07-09 16:53:09 -04001639 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 -05001640 ocr: boolean, Whether to attempt OCR on .jpg, .png, .gif, or .pdf uploads.
Joe Gregorio075572b2012-07-09 16:53:09 -04001641 pinned: boolean, Whether to pin the new revision.
Joe Gregorio075572b2012-07-09 16:53:09 -04001642 updateViewedDate: boolean, Whether to update the view date after successfully updating the file.
1643 timedTextTrackName: string, The timed text track name.
1644 convert: boolean, Whether to convert this file to the corresponding Google Docs format.
1645 setModifiedDate: boolean, Whether to set the modified date with the supplied modified date.
1646 timedTextLanguage: string, The language of the timed text.
1647
1648Returns:
1649 An object of the form:
1650
1651 { # The metadata for a file.
Joe Gregorioad8013f2012-08-03 08:44:02 -04001652 "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 Gregorio52a5c532013-01-24 16:19:07 -05001653 "appDataContents": True or False, # Whether this file is in the appdata folder.
Joe Gregorio075572b2012-07-09 16:53:09 -04001654 "thumbnailLink": "A String", # A link to the file's thumbnail.
1655 "labels": { # A group of labels for the file.
1656 "restricted": True or False, # Whether viewers are prevented from downloading this file.
1657 "hidden": True or False, # Whether this file is hidden from the user.
1658 "viewed": True or False, # Whether this file has been viewed by this user.
1659 "starred": True or False, # Whether this file is starred by the user.
1660 "trashed": True or False, # Whether this file has been trashed.
1661 },
1662 "indexableText": { # Indexable text attributes for the file (can only be written)
1663 "text": "A String", # The text to be indexed for this file
1664 },
Joe Gregorioad8013f2012-08-03 08:44:02 -04001665 "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 -04001666 "etag": "A String", # ETag of the file.
1667 "lastModifyingUserName": "A String", # Name of the last user to modify this file. This will only be populated if a user has edited this file.
1668 "writersCanShare": True or False, # Whether writers can share the document with other users.
1669 "id": "A String", # The id of the file.
1670 "title": "A String", # The title of this file.
1671 "ownerNames": [ # Name(s) of the owner(s) of this file.
1672 "A String",
1673 ],
1674 "sharedWithMeDate": "A String", # Time at which this file was shared with the user (formatted RFC 3339 timestamp).
Joe Gregorio52a5c532013-01-24 16:19:07 -05001675 "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 -04001676 "lastViewedByMeDate": "A String", # Last time this file was viewed by the user (formatted RFC 3339 timestamp).
1677 "parents": [ # Collection of parent folders which contain this file.
Joe Gregorioe7a0c472012-07-12 11:46:04 -04001678 # 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 -04001679 { # A reference to a file's parent.
1680 "selfLink": "A String", # A link back to this reference.
1681 "kind": "drive#parentReference", # This is always drive#parentReference.
1682 "id": "A String", # The ID of the parent.
1683 "isRoot": True or False, # Whether or not the parent is the root folder.
1684 "parentLink": "A String", # A link to the parent.
1685 },
1686 ],
1687 "exportLinks": { # Links for exporting Google Docs to specific formats.
Joe Gregoriofa08c2e2012-07-23 16:52:03 -04001688 "a_key": "A String", # A mapping from export format to URL
Joe Gregorio075572b2012-07-09 16:53:09 -04001689 },
Joe Gregorio52a5c532013-01-24 16:19:07 -05001690 "shared": True or False, # Whether the file has been shared.
Joe Gregoriod67010d2012-11-05 08:57:06 -05001691 "thumbnail": { # Thumbnail for the file. Only accepted on upload and for files that are not already thumbnailed by Google.
1692 "mimeType": "A String", # The MIME type of the thumbnail.
1693 "image": "A String", # The URL-safe Base64 encoded bytes of the thumbnail image.
1694 },
Joe Gregorioad8013f2012-08-03 08:44:02 -04001695 "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 -04001696 "description": "A String", # A short description of the file.
Joe Gregorioad8013f2012-08-03 08:44:02 -04001697 "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 -04001698 "editable": True or False, # Whether the file can be edited by the current user.
1699 "kind": "drive#file", # The type of file. This is always drive#file.
1700 "quotaBytesUsed": "A String", # The number of quota bytes used by this file.
1701 "fileSize": "A String", # The size of the file in bytes. This will only be populated on files with content stored in Drive.
1702 "createdDate": "A String", # Create time for this file (formatted ISO8601 timestamp).
1703 "md5Checksum": "A String", # An MD5 checksum for the content of this file. This will only be populated on files with content stored in Drive.
Joe Gregorio52a5c532013-01-24 16:19:07 -05001704 "iconLink": "A String", # A link to the file's icon.
Joe Gregorioad8013f2012-08-03 08:44:02 -04001705 "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 -05001706 "exposureBias": 3.14, # The exposure bias of the photo (APEX value).
Joe Gregoriod67010d2012-11-05 08:57:06 -05001707 "exposureTime": 3.14, # The length of the exposure, in seconds.
1708 "cameraMake": "A String", # The make of the camera used to create the photo.
Joe Gregorio52a5c532013-01-24 16:19:07 -05001709 "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 -05001710 "isoSpeed": 42, # The ISO speed used to create the photo.
1711 "focalLength": 3.14, # The focal length used to create the photo, in millimeters.
Joe Gregorio52a5c532013-01-24 16:19:07 -05001712 "exposureMode": "A String", # The exposure mode used to create the photo.
1713 "colorSpace": "A String", # The color space of the photo.
Joe Gregorioad8013f2012-08-03 08:44:02 -04001714 "location": { # Geographic location information stored in the image.
1715 "latitude": 3.14, # The latitude stored in the image.
1716 "altitude": 3.14, # The altitude stored in the image.
1717 "longitude": 3.14, # The longitude stored in the image.
1718 },
Joe Gregorio52a5c532013-01-24 16:19:07 -05001719 "subjectDistance": 42, # The distance to the subject of the photo, in meters.
1720 "height": 42, # The height of the image in pixels.
1721 "lens": "A String", # The lens used to create the photo.
1722 "date": "A String", # The date and time the photo was taken (EXIF format timestamp).
1723 "width": 42, # The width of the image in pixels.
1724 "meteringMode": "A String", # The metering mode used to create the photo.
1725 "flashUsed": True or False, # Whether a flash was used to create the photo.
Joe Gregoriod67010d2012-11-05 08:57:06 -05001726 "aperture": 3.14, # The aperture used to create the photo (f-number).
1727 "rotation": 42, # The rotation in clockwise degrees from the image's original orientation.
Joe Gregorio52a5c532013-01-24 16:19:07 -05001728 "sensor": "A String", # The type of sensor used to create the photo.
1729 "whiteBalance": "A String", # The white balance mode used to create the photo.
Joe Gregoriod67010d2012-11-05 08:57:06 -05001730 "cameraModel": "A String", # The model of the camera used to create the photo.
Joe Gregorioad8013f2012-08-03 08:44:02 -04001731 },
Joe Gregorio075572b2012-07-09 16:53:09 -04001732 "embedLink": "A String", # A link for embedding the file.
Joe Gregorioad8013f2012-08-03 08:44:02 -04001733 "alternateLink": "A String", # A link for opening the file in using a relevant Google editor or viewer.
1734 "modifiedByMeDate": "A String", # Last time this file was modified by the user (formatted RFC 3339 timestamp). Note that setting modifiedDate will also update the modifiedByMe date for the user which set the date.
Joe Gregorio075572b2012-07-09 16:53:09 -04001735 "downloadUrl": "A String", # Short term download URL for the file. This will only be populated on files with content stored in Drive.
Joe Gregorio52a5c532013-01-24 16:19:07 -05001736 "userPermission": { # A single permission for a file.
Joe Gregorio075572b2012-07-09 16:53:09 -04001737 "withLink": True or False, # Whether the link is required for this permission.
1738 "kind": "drive#permission", # This is always drive#permission.
1739 "name": "A String", # The name for this permission.
1740 "value": "A String", # The email address or domain name for the entity. This is not populated in responses.
1741 "id": "A String", # The ID of the permission.
1742 "authKey": "A String", # The authkey parameter required for this permission.
1743 "etag": "A String", # The ETag of the permission.
1744 "role": "A String", # The primary role for this user. Allowed values are:
1745 # - owner
1746 # - reader
1747 # - writer
1748 "photoLink": "A String", # A link to the profile photo, if available.
1749 "type": "A String", # The account type. Allowed values are:
1750 # - user
1751 # - group
1752 # - domain
1753 # - anyone
1754 "additionalRoles": [ # Additional roles for this user. Only commenter is currently allowed.
1755 "A String",
1756 ],
1757 "selfLink": "A String", # A link back to this permission.
1758 },
Joe Gregorioad8013f2012-08-03 08:44:02 -04001759 "fileExtension": "A String", # The file extension used when downloading this file. This field is set from the title when inserting or uploading new content. This will only be populated on files with content stored in Drive.
Joe Gregorio075572b2012-07-09 16:53:09 -04001760 "selfLink": "A String", # A link back to this file.
Joe Gregorioad8013f2012-08-03 08:44:02 -04001761 "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 -04001762 }</pre>
1763</div>
1764
1765</body></html>