John Asmuth | 614db98 | 2014-04-24 15:46:26 -0400 | [diff] [blame] | 1 | <html><body> |
| 2 | <style> |
| 3 | |
| 4 | body, 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 | |
| 15 | body { |
| 16 | font-size: 13px; |
| 17 | padding: 1em; |
| 18 | } |
| 19 | |
| 20 | h1 { |
| 21 | font-size: 26px; |
| 22 | margin-bottom: 1em; |
| 23 | } |
| 24 | |
| 25 | h2 { |
| 26 | font-size: 24px; |
| 27 | margin-bottom: 1em; |
| 28 | } |
| 29 | |
| 30 | h3 { |
| 31 | font-size: 20px; |
| 32 | margin-bottom: 1em; |
| 33 | margin-top: 1em; |
| 34 | } |
| 35 | |
| 36 | pre, code { |
| 37 | line-height: 1.5; |
| 38 | font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace; |
| 39 | } |
| 40 | |
| 41 | pre { |
| 42 | margin-top: 0.5em; |
| 43 | } |
| 44 | |
| 45 | h1, h2, h3, p { |
| 46 | font-family: Arial, sans serif; |
| 47 | } |
| 48 | |
| 49 | h1, 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"> |
| 78 | <code><a href="#copy">copy(fileId, body, pinned=None, convert=None, visibility=None, ocrLanguage=None, ocr=None, timedTextLanguage=None, timedTextTrackName=None)</a></code></p> |
| 79 | <p class="firstline">Creates a copy of the specified file.</p> |
| 80 | <p class="toc_element"> |
| 81 | <code><a href="#delete">delete(fileId)</a></code></p> |
| 82 | <p class="firstline">Permanently deletes a file by ID. Skips the trash.</p> |
| 83 | <p class="toc_element"> |
| 84 | <code><a href="#get">get(fileId, projection=None, updateViewedDate=None)</a></code></p> |
| 85 | <p class="firstline">Gets a file's metadata by ID.</p> |
| 86 | <p class="toc_element"> |
| 87 | <code><a href="#insert">insert(body=None, media_body=None, convert=None, useContentAsIndexableText=None, visibility=None, ocrLanguage=None, ocr=None, timedTextLanguage=None, timedTextTrackName=None, pinned=None)</a></code></p> |
| 88 | <p class="firstline">Insert a new file.</p> |
| 89 | <p class="toc_element"> |
| 90 | <code><a href="#list">list(q=None, projection=None, pageToken=None, maxResults=None)</a></code></p> |
| 91 | <p class="firstline">Lists the user's files.</p> |
| 92 | <p class="toc_element"> |
| 93 | <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p> |
| 94 | <p class="firstline">Retrieves the next page of results.</p> |
| 95 | <p class="toc_element"> |
| 96 | <code><a href="#patch">patch(fileId, body, newRevision=None, pinned=None, ocrLanguage=None, ocr=None, updateViewedDate=None, timedTextTrackName=None, convert=None, useContentAsIndexableText=None, setModifiedDate=None, timedTextLanguage=None)</a></code></p> |
| 97 | <p class="firstline">Updates file metadata and/or content. This method supports patch semantics.</p> |
| 98 | <p class="toc_element"> |
| 99 | <code><a href="#touch">touch(fileId)</a></code></p> |
| 100 | <p class="firstline">Set the file's updated time to the current server time.</p> |
| 101 | <p class="toc_element"> |
| 102 | <code><a href="#trash">trash(fileId)</a></code></p> |
| 103 | <p class="firstline">Moves a file to the trash.</p> |
| 104 | <p class="toc_element"> |
| 105 | <code><a href="#untrash">untrash(fileId)</a></code></p> |
| 106 | <p class="firstline">Restores a file from the trash.</p> |
| 107 | <p class="toc_element"> |
| 108 | <code><a href="#update">update(fileId, body=None, newRevision=None, media_body=None, ocrLanguage=None, ocr=None, pinned=None, updateViewedDate=None, timedTextTrackName=None, convert=None, useContentAsIndexableText=None, setModifiedDate=None, timedTextLanguage=None)</a></code></p> |
| 109 | <p class="firstline">Updates file metadata and/or content.</p> |
| 110 | <p class="toc_element"> |
| 111 | <code><a href="#watch">watch(fileId, body, projection=None, updateViewedDate=None)</a></code></p> |
| 112 | <p class="firstline">Subscribe to changes on a file</p> |
| 113 | <h3>Method Details</h3> |
| 114 | <div class="method"> |
| 115 | <code class="details" id="copy">copy(fileId, body, pinned=None, convert=None, visibility=None, ocrLanguage=None, ocr=None, timedTextLanguage=None, timedTextTrackName=None)</code> |
| 116 | <pre>Creates a copy of the specified file. |
| 117 | |
| 118 | Args: |
| 119 | fileId: string, The ID of the file to copy. (required) |
| 120 | body: object, The request body. (required) |
| 121 | The object takes the form of: |
| 122 | |
| 123 | { # The metadata for a file. |
| 124 | "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. |
| 125 | "lastViewedByMeDate": "A String", # Last time this file was viewed by the user (formatted RFC 3339 timestamp). |
| 126 | "appDataContents": True or False, # Whether this file is in the appdata folder. |
| 127 | "thumbnailLink": "A String", # A link to the file's thumbnail. |
| 128 | "labels": { # A group of labels for the file. |
| 129 | "restricted": True or False, # Whether viewers are prevented from downloading this file. |
| 130 | "hidden": True or False, # Deprecated. |
| 131 | "viewed": True or False, # Whether this file has been viewed by this user. |
| 132 | "starred": True or False, # Whether this file is starred by the user. |
| 133 | "trashed": True or False, # Whether this file has been trashed. |
| 134 | }, |
| 135 | "indexableText": { # Indexable text attributes for the file (can only be written) |
| 136 | "text": "A String", # The text to be indexed for this file. |
| 137 | }, |
| 138 | "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. |
| 139 | "lastModifyingUserName": "A String", # Name of the last user to modify this file. |
| 140 | "writersCanShare": True or False, # Whether writers can share the document with other users. |
| 141 | "owners": [ # The owner(s) of this file. |
| 142 | { # The JSON template for a user. |
| 143 | "picture": { # The user's profile picture. |
| 144 | "url": "A String", # A URL that points to a profile picture of this user. |
| 145 | }, |
| 146 | "kind": "drive#user", # This is always drive#user. |
| 147 | "isAuthenticatedUser": True or False, # Whether this user is the same as the authenticated user for whom the request was made. |
| 148 | "displayName": "A String", # A plain text displayable name for this user. |
| 149 | "permissionId": "A String", # The user's ID as visible in the permissions collection. |
| 150 | }, |
| 151 | ], |
| 152 | "id": "A String", # The ID of the file. |
| 153 | "lastModifyingUser": { # The JSON template for a user. # The last user to modify this file. |
| 154 | "picture": { # The user's profile picture. |
| 155 | "url": "A String", # A URL that points to a profile picture of this user. |
| 156 | }, |
| 157 | "kind": "drive#user", # This is always drive#user. |
| 158 | "isAuthenticatedUser": True or False, # Whether this user is the same as the authenticated user for whom the request was made. |
| 159 | "displayName": "A String", # A plain text displayable name for this user. |
| 160 | "permissionId": "A String", # The user's ID as visible in the permissions collection. |
| 161 | }, |
| 162 | "copyable": True or False, # Whether the file can be copied by the current user. |
| 163 | "ownerNames": [ # Name(s) of the owner(s) of this file. |
| 164 | "A String", |
| 165 | ], |
| 166 | "sharedWithMeDate": "A String", # Time at which this file was shared with the user (formatted RFC 3339 timestamp). |
| 167 | "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. |
| 168 | "etag": "A String", # ETag of the file. |
| 169 | "parents": [ # Collection of parent folders which contain this file. |
| 170 | # 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. |
| 171 | { # A reference to a file's parent. |
| 172 | "selfLink": "A String", # A link back to this reference. |
| 173 | "kind": "drive#parentReference", # This is always drive#parentReference. |
| 174 | "id": "A String", # The ID of the parent. |
| 175 | "isRoot": True or False, # Whether or not the parent is the root folder. |
| 176 | "parentLink": "A String", # A link to the parent. |
| 177 | }, |
| 178 | ], |
| 179 | "exportLinks": { # Links for exporting Google Docs to specific formats. |
| 180 | "a_key": "A String", # A mapping from export format to URL |
| 181 | }, |
| 182 | "shared": True or False, # Whether the file has been shared. |
| 183 | "thumbnail": { # Thumbnail for the file. Only accepted on upload and for files that are not already thumbnailed by Google. |
| 184 | "mimeType": "A String", # The MIME type of the thumbnail. |
| 185 | "image": "A String", # The URL-safe Base64 encoded bytes of the thumbnail image. |
| 186 | }, |
| 187 | "openWithLinks": { # A map of the id of each of the user's apps to a link to open this file with that app. Only populated when the drive.apps.readonly scope is used. |
| 188 | "a_key": "A String", |
| 189 | }, |
| 190 | "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. |
| 191 | "exposureBias": 3.14, # The exposure bias of the photo (APEX value). |
| 192 | "exposureTime": 3.14, # The length of the exposure, in seconds. |
| 193 | "cameraMake": "A String", # The make of the camera used to create the photo. |
| 194 | "maxApertureValue": 3.14, # The smallest f-number of the lens at the focal length used to create the photo (APEX value). |
| 195 | "isoSpeed": 42, # The ISO speed used to create the photo. |
| 196 | "focalLength": 3.14, # The focal length used to create the photo, in millimeters. |
| 197 | "exposureMode": "A String", # The exposure mode used to create the photo. |
| 198 | "colorSpace": "A String", # The color space of the photo. |
| 199 | "location": { # Geographic location information stored in the image. |
| 200 | "latitude": 3.14, # The latitude stored in the image. |
| 201 | "altitude": 3.14, # The altitude stored in the image. |
| 202 | "longitude": 3.14, # The longitude stored in the image. |
| 203 | }, |
| 204 | "subjectDistance": 42, # The distance to the subject of the photo, in meters. |
| 205 | "height": 42, # The height of the image in pixels. |
| 206 | "lens": "A String", # The lens used to create the photo. |
| 207 | "date": "A String", # The date and time the photo was taken (EXIF format timestamp). |
| 208 | "width": 42, # The width of the image in pixels. |
| 209 | "meteringMode": "A String", # The metering mode used to create the photo. |
| 210 | "flashUsed": True or False, # Whether a flash was used to create the photo. |
| 211 | "aperture": 3.14, # The aperture used to create the photo (f-number). |
| 212 | "rotation": 42, # The rotation in clockwise degrees from the image's original orientation. |
| 213 | "sensor": "A String", # The type of sensor used to create the photo. |
| 214 | "whiteBalance": "A String", # The white balance mode used to create the photo. |
| 215 | "cameraModel": "A String", # The model of the camera used to create the photo. |
| 216 | }, |
| 217 | "description": "A String", # A short description of the file. |
| 218 | "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. |
| 219 | "editable": True or False, # Whether the file can be edited by the current user. |
| 220 | "kind": "drive#file", # The type of file. This is always drive#file. |
| 221 | "quotaBytesUsed": "A String", # The number of quota bytes used by this file. |
| 222 | "fileSize": "A String", # The size of the file in bytes. This is only populated for files with content stored in Drive. |
| 223 | "createdDate": "A String", # Create time for this file (formatted ISO8601 timestamp). |
| 224 | "properties": [ # The list of properties. |
| 225 | { # A key-value pair that is either public or private to an application. |
| 226 | "kind": "drive#property", # This is always drive#property. |
| 227 | "value": "A String", # The value of this property. |
| 228 | "etag": "A String", # ETag of the property. |
| 229 | "visibility": "A String", # The visibility of this property. |
| 230 | "key": "A String", # The key of this property. |
| 231 | "selfLink": "A String", # The link back to this property. |
| 232 | }, |
| 233 | ], |
| 234 | "md5Checksum": "A String", # An MD5 checksum for the content of this file. This is populated only for files with content stored in Drive. |
| 235 | "iconLink": "A String", # A link to the file's icon. |
| 236 | "defaultOpenWithLink": "A String", # A link to open this file with the user's default app for this file. Only populated when the drive.apps.readonly scope is used. |
| 237 | "embedLink": "A String", # A link for embedding the file. |
| 238 | "alternateLink": "A String", # A link for opening the file in using a relevant Google editor or viewer. |
| 239 | "title": "A String", # The title of this file. |
| 240 | "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. |
| 241 | "downloadUrl": "A String", # Short lived download URL for the file. This is only populated for files with content stored in Drive. |
| 242 | "userPermission": { # A permission for a file. # The permissions for the authenticated user on this file. |
| 243 | "withLink": True or False, # Whether the link is required for this permission. |
| 244 | "domain": "A String", # The domain name of the entity this permission refers to. This is an output-only field which is populated when the permission type is "user", "group" or "domain". |
| 245 | "name": "A String", # The name for this permission. |
| 246 | "kind": "drive#permission", # This is always drive#permission. |
| 247 | "value": "A String", # The email address or domain name for the entity. This is used during inserts and is not populated in responses. When making a drive.permissions.insert request, exactly one of 'id' or 'value' fields must be specified. |
| 248 | "id": "A String", # The ID of the user this permission refers to, and identical to the permissionId in the About and Files resources. When making a drive.permissions.insert request, exactly one of 'id' or 'value' fields must be specified. |
| 249 | "authKey": "A String", # The authkey parameter required for this permission. |
| 250 | "etag": "A String", # The ETag of the permission. |
| 251 | "emailAddress": "A String", # The email address of the user this permission refers to. This is an output-only field which is populated when the permission type is "user" and the given user's Google+ profile privacy settings allow exposing their email address. |
| 252 | "photoLink": "A String", # A link to the profile photo, if available. |
| 253 | "role": "A String", # The primary role for this user. Allowed values are: |
| 254 | # - owner |
| 255 | # - reader |
| 256 | # - writer |
| 257 | "type": "A String", # The account type. Allowed values are: |
| 258 | # - user |
| 259 | # - group |
| 260 | # - domain |
| 261 | # - anyone |
| 262 | "additionalRoles": [ # Additional roles for this user. Only commenter is currently allowed. |
| 263 | "A String", |
| 264 | ], |
| 265 | "selfLink": "A String", # A link back to this permission. |
| 266 | }, |
| 267 | "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. |
| 268 | "fileExtension": "A String", # The file extension used when downloading this file. This field is read only. To set the extension, include it in the title when creating the file. This is only populated for files with content stored in Drive. |
| 269 | "headRevisionId": "A String", # The ID of the file's head revision. This will only be populated for files with content stored in Drive. |
| 270 | "selfLink": "A String", # A link back to this file. |
| 271 | "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. |
| 272 | } |
| 273 | |
| 274 | pinned: boolean, Whether to pin the head revision of the new copy. |
| 275 | convert: boolean, Whether to convert this file to the corresponding Google Docs format. |
| 276 | visibility: string, The visibility of the new file. This parameter is only relevant when the source is not a native Google Doc and convert=false. |
| 277 | Allowed values |
| 278 | DEFAULT - The visibility of the new file is determined by the user's default visibility/sharing policies. |
| 279 | PRIVATE - The new file will be visible to only the owner. |
| 280 | ocrLanguage: string, If ocr is true, hints at the language to use. Valid values are ISO 639-1 codes. |
| 281 | ocr: boolean, Whether to attempt OCR on .jpg, .png, .gif, or .pdf uploads. |
| 282 | timedTextLanguage: string, The language of the timed text. |
| 283 | timedTextTrackName: string, The timed text track name. |
| 284 | |
| 285 | Returns: |
| 286 | An object of the form: |
| 287 | |
| 288 | { # The metadata for a file. |
| 289 | "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. |
| 290 | "lastViewedByMeDate": "A String", # Last time this file was viewed by the user (formatted RFC 3339 timestamp). |
| 291 | "appDataContents": True or False, # Whether this file is in the appdata folder. |
| 292 | "thumbnailLink": "A String", # A link to the file's thumbnail. |
| 293 | "labels": { # A group of labels for the file. |
| 294 | "restricted": True or False, # Whether viewers are prevented from downloading this file. |
| 295 | "hidden": True or False, # Deprecated. |
| 296 | "viewed": True or False, # Whether this file has been viewed by this user. |
| 297 | "starred": True or False, # Whether this file is starred by the user. |
| 298 | "trashed": True or False, # Whether this file has been trashed. |
| 299 | }, |
| 300 | "indexableText": { # Indexable text attributes for the file (can only be written) |
| 301 | "text": "A String", # The text to be indexed for this file. |
| 302 | }, |
| 303 | "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. |
| 304 | "lastModifyingUserName": "A String", # Name of the last user to modify this file. |
| 305 | "writersCanShare": True or False, # Whether writers can share the document with other users. |
| 306 | "owners": [ # The owner(s) of this file. |
| 307 | { # The JSON template for a user. |
| 308 | "picture": { # The user's profile picture. |
| 309 | "url": "A String", # A URL that points to a profile picture of this user. |
| 310 | }, |
| 311 | "kind": "drive#user", # This is always drive#user. |
| 312 | "isAuthenticatedUser": True or False, # Whether this user is the same as the authenticated user for whom the request was made. |
| 313 | "displayName": "A String", # A plain text displayable name for this user. |
| 314 | "permissionId": "A String", # The user's ID as visible in the permissions collection. |
| 315 | }, |
| 316 | ], |
| 317 | "id": "A String", # The ID of the file. |
| 318 | "lastModifyingUser": { # The JSON template for a user. # The last user to modify this file. |
| 319 | "picture": { # The user's profile picture. |
| 320 | "url": "A String", # A URL that points to a profile picture of this user. |
| 321 | }, |
| 322 | "kind": "drive#user", # This is always drive#user. |
| 323 | "isAuthenticatedUser": True or False, # Whether this user is the same as the authenticated user for whom the request was made. |
| 324 | "displayName": "A String", # A plain text displayable name for this user. |
| 325 | "permissionId": "A String", # The user's ID as visible in the permissions collection. |
| 326 | }, |
| 327 | "copyable": True or False, # Whether the file can be copied by the current user. |
| 328 | "ownerNames": [ # Name(s) of the owner(s) of this file. |
| 329 | "A String", |
| 330 | ], |
| 331 | "sharedWithMeDate": "A String", # Time at which this file was shared with the user (formatted RFC 3339 timestamp). |
| 332 | "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. |
| 333 | "etag": "A String", # ETag of the file. |
| 334 | "parents": [ # Collection of parent folders which contain this file. |
| 335 | # 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. |
| 336 | { # A reference to a file's parent. |
| 337 | "selfLink": "A String", # A link back to this reference. |
| 338 | "kind": "drive#parentReference", # This is always drive#parentReference. |
| 339 | "id": "A String", # The ID of the parent. |
| 340 | "isRoot": True or False, # Whether or not the parent is the root folder. |
| 341 | "parentLink": "A String", # A link to the parent. |
| 342 | }, |
| 343 | ], |
| 344 | "exportLinks": { # Links for exporting Google Docs to specific formats. |
| 345 | "a_key": "A String", # A mapping from export format to URL |
| 346 | }, |
| 347 | "shared": True or False, # Whether the file has been shared. |
| 348 | "thumbnail": { # Thumbnail for the file. Only accepted on upload and for files that are not already thumbnailed by Google. |
| 349 | "mimeType": "A String", # The MIME type of the thumbnail. |
| 350 | "image": "A String", # The URL-safe Base64 encoded bytes of the thumbnail image. |
| 351 | }, |
| 352 | "openWithLinks": { # A map of the id of each of the user's apps to a link to open this file with that app. Only populated when the drive.apps.readonly scope is used. |
| 353 | "a_key": "A String", |
| 354 | }, |
| 355 | "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. |
| 356 | "exposureBias": 3.14, # The exposure bias of the photo (APEX value). |
| 357 | "exposureTime": 3.14, # The length of the exposure, in seconds. |
| 358 | "cameraMake": "A String", # The make of the camera used to create the photo. |
| 359 | "maxApertureValue": 3.14, # The smallest f-number of the lens at the focal length used to create the photo (APEX value). |
| 360 | "isoSpeed": 42, # The ISO speed used to create the photo. |
| 361 | "focalLength": 3.14, # The focal length used to create the photo, in millimeters. |
| 362 | "exposureMode": "A String", # The exposure mode used to create the photo. |
| 363 | "colorSpace": "A String", # The color space of the photo. |
| 364 | "location": { # Geographic location information stored in the image. |
| 365 | "latitude": 3.14, # The latitude stored in the image. |
| 366 | "altitude": 3.14, # The altitude stored in the image. |
| 367 | "longitude": 3.14, # The longitude stored in the image. |
| 368 | }, |
| 369 | "subjectDistance": 42, # The distance to the subject of the photo, in meters. |
| 370 | "height": 42, # The height of the image in pixels. |
| 371 | "lens": "A String", # The lens used to create the photo. |
| 372 | "date": "A String", # The date and time the photo was taken (EXIF format timestamp). |
| 373 | "width": 42, # The width of the image in pixels. |
| 374 | "meteringMode": "A String", # The metering mode used to create the photo. |
| 375 | "flashUsed": True or False, # Whether a flash was used to create the photo. |
| 376 | "aperture": 3.14, # The aperture used to create the photo (f-number). |
| 377 | "rotation": 42, # The rotation in clockwise degrees from the image's original orientation. |
| 378 | "sensor": "A String", # The type of sensor used to create the photo. |
| 379 | "whiteBalance": "A String", # The white balance mode used to create the photo. |
| 380 | "cameraModel": "A String", # The model of the camera used to create the photo. |
| 381 | }, |
| 382 | "description": "A String", # A short description of the file. |
| 383 | "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. |
| 384 | "editable": True or False, # Whether the file can be edited by the current user. |
| 385 | "kind": "drive#file", # The type of file. This is always drive#file. |
| 386 | "quotaBytesUsed": "A String", # The number of quota bytes used by this file. |
| 387 | "fileSize": "A String", # The size of the file in bytes. This is only populated for files with content stored in Drive. |
| 388 | "createdDate": "A String", # Create time for this file (formatted ISO8601 timestamp). |
| 389 | "properties": [ # The list of properties. |
| 390 | { # A key-value pair that is either public or private to an application. |
| 391 | "kind": "drive#property", # This is always drive#property. |
| 392 | "value": "A String", # The value of this property. |
| 393 | "etag": "A String", # ETag of the property. |
| 394 | "visibility": "A String", # The visibility of this property. |
| 395 | "key": "A String", # The key of this property. |
| 396 | "selfLink": "A String", # The link back to this property. |
| 397 | }, |
| 398 | ], |
| 399 | "md5Checksum": "A String", # An MD5 checksum for the content of this file. This is populated only for files with content stored in Drive. |
| 400 | "iconLink": "A String", # A link to the file's icon. |
| 401 | "defaultOpenWithLink": "A String", # A link to open this file with the user's default app for this file. Only populated when the drive.apps.readonly scope is used. |
| 402 | "embedLink": "A String", # A link for embedding the file. |
| 403 | "alternateLink": "A String", # A link for opening the file in using a relevant Google editor or viewer. |
| 404 | "title": "A String", # The title of this file. |
| 405 | "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. |
| 406 | "downloadUrl": "A String", # Short lived download URL for the file. This is only populated for files with content stored in Drive. |
| 407 | "userPermission": { # A permission for a file. # The permissions for the authenticated user on this file. |
| 408 | "withLink": True or False, # Whether the link is required for this permission. |
| 409 | "domain": "A String", # The domain name of the entity this permission refers to. This is an output-only field which is populated when the permission type is "user", "group" or "domain". |
| 410 | "name": "A String", # The name for this permission. |
| 411 | "kind": "drive#permission", # This is always drive#permission. |
| 412 | "value": "A String", # The email address or domain name for the entity. This is used during inserts and is not populated in responses. When making a drive.permissions.insert request, exactly one of 'id' or 'value' fields must be specified. |
| 413 | "id": "A String", # The ID of the user this permission refers to, and identical to the permissionId in the About and Files resources. When making a drive.permissions.insert request, exactly one of 'id' or 'value' fields must be specified. |
| 414 | "authKey": "A String", # The authkey parameter required for this permission. |
| 415 | "etag": "A String", # The ETag of the permission. |
| 416 | "emailAddress": "A String", # The email address of the user this permission refers to. This is an output-only field which is populated when the permission type is "user" and the given user's Google+ profile privacy settings allow exposing their email address. |
| 417 | "photoLink": "A String", # A link to the profile photo, if available. |
| 418 | "role": "A String", # The primary role for this user. Allowed values are: |
| 419 | # - owner |
| 420 | # - reader |
| 421 | # - writer |
| 422 | "type": "A String", # The account type. Allowed values are: |
| 423 | # - user |
| 424 | # - group |
| 425 | # - domain |
| 426 | # - anyone |
| 427 | "additionalRoles": [ # Additional roles for this user. Only commenter is currently allowed. |
| 428 | "A String", |
| 429 | ], |
| 430 | "selfLink": "A String", # A link back to this permission. |
| 431 | }, |
| 432 | "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. |
| 433 | "fileExtension": "A String", # The file extension used when downloading this file. This field is read only. To set the extension, include it in the title when creating the file. This is only populated for files with content stored in Drive. |
| 434 | "headRevisionId": "A String", # The ID of the file's head revision. This will only be populated for files with content stored in Drive. |
| 435 | "selfLink": "A String", # A link back to this file. |
| 436 | "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. |
| 437 | }</pre> |
| 438 | </div> |
| 439 | |
| 440 | <div class="method"> |
| 441 | <code class="details" id="delete">delete(fileId)</code> |
| 442 | <pre>Permanently deletes a file by ID. Skips the trash. |
| 443 | |
| 444 | Args: |
| 445 | fileId: string, The ID of the file to delete. (required) |
| 446 | </pre> |
| 447 | </div> |
| 448 | |
| 449 | <div class="method"> |
| 450 | <code class="details" id="get">get(fileId, projection=None, updateViewedDate=None)</code> |
| 451 | <pre>Gets a file's metadata by ID. |
| 452 | |
| 453 | Args: |
| 454 | fileId: string, The ID for the file in question. (required) |
| 455 | projection: string, This parameter is deprecated and has no function. |
| 456 | Allowed values |
| 457 | BASIC - Deprecated |
| 458 | FULL - Deprecated |
| 459 | updateViewedDate: boolean, Whether to update the view date after successfully retrieving the file. |
| 460 | |
| 461 | Returns: |
| 462 | An object of the form: |
| 463 | |
| 464 | { # The metadata for a file. |
| 465 | "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. |
| 466 | "lastViewedByMeDate": "A String", # Last time this file was viewed by the user (formatted RFC 3339 timestamp). |
| 467 | "appDataContents": True or False, # Whether this file is in the appdata folder. |
| 468 | "thumbnailLink": "A String", # A link to the file's thumbnail. |
| 469 | "labels": { # A group of labels for the file. |
| 470 | "restricted": True or False, # Whether viewers are prevented from downloading this file. |
| 471 | "hidden": True or False, # Deprecated. |
| 472 | "viewed": True or False, # Whether this file has been viewed by this user. |
| 473 | "starred": True or False, # Whether this file is starred by the user. |
| 474 | "trashed": True or False, # Whether this file has been trashed. |
| 475 | }, |
| 476 | "indexableText": { # Indexable text attributes for the file (can only be written) |
| 477 | "text": "A String", # The text to be indexed for this file. |
| 478 | }, |
| 479 | "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. |
| 480 | "lastModifyingUserName": "A String", # Name of the last user to modify this file. |
| 481 | "writersCanShare": True or False, # Whether writers can share the document with other users. |
| 482 | "owners": [ # The owner(s) of this file. |
| 483 | { # The JSON template for a user. |
| 484 | "picture": { # The user's profile picture. |
| 485 | "url": "A String", # A URL that points to a profile picture of this user. |
| 486 | }, |
| 487 | "kind": "drive#user", # This is always drive#user. |
| 488 | "isAuthenticatedUser": True or False, # Whether this user is the same as the authenticated user for whom the request was made. |
| 489 | "displayName": "A String", # A plain text displayable name for this user. |
| 490 | "permissionId": "A String", # The user's ID as visible in the permissions collection. |
| 491 | }, |
| 492 | ], |
| 493 | "id": "A String", # The ID of the file. |
| 494 | "lastModifyingUser": { # The JSON template for a user. # The last user to modify this file. |
| 495 | "picture": { # The user's profile picture. |
| 496 | "url": "A String", # A URL that points to a profile picture of this user. |
| 497 | }, |
| 498 | "kind": "drive#user", # This is always drive#user. |
| 499 | "isAuthenticatedUser": True or False, # Whether this user is the same as the authenticated user for whom the request was made. |
| 500 | "displayName": "A String", # A plain text displayable name for this user. |
| 501 | "permissionId": "A String", # The user's ID as visible in the permissions collection. |
| 502 | }, |
| 503 | "copyable": True or False, # Whether the file can be copied by the current user. |
| 504 | "ownerNames": [ # Name(s) of the owner(s) of this file. |
| 505 | "A String", |
| 506 | ], |
| 507 | "sharedWithMeDate": "A String", # Time at which this file was shared with the user (formatted RFC 3339 timestamp). |
| 508 | "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. |
| 509 | "etag": "A String", # ETag of the file. |
| 510 | "parents": [ # Collection of parent folders which contain this file. |
| 511 | # 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. |
| 512 | { # A reference to a file's parent. |
| 513 | "selfLink": "A String", # A link back to this reference. |
| 514 | "kind": "drive#parentReference", # This is always drive#parentReference. |
| 515 | "id": "A String", # The ID of the parent. |
| 516 | "isRoot": True or False, # Whether or not the parent is the root folder. |
| 517 | "parentLink": "A String", # A link to the parent. |
| 518 | }, |
| 519 | ], |
| 520 | "exportLinks": { # Links for exporting Google Docs to specific formats. |
| 521 | "a_key": "A String", # A mapping from export format to URL |
| 522 | }, |
| 523 | "shared": True or False, # Whether the file has been shared. |
| 524 | "thumbnail": { # Thumbnail for the file. Only accepted on upload and for files that are not already thumbnailed by Google. |
| 525 | "mimeType": "A String", # The MIME type of the thumbnail. |
| 526 | "image": "A String", # The URL-safe Base64 encoded bytes of the thumbnail image. |
| 527 | }, |
| 528 | "openWithLinks": { # A map of the id of each of the user's apps to a link to open this file with that app. Only populated when the drive.apps.readonly scope is used. |
| 529 | "a_key": "A String", |
| 530 | }, |
| 531 | "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. |
| 532 | "exposureBias": 3.14, # The exposure bias of the photo (APEX value). |
| 533 | "exposureTime": 3.14, # The length of the exposure, in seconds. |
| 534 | "cameraMake": "A String", # The make of the camera used to create the photo. |
| 535 | "maxApertureValue": 3.14, # The smallest f-number of the lens at the focal length used to create the photo (APEX value). |
| 536 | "isoSpeed": 42, # The ISO speed used to create the photo. |
| 537 | "focalLength": 3.14, # The focal length used to create the photo, in millimeters. |
| 538 | "exposureMode": "A String", # The exposure mode used to create the photo. |
| 539 | "colorSpace": "A String", # The color space of the photo. |
| 540 | "location": { # Geographic location information stored in the image. |
| 541 | "latitude": 3.14, # The latitude stored in the image. |
| 542 | "altitude": 3.14, # The altitude stored in the image. |
| 543 | "longitude": 3.14, # The longitude stored in the image. |
| 544 | }, |
| 545 | "subjectDistance": 42, # The distance to the subject of the photo, in meters. |
| 546 | "height": 42, # The height of the image in pixels. |
| 547 | "lens": "A String", # The lens used to create the photo. |
| 548 | "date": "A String", # The date and time the photo was taken (EXIF format timestamp). |
| 549 | "width": 42, # The width of the image in pixels. |
| 550 | "meteringMode": "A String", # The metering mode used to create the photo. |
| 551 | "flashUsed": True or False, # Whether a flash was used to create the photo. |
| 552 | "aperture": 3.14, # The aperture used to create the photo (f-number). |
| 553 | "rotation": 42, # The rotation in clockwise degrees from the image's original orientation. |
| 554 | "sensor": "A String", # The type of sensor used to create the photo. |
| 555 | "whiteBalance": "A String", # The white balance mode used to create the photo. |
| 556 | "cameraModel": "A String", # The model of the camera used to create the photo. |
| 557 | }, |
| 558 | "description": "A String", # A short description of the file. |
| 559 | "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. |
| 560 | "editable": True or False, # Whether the file can be edited by the current user. |
| 561 | "kind": "drive#file", # The type of file. This is always drive#file. |
| 562 | "quotaBytesUsed": "A String", # The number of quota bytes used by this file. |
| 563 | "fileSize": "A String", # The size of the file in bytes. This is only populated for files with content stored in Drive. |
| 564 | "createdDate": "A String", # Create time for this file (formatted ISO8601 timestamp). |
| 565 | "properties": [ # The list of properties. |
| 566 | { # A key-value pair that is either public or private to an application. |
| 567 | "kind": "drive#property", # This is always drive#property. |
| 568 | "value": "A String", # The value of this property. |
| 569 | "etag": "A String", # ETag of the property. |
| 570 | "visibility": "A String", # The visibility of this property. |
| 571 | "key": "A String", # The key of this property. |
| 572 | "selfLink": "A String", # The link back to this property. |
| 573 | }, |
| 574 | ], |
| 575 | "md5Checksum": "A String", # An MD5 checksum for the content of this file. This is populated only for files with content stored in Drive. |
| 576 | "iconLink": "A String", # A link to the file's icon. |
| 577 | "defaultOpenWithLink": "A String", # A link to open this file with the user's default app for this file. Only populated when the drive.apps.readonly scope is used. |
| 578 | "embedLink": "A String", # A link for embedding the file. |
| 579 | "alternateLink": "A String", # A link for opening the file in using a relevant Google editor or viewer. |
| 580 | "title": "A String", # The title of this file. |
| 581 | "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. |
| 582 | "downloadUrl": "A String", # Short lived download URL for the file. This is only populated for files with content stored in Drive. |
| 583 | "userPermission": { # A permission for a file. # The permissions for the authenticated user on this file. |
| 584 | "withLink": True or False, # Whether the link is required for this permission. |
| 585 | "domain": "A String", # The domain name of the entity this permission refers to. This is an output-only field which is populated when the permission type is "user", "group" or "domain". |
| 586 | "name": "A String", # The name for this permission. |
| 587 | "kind": "drive#permission", # This is always drive#permission. |
| 588 | "value": "A String", # The email address or domain name for the entity. This is used during inserts and is not populated in responses. When making a drive.permissions.insert request, exactly one of 'id' or 'value' fields must be specified. |
| 589 | "id": "A String", # The ID of the user this permission refers to, and identical to the permissionId in the About and Files resources. When making a drive.permissions.insert request, exactly one of 'id' or 'value' fields must be specified. |
| 590 | "authKey": "A String", # The authkey parameter required for this permission. |
| 591 | "etag": "A String", # The ETag of the permission. |
| 592 | "emailAddress": "A String", # The email address of the user this permission refers to. This is an output-only field which is populated when the permission type is "user" and the given user's Google+ profile privacy settings allow exposing their email address. |
| 593 | "photoLink": "A String", # A link to the profile photo, if available. |
| 594 | "role": "A String", # The primary role for this user. Allowed values are: |
| 595 | # - owner |
| 596 | # - reader |
| 597 | # - writer |
| 598 | "type": "A String", # The account type. Allowed values are: |
| 599 | # - user |
| 600 | # - group |
| 601 | # - domain |
| 602 | # - anyone |
| 603 | "additionalRoles": [ # Additional roles for this user. Only commenter is currently allowed. |
| 604 | "A String", |
| 605 | ], |
| 606 | "selfLink": "A String", # A link back to this permission. |
| 607 | }, |
| 608 | "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. |
| 609 | "fileExtension": "A String", # The file extension used when downloading this file. This field is read only. To set the extension, include it in the title when creating the file. This is only populated for files with content stored in Drive. |
| 610 | "headRevisionId": "A String", # The ID of the file's head revision. This will only be populated for files with content stored in Drive. |
| 611 | "selfLink": "A String", # A link back to this file. |
| 612 | "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. |
| 613 | }</pre> |
| 614 | </div> |
| 615 | |
| 616 | <div class="method"> |
| 617 | <code class="details" id="insert">insert(body=None, media_body=None, convert=None, useContentAsIndexableText=None, visibility=None, ocrLanguage=None, ocr=None, timedTextLanguage=None, timedTextTrackName=None, pinned=None)</code> |
| 618 | <pre>Insert a new file. |
| 619 | |
| 620 | Args: |
| 621 | body: object, The request body. |
| 622 | The object takes the form of: |
| 623 | |
| 624 | { # The metadata for a file. |
| 625 | "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. |
| 626 | "lastViewedByMeDate": "A String", # Last time this file was viewed by the user (formatted RFC 3339 timestamp). |
| 627 | "appDataContents": True or False, # Whether this file is in the appdata folder. |
| 628 | "thumbnailLink": "A String", # A link to the file's thumbnail. |
| 629 | "labels": { # A group of labels for the file. |
| 630 | "restricted": True or False, # Whether viewers are prevented from downloading this file. |
| 631 | "hidden": True or False, # Deprecated. |
| 632 | "viewed": True or False, # Whether this file has been viewed by this user. |
| 633 | "starred": True or False, # Whether this file is starred by the user. |
| 634 | "trashed": True or False, # Whether this file has been trashed. |
| 635 | }, |
| 636 | "indexableText": { # Indexable text attributes for the file (can only be written) |
| 637 | "text": "A String", # The text to be indexed for this file. |
| 638 | }, |
| 639 | "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. |
| 640 | "lastModifyingUserName": "A String", # Name of the last user to modify this file. |
| 641 | "writersCanShare": True or False, # Whether writers can share the document with other users. |
| 642 | "owners": [ # The owner(s) of this file. |
| 643 | { # The JSON template for a user. |
| 644 | "picture": { # The user's profile picture. |
| 645 | "url": "A String", # A URL that points to a profile picture of this user. |
| 646 | }, |
| 647 | "kind": "drive#user", # This is always drive#user. |
| 648 | "isAuthenticatedUser": True or False, # Whether this user is the same as the authenticated user for whom the request was made. |
| 649 | "displayName": "A String", # A plain text displayable name for this user. |
| 650 | "permissionId": "A String", # The user's ID as visible in the permissions collection. |
| 651 | }, |
| 652 | ], |
| 653 | "id": "A String", # The ID of the file. |
| 654 | "lastModifyingUser": { # The JSON template for a user. # The last user to modify this file. |
| 655 | "picture": { # The user's profile picture. |
| 656 | "url": "A String", # A URL that points to a profile picture of this user. |
| 657 | }, |
| 658 | "kind": "drive#user", # This is always drive#user. |
| 659 | "isAuthenticatedUser": True or False, # Whether this user is the same as the authenticated user for whom the request was made. |
| 660 | "displayName": "A String", # A plain text displayable name for this user. |
| 661 | "permissionId": "A String", # The user's ID as visible in the permissions collection. |
| 662 | }, |
| 663 | "copyable": True or False, # Whether the file can be copied by the current user. |
| 664 | "ownerNames": [ # Name(s) of the owner(s) of this file. |
| 665 | "A String", |
| 666 | ], |
| 667 | "sharedWithMeDate": "A String", # Time at which this file was shared with the user (formatted RFC 3339 timestamp). |
| 668 | "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. |
| 669 | "etag": "A String", # ETag of the file. |
| 670 | "parents": [ # Collection of parent folders which contain this file. |
| 671 | # 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. |
| 672 | { # A reference to a file's parent. |
| 673 | "selfLink": "A String", # A link back to this reference. |
| 674 | "kind": "drive#parentReference", # This is always drive#parentReference. |
| 675 | "id": "A String", # The ID of the parent. |
| 676 | "isRoot": True or False, # Whether or not the parent is the root folder. |
| 677 | "parentLink": "A String", # A link to the parent. |
| 678 | }, |
| 679 | ], |
| 680 | "exportLinks": { # Links for exporting Google Docs to specific formats. |
| 681 | "a_key": "A String", # A mapping from export format to URL |
| 682 | }, |
| 683 | "shared": True or False, # Whether the file has been shared. |
| 684 | "thumbnail": { # Thumbnail for the file. Only accepted on upload and for files that are not already thumbnailed by Google. |
| 685 | "mimeType": "A String", # The MIME type of the thumbnail. |
| 686 | "image": "A String", # The URL-safe Base64 encoded bytes of the thumbnail image. |
| 687 | }, |
| 688 | "openWithLinks": { # A map of the id of each of the user's apps to a link to open this file with that app. Only populated when the drive.apps.readonly scope is used. |
| 689 | "a_key": "A String", |
| 690 | }, |
| 691 | "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. |
| 692 | "exposureBias": 3.14, # The exposure bias of the photo (APEX value). |
| 693 | "exposureTime": 3.14, # The length of the exposure, in seconds. |
| 694 | "cameraMake": "A String", # The make of the camera used to create the photo. |
| 695 | "maxApertureValue": 3.14, # The smallest f-number of the lens at the focal length used to create the photo (APEX value). |
| 696 | "isoSpeed": 42, # The ISO speed used to create the photo. |
| 697 | "focalLength": 3.14, # The focal length used to create the photo, in millimeters. |
| 698 | "exposureMode": "A String", # The exposure mode used to create the photo. |
| 699 | "colorSpace": "A String", # The color space of the photo. |
| 700 | "location": { # Geographic location information stored in the image. |
| 701 | "latitude": 3.14, # The latitude stored in the image. |
| 702 | "altitude": 3.14, # The altitude stored in the image. |
| 703 | "longitude": 3.14, # The longitude stored in the image. |
| 704 | }, |
| 705 | "subjectDistance": 42, # The distance to the subject of the photo, in meters. |
| 706 | "height": 42, # The height of the image in pixels. |
| 707 | "lens": "A String", # The lens used to create the photo. |
| 708 | "date": "A String", # The date and time the photo was taken (EXIF format timestamp). |
| 709 | "width": 42, # The width of the image in pixels. |
| 710 | "meteringMode": "A String", # The metering mode used to create the photo. |
| 711 | "flashUsed": True or False, # Whether a flash was used to create the photo. |
| 712 | "aperture": 3.14, # The aperture used to create the photo (f-number). |
| 713 | "rotation": 42, # The rotation in clockwise degrees from the image's original orientation. |
| 714 | "sensor": "A String", # The type of sensor used to create the photo. |
| 715 | "whiteBalance": "A String", # The white balance mode used to create the photo. |
| 716 | "cameraModel": "A String", # The model of the camera used to create the photo. |
| 717 | }, |
| 718 | "description": "A String", # A short description of the file. |
| 719 | "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. |
| 720 | "editable": True or False, # Whether the file can be edited by the current user. |
| 721 | "kind": "drive#file", # The type of file. This is always drive#file. |
| 722 | "quotaBytesUsed": "A String", # The number of quota bytes used by this file. |
| 723 | "fileSize": "A String", # The size of the file in bytes. This is only populated for files with content stored in Drive. |
| 724 | "createdDate": "A String", # Create time for this file (formatted ISO8601 timestamp). |
| 725 | "properties": [ # The list of properties. |
| 726 | { # A key-value pair that is either public or private to an application. |
| 727 | "kind": "drive#property", # This is always drive#property. |
| 728 | "value": "A String", # The value of this property. |
| 729 | "etag": "A String", # ETag of the property. |
| 730 | "visibility": "A String", # The visibility of this property. |
| 731 | "key": "A String", # The key of this property. |
| 732 | "selfLink": "A String", # The link back to this property. |
| 733 | }, |
| 734 | ], |
| 735 | "md5Checksum": "A String", # An MD5 checksum for the content of this file. This is populated only for files with content stored in Drive. |
| 736 | "iconLink": "A String", # A link to the file's icon. |
| 737 | "defaultOpenWithLink": "A String", # A link to open this file with the user's default app for this file. Only populated when the drive.apps.readonly scope is used. |
| 738 | "embedLink": "A String", # A link for embedding the file. |
| 739 | "alternateLink": "A String", # A link for opening the file in using a relevant Google editor or viewer. |
| 740 | "title": "A String", # The title of this file. |
| 741 | "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. |
| 742 | "downloadUrl": "A String", # Short lived download URL for the file. This is only populated for files with content stored in Drive. |
| 743 | "userPermission": { # A permission for a file. # The permissions for the authenticated user on this file. |
| 744 | "withLink": True or False, # Whether the link is required for this permission. |
| 745 | "domain": "A String", # The domain name of the entity this permission refers to. This is an output-only field which is populated when the permission type is "user", "group" or "domain". |
| 746 | "name": "A String", # The name for this permission. |
| 747 | "kind": "drive#permission", # This is always drive#permission. |
| 748 | "value": "A String", # The email address or domain name for the entity. This is used during inserts and is not populated in responses. When making a drive.permissions.insert request, exactly one of 'id' or 'value' fields must be specified. |
| 749 | "id": "A String", # The ID of the user this permission refers to, and identical to the permissionId in the About and Files resources. When making a drive.permissions.insert request, exactly one of 'id' or 'value' fields must be specified. |
| 750 | "authKey": "A String", # The authkey parameter required for this permission. |
| 751 | "etag": "A String", # The ETag of the permission. |
| 752 | "emailAddress": "A String", # The email address of the user this permission refers to. This is an output-only field which is populated when the permission type is "user" and the given user's Google+ profile privacy settings allow exposing their email address. |
| 753 | "photoLink": "A String", # A link to the profile photo, if available. |
| 754 | "role": "A String", # The primary role for this user. Allowed values are: |
| 755 | # - owner |
| 756 | # - reader |
| 757 | # - writer |
| 758 | "type": "A String", # The account type. Allowed values are: |
| 759 | # - user |
| 760 | # - group |
| 761 | # - domain |
| 762 | # - anyone |
| 763 | "additionalRoles": [ # Additional roles for this user. Only commenter is currently allowed. |
| 764 | "A String", |
| 765 | ], |
| 766 | "selfLink": "A String", # A link back to this permission. |
| 767 | }, |
| 768 | "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. |
| 769 | "fileExtension": "A String", # The file extension used when downloading this file. This field is read only. To set the extension, include it in the title when creating the file. This is only populated for files with content stored in Drive. |
| 770 | "headRevisionId": "A String", # The ID of the file's head revision. This will only be populated for files with content stored in Drive. |
| 771 | "selfLink": "A String", # A link back to this file. |
| 772 | "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. |
| 773 | } |
| 774 | |
| 775 | media_body: string, The filename of the media request body, or an instance of a MediaUpload object. |
| 776 | convert: boolean, Whether to convert this file to the corresponding Google Docs format. |
| 777 | useContentAsIndexableText: boolean, Whether to use the content as indexable text. |
| 778 | visibility: string, The visibility of the new file. This parameter is only relevant when convert=false. |
| 779 | Allowed values |
| 780 | DEFAULT - The visibility of the new file is determined by the user's default visibility/sharing policies. |
| 781 | PRIVATE - The new file will be visible to only the owner. |
| 782 | ocrLanguage: string, If ocr is true, hints at the language to use. Valid values are ISO 639-1 codes. |
| 783 | ocr: boolean, Whether to attempt OCR on .jpg, .png, .gif, or .pdf uploads. |
| 784 | timedTextLanguage: string, The language of the timed text. |
| 785 | timedTextTrackName: string, The timed text track name. |
| 786 | pinned: boolean, Whether to pin the head revision of the uploaded file. |
| 787 | |
| 788 | Returns: |
| 789 | An object of the form: |
| 790 | |
| 791 | { # The metadata for a file. |
| 792 | "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. |
| 793 | "lastViewedByMeDate": "A String", # Last time this file was viewed by the user (formatted RFC 3339 timestamp). |
| 794 | "appDataContents": True or False, # Whether this file is in the appdata folder. |
| 795 | "thumbnailLink": "A String", # A link to the file's thumbnail. |
| 796 | "labels": { # A group of labels for the file. |
| 797 | "restricted": True or False, # Whether viewers are prevented from downloading this file. |
| 798 | "hidden": True or False, # Deprecated. |
| 799 | "viewed": True or False, # Whether this file has been viewed by this user. |
| 800 | "starred": True or False, # Whether this file is starred by the user. |
| 801 | "trashed": True or False, # Whether this file has been trashed. |
| 802 | }, |
| 803 | "indexableText": { # Indexable text attributes for the file (can only be written) |
| 804 | "text": "A String", # The text to be indexed for this file. |
| 805 | }, |
| 806 | "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. |
| 807 | "lastModifyingUserName": "A String", # Name of the last user to modify this file. |
| 808 | "writersCanShare": True or False, # Whether writers can share the document with other users. |
| 809 | "owners": [ # The owner(s) of this file. |
| 810 | { # The JSON template for a user. |
| 811 | "picture": { # The user's profile picture. |
| 812 | "url": "A String", # A URL that points to a profile picture of this user. |
| 813 | }, |
| 814 | "kind": "drive#user", # This is always drive#user. |
| 815 | "isAuthenticatedUser": True or False, # Whether this user is the same as the authenticated user for whom the request was made. |
| 816 | "displayName": "A String", # A plain text displayable name for this user. |
| 817 | "permissionId": "A String", # The user's ID as visible in the permissions collection. |
| 818 | }, |
| 819 | ], |
| 820 | "id": "A String", # The ID of the file. |
| 821 | "lastModifyingUser": { # The JSON template for a user. # The last user to modify this file. |
| 822 | "picture": { # The user's profile picture. |
| 823 | "url": "A String", # A URL that points to a profile picture of this user. |
| 824 | }, |
| 825 | "kind": "drive#user", # This is always drive#user. |
| 826 | "isAuthenticatedUser": True or False, # Whether this user is the same as the authenticated user for whom the request was made. |
| 827 | "displayName": "A String", # A plain text displayable name for this user. |
| 828 | "permissionId": "A String", # The user's ID as visible in the permissions collection. |
| 829 | }, |
| 830 | "copyable": True or False, # Whether the file can be copied by the current user. |
| 831 | "ownerNames": [ # Name(s) of the owner(s) of this file. |
| 832 | "A String", |
| 833 | ], |
| 834 | "sharedWithMeDate": "A String", # Time at which this file was shared with the user (formatted RFC 3339 timestamp). |
| 835 | "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. |
| 836 | "etag": "A String", # ETag of the file. |
| 837 | "parents": [ # Collection of parent folders which contain this file. |
| 838 | # 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. |
| 839 | { # A reference to a file's parent. |
| 840 | "selfLink": "A String", # A link back to this reference. |
| 841 | "kind": "drive#parentReference", # This is always drive#parentReference. |
| 842 | "id": "A String", # The ID of the parent. |
| 843 | "isRoot": True or False, # Whether or not the parent is the root folder. |
| 844 | "parentLink": "A String", # A link to the parent. |
| 845 | }, |
| 846 | ], |
| 847 | "exportLinks": { # Links for exporting Google Docs to specific formats. |
| 848 | "a_key": "A String", # A mapping from export format to URL |
| 849 | }, |
| 850 | "shared": True or False, # Whether the file has been shared. |
| 851 | "thumbnail": { # Thumbnail for the file. Only accepted on upload and for files that are not already thumbnailed by Google. |
| 852 | "mimeType": "A String", # The MIME type of the thumbnail. |
| 853 | "image": "A String", # The URL-safe Base64 encoded bytes of the thumbnail image. |
| 854 | }, |
| 855 | "openWithLinks": { # A map of the id of each of the user's apps to a link to open this file with that app. Only populated when the drive.apps.readonly scope is used. |
| 856 | "a_key": "A String", |
| 857 | }, |
| 858 | "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. |
| 859 | "exposureBias": 3.14, # The exposure bias of the photo (APEX value). |
| 860 | "exposureTime": 3.14, # The length of the exposure, in seconds. |
| 861 | "cameraMake": "A String", # The make of the camera used to create the photo. |
| 862 | "maxApertureValue": 3.14, # The smallest f-number of the lens at the focal length used to create the photo (APEX value). |
| 863 | "isoSpeed": 42, # The ISO speed used to create the photo. |
| 864 | "focalLength": 3.14, # The focal length used to create the photo, in millimeters. |
| 865 | "exposureMode": "A String", # The exposure mode used to create the photo. |
| 866 | "colorSpace": "A String", # The color space of the photo. |
| 867 | "location": { # Geographic location information stored in the image. |
| 868 | "latitude": 3.14, # The latitude stored in the image. |
| 869 | "altitude": 3.14, # The altitude stored in the image. |
| 870 | "longitude": 3.14, # The longitude stored in the image. |
| 871 | }, |
| 872 | "subjectDistance": 42, # The distance to the subject of the photo, in meters. |
| 873 | "height": 42, # The height of the image in pixels. |
| 874 | "lens": "A String", # The lens used to create the photo. |
| 875 | "date": "A String", # The date and time the photo was taken (EXIF format timestamp). |
| 876 | "width": 42, # The width of the image in pixels. |
| 877 | "meteringMode": "A String", # The metering mode used to create the photo. |
| 878 | "flashUsed": True or False, # Whether a flash was used to create the photo. |
| 879 | "aperture": 3.14, # The aperture used to create the photo (f-number). |
| 880 | "rotation": 42, # The rotation in clockwise degrees from the image's original orientation. |
| 881 | "sensor": "A String", # The type of sensor used to create the photo. |
| 882 | "whiteBalance": "A String", # The white balance mode used to create the photo. |
| 883 | "cameraModel": "A String", # The model of the camera used to create the photo. |
| 884 | }, |
| 885 | "description": "A String", # A short description of the file. |
| 886 | "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. |
| 887 | "editable": True or False, # Whether the file can be edited by the current user. |
| 888 | "kind": "drive#file", # The type of file. This is always drive#file. |
| 889 | "quotaBytesUsed": "A String", # The number of quota bytes used by this file. |
| 890 | "fileSize": "A String", # The size of the file in bytes. This is only populated for files with content stored in Drive. |
| 891 | "createdDate": "A String", # Create time for this file (formatted ISO8601 timestamp). |
| 892 | "properties": [ # The list of properties. |
| 893 | { # A key-value pair that is either public or private to an application. |
| 894 | "kind": "drive#property", # This is always drive#property. |
| 895 | "value": "A String", # The value of this property. |
| 896 | "etag": "A String", # ETag of the property. |
| 897 | "visibility": "A String", # The visibility of this property. |
| 898 | "key": "A String", # The key of this property. |
| 899 | "selfLink": "A String", # The link back to this property. |
| 900 | }, |
| 901 | ], |
| 902 | "md5Checksum": "A String", # An MD5 checksum for the content of this file. This is populated only for files with content stored in Drive. |
| 903 | "iconLink": "A String", # A link to the file's icon. |
| 904 | "defaultOpenWithLink": "A String", # A link to open this file with the user's default app for this file. Only populated when the drive.apps.readonly scope is used. |
| 905 | "embedLink": "A String", # A link for embedding the file. |
| 906 | "alternateLink": "A String", # A link for opening the file in using a relevant Google editor or viewer. |
| 907 | "title": "A String", # The title of this file. |
| 908 | "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. |
| 909 | "downloadUrl": "A String", # Short lived download URL for the file. This is only populated for files with content stored in Drive. |
| 910 | "userPermission": { # A permission for a file. # The permissions for the authenticated user on this file. |
| 911 | "withLink": True or False, # Whether the link is required for this permission. |
| 912 | "domain": "A String", # The domain name of the entity this permission refers to. This is an output-only field which is populated when the permission type is "user", "group" or "domain". |
| 913 | "name": "A String", # The name for this permission. |
| 914 | "kind": "drive#permission", # This is always drive#permission. |
| 915 | "value": "A String", # The email address or domain name for the entity. This is used during inserts and is not populated in responses. When making a drive.permissions.insert request, exactly one of 'id' or 'value' fields must be specified. |
| 916 | "id": "A String", # The ID of the user this permission refers to, and identical to the permissionId in the About and Files resources. When making a drive.permissions.insert request, exactly one of 'id' or 'value' fields must be specified. |
| 917 | "authKey": "A String", # The authkey parameter required for this permission. |
| 918 | "etag": "A String", # The ETag of the permission. |
| 919 | "emailAddress": "A String", # The email address of the user this permission refers to. This is an output-only field which is populated when the permission type is "user" and the given user's Google+ profile privacy settings allow exposing their email address. |
| 920 | "photoLink": "A String", # A link to the profile photo, if available. |
| 921 | "role": "A String", # The primary role for this user. Allowed values are: |
| 922 | # - owner |
| 923 | # - reader |
| 924 | # - writer |
| 925 | "type": "A String", # The account type. Allowed values are: |
| 926 | # - user |
| 927 | # - group |
| 928 | # - domain |
| 929 | # - anyone |
| 930 | "additionalRoles": [ # Additional roles for this user. Only commenter is currently allowed. |
| 931 | "A String", |
| 932 | ], |
| 933 | "selfLink": "A String", # A link back to this permission. |
| 934 | }, |
| 935 | "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. |
| 936 | "fileExtension": "A String", # The file extension used when downloading this file. This field is read only. To set the extension, include it in the title when creating the file. This is only populated for files with content stored in Drive. |
| 937 | "headRevisionId": "A String", # The ID of the file's head revision. This will only be populated for files with content stored in Drive. |
| 938 | "selfLink": "A String", # A link back to this file. |
| 939 | "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. |
| 940 | }</pre> |
| 941 | </div> |
| 942 | |
| 943 | <div class="method"> |
| 944 | <code class="details" id="list">list(q=None, projection=None, pageToken=None, maxResults=None)</code> |
| 945 | <pre>Lists the user's files. |
| 946 | |
| 947 | Args: |
| 948 | q: string, Query string for searching files. |
| 949 | projection: string, This parameter is deprecated and has no function. |
| 950 | Allowed values |
| 951 | BASIC - Deprecated |
| 952 | FULL - Deprecated |
| 953 | pageToken: string, Page token for files. |
| 954 | maxResults: integer, Maximum number of files to return. |
| 955 | |
| 956 | Returns: |
| 957 | An object of the form: |
| 958 | |
| 959 | { # A list of files. |
| 960 | "nextPageToken": "A String", # The page token for the next page of files. |
| 961 | "kind": "drive#fileList", # This is always drive#fileList. |
| 962 | "items": [ # The actual list of files. |
| 963 | { # The metadata for a file. |
| 964 | "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. |
| 965 | "lastViewedByMeDate": "A String", # Last time this file was viewed by the user (formatted RFC 3339 timestamp). |
| 966 | "appDataContents": True or False, # Whether this file is in the appdata folder. |
| 967 | "thumbnailLink": "A String", # A link to the file's thumbnail. |
| 968 | "labels": { # A group of labels for the file. |
| 969 | "restricted": True or False, # Whether viewers are prevented from downloading this file. |
| 970 | "hidden": True or False, # Deprecated. |
| 971 | "viewed": True or False, # Whether this file has been viewed by this user. |
| 972 | "starred": True or False, # Whether this file is starred by the user. |
| 973 | "trashed": True or False, # Whether this file has been trashed. |
| 974 | }, |
| 975 | "indexableText": { # Indexable text attributes for the file (can only be written) |
| 976 | "text": "A String", # The text to be indexed for this file. |
| 977 | }, |
| 978 | "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. |
| 979 | "lastModifyingUserName": "A String", # Name of the last user to modify this file. |
| 980 | "writersCanShare": True or False, # Whether writers can share the document with other users. |
| 981 | "owners": [ # The owner(s) of this file. |
| 982 | { # The JSON template for a user. |
| 983 | "picture": { # The user's profile picture. |
| 984 | "url": "A String", # A URL that points to a profile picture of this user. |
| 985 | }, |
| 986 | "kind": "drive#user", # This is always drive#user. |
| 987 | "isAuthenticatedUser": True or False, # Whether this user is the same as the authenticated user for whom the request was made. |
| 988 | "displayName": "A String", # A plain text displayable name for this user. |
| 989 | "permissionId": "A String", # The user's ID as visible in the permissions collection. |
| 990 | }, |
| 991 | ], |
| 992 | "id": "A String", # The ID of the file. |
| 993 | "lastModifyingUser": { # The JSON template for a user. # The last user to modify this file. |
| 994 | "picture": { # The user's profile picture. |
| 995 | "url": "A String", # A URL that points to a profile picture of this user. |
| 996 | }, |
| 997 | "kind": "drive#user", # This is always drive#user. |
| 998 | "isAuthenticatedUser": True or False, # Whether this user is the same as the authenticated user for whom the request was made. |
| 999 | "displayName": "A String", # A plain text displayable name for this user. |
| 1000 | "permissionId": "A String", # The user's ID as visible in the permissions collection. |
| 1001 | }, |
| 1002 | "copyable": True or False, # Whether the file can be copied by the current user. |
| 1003 | "ownerNames": [ # Name(s) of the owner(s) of this file. |
| 1004 | "A String", |
| 1005 | ], |
| 1006 | "sharedWithMeDate": "A String", # Time at which this file was shared with the user (formatted RFC 3339 timestamp). |
| 1007 | "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. |
| 1008 | "etag": "A String", # ETag of the file. |
| 1009 | "parents": [ # Collection of parent folders which contain this file. |
| 1010 | # 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. |
| 1011 | { # A reference to a file's parent. |
| 1012 | "selfLink": "A String", # A link back to this reference. |
| 1013 | "kind": "drive#parentReference", # This is always drive#parentReference. |
| 1014 | "id": "A String", # The ID of the parent. |
| 1015 | "isRoot": True or False, # Whether or not the parent is the root folder. |
| 1016 | "parentLink": "A String", # A link to the parent. |
| 1017 | }, |
| 1018 | ], |
| 1019 | "exportLinks": { # Links for exporting Google Docs to specific formats. |
| 1020 | "a_key": "A String", # A mapping from export format to URL |
| 1021 | }, |
| 1022 | "shared": True or False, # Whether the file has been shared. |
| 1023 | "thumbnail": { # Thumbnail for the file. Only accepted on upload and for files that are not already thumbnailed by Google. |
| 1024 | "mimeType": "A String", # The MIME type of the thumbnail. |
| 1025 | "image": "A String", # The URL-safe Base64 encoded bytes of the thumbnail image. |
| 1026 | }, |
| 1027 | "openWithLinks": { # A map of the id of each of the user's apps to a link to open this file with that app. Only populated when the drive.apps.readonly scope is used. |
| 1028 | "a_key": "A String", |
| 1029 | }, |
| 1030 | "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. |
| 1031 | "exposureBias": 3.14, # The exposure bias of the photo (APEX value). |
| 1032 | "exposureTime": 3.14, # The length of the exposure, in seconds. |
| 1033 | "cameraMake": "A String", # The make of the camera used to create the photo. |
| 1034 | "maxApertureValue": 3.14, # The smallest f-number of the lens at the focal length used to create the photo (APEX value). |
| 1035 | "isoSpeed": 42, # The ISO speed used to create the photo. |
| 1036 | "focalLength": 3.14, # The focal length used to create the photo, in millimeters. |
| 1037 | "exposureMode": "A String", # The exposure mode used to create the photo. |
| 1038 | "colorSpace": "A String", # The color space of the photo. |
| 1039 | "location": { # Geographic location information stored in the image. |
| 1040 | "latitude": 3.14, # The latitude stored in the image. |
| 1041 | "altitude": 3.14, # The altitude stored in the image. |
| 1042 | "longitude": 3.14, # The longitude stored in the image. |
| 1043 | }, |
| 1044 | "subjectDistance": 42, # The distance to the subject of the photo, in meters. |
| 1045 | "height": 42, # The height of the image in pixels. |
| 1046 | "lens": "A String", # The lens used to create the photo. |
| 1047 | "date": "A String", # The date and time the photo was taken (EXIF format timestamp). |
| 1048 | "width": 42, # The width of the image in pixels. |
| 1049 | "meteringMode": "A String", # The metering mode used to create the photo. |
| 1050 | "flashUsed": True or False, # Whether a flash was used to create the photo. |
| 1051 | "aperture": 3.14, # The aperture used to create the photo (f-number). |
| 1052 | "rotation": 42, # The rotation in clockwise degrees from the image's original orientation. |
| 1053 | "sensor": "A String", # The type of sensor used to create the photo. |
| 1054 | "whiteBalance": "A String", # The white balance mode used to create the photo. |
| 1055 | "cameraModel": "A String", # The model of the camera used to create the photo. |
| 1056 | }, |
| 1057 | "description": "A String", # A short description of the file. |
| 1058 | "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. |
| 1059 | "editable": True or False, # Whether the file can be edited by the current user. |
| 1060 | "kind": "drive#file", # The type of file. This is always drive#file. |
| 1061 | "quotaBytesUsed": "A String", # The number of quota bytes used by this file. |
| 1062 | "fileSize": "A String", # The size of the file in bytes. This is only populated for files with content stored in Drive. |
| 1063 | "createdDate": "A String", # Create time for this file (formatted ISO8601 timestamp). |
| 1064 | "properties": [ # The list of properties. |
| 1065 | { # A key-value pair that is either public or private to an application. |
| 1066 | "kind": "drive#property", # This is always drive#property. |
| 1067 | "value": "A String", # The value of this property. |
| 1068 | "etag": "A String", # ETag of the property. |
| 1069 | "visibility": "A String", # The visibility of this property. |
| 1070 | "key": "A String", # The key of this property. |
| 1071 | "selfLink": "A String", # The link back to this property. |
| 1072 | }, |
| 1073 | ], |
| 1074 | "md5Checksum": "A String", # An MD5 checksum for the content of this file. This is populated only for files with content stored in Drive. |
| 1075 | "iconLink": "A String", # A link to the file's icon. |
| 1076 | "defaultOpenWithLink": "A String", # A link to open this file with the user's default app for this file. Only populated when the drive.apps.readonly scope is used. |
| 1077 | "embedLink": "A String", # A link for embedding the file. |
| 1078 | "alternateLink": "A String", # A link for opening the file in using a relevant Google editor or viewer. |
| 1079 | "title": "A String", # The title of this file. |
| 1080 | "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. |
| 1081 | "downloadUrl": "A String", # Short lived download URL for the file. This is only populated for files with content stored in Drive. |
| 1082 | "userPermission": { # A permission for a file. # The permissions for the authenticated user on this file. |
| 1083 | "withLink": True or False, # Whether the link is required for this permission. |
| 1084 | "domain": "A String", # The domain name of the entity this permission refers to. This is an output-only field which is populated when the permission type is "user", "group" or "domain". |
| 1085 | "name": "A String", # The name for this permission. |
| 1086 | "kind": "drive#permission", # This is always drive#permission. |
| 1087 | "value": "A String", # The email address or domain name for the entity. This is used during inserts and is not populated in responses. When making a drive.permissions.insert request, exactly one of 'id' or 'value' fields must be specified. |
| 1088 | "id": "A String", # The ID of the user this permission refers to, and identical to the permissionId in the About and Files resources. When making a drive.permissions.insert request, exactly one of 'id' or 'value' fields must be specified. |
| 1089 | "authKey": "A String", # The authkey parameter required for this permission. |
| 1090 | "etag": "A String", # The ETag of the permission. |
| 1091 | "emailAddress": "A String", # The email address of the user this permission refers to. This is an output-only field which is populated when the permission type is "user" and the given user's Google+ profile privacy settings allow exposing their email address. |
| 1092 | "photoLink": "A String", # A link to the profile photo, if available. |
| 1093 | "role": "A String", # The primary role for this user. Allowed values are: |
| 1094 | # - owner |
| 1095 | # - reader |
| 1096 | # - writer |
| 1097 | "type": "A String", # The account type. Allowed values are: |
| 1098 | # - user |
| 1099 | # - group |
| 1100 | # - domain |
| 1101 | # - anyone |
| 1102 | "additionalRoles": [ # Additional roles for this user. Only commenter is currently allowed. |
| 1103 | "A String", |
| 1104 | ], |
| 1105 | "selfLink": "A String", # A link back to this permission. |
| 1106 | }, |
| 1107 | "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. |
| 1108 | "fileExtension": "A String", # The file extension used when downloading this file. This field is read only. To set the extension, include it in the title when creating the file. This is only populated for files with content stored in Drive. |
| 1109 | "headRevisionId": "A String", # The ID of the file's head revision. This will only be populated for files with content stored in Drive. |
| 1110 | "selfLink": "A String", # A link back to this file. |
| 1111 | "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. |
| 1112 | }, |
| 1113 | ], |
| 1114 | "nextLink": "A String", # A link to the next page of files. |
| 1115 | "etag": "A String", # The ETag of the list. |
| 1116 | "selfLink": "A String", # A link back to this list. |
| 1117 | }</pre> |
| 1118 | </div> |
| 1119 | |
| 1120 | <div class="method"> |
| 1121 | <code class="details" id="list_next">list_next(previous_request, previous_response)</code> |
| 1122 | <pre>Retrieves the next page of results. |
| 1123 | |
| 1124 | Args: |
| 1125 | previous_request: The request for the previous page. (required) |
| 1126 | previous_response: The response from the request for the previous page. (required) |
| 1127 | |
| 1128 | Returns: |
| 1129 | A request object that you can call 'execute()' on to request the next |
| 1130 | page. Returns None if there are no more items in the collection. |
| 1131 | </pre> |
| 1132 | </div> |
| 1133 | |
| 1134 | <div class="method"> |
| 1135 | <code class="details" id="patch">patch(fileId, body, newRevision=None, pinned=None, ocrLanguage=None, ocr=None, updateViewedDate=None, timedTextTrackName=None, convert=None, useContentAsIndexableText=None, setModifiedDate=None, timedTextLanguage=None)</code> |
| 1136 | <pre>Updates file metadata and/or content. This method supports patch semantics. |
| 1137 | |
| 1138 | Args: |
| 1139 | fileId: string, The ID of the file to update. (required) |
| 1140 | body: object, The request body. (required) |
| 1141 | The object takes the form of: |
| 1142 | |
| 1143 | { # The metadata for a file. |
| 1144 | "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. |
| 1145 | "lastViewedByMeDate": "A String", # Last time this file was viewed by the user (formatted RFC 3339 timestamp). |
| 1146 | "appDataContents": True or False, # Whether this file is in the appdata folder. |
| 1147 | "thumbnailLink": "A String", # A link to the file's thumbnail. |
| 1148 | "labels": { # A group of labels for the file. |
| 1149 | "restricted": True or False, # Whether viewers are prevented from downloading this file. |
| 1150 | "hidden": True or False, # Deprecated. |
| 1151 | "viewed": True or False, # Whether this file has been viewed by this user. |
| 1152 | "starred": True or False, # Whether this file is starred by the user. |
| 1153 | "trashed": True or False, # Whether this file has been trashed. |
| 1154 | }, |
| 1155 | "indexableText": { # Indexable text attributes for the file (can only be written) |
| 1156 | "text": "A String", # The text to be indexed for this file. |
| 1157 | }, |
| 1158 | "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. |
| 1159 | "lastModifyingUserName": "A String", # Name of the last user to modify this file. |
| 1160 | "writersCanShare": True or False, # Whether writers can share the document with other users. |
| 1161 | "owners": [ # The owner(s) of this file. |
| 1162 | { # The JSON template for a user. |
| 1163 | "picture": { # The user's profile picture. |
| 1164 | "url": "A String", # A URL that points to a profile picture of this user. |
| 1165 | }, |
| 1166 | "kind": "drive#user", # This is always drive#user. |
| 1167 | "isAuthenticatedUser": True or False, # Whether this user is the same as the authenticated user for whom the request was made. |
| 1168 | "displayName": "A String", # A plain text displayable name for this user. |
| 1169 | "permissionId": "A String", # The user's ID as visible in the permissions collection. |
| 1170 | }, |
| 1171 | ], |
| 1172 | "id": "A String", # The ID of the file. |
| 1173 | "lastModifyingUser": { # The JSON template for a user. # The last user to modify this file. |
| 1174 | "picture": { # The user's profile picture. |
| 1175 | "url": "A String", # A URL that points to a profile picture of this user. |
| 1176 | }, |
| 1177 | "kind": "drive#user", # This is always drive#user. |
| 1178 | "isAuthenticatedUser": True or False, # Whether this user is the same as the authenticated user for whom the request was made. |
| 1179 | "displayName": "A String", # A plain text displayable name for this user. |
| 1180 | "permissionId": "A String", # The user's ID as visible in the permissions collection. |
| 1181 | }, |
| 1182 | "copyable": True or False, # Whether the file can be copied by the current user. |
| 1183 | "ownerNames": [ # Name(s) of the owner(s) of this file. |
| 1184 | "A String", |
| 1185 | ], |
| 1186 | "sharedWithMeDate": "A String", # Time at which this file was shared with the user (formatted RFC 3339 timestamp). |
| 1187 | "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. |
| 1188 | "etag": "A String", # ETag of the file. |
| 1189 | "parents": [ # Collection of parent folders which contain this file. |
| 1190 | # 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. |
| 1191 | { # A reference to a file's parent. |
| 1192 | "selfLink": "A String", # A link back to this reference. |
| 1193 | "kind": "drive#parentReference", # This is always drive#parentReference. |
| 1194 | "id": "A String", # The ID of the parent. |
| 1195 | "isRoot": True or False, # Whether or not the parent is the root folder. |
| 1196 | "parentLink": "A String", # A link to the parent. |
| 1197 | }, |
| 1198 | ], |
| 1199 | "exportLinks": { # Links for exporting Google Docs to specific formats. |
| 1200 | "a_key": "A String", # A mapping from export format to URL |
| 1201 | }, |
| 1202 | "shared": True or False, # Whether the file has been shared. |
| 1203 | "thumbnail": { # Thumbnail for the file. Only accepted on upload and for files that are not already thumbnailed by Google. |
| 1204 | "mimeType": "A String", # The MIME type of the thumbnail. |
| 1205 | "image": "A String", # The URL-safe Base64 encoded bytes of the thumbnail image. |
| 1206 | }, |
| 1207 | "openWithLinks": { # A map of the id of each of the user's apps to a link to open this file with that app. Only populated when the drive.apps.readonly scope is used. |
| 1208 | "a_key": "A String", |
| 1209 | }, |
| 1210 | "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. |
| 1211 | "exposureBias": 3.14, # The exposure bias of the photo (APEX value). |
| 1212 | "exposureTime": 3.14, # The length of the exposure, in seconds. |
| 1213 | "cameraMake": "A String", # The make of the camera used to create the photo. |
| 1214 | "maxApertureValue": 3.14, # The smallest f-number of the lens at the focal length used to create the photo (APEX value). |
| 1215 | "isoSpeed": 42, # The ISO speed used to create the photo. |
| 1216 | "focalLength": 3.14, # The focal length used to create the photo, in millimeters. |
| 1217 | "exposureMode": "A String", # The exposure mode used to create the photo. |
| 1218 | "colorSpace": "A String", # The color space of the photo. |
| 1219 | "location": { # Geographic location information stored in the image. |
| 1220 | "latitude": 3.14, # The latitude stored in the image. |
| 1221 | "altitude": 3.14, # The altitude stored in the image. |
| 1222 | "longitude": 3.14, # The longitude stored in the image. |
| 1223 | }, |
| 1224 | "subjectDistance": 42, # The distance to the subject of the photo, in meters. |
| 1225 | "height": 42, # The height of the image in pixels. |
| 1226 | "lens": "A String", # The lens used to create the photo. |
| 1227 | "date": "A String", # The date and time the photo was taken (EXIF format timestamp). |
| 1228 | "width": 42, # The width of the image in pixels. |
| 1229 | "meteringMode": "A String", # The metering mode used to create the photo. |
| 1230 | "flashUsed": True or False, # Whether a flash was used to create the photo. |
| 1231 | "aperture": 3.14, # The aperture used to create the photo (f-number). |
| 1232 | "rotation": 42, # The rotation in clockwise degrees from the image's original orientation. |
| 1233 | "sensor": "A String", # The type of sensor used to create the photo. |
| 1234 | "whiteBalance": "A String", # The white balance mode used to create the photo. |
| 1235 | "cameraModel": "A String", # The model of the camera used to create the photo. |
| 1236 | }, |
| 1237 | "description": "A String", # A short description of the file. |
| 1238 | "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. |
| 1239 | "editable": True or False, # Whether the file can be edited by the current user. |
| 1240 | "kind": "drive#file", # The type of file. This is always drive#file. |
| 1241 | "quotaBytesUsed": "A String", # The number of quota bytes used by this file. |
| 1242 | "fileSize": "A String", # The size of the file in bytes. This is only populated for files with content stored in Drive. |
| 1243 | "createdDate": "A String", # Create time for this file (formatted ISO8601 timestamp). |
| 1244 | "properties": [ # The list of properties. |
| 1245 | { # A key-value pair that is either public or private to an application. |
| 1246 | "kind": "drive#property", # This is always drive#property. |
| 1247 | "value": "A String", # The value of this property. |
| 1248 | "etag": "A String", # ETag of the property. |
| 1249 | "visibility": "A String", # The visibility of this property. |
| 1250 | "key": "A String", # The key of this property. |
| 1251 | "selfLink": "A String", # The link back to this property. |
| 1252 | }, |
| 1253 | ], |
| 1254 | "md5Checksum": "A String", # An MD5 checksum for the content of this file. This is populated only for files with content stored in Drive. |
| 1255 | "iconLink": "A String", # A link to the file's icon. |
| 1256 | "defaultOpenWithLink": "A String", # A link to open this file with the user's default app for this file. Only populated when the drive.apps.readonly scope is used. |
| 1257 | "embedLink": "A String", # A link for embedding the file. |
| 1258 | "alternateLink": "A String", # A link for opening the file in using a relevant Google editor or viewer. |
| 1259 | "title": "A String", # The title of this file. |
| 1260 | "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. |
| 1261 | "downloadUrl": "A String", # Short lived download URL for the file. This is only populated for files with content stored in Drive. |
| 1262 | "userPermission": { # A permission for a file. # The permissions for the authenticated user on this file. |
| 1263 | "withLink": True or False, # Whether the link is required for this permission. |
| 1264 | "domain": "A String", # The domain name of the entity this permission refers to. This is an output-only field which is populated when the permission type is "user", "group" or "domain". |
| 1265 | "name": "A String", # The name for this permission. |
| 1266 | "kind": "drive#permission", # This is always drive#permission. |
| 1267 | "value": "A String", # The email address or domain name for the entity. This is used during inserts and is not populated in responses. When making a drive.permissions.insert request, exactly one of 'id' or 'value' fields must be specified. |
| 1268 | "id": "A String", # The ID of the user this permission refers to, and identical to the permissionId in the About and Files resources. When making a drive.permissions.insert request, exactly one of 'id' or 'value' fields must be specified. |
| 1269 | "authKey": "A String", # The authkey parameter required for this permission. |
| 1270 | "etag": "A String", # The ETag of the permission. |
| 1271 | "emailAddress": "A String", # The email address of the user this permission refers to. This is an output-only field which is populated when the permission type is "user" and the given user's Google+ profile privacy settings allow exposing their email address. |
| 1272 | "photoLink": "A String", # A link to the profile photo, if available. |
| 1273 | "role": "A String", # The primary role for this user. Allowed values are: |
| 1274 | # - owner |
| 1275 | # - reader |
| 1276 | # - writer |
| 1277 | "type": "A String", # The account type. Allowed values are: |
| 1278 | # - user |
| 1279 | # - group |
| 1280 | # - domain |
| 1281 | # - anyone |
| 1282 | "additionalRoles": [ # Additional roles for this user. Only commenter is currently allowed. |
| 1283 | "A String", |
| 1284 | ], |
| 1285 | "selfLink": "A String", # A link back to this permission. |
| 1286 | }, |
| 1287 | "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. |
| 1288 | "fileExtension": "A String", # The file extension used when downloading this file. This field is read only. To set the extension, include it in the title when creating the file. This is only populated for files with content stored in Drive. |
| 1289 | "headRevisionId": "A String", # The ID of the file's head revision. This will only be populated for files with content stored in Drive. |
| 1290 | "selfLink": "A String", # A link back to this file. |
| 1291 | "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. |
| 1292 | } |
| 1293 | |
| 1294 | newRevision: boolean, Whether a blob upload should create a new revision. If false, the blob data in the current head revision is replaced. If not set or true, a new blob is created as head revision, and previous revisions are preserved (causing increased use of the user's data storage quota). |
| 1295 | pinned: boolean, Whether to pin the new revision. |
| 1296 | ocrLanguage: string, If ocr is true, hints at the language to use. Valid values are ISO 639-1 codes. |
| 1297 | ocr: boolean, Whether to attempt OCR on .jpg, .png, .gif, or .pdf uploads. |
| 1298 | updateViewedDate: boolean, Whether to update the view date after successfully updating the file. |
| 1299 | timedTextTrackName: string, The timed text track name. |
| 1300 | convert: boolean, Whether to convert this file to the corresponding Google Docs format. |
| 1301 | useContentAsIndexableText: boolean, Whether to use the content as indexable text. |
| 1302 | setModifiedDate: boolean, Whether to set the modified date with the supplied modified date. |
| 1303 | timedTextLanguage: string, The language of the timed text. |
| 1304 | |
| 1305 | Returns: |
| 1306 | An object of the form: |
| 1307 | |
| 1308 | { # The metadata for a file. |
| 1309 | "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. |
| 1310 | "lastViewedByMeDate": "A String", # Last time this file was viewed by the user (formatted RFC 3339 timestamp). |
| 1311 | "appDataContents": True or False, # Whether this file is in the appdata folder. |
| 1312 | "thumbnailLink": "A String", # A link to the file's thumbnail. |
| 1313 | "labels": { # A group of labels for the file. |
| 1314 | "restricted": True or False, # Whether viewers are prevented from downloading this file. |
| 1315 | "hidden": True or False, # Deprecated. |
| 1316 | "viewed": True or False, # Whether this file has been viewed by this user. |
| 1317 | "starred": True or False, # Whether this file is starred by the user. |
| 1318 | "trashed": True or False, # Whether this file has been trashed. |
| 1319 | }, |
| 1320 | "indexableText": { # Indexable text attributes for the file (can only be written) |
| 1321 | "text": "A String", # The text to be indexed for this file. |
| 1322 | }, |
| 1323 | "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. |
| 1324 | "lastModifyingUserName": "A String", # Name of the last user to modify this file. |
| 1325 | "writersCanShare": True or False, # Whether writers can share the document with other users. |
| 1326 | "owners": [ # The owner(s) of this file. |
| 1327 | { # The JSON template for a user. |
| 1328 | "picture": { # The user's profile picture. |
| 1329 | "url": "A String", # A URL that points to a profile picture of this user. |
| 1330 | }, |
| 1331 | "kind": "drive#user", # This is always drive#user. |
| 1332 | "isAuthenticatedUser": True or False, # Whether this user is the same as the authenticated user for whom the request was made. |
| 1333 | "displayName": "A String", # A plain text displayable name for this user. |
| 1334 | "permissionId": "A String", # The user's ID as visible in the permissions collection. |
| 1335 | }, |
| 1336 | ], |
| 1337 | "id": "A String", # The ID of the file. |
| 1338 | "lastModifyingUser": { # The JSON template for a user. # The last user to modify this file. |
| 1339 | "picture": { # The user's profile picture. |
| 1340 | "url": "A String", # A URL that points to a profile picture of this user. |
| 1341 | }, |
| 1342 | "kind": "drive#user", # This is always drive#user. |
| 1343 | "isAuthenticatedUser": True or False, # Whether this user is the same as the authenticated user for whom the request was made. |
| 1344 | "displayName": "A String", # A plain text displayable name for this user. |
| 1345 | "permissionId": "A String", # The user's ID as visible in the permissions collection. |
| 1346 | }, |
| 1347 | "copyable": True or False, # Whether the file can be copied by the current user. |
| 1348 | "ownerNames": [ # Name(s) of the owner(s) of this file. |
| 1349 | "A String", |
| 1350 | ], |
| 1351 | "sharedWithMeDate": "A String", # Time at which this file was shared with the user (formatted RFC 3339 timestamp). |
| 1352 | "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. |
| 1353 | "etag": "A String", # ETag of the file. |
| 1354 | "parents": [ # Collection of parent folders which contain this file. |
| 1355 | # 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. |
| 1356 | { # A reference to a file's parent. |
| 1357 | "selfLink": "A String", # A link back to this reference. |
| 1358 | "kind": "drive#parentReference", # This is always drive#parentReference. |
| 1359 | "id": "A String", # The ID of the parent. |
| 1360 | "isRoot": True or False, # Whether or not the parent is the root folder. |
| 1361 | "parentLink": "A String", # A link to the parent. |
| 1362 | }, |
| 1363 | ], |
| 1364 | "exportLinks": { # Links for exporting Google Docs to specific formats. |
| 1365 | "a_key": "A String", # A mapping from export format to URL |
| 1366 | }, |
| 1367 | "shared": True or False, # Whether the file has been shared. |
| 1368 | "thumbnail": { # Thumbnail for the file. Only accepted on upload and for files that are not already thumbnailed by Google. |
| 1369 | "mimeType": "A String", # The MIME type of the thumbnail. |
| 1370 | "image": "A String", # The URL-safe Base64 encoded bytes of the thumbnail image. |
| 1371 | }, |
| 1372 | "openWithLinks": { # A map of the id of each of the user's apps to a link to open this file with that app. Only populated when the drive.apps.readonly scope is used. |
| 1373 | "a_key": "A String", |
| 1374 | }, |
| 1375 | "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. |
| 1376 | "exposureBias": 3.14, # The exposure bias of the photo (APEX value). |
| 1377 | "exposureTime": 3.14, # The length of the exposure, in seconds. |
| 1378 | "cameraMake": "A String", # The make of the camera used to create the photo. |
| 1379 | "maxApertureValue": 3.14, # The smallest f-number of the lens at the focal length used to create the photo (APEX value). |
| 1380 | "isoSpeed": 42, # The ISO speed used to create the photo. |
| 1381 | "focalLength": 3.14, # The focal length used to create the photo, in millimeters. |
| 1382 | "exposureMode": "A String", # The exposure mode used to create the photo. |
| 1383 | "colorSpace": "A String", # The color space of the photo. |
| 1384 | "location": { # Geographic location information stored in the image. |
| 1385 | "latitude": 3.14, # The latitude stored in the image. |
| 1386 | "altitude": 3.14, # The altitude stored in the image. |
| 1387 | "longitude": 3.14, # The longitude stored in the image. |
| 1388 | }, |
| 1389 | "subjectDistance": 42, # The distance to the subject of the photo, in meters. |
| 1390 | "height": 42, # The height of the image in pixels. |
| 1391 | "lens": "A String", # The lens used to create the photo. |
| 1392 | "date": "A String", # The date and time the photo was taken (EXIF format timestamp). |
| 1393 | "width": 42, # The width of the image in pixels. |
| 1394 | "meteringMode": "A String", # The metering mode used to create the photo. |
| 1395 | "flashUsed": True or False, # Whether a flash was used to create the photo. |
| 1396 | "aperture": 3.14, # The aperture used to create the photo (f-number). |
| 1397 | "rotation": 42, # The rotation in clockwise degrees from the image's original orientation. |
| 1398 | "sensor": "A String", # The type of sensor used to create the photo. |
| 1399 | "whiteBalance": "A String", # The white balance mode used to create the photo. |
| 1400 | "cameraModel": "A String", # The model of the camera used to create the photo. |
| 1401 | }, |
| 1402 | "description": "A String", # A short description of the file. |
| 1403 | "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. |
| 1404 | "editable": True or False, # Whether the file can be edited by the current user. |
| 1405 | "kind": "drive#file", # The type of file. This is always drive#file. |
| 1406 | "quotaBytesUsed": "A String", # The number of quota bytes used by this file. |
| 1407 | "fileSize": "A String", # The size of the file in bytes. This is only populated for files with content stored in Drive. |
| 1408 | "createdDate": "A String", # Create time for this file (formatted ISO8601 timestamp). |
| 1409 | "properties": [ # The list of properties. |
| 1410 | { # A key-value pair that is either public or private to an application. |
| 1411 | "kind": "drive#property", # This is always drive#property. |
| 1412 | "value": "A String", # The value of this property. |
| 1413 | "etag": "A String", # ETag of the property. |
| 1414 | "visibility": "A String", # The visibility of this property. |
| 1415 | "key": "A String", # The key of this property. |
| 1416 | "selfLink": "A String", # The link back to this property. |
| 1417 | }, |
| 1418 | ], |
| 1419 | "md5Checksum": "A String", # An MD5 checksum for the content of this file. This is populated only for files with content stored in Drive. |
| 1420 | "iconLink": "A String", # A link to the file's icon. |
| 1421 | "defaultOpenWithLink": "A String", # A link to open this file with the user's default app for this file. Only populated when the drive.apps.readonly scope is used. |
| 1422 | "embedLink": "A String", # A link for embedding the file. |
| 1423 | "alternateLink": "A String", # A link for opening the file in using a relevant Google editor or viewer. |
| 1424 | "title": "A String", # The title of this file. |
| 1425 | "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. |
| 1426 | "downloadUrl": "A String", # Short lived download URL for the file. This is only populated for files with content stored in Drive. |
| 1427 | "userPermission": { # A permission for a file. # The permissions for the authenticated user on this file. |
| 1428 | "withLink": True or False, # Whether the link is required for this permission. |
| 1429 | "domain": "A String", # The domain name of the entity this permission refers to. This is an output-only field which is populated when the permission type is "user", "group" or "domain". |
| 1430 | "name": "A String", # The name for this permission. |
| 1431 | "kind": "drive#permission", # This is always drive#permission. |
| 1432 | "value": "A String", # The email address or domain name for the entity. This is used during inserts and is not populated in responses. When making a drive.permissions.insert request, exactly one of 'id' or 'value' fields must be specified. |
| 1433 | "id": "A String", # The ID of the user this permission refers to, and identical to the permissionId in the About and Files resources. When making a drive.permissions.insert request, exactly one of 'id' or 'value' fields must be specified. |
| 1434 | "authKey": "A String", # The authkey parameter required for this permission. |
| 1435 | "etag": "A String", # The ETag of the permission. |
| 1436 | "emailAddress": "A String", # The email address of the user this permission refers to. This is an output-only field which is populated when the permission type is "user" and the given user's Google+ profile privacy settings allow exposing their email address. |
| 1437 | "photoLink": "A String", # A link to the profile photo, if available. |
| 1438 | "role": "A String", # The primary role for this user. Allowed values are: |
| 1439 | # - owner |
| 1440 | # - reader |
| 1441 | # - writer |
| 1442 | "type": "A String", # The account type. Allowed values are: |
| 1443 | # - user |
| 1444 | # - group |
| 1445 | # - domain |
| 1446 | # - anyone |
| 1447 | "additionalRoles": [ # Additional roles for this user. Only commenter is currently allowed. |
| 1448 | "A String", |
| 1449 | ], |
| 1450 | "selfLink": "A String", # A link back to this permission. |
| 1451 | }, |
| 1452 | "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. |
| 1453 | "fileExtension": "A String", # The file extension used when downloading this file. This field is read only. To set the extension, include it in the title when creating the file. This is only populated for files with content stored in Drive. |
| 1454 | "headRevisionId": "A String", # The ID of the file's head revision. This will only be populated for files with content stored in Drive. |
| 1455 | "selfLink": "A String", # A link back to this file. |
| 1456 | "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. |
| 1457 | }</pre> |
| 1458 | </div> |
| 1459 | |
| 1460 | <div class="method"> |
| 1461 | <code class="details" id="touch">touch(fileId)</code> |
| 1462 | <pre>Set the file's updated time to the current server time. |
| 1463 | |
| 1464 | Args: |
| 1465 | fileId: string, The ID of the file to update. (required) |
| 1466 | |
| 1467 | Returns: |
| 1468 | An object of the form: |
| 1469 | |
| 1470 | { # The metadata for a file. |
| 1471 | "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. |
| 1472 | "lastViewedByMeDate": "A String", # Last time this file was viewed by the user (formatted RFC 3339 timestamp). |
| 1473 | "appDataContents": True or False, # Whether this file is in the appdata folder. |
| 1474 | "thumbnailLink": "A String", # A link to the file's thumbnail. |
| 1475 | "labels": { # A group of labels for the file. |
| 1476 | "restricted": True or False, # Whether viewers are prevented from downloading this file. |
| 1477 | "hidden": True or False, # Deprecated. |
| 1478 | "viewed": True or False, # Whether this file has been viewed by this user. |
| 1479 | "starred": True or False, # Whether this file is starred by the user. |
| 1480 | "trashed": True or False, # Whether this file has been trashed. |
| 1481 | }, |
| 1482 | "indexableText": { # Indexable text attributes for the file (can only be written) |
| 1483 | "text": "A String", # The text to be indexed for this file. |
| 1484 | }, |
| 1485 | "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. |
| 1486 | "lastModifyingUserName": "A String", # Name of the last user to modify this file. |
| 1487 | "writersCanShare": True or False, # Whether writers can share the document with other users. |
| 1488 | "owners": [ # The owner(s) of this file. |
| 1489 | { # The JSON template for a user. |
| 1490 | "picture": { # The user's profile picture. |
| 1491 | "url": "A String", # A URL that points to a profile picture of this user. |
| 1492 | }, |
| 1493 | "kind": "drive#user", # This is always drive#user. |
| 1494 | "isAuthenticatedUser": True or False, # Whether this user is the same as the authenticated user for whom the request was made. |
| 1495 | "displayName": "A String", # A plain text displayable name for this user. |
| 1496 | "permissionId": "A String", # The user's ID as visible in the permissions collection. |
| 1497 | }, |
| 1498 | ], |
| 1499 | "id": "A String", # The ID of the file. |
| 1500 | "lastModifyingUser": { # The JSON template for a user. # The last user to modify this file. |
| 1501 | "picture": { # The user's profile picture. |
| 1502 | "url": "A String", # A URL that points to a profile picture of this user. |
| 1503 | }, |
| 1504 | "kind": "drive#user", # This is always drive#user. |
| 1505 | "isAuthenticatedUser": True or False, # Whether this user is the same as the authenticated user for whom the request was made. |
| 1506 | "displayName": "A String", # A plain text displayable name for this user. |
| 1507 | "permissionId": "A String", # The user's ID as visible in the permissions collection. |
| 1508 | }, |
| 1509 | "copyable": True or False, # Whether the file can be copied by the current user. |
| 1510 | "ownerNames": [ # Name(s) of the owner(s) of this file. |
| 1511 | "A String", |
| 1512 | ], |
| 1513 | "sharedWithMeDate": "A String", # Time at which this file was shared with the user (formatted RFC 3339 timestamp). |
| 1514 | "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. |
| 1515 | "etag": "A String", # ETag of the file. |
| 1516 | "parents": [ # Collection of parent folders which contain this file. |
| 1517 | # 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. |
| 1518 | { # A reference to a file's parent. |
| 1519 | "selfLink": "A String", # A link back to this reference. |
| 1520 | "kind": "drive#parentReference", # This is always drive#parentReference. |
| 1521 | "id": "A String", # The ID of the parent. |
| 1522 | "isRoot": True or False, # Whether or not the parent is the root folder. |
| 1523 | "parentLink": "A String", # A link to the parent. |
| 1524 | }, |
| 1525 | ], |
| 1526 | "exportLinks": { # Links for exporting Google Docs to specific formats. |
| 1527 | "a_key": "A String", # A mapping from export format to URL |
| 1528 | }, |
| 1529 | "shared": True or False, # Whether the file has been shared. |
| 1530 | "thumbnail": { # Thumbnail for the file. Only accepted on upload and for files that are not already thumbnailed by Google. |
| 1531 | "mimeType": "A String", # The MIME type of the thumbnail. |
| 1532 | "image": "A String", # The URL-safe Base64 encoded bytes of the thumbnail image. |
| 1533 | }, |
| 1534 | "openWithLinks": { # A map of the id of each of the user's apps to a link to open this file with that app. Only populated when the drive.apps.readonly scope is used. |
| 1535 | "a_key": "A String", |
| 1536 | }, |
| 1537 | "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. |
| 1538 | "exposureBias": 3.14, # The exposure bias of the photo (APEX value). |
| 1539 | "exposureTime": 3.14, # The length of the exposure, in seconds. |
| 1540 | "cameraMake": "A String", # The make of the camera used to create the photo. |
| 1541 | "maxApertureValue": 3.14, # The smallest f-number of the lens at the focal length used to create the photo (APEX value). |
| 1542 | "isoSpeed": 42, # The ISO speed used to create the photo. |
| 1543 | "focalLength": 3.14, # The focal length used to create the photo, in millimeters. |
| 1544 | "exposureMode": "A String", # The exposure mode used to create the photo. |
| 1545 | "colorSpace": "A String", # The color space of the photo. |
| 1546 | "location": { # Geographic location information stored in the image. |
| 1547 | "latitude": 3.14, # The latitude stored in the image. |
| 1548 | "altitude": 3.14, # The altitude stored in the image. |
| 1549 | "longitude": 3.14, # The longitude stored in the image. |
| 1550 | }, |
| 1551 | "subjectDistance": 42, # The distance to the subject of the photo, in meters. |
| 1552 | "height": 42, # The height of the image in pixels. |
| 1553 | "lens": "A String", # The lens used to create the photo. |
| 1554 | "date": "A String", # The date and time the photo was taken (EXIF format timestamp). |
| 1555 | "width": 42, # The width of the image in pixels. |
| 1556 | "meteringMode": "A String", # The metering mode used to create the photo. |
| 1557 | "flashUsed": True or False, # Whether a flash was used to create the photo. |
| 1558 | "aperture": 3.14, # The aperture used to create the photo (f-number). |
| 1559 | "rotation": 42, # The rotation in clockwise degrees from the image's original orientation. |
| 1560 | "sensor": "A String", # The type of sensor used to create the photo. |
| 1561 | "whiteBalance": "A String", # The white balance mode used to create the photo. |
| 1562 | "cameraModel": "A String", # The model of the camera used to create the photo. |
| 1563 | }, |
| 1564 | "description": "A String", # A short description of the file. |
| 1565 | "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. |
| 1566 | "editable": True or False, # Whether the file can be edited by the current user. |
| 1567 | "kind": "drive#file", # The type of file. This is always drive#file. |
| 1568 | "quotaBytesUsed": "A String", # The number of quota bytes used by this file. |
| 1569 | "fileSize": "A String", # The size of the file in bytes. This is only populated for files with content stored in Drive. |
| 1570 | "createdDate": "A String", # Create time for this file (formatted ISO8601 timestamp). |
| 1571 | "properties": [ # The list of properties. |
| 1572 | { # A key-value pair that is either public or private to an application. |
| 1573 | "kind": "drive#property", # This is always drive#property. |
| 1574 | "value": "A String", # The value of this property. |
| 1575 | "etag": "A String", # ETag of the property. |
| 1576 | "visibility": "A String", # The visibility of this property. |
| 1577 | "key": "A String", # The key of this property. |
| 1578 | "selfLink": "A String", # The link back to this property. |
| 1579 | }, |
| 1580 | ], |
| 1581 | "md5Checksum": "A String", # An MD5 checksum for the content of this file. This is populated only for files with content stored in Drive. |
| 1582 | "iconLink": "A String", # A link to the file's icon. |
| 1583 | "defaultOpenWithLink": "A String", # A link to open this file with the user's default app for this file. Only populated when the drive.apps.readonly scope is used. |
| 1584 | "embedLink": "A String", # A link for embedding the file. |
| 1585 | "alternateLink": "A String", # A link for opening the file in using a relevant Google editor or viewer. |
| 1586 | "title": "A String", # The title of this file. |
| 1587 | "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. |
| 1588 | "downloadUrl": "A String", # Short lived download URL for the file. This is only populated for files with content stored in Drive. |
| 1589 | "userPermission": { # A permission for a file. # The permissions for the authenticated user on this file. |
| 1590 | "withLink": True or False, # Whether the link is required for this permission. |
| 1591 | "domain": "A String", # The domain name of the entity this permission refers to. This is an output-only field which is populated when the permission type is "user", "group" or "domain". |
| 1592 | "name": "A String", # The name for this permission. |
| 1593 | "kind": "drive#permission", # This is always drive#permission. |
| 1594 | "value": "A String", # The email address or domain name for the entity. This is used during inserts and is not populated in responses. When making a drive.permissions.insert request, exactly one of 'id' or 'value' fields must be specified. |
| 1595 | "id": "A String", # The ID of the user this permission refers to, and identical to the permissionId in the About and Files resources. When making a drive.permissions.insert request, exactly one of 'id' or 'value' fields must be specified. |
| 1596 | "authKey": "A String", # The authkey parameter required for this permission. |
| 1597 | "etag": "A String", # The ETag of the permission. |
| 1598 | "emailAddress": "A String", # The email address of the user this permission refers to. This is an output-only field which is populated when the permission type is "user" and the given user's Google+ profile privacy settings allow exposing their email address. |
| 1599 | "photoLink": "A String", # A link to the profile photo, if available. |
| 1600 | "role": "A String", # The primary role for this user. Allowed values are: |
| 1601 | # - owner |
| 1602 | # - reader |
| 1603 | # - writer |
| 1604 | "type": "A String", # The account type. Allowed values are: |
| 1605 | # - user |
| 1606 | # - group |
| 1607 | # - domain |
| 1608 | # - anyone |
| 1609 | "additionalRoles": [ # Additional roles for this user. Only commenter is currently allowed. |
| 1610 | "A String", |
| 1611 | ], |
| 1612 | "selfLink": "A String", # A link back to this permission. |
| 1613 | }, |
| 1614 | "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. |
| 1615 | "fileExtension": "A String", # The file extension used when downloading this file. This field is read only. To set the extension, include it in the title when creating the file. This is only populated for files with content stored in Drive. |
| 1616 | "headRevisionId": "A String", # The ID of the file's head revision. This will only be populated for files with content stored in Drive. |
| 1617 | "selfLink": "A String", # A link back to this file. |
| 1618 | "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. |
| 1619 | }</pre> |
| 1620 | </div> |
| 1621 | |
| 1622 | <div class="method"> |
| 1623 | <code class="details" id="trash">trash(fileId)</code> |
| 1624 | <pre>Moves a file to the trash. |
| 1625 | |
| 1626 | Args: |
| 1627 | fileId: string, The ID of the file to trash. (required) |
| 1628 | |
| 1629 | Returns: |
| 1630 | An object of the form: |
| 1631 | |
| 1632 | { # The metadata for a file. |
| 1633 | "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. |
| 1634 | "lastViewedByMeDate": "A String", # Last time this file was viewed by the user (formatted RFC 3339 timestamp). |
| 1635 | "appDataContents": True or False, # Whether this file is in the appdata folder. |
| 1636 | "thumbnailLink": "A String", # A link to the file's thumbnail. |
| 1637 | "labels": { # A group of labels for the file. |
| 1638 | "restricted": True or False, # Whether viewers are prevented from downloading this file. |
| 1639 | "hidden": True or False, # Deprecated. |
| 1640 | "viewed": True or False, # Whether this file has been viewed by this user. |
| 1641 | "starred": True or False, # Whether this file is starred by the user. |
| 1642 | "trashed": True or False, # Whether this file has been trashed. |
| 1643 | }, |
| 1644 | "indexableText": { # Indexable text attributes for the file (can only be written) |
| 1645 | "text": "A String", # The text to be indexed for this file. |
| 1646 | }, |
| 1647 | "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. |
| 1648 | "lastModifyingUserName": "A String", # Name of the last user to modify this file. |
| 1649 | "writersCanShare": True or False, # Whether writers can share the document with other users. |
| 1650 | "owners": [ # The owner(s) of this file. |
| 1651 | { # The JSON template for a user. |
| 1652 | "picture": { # The user's profile picture. |
| 1653 | "url": "A String", # A URL that points to a profile picture of this user. |
| 1654 | }, |
| 1655 | "kind": "drive#user", # This is always drive#user. |
| 1656 | "isAuthenticatedUser": True or False, # Whether this user is the same as the authenticated user for whom the request was made. |
| 1657 | "displayName": "A String", # A plain text displayable name for this user. |
| 1658 | "permissionId": "A String", # The user's ID as visible in the permissions collection. |
| 1659 | }, |
| 1660 | ], |
| 1661 | "id": "A String", # The ID of the file. |
| 1662 | "lastModifyingUser": { # The JSON template for a user. # The last user to modify this file. |
| 1663 | "picture": { # The user's profile picture. |
| 1664 | "url": "A String", # A URL that points to a profile picture of this user. |
| 1665 | }, |
| 1666 | "kind": "drive#user", # This is always drive#user. |
| 1667 | "isAuthenticatedUser": True or False, # Whether this user is the same as the authenticated user for whom the request was made. |
| 1668 | "displayName": "A String", # A plain text displayable name for this user. |
| 1669 | "permissionId": "A String", # The user's ID as visible in the permissions collection. |
| 1670 | }, |
| 1671 | "copyable": True or False, # Whether the file can be copied by the current user. |
| 1672 | "ownerNames": [ # Name(s) of the owner(s) of this file. |
| 1673 | "A String", |
| 1674 | ], |
| 1675 | "sharedWithMeDate": "A String", # Time at which this file was shared with the user (formatted RFC 3339 timestamp). |
| 1676 | "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. |
| 1677 | "etag": "A String", # ETag of the file. |
| 1678 | "parents": [ # Collection of parent folders which contain this file. |
| 1679 | # 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. |
| 1680 | { # A reference to a file's parent. |
| 1681 | "selfLink": "A String", # A link back to this reference. |
| 1682 | "kind": "drive#parentReference", # This is always drive#parentReference. |
| 1683 | "id": "A String", # The ID of the parent. |
| 1684 | "isRoot": True or False, # Whether or not the parent is the root folder. |
| 1685 | "parentLink": "A String", # A link to the parent. |
| 1686 | }, |
| 1687 | ], |
| 1688 | "exportLinks": { # Links for exporting Google Docs to specific formats. |
| 1689 | "a_key": "A String", # A mapping from export format to URL |
| 1690 | }, |
| 1691 | "shared": True or False, # Whether the file has been shared. |
| 1692 | "thumbnail": { # Thumbnail for the file. Only accepted on upload and for files that are not already thumbnailed by Google. |
| 1693 | "mimeType": "A String", # The MIME type of the thumbnail. |
| 1694 | "image": "A String", # The URL-safe Base64 encoded bytes of the thumbnail image. |
| 1695 | }, |
| 1696 | "openWithLinks": { # A map of the id of each of the user's apps to a link to open this file with that app. Only populated when the drive.apps.readonly scope is used. |
| 1697 | "a_key": "A String", |
| 1698 | }, |
| 1699 | "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. |
| 1700 | "exposureBias": 3.14, # The exposure bias of the photo (APEX value). |
| 1701 | "exposureTime": 3.14, # The length of the exposure, in seconds. |
| 1702 | "cameraMake": "A String", # The make of the camera used to create the photo. |
| 1703 | "maxApertureValue": 3.14, # The smallest f-number of the lens at the focal length used to create the photo (APEX value). |
| 1704 | "isoSpeed": 42, # The ISO speed used to create the photo. |
| 1705 | "focalLength": 3.14, # The focal length used to create the photo, in millimeters. |
| 1706 | "exposureMode": "A String", # The exposure mode used to create the photo. |
| 1707 | "colorSpace": "A String", # The color space of the photo. |
| 1708 | "location": { # Geographic location information stored in the image. |
| 1709 | "latitude": 3.14, # The latitude stored in the image. |
| 1710 | "altitude": 3.14, # The altitude stored in the image. |
| 1711 | "longitude": 3.14, # The longitude stored in the image. |
| 1712 | }, |
| 1713 | "subjectDistance": 42, # The distance to the subject of the photo, in meters. |
| 1714 | "height": 42, # The height of the image in pixels. |
| 1715 | "lens": "A String", # The lens used to create the photo. |
| 1716 | "date": "A String", # The date and time the photo was taken (EXIF format timestamp). |
| 1717 | "width": 42, # The width of the image in pixels. |
| 1718 | "meteringMode": "A String", # The metering mode used to create the photo. |
| 1719 | "flashUsed": True or False, # Whether a flash was used to create the photo. |
| 1720 | "aperture": 3.14, # The aperture used to create the photo (f-number). |
| 1721 | "rotation": 42, # The rotation in clockwise degrees from the image's original orientation. |
| 1722 | "sensor": "A String", # The type of sensor used to create the photo. |
| 1723 | "whiteBalance": "A String", # The white balance mode used to create the photo. |
| 1724 | "cameraModel": "A String", # The model of the camera used to create the photo. |
| 1725 | }, |
| 1726 | "description": "A String", # A short description of the file. |
| 1727 | "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. |
| 1728 | "editable": True or False, # Whether the file can be edited by the current user. |
| 1729 | "kind": "drive#file", # The type of file. This is always drive#file. |
| 1730 | "quotaBytesUsed": "A String", # The number of quota bytes used by this file. |
| 1731 | "fileSize": "A String", # The size of the file in bytes. This is only populated for files with content stored in Drive. |
| 1732 | "createdDate": "A String", # Create time for this file (formatted ISO8601 timestamp). |
| 1733 | "properties": [ # The list of properties. |
| 1734 | { # A key-value pair that is either public or private to an application. |
| 1735 | "kind": "drive#property", # This is always drive#property. |
| 1736 | "value": "A String", # The value of this property. |
| 1737 | "etag": "A String", # ETag of the property. |
| 1738 | "visibility": "A String", # The visibility of this property. |
| 1739 | "key": "A String", # The key of this property. |
| 1740 | "selfLink": "A String", # The link back to this property. |
| 1741 | }, |
| 1742 | ], |
| 1743 | "md5Checksum": "A String", # An MD5 checksum for the content of this file. This is populated only for files with content stored in Drive. |
| 1744 | "iconLink": "A String", # A link to the file's icon. |
| 1745 | "defaultOpenWithLink": "A String", # A link to open this file with the user's default app for this file. Only populated when the drive.apps.readonly scope is used. |
| 1746 | "embedLink": "A String", # A link for embedding the file. |
| 1747 | "alternateLink": "A String", # A link for opening the file in using a relevant Google editor or viewer. |
| 1748 | "title": "A String", # The title of this file. |
| 1749 | "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. |
| 1750 | "downloadUrl": "A String", # Short lived download URL for the file. This is only populated for files with content stored in Drive. |
| 1751 | "userPermission": { # A permission for a file. # The permissions for the authenticated user on this file. |
| 1752 | "withLink": True or False, # Whether the link is required for this permission. |
| 1753 | "domain": "A String", # The domain name of the entity this permission refers to. This is an output-only field which is populated when the permission type is "user", "group" or "domain". |
| 1754 | "name": "A String", # The name for this permission. |
| 1755 | "kind": "drive#permission", # This is always drive#permission. |
| 1756 | "value": "A String", # The email address or domain name for the entity. This is used during inserts and is not populated in responses. When making a drive.permissions.insert request, exactly one of 'id' or 'value' fields must be specified. |
| 1757 | "id": "A String", # The ID of the user this permission refers to, and identical to the permissionId in the About and Files resources. When making a drive.permissions.insert request, exactly one of 'id' or 'value' fields must be specified. |
| 1758 | "authKey": "A String", # The authkey parameter required for this permission. |
| 1759 | "etag": "A String", # The ETag of the permission. |
| 1760 | "emailAddress": "A String", # The email address of the user this permission refers to. This is an output-only field which is populated when the permission type is "user" and the given user's Google+ profile privacy settings allow exposing their email address. |
| 1761 | "photoLink": "A String", # A link to the profile photo, if available. |
| 1762 | "role": "A String", # The primary role for this user. Allowed values are: |
| 1763 | # - owner |
| 1764 | # - reader |
| 1765 | # - writer |
| 1766 | "type": "A String", # The account type. Allowed values are: |
| 1767 | # - user |
| 1768 | # - group |
| 1769 | # - domain |
| 1770 | # - anyone |
| 1771 | "additionalRoles": [ # Additional roles for this user. Only commenter is currently allowed. |
| 1772 | "A String", |
| 1773 | ], |
| 1774 | "selfLink": "A String", # A link back to this permission. |
| 1775 | }, |
| 1776 | "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. |
| 1777 | "fileExtension": "A String", # The file extension used when downloading this file. This field is read only. To set the extension, include it in the title when creating the file. This is only populated for files with content stored in Drive. |
| 1778 | "headRevisionId": "A String", # The ID of the file's head revision. This will only be populated for files with content stored in Drive. |
| 1779 | "selfLink": "A String", # A link back to this file. |
| 1780 | "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. |
| 1781 | }</pre> |
| 1782 | </div> |
| 1783 | |
| 1784 | <div class="method"> |
| 1785 | <code class="details" id="untrash">untrash(fileId)</code> |
| 1786 | <pre>Restores a file from the trash. |
| 1787 | |
| 1788 | Args: |
| 1789 | fileId: string, The ID of the file to untrash. (required) |
| 1790 | |
| 1791 | Returns: |
| 1792 | An object of the form: |
| 1793 | |
| 1794 | { # The metadata for a file. |
| 1795 | "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. |
| 1796 | "lastViewedByMeDate": "A String", # Last time this file was viewed by the user (formatted RFC 3339 timestamp). |
| 1797 | "appDataContents": True or False, # Whether this file is in the appdata folder. |
| 1798 | "thumbnailLink": "A String", # A link to the file's thumbnail. |
| 1799 | "labels": { # A group of labels for the file. |
| 1800 | "restricted": True or False, # Whether viewers are prevented from downloading this file. |
| 1801 | "hidden": True or False, # Deprecated. |
| 1802 | "viewed": True or False, # Whether this file has been viewed by this user. |
| 1803 | "starred": True or False, # Whether this file is starred by the user. |
| 1804 | "trashed": True or False, # Whether this file has been trashed. |
| 1805 | }, |
| 1806 | "indexableText": { # Indexable text attributes for the file (can only be written) |
| 1807 | "text": "A String", # The text to be indexed for this file. |
| 1808 | }, |
| 1809 | "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. |
| 1810 | "lastModifyingUserName": "A String", # Name of the last user to modify this file. |
| 1811 | "writersCanShare": True or False, # Whether writers can share the document with other users. |
| 1812 | "owners": [ # The owner(s) of this file. |
| 1813 | { # The JSON template for a user. |
| 1814 | "picture": { # The user's profile picture. |
| 1815 | "url": "A String", # A URL that points to a profile picture of this user. |
| 1816 | }, |
| 1817 | "kind": "drive#user", # This is always drive#user. |
| 1818 | "isAuthenticatedUser": True or False, # Whether this user is the same as the authenticated user for whom the request was made. |
| 1819 | "displayName": "A String", # A plain text displayable name for this user. |
| 1820 | "permissionId": "A String", # The user's ID as visible in the permissions collection. |
| 1821 | }, |
| 1822 | ], |
| 1823 | "id": "A String", # The ID of the file. |
| 1824 | "lastModifyingUser": { # The JSON template for a user. # The last user to modify this file. |
| 1825 | "picture": { # The user's profile picture. |
| 1826 | "url": "A String", # A URL that points to a profile picture of this user. |
| 1827 | }, |
| 1828 | "kind": "drive#user", # This is always drive#user. |
| 1829 | "isAuthenticatedUser": True or False, # Whether this user is the same as the authenticated user for whom the request was made. |
| 1830 | "displayName": "A String", # A plain text displayable name for this user. |
| 1831 | "permissionId": "A String", # The user's ID as visible in the permissions collection. |
| 1832 | }, |
| 1833 | "copyable": True or False, # Whether the file can be copied by the current user. |
| 1834 | "ownerNames": [ # Name(s) of the owner(s) of this file. |
| 1835 | "A String", |
| 1836 | ], |
| 1837 | "sharedWithMeDate": "A String", # Time at which this file was shared with the user (formatted RFC 3339 timestamp). |
| 1838 | "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. |
| 1839 | "etag": "A String", # ETag of the file. |
| 1840 | "parents": [ # Collection of parent folders which contain this file. |
| 1841 | # 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. |
| 1842 | { # A reference to a file's parent. |
| 1843 | "selfLink": "A String", # A link back to this reference. |
| 1844 | "kind": "drive#parentReference", # This is always drive#parentReference. |
| 1845 | "id": "A String", # The ID of the parent. |
| 1846 | "isRoot": True or False, # Whether or not the parent is the root folder. |
| 1847 | "parentLink": "A String", # A link to the parent. |
| 1848 | }, |
| 1849 | ], |
| 1850 | "exportLinks": { # Links for exporting Google Docs to specific formats. |
| 1851 | "a_key": "A String", # A mapping from export format to URL |
| 1852 | }, |
| 1853 | "shared": True or False, # Whether the file has been shared. |
| 1854 | "thumbnail": { # Thumbnail for the file. Only accepted on upload and for files that are not already thumbnailed by Google. |
| 1855 | "mimeType": "A String", # The MIME type of the thumbnail. |
| 1856 | "image": "A String", # The URL-safe Base64 encoded bytes of the thumbnail image. |
| 1857 | }, |
| 1858 | "openWithLinks": { # A map of the id of each of the user's apps to a link to open this file with that app. Only populated when the drive.apps.readonly scope is used. |
| 1859 | "a_key": "A String", |
| 1860 | }, |
| 1861 | "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. |
| 1862 | "exposureBias": 3.14, # The exposure bias of the photo (APEX value). |
| 1863 | "exposureTime": 3.14, # The length of the exposure, in seconds. |
| 1864 | "cameraMake": "A String", # The make of the camera used to create the photo. |
| 1865 | "maxApertureValue": 3.14, # The smallest f-number of the lens at the focal length used to create the photo (APEX value). |
| 1866 | "isoSpeed": 42, # The ISO speed used to create the photo. |
| 1867 | "focalLength": 3.14, # The focal length used to create the photo, in millimeters. |
| 1868 | "exposureMode": "A String", # The exposure mode used to create the photo. |
| 1869 | "colorSpace": "A String", # The color space of the photo. |
| 1870 | "location": { # Geographic location information stored in the image. |
| 1871 | "latitude": 3.14, # The latitude stored in the image. |
| 1872 | "altitude": 3.14, # The altitude stored in the image. |
| 1873 | "longitude": 3.14, # The longitude stored in the image. |
| 1874 | }, |
| 1875 | "subjectDistance": 42, # The distance to the subject of the photo, in meters. |
| 1876 | "height": 42, # The height of the image in pixels. |
| 1877 | "lens": "A String", # The lens used to create the photo. |
| 1878 | "date": "A String", # The date and time the photo was taken (EXIF format timestamp). |
| 1879 | "width": 42, # The width of the image in pixels. |
| 1880 | "meteringMode": "A String", # The metering mode used to create the photo. |
| 1881 | "flashUsed": True or False, # Whether a flash was used to create the photo. |
| 1882 | "aperture": 3.14, # The aperture used to create the photo (f-number). |
| 1883 | "rotation": 42, # The rotation in clockwise degrees from the image's original orientation. |
| 1884 | "sensor": "A String", # The type of sensor used to create the photo. |
| 1885 | "whiteBalance": "A String", # The white balance mode used to create the photo. |
| 1886 | "cameraModel": "A String", # The model of the camera used to create the photo. |
| 1887 | }, |
| 1888 | "description": "A String", # A short description of the file. |
| 1889 | "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. |
| 1890 | "editable": True or False, # Whether the file can be edited by the current user. |
| 1891 | "kind": "drive#file", # The type of file. This is always drive#file. |
| 1892 | "quotaBytesUsed": "A String", # The number of quota bytes used by this file. |
| 1893 | "fileSize": "A String", # The size of the file in bytes. This is only populated for files with content stored in Drive. |
| 1894 | "createdDate": "A String", # Create time for this file (formatted ISO8601 timestamp). |
| 1895 | "properties": [ # The list of properties. |
| 1896 | { # A key-value pair that is either public or private to an application. |
| 1897 | "kind": "drive#property", # This is always drive#property. |
| 1898 | "value": "A String", # The value of this property. |
| 1899 | "etag": "A String", # ETag of the property. |
| 1900 | "visibility": "A String", # The visibility of this property. |
| 1901 | "key": "A String", # The key of this property. |
| 1902 | "selfLink": "A String", # The link back to this property. |
| 1903 | }, |
| 1904 | ], |
| 1905 | "md5Checksum": "A String", # An MD5 checksum for the content of this file. This is populated only for files with content stored in Drive. |
| 1906 | "iconLink": "A String", # A link to the file's icon. |
| 1907 | "defaultOpenWithLink": "A String", # A link to open this file with the user's default app for this file. Only populated when the drive.apps.readonly scope is used. |
| 1908 | "embedLink": "A String", # A link for embedding the file. |
| 1909 | "alternateLink": "A String", # A link for opening the file in using a relevant Google editor or viewer. |
| 1910 | "title": "A String", # The title of this file. |
| 1911 | "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. |
| 1912 | "downloadUrl": "A String", # Short lived download URL for the file. This is only populated for files with content stored in Drive. |
| 1913 | "userPermission": { # A permission for a file. # The permissions for the authenticated user on this file. |
| 1914 | "withLink": True or False, # Whether the link is required for this permission. |
| 1915 | "domain": "A String", # The domain name of the entity this permission refers to. This is an output-only field which is populated when the permission type is "user", "group" or "domain". |
| 1916 | "name": "A String", # The name for this permission. |
| 1917 | "kind": "drive#permission", # This is always drive#permission. |
| 1918 | "value": "A String", # The email address or domain name for the entity. This is used during inserts and is not populated in responses. When making a drive.permissions.insert request, exactly one of 'id' or 'value' fields must be specified. |
| 1919 | "id": "A String", # The ID of the user this permission refers to, and identical to the permissionId in the About and Files resources. When making a drive.permissions.insert request, exactly one of 'id' or 'value' fields must be specified. |
| 1920 | "authKey": "A String", # The authkey parameter required for this permission. |
| 1921 | "etag": "A String", # The ETag of the permission. |
| 1922 | "emailAddress": "A String", # The email address of the user this permission refers to. This is an output-only field which is populated when the permission type is "user" and the given user's Google+ profile privacy settings allow exposing their email address. |
| 1923 | "photoLink": "A String", # A link to the profile photo, if available. |
| 1924 | "role": "A String", # The primary role for this user. Allowed values are: |
| 1925 | # - owner |
| 1926 | # - reader |
| 1927 | # - writer |
| 1928 | "type": "A String", # The account type. Allowed values are: |
| 1929 | # - user |
| 1930 | # - group |
| 1931 | # - domain |
| 1932 | # - anyone |
| 1933 | "additionalRoles": [ # Additional roles for this user. Only commenter is currently allowed. |
| 1934 | "A String", |
| 1935 | ], |
| 1936 | "selfLink": "A String", # A link back to this permission. |
| 1937 | }, |
| 1938 | "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. |
| 1939 | "fileExtension": "A String", # The file extension used when downloading this file. This field is read only. To set the extension, include it in the title when creating the file. This is only populated for files with content stored in Drive. |
| 1940 | "headRevisionId": "A String", # The ID of the file's head revision. This will only be populated for files with content stored in Drive. |
| 1941 | "selfLink": "A String", # A link back to this file. |
| 1942 | "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. |
| 1943 | }</pre> |
| 1944 | </div> |
| 1945 | |
| 1946 | <div class="method"> |
| 1947 | <code class="details" id="update">update(fileId, body=None, newRevision=None, media_body=None, ocrLanguage=None, ocr=None, pinned=None, updateViewedDate=None, timedTextTrackName=None, convert=None, useContentAsIndexableText=None, setModifiedDate=None, timedTextLanguage=None)</code> |
| 1948 | <pre>Updates file metadata and/or content. |
| 1949 | |
| 1950 | Args: |
| 1951 | fileId: string, The ID of the file to update. (required) |
| 1952 | body: object, The request body. |
| 1953 | The object takes the form of: |
| 1954 | |
| 1955 | { # The metadata for a file. |
| 1956 | "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. |
| 1957 | "lastViewedByMeDate": "A String", # Last time this file was viewed by the user (formatted RFC 3339 timestamp). |
| 1958 | "appDataContents": True or False, # Whether this file is in the appdata folder. |
| 1959 | "thumbnailLink": "A String", # A link to the file's thumbnail. |
| 1960 | "labels": { # A group of labels for the file. |
| 1961 | "restricted": True or False, # Whether viewers are prevented from downloading this file. |
| 1962 | "hidden": True or False, # Deprecated. |
| 1963 | "viewed": True or False, # Whether this file has been viewed by this user. |
| 1964 | "starred": True or False, # Whether this file is starred by the user. |
| 1965 | "trashed": True or False, # Whether this file has been trashed. |
| 1966 | }, |
| 1967 | "indexableText": { # Indexable text attributes for the file (can only be written) |
| 1968 | "text": "A String", # The text to be indexed for this file. |
| 1969 | }, |
| 1970 | "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. |
| 1971 | "lastModifyingUserName": "A String", # Name of the last user to modify this file. |
| 1972 | "writersCanShare": True or False, # Whether writers can share the document with other users. |
| 1973 | "owners": [ # The owner(s) of this file. |
| 1974 | { # The JSON template for a user. |
| 1975 | "picture": { # The user's profile picture. |
| 1976 | "url": "A String", # A URL that points to a profile picture of this user. |
| 1977 | }, |
| 1978 | "kind": "drive#user", # This is always drive#user. |
| 1979 | "isAuthenticatedUser": True or False, # Whether this user is the same as the authenticated user for whom the request was made. |
| 1980 | "displayName": "A String", # A plain text displayable name for this user. |
| 1981 | "permissionId": "A String", # The user's ID as visible in the permissions collection. |
| 1982 | }, |
| 1983 | ], |
| 1984 | "id": "A String", # The ID of the file. |
| 1985 | "lastModifyingUser": { # The JSON template for a user. # The last user to modify this file. |
| 1986 | "picture": { # The user's profile picture. |
| 1987 | "url": "A String", # A URL that points to a profile picture of this user. |
| 1988 | }, |
| 1989 | "kind": "drive#user", # This is always drive#user. |
| 1990 | "isAuthenticatedUser": True or False, # Whether this user is the same as the authenticated user for whom the request was made. |
| 1991 | "displayName": "A String", # A plain text displayable name for this user. |
| 1992 | "permissionId": "A String", # The user's ID as visible in the permissions collection. |
| 1993 | }, |
| 1994 | "copyable": True or False, # Whether the file can be copied by the current user. |
| 1995 | "ownerNames": [ # Name(s) of the owner(s) of this file. |
| 1996 | "A String", |
| 1997 | ], |
| 1998 | "sharedWithMeDate": "A String", # Time at which this file was shared with the user (formatted RFC 3339 timestamp). |
| 1999 | "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. |
| 2000 | "etag": "A String", # ETag of the file. |
| 2001 | "parents": [ # Collection of parent folders which contain this file. |
| 2002 | # 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. |
| 2003 | { # A reference to a file's parent. |
| 2004 | "selfLink": "A String", # A link back to this reference. |
| 2005 | "kind": "drive#parentReference", # This is always drive#parentReference. |
| 2006 | "id": "A String", # The ID of the parent. |
| 2007 | "isRoot": True or False, # Whether or not the parent is the root folder. |
| 2008 | "parentLink": "A String", # A link to the parent. |
| 2009 | }, |
| 2010 | ], |
| 2011 | "exportLinks": { # Links for exporting Google Docs to specific formats. |
| 2012 | "a_key": "A String", # A mapping from export format to URL |
| 2013 | }, |
| 2014 | "shared": True or False, # Whether the file has been shared. |
| 2015 | "thumbnail": { # Thumbnail for the file. Only accepted on upload and for files that are not already thumbnailed by Google. |
| 2016 | "mimeType": "A String", # The MIME type of the thumbnail. |
| 2017 | "image": "A String", # The URL-safe Base64 encoded bytes of the thumbnail image. |
| 2018 | }, |
| 2019 | "openWithLinks": { # A map of the id of each of the user's apps to a link to open this file with that app. Only populated when the drive.apps.readonly scope is used. |
| 2020 | "a_key": "A String", |
| 2021 | }, |
| 2022 | "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. |
| 2023 | "exposureBias": 3.14, # The exposure bias of the photo (APEX value). |
| 2024 | "exposureTime": 3.14, # The length of the exposure, in seconds. |
| 2025 | "cameraMake": "A String", # The make of the camera used to create the photo. |
| 2026 | "maxApertureValue": 3.14, # The smallest f-number of the lens at the focal length used to create the photo (APEX value). |
| 2027 | "isoSpeed": 42, # The ISO speed used to create the photo. |
| 2028 | "focalLength": 3.14, # The focal length used to create the photo, in millimeters. |
| 2029 | "exposureMode": "A String", # The exposure mode used to create the photo. |
| 2030 | "colorSpace": "A String", # The color space of the photo. |
| 2031 | "location": { # Geographic location information stored in the image. |
| 2032 | "latitude": 3.14, # The latitude stored in the image. |
| 2033 | "altitude": 3.14, # The altitude stored in the image. |
| 2034 | "longitude": 3.14, # The longitude stored in the image. |
| 2035 | }, |
| 2036 | "subjectDistance": 42, # The distance to the subject of the photo, in meters. |
| 2037 | "height": 42, # The height of the image in pixels. |
| 2038 | "lens": "A String", # The lens used to create the photo. |
| 2039 | "date": "A String", # The date and time the photo was taken (EXIF format timestamp). |
| 2040 | "width": 42, # The width of the image in pixels. |
| 2041 | "meteringMode": "A String", # The metering mode used to create the photo. |
| 2042 | "flashUsed": True or False, # Whether a flash was used to create the photo. |
| 2043 | "aperture": 3.14, # The aperture used to create the photo (f-number). |
| 2044 | "rotation": 42, # The rotation in clockwise degrees from the image's original orientation. |
| 2045 | "sensor": "A String", # The type of sensor used to create the photo. |
| 2046 | "whiteBalance": "A String", # The white balance mode used to create the photo. |
| 2047 | "cameraModel": "A String", # The model of the camera used to create the photo. |
| 2048 | }, |
| 2049 | "description": "A String", # A short description of the file. |
| 2050 | "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. |
| 2051 | "editable": True or False, # Whether the file can be edited by the current user. |
| 2052 | "kind": "drive#file", # The type of file. This is always drive#file. |
| 2053 | "quotaBytesUsed": "A String", # The number of quota bytes used by this file. |
| 2054 | "fileSize": "A String", # The size of the file in bytes. This is only populated for files with content stored in Drive. |
| 2055 | "createdDate": "A String", # Create time for this file (formatted ISO8601 timestamp). |
| 2056 | "properties": [ # The list of properties. |
| 2057 | { # A key-value pair that is either public or private to an application. |
| 2058 | "kind": "drive#property", # This is always drive#property. |
| 2059 | "value": "A String", # The value of this property. |
| 2060 | "etag": "A String", # ETag of the property. |
| 2061 | "visibility": "A String", # The visibility of this property. |
| 2062 | "key": "A String", # The key of this property. |
| 2063 | "selfLink": "A String", # The link back to this property. |
| 2064 | }, |
| 2065 | ], |
| 2066 | "md5Checksum": "A String", # An MD5 checksum for the content of this file. This is populated only for files with content stored in Drive. |
| 2067 | "iconLink": "A String", # A link to the file's icon. |
| 2068 | "defaultOpenWithLink": "A String", # A link to open this file with the user's default app for this file. Only populated when the drive.apps.readonly scope is used. |
| 2069 | "embedLink": "A String", # A link for embedding the file. |
| 2070 | "alternateLink": "A String", # A link for opening the file in using a relevant Google editor or viewer. |
| 2071 | "title": "A String", # The title of this file. |
| 2072 | "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. |
| 2073 | "downloadUrl": "A String", # Short lived download URL for the file. This is only populated for files with content stored in Drive. |
| 2074 | "userPermission": { # A permission for a file. # The permissions for the authenticated user on this file. |
| 2075 | "withLink": True or False, # Whether the link is required for this permission. |
| 2076 | "domain": "A String", # The domain name of the entity this permission refers to. This is an output-only field which is populated when the permission type is "user", "group" or "domain". |
| 2077 | "name": "A String", # The name for this permission. |
| 2078 | "kind": "drive#permission", # This is always drive#permission. |
| 2079 | "value": "A String", # The email address or domain name for the entity. This is used during inserts and is not populated in responses. When making a drive.permissions.insert request, exactly one of 'id' or 'value' fields must be specified. |
| 2080 | "id": "A String", # The ID of the user this permission refers to, and identical to the permissionId in the About and Files resources. When making a drive.permissions.insert request, exactly one of 'id' or 'value' fields must be specified. |
| 2081 | "authKey": "A String", # The authkey parameter required for this permission. |
| 2082 | "etag": "A String", # The ETag of the permission. |
| 2083 | "emailAddress": "A String", # The email address of the user this permission refers to. This is an output-only field which is populated when the permission type is "user" and the given user's Google+ profile privacy settings allow exposing their email address. |
| 2084 | "photoLink": "A String", # A link to the profile photo, if available. |
| 2085 | "role": "A String", # The primary role for this user. Allowed values are: |
| 2086 | # - owner |
| 2087 | # - reader |
| 2088 | # - writer |
| 2089 | "type": "A String", # The account type. Allowed values are: |
| 2090 | # - user |
| 2091 | # - group |
| 2092 | # - domain |
| 2093 | # - anyone |
| 2094 | "additionalRoles": [ # Additional roles for this user. Only commenter is currently allowed. |
| 2095 | "A String", |
| 2096 | ], |
| 2097 | "selfLink": "A String", # A link back to this permission. |
| 2098 | }, |
| 2099 | "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. |
| 2100 | "fileExtension": "A String", # The file extension used when downloading this file. This field is read only. To set the extension, include it in the title when creating the file. This is only populated for files with content stored in Drive. |
| 2101 | "headRevisionId": "A String", # The ID of the file's head revision. This will only be populated for files with content stored in Drive. |
| 2102 | "selfLink": "A String", # A link back to this file. |
| 2103 | "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. |
| 2104 | } |
| 2105 | |
| 2106 | newRevision: boolean, Whether a blob upload should create a new revision. If false, the blob data in the current head revision is replaced. If not set or true, a new blob is created as head revision, and previous revisions are preserved (causing increased use of the user's data storage quota). |
| 2107 | media_body: string, The filename of the media request body, or an instance of a MediaUpload object. |
| 2108 | ocrLanguage: string, If ocr is true, hints at the language to use. Valid values are ISO 639-1 codes. |
| 2109 | ocr: boolean, Whether to attempt OCR on .jpg, .png, .gif, or .pdf uploads. |
| 2110 | pinned: boolean, Whether to pin the new revision. |
| 2111 | updateViewedDate: boolean, Whether to update the view date after successfully updating the file. |
| 2112 | timedTextTrackName: string, The timed text track name. |
| 2113 | convert: boolean, Whether to convert this file to the corresponding Google Docs format. |
| 2114 | useContentAsIndexableText: boolean, Whether to use the content as indexable text. |
| 2115 | setModifiedDate: boolean, Whether to set the modified date with the supplied modified date. |
| 2116 | timedTextLanguage: string, The language of the timed text. |
| 2117 | |
| 2118 | Returns: |
| 2119 | An object of the form: |
| 2120 | |
| 2121 | { # The metadata for a file. |
| 2122 | "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. |
| 2123 | "lastViewedByMeDate": "A String", # Last time this file was viewed by the user (formatted RFC 3339 timestamp). |
| 2124 | "appDataContents": True or False, # Whether this file is in the appdata folder. |
| 2125 | "thumbnailLink": "A String", # A link to the file's thumbnail. |
| 2126 | "labels": { # A group of labels for the file. |
| 2127 | "restricted": True or False, # Whether viewers are prevented from downloading this file. |
| 2128 | "hidden": True or False, # Deprecated. |
| 2129 | "viewed": True or False, # Whether this file has been viewed by this user. |
| 2130 | "starred": True or False, # Whether this file is starred by the user. |
| 2131 | "trashed": True or False, # Whether this file has been trashed. |
| 2132 | }, |
| 2133 | "indexableText": { # Indexable text attributes for the file (can only be written) |
| 2134 | "text": "A String", # The text to be indexed for this file. |
| 2135 | }, |
| 2136 | "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. |
| 2137 | "lastModifyingUserName": "A String", # Name of the last user to modify this file. |
| 2138 | "writersCanShare": True or False, # Whether writers can share the document with other users. |
| 2139 | "owners": [ # The owner(s) of this file. |
| 2140 | { # The JSON template for a user. |
| 2141 | "picture": { # The user's profile picture. |
| 2142 | "url": "A String", # A URL that points to a profile picture of this user. |
| 2143 | }, |
| 2144 | "kind": "drive#user", # This is always drive#user. |
| 2145 | "isAuthenticatedUser": True or False, # Whether this user is the same as the authenticated user for whom the request was made. |
| 2146 | "displayName": "A String", # A plain text displayable name for this user. |
| 2147 | "permissionId": "A String", # The user's ID as visible in the permissions collection. |
| 2148 | }, |
| 2149 | ], |
| 2150 | "id": "A String", # The ID of the file. |
| 2151 | "lastModifyingUser": { # The JSON template for a user. # The last user to modify this file. |
| 2152 | "picture": { # The user's profile picture. |
| 2153 | "url": "A String", # A URL that points to a profile picture of this user. |
| 2154 | }, |
| 2155 | "kind": "drive#user", # This is always drive#user. |
| 2156 | "isAuthenticatedUser": True or False, # Whether this user is the same as the authenticated user for whom the request was made. |
| 2157 | "displayName": "A String", # A plain text displayable name for this user. |
| 2158 | "permissionId": "A String", # The user's ID as visible in the permissions collection. |
| 2159 | }, |
| 2160 | "copyable": True or False, # Whether the file can be copied by the current user. |
| 2161 | "ownerNames": [ # Name(s) of the owner(s) of this file. |
| 2162 | "A String", |
| 2163 | ], |
| 2164 | "sharedWithMeDate": "A String", # Time at which this file was shared with the user (formatted RFC 3339 timestamp). |
| 2165 | "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. |
| 2166 | "etag": "A String", # ETag of the file. |
| 2167 | "parents": [ # Collection of parent folders which contain this file. |
| 2168 | # 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. |
| 2169 | { # A reference to a file's parent. |
| 2170 | "selfLink": "A String", # A link back to this reference. |
| 2171 | "kind": "drive#parentReference", # This is always drive#parentReference. |
| 2172 | "id": "A String", # The ID of the parent. |
| 2173 | "isRoot": True or False, # Whether or not the parent is the root folder. |
| 2174 | "parentLink": "A String", # A link to the parent. |
| 2175 | }, |
| 2176 | ], |
| 2177 | "exportLinks": { # Links for exporting Google Docs to specific formats. |
| 2178 | "a_key": "A String", # A mapping from export format to URL |
| 2179 | }, |
| 2180 | "shared": True or False, # Whether the file has been shared. |
| 2181 | "thumbnail": { # Thumbnail for the file. Only accepted on upload and for files that are not already thumbnailed by Google. |
| 2182 | "mimeType": "A String", # The MIME type of the thumbnail. |
| 2183 | "image": "A String", # The URL-safe Base64 encoded bytes of the thumbnail image. |
| 2184 | }, |
| 2185 | "openWithLinks": { # A map of the id of each of the user's apps to a link to open this file with that app. Only populated when the drive.apps.readonly scope is used. |
| 2186 | "a_key": "A String", |
| 2187 | }, |
| 2188 | "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. |
| 2189 | "exposureBias": 3.14, # The exposure bias of the photo (APEX value). |
| 2190 | "exposureTime": 3.14, # The length of the exposure, in seconds. |
| 2191 | "cameraMake": "A String", # The make of the camera used to create the photo. |
| 2192 | "maxApertureValue": 3.14, # The smallest f-number of the lens at the focal length used to create the photo (APEX value). |
| 2193 | "isoSpeed": 42, # The ISO speed used to create the photo. |
| 2194 | "focalLength": 3.14, # The focal length used to create the photo, in millimeters. |
| 2195 | "exposureMode": "A String", # The exposure mode used to create the photo. |
| 2196 | "colorSpace": "A String", # The color space of the photo. |
| 2197 | "location": { # Geographic location information stored in the image. |
| 2198 | "latitude": 3.14, # The latitude stored in the image. |
| 2199 | "altitude": 3.14, # The altitude stored in the image. |
| 2200 | "longitude": 3.14, # The longitude stored in the image. |
| 2201 | }, |
| 2202 | "subjectDistance": 42, # The distance to the subject of the photo, in meters. |
| 2203 | "height": 42, # The height of the image in pixels. |
| 2204 | "lens": "A String", # The lens used to create the photo. |
| 2205 | "date": "A String", # The date and time the photo was taken (EXIF format timestamp). |
| 2206 | "width": 42, # The width of the image in pixels. |
| 2207 | "meteringMode": "A String", # The metering mode used to create the photo. |
| 2208 | "flashUsed": True or False, # Whether a flash was used to create the photo. |
| 2209 | "aperture": 3.14, # The aperture used to create the photo (f-number). |
| 2210 | "rotation": 42, # The rotation in clockwise degrees from the image's original orientation. |
| 2211 | "sensor": "A String", # The type of sensor used to create the photo. |
| 2212 | "whiteBalance": "A String", # The white balance mode used to create the photo. |
| 2213 | "cameraModel": "A String", # The model of the camera used to create the photo. |
| 2214 | }, |
| 2215 | "description": "A String", # A short description of the file. |
| 2216 | "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. |
| 2217 | "editable": True or False, # Whether the file can be edited by the current user. |
| 2218 | "kind": "drive#file", # The type of file. This is always drive#file. |
| 2219 | "quotaBytesUsed": "A String", # The number of quota bytes used by this file. |
| 2220 | "fileSize": "A String", # The size of the file in bytes. This is only populated for files with content stored in Drive. |
| 2221 | "createdDate": "A String", # Create time for this file (formatted ISO8601 timestamp). |
| 2222 | "properties": [ # The list of properties. |
| 2223 | { # A key-value pair that is either public or private to an application. |
| 2224 | "kind": "drive#property", # This is always drive#property. |
| 2225 | "value": "A String", # The value of this property. |
| 2226 | "etag": "A String", # ETag of the property. |
| 2227 | "visibility": "A String", # The visibility of this property. |
| 2228 | "key": "A String", # The key of this property. |
| 2229 | "selfLink": "A String", # The link back to this property. |
| 2230 | }, |
| 2231 | ], |
| 2232 | "md5Checksum": "A String", # An MD5 checksum for the content of this file. This is populated only for files with content stored in Drive. |
| 2233 | "iconLink": "A String", # A link to the file's icon. |
| 2234 | "defaultOpenWithLink": "A String", # A link to open this file with the user's default app for this file. Only populated when the drive.apps.readonly scope is used. |
| 2235 | "embedLink": "A String", # A link for embedding the file. |
| 2236 | "alternateLink": "A String", # A link for opening the file in using a relevant Google editor or viewer. |
| 2237 | "title": "A String", # The title of this file. |
| 2238 | "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. |
| 2239 | "downloadUrl": "A String", # Short lived download URL for the file. This is only populated for files with content stored in Drive. |
| 2240 | "userPermission": { # A permission for a file. # The permissions for the authenticated user on this file. |
| 2241 | "withLink": True or False, # Whether the link is required for this permission. |
| 2242 | "domain": "A String", # The domain name of the entity this permission refers to. This is an output-only field which is populated when the permission type is "user", "group" or "domain". |
| 2243 | "name": "A String", # The name for this permission. |
| 2244 | "kind": "drive#permission", # This is always drive#permission. |
| 2245 | "value": "A String", # The email address or domain name for the entity. This is used during inserts and is not populated in responses. When making a drive.permissions.insert request, exactly one of 'id' or 'value' fields must be specified. |
| 2246 | "id": "A String", # The ID of the user this permission refers to, and identical to the permissionId in the About and Files resources. When making a drive.permissions.insert request, exactly one of 'id' or 'value' fields must be specified. |
| 2247 | "authKey": "A String", # The authkey parameter required for this permission. |
| 2248 | "etag": "A String", # The ETag of the permission. |
| 2249 | "emailAddress": "A String", # The email address of the user this permission refers to. This is an output-only field which is populated when the permission type is "user" and the given user's Google+ profile privacy settings allow exposing their email address. |
| 2250 | "photoLink": "A String", # A link to the profile photo, if available. |
| 2251 | "role": "A String", # The primary role for this user. Allowed values are: |
| 2252 | # - owner |
| 2253 | # - reader |
| 2254 | # - writer |
| 2255 | "type": "A String", # The account type. Allowed values are: |
| 2256 | # - user |
| 2257 | # - group |
| 2258 | # - domain |
| 2259 | # - anyone |
| 2260 | "additionalRoles": [ # Additional roles for this user. Only commenter is currently allowed. |
| 2261 | "A String", |
| 2262 | ], |
| 2263 | "selfLink": "A String", # A link back to this permission. |
| 2264 | }, |
| 2265 | "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. |
| 2266 | "fileExtension": "A String", # The file extension used when downloading this file. This field is read only. To set the extension, include it in the title when creating the file. This is only populated for files with content stored in Drive. |
| 2267 | "headRevisionId": "A String", # The ID of the file's head revision. This will only be populated for files with content stored in Drive. |
| 2268 | "selfLink": "A String", # A link back to this file. |
| 2269 | "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. |
| 2270 | }</pre> |
| 2271 | </div> |
| 2272 | |
| 2273 | <div class="method"> |
| 2274 | <code class="details" id="watch">watch(fileId, body, projection=None, updateViewedDate=None)</code> |
| 2275 | <pre>Subscribe to changes on a file |
| 2276 | |
| 2277 | Args: |
| 2278 | fileId: string, The ID for the file in question. (required) |
| 2279 | body: object, The request body. (required) |
| 2280 | The object takes the form of: |
| 2281 | |
| 2282 | { # An notification channel used to watch for resource changes. |
| 2283 | "resourceUri": "A String", # A version-specific identifier for the watched resource. |
| 2284 | "kind": "api#channel", # Identifies this as a notification channel used to watch for changes to a resource. Value: the fixed string "api#channel". |
| 2285 | "resourceId": "A String", # An opaque ID that identifies the resource being watched on this channel. Stable across different API versions. |
| 2286 | "payload": True or False, # A Boolean value to indicate whether payload is wanted. Optional. |
| 2287 | "token": "A String", # An arbitrary string delivered to the target address with each notification delivered over this channel. Optional. |
| 2288 | "params": { # Additional parameters controlling delivery channel behavior. Optional. |
| 2289 | "a_key": "A String", # Declares a new parameter by name. |
| 2290 | }, |
| 2291 | "expiration": "A String", # Date and time of notification channel expiration, expressed as a Unix timestamp, in milliseconds. Optional. |
| 2292 | "address": "A String", # The address where notifications are delivered for this channel. |
| 2293 | "type": "A String", # The type of delivery mechanism used for this channel. |
| 2294 | "id": "A String", # A UUID or similar unique string that identifies this channel. |
| 2295 | } |
| 2296 | |
| 2297 | projection: string, This parameter is deprecated and has no function. |
| 2298 | Allowed values |
| 2299 | BASIC - Deprecated |
| 2300 | FULL - Deprecated |
| 2301 | updateViewedDate: boolean, Whether to update the view date after successfully retrieving the file. |
| 2302 | |
| 2303 | Returns: |
| 2304 | An object of the form: |
| 2305 | |
| 2306 | { # An notification channel used to watch for resource changes. |
| 2307 | "resourceUri": "A String", # A version-specific identifier for the watched resource. |
| 2308 | "kind": "api#channel", # Identifies this as a notification channel used to watch for changes to a resource. Value: the fixed string "api#channel". |
| 2309 | "resourceId": "A String", # An opaque ID that identifies the resource being watched on this channel. Stable across different API versions. |
| 2310 | "payload": True or False, # A Boolean value to indicate whether payload is wanted. Optional. |
| 2311 | "token": "A String", # An arbitrary string delivered to the target address with each notification delivered over this channel. Optional. |
| 2312 | "params": { # Additional parameters controlling delivery channel behavior. Optional. |
| 2313 | "a_key": "A String", # Declares a new parameter by name. |
| 2314 | }, |
| 2315 | "expiration": "A String", # Date and time of notification channel expiration, expressed as a Unix timestamp, in milliseconds. Optional. |
| 2316 | "address": "A String", # The address where notifications are delivered for this channel. |
| 2317 | "type": "A String", # The type of delivery mechanism used for this channel. |
| 2318 | "id": "A String", # A UUID or similar unique string that identifies this channel. |
| 2319 | }</pre> |
| 2320 | </div> |
| 2321 | |
| 2322 | </body></html> |