blob: 431b105d6ed2666b6e88059667a7e64740a778c8 [file] [log] [blame]
John Asmuth614db982014-04-24 15:46:26 -04001<html><body>
2<style>
3
4body, h1, h2, h3, div, span, p, pre, a {
5 margin: 0;
6 padding: 0;
7 border: 0;
8 font-weight: inherit;
9 font-style: inherit;
10 font-size: 100%;
11 font-family: inherit;
12 vertical-align: baseline;
13}
14
15body {
16 font-size: 13px;
17 padding: 1em;
18}
19
20h1 {
21 font-size: 26px;
22 margin-bottom: 1em;
23}
24
25h2 {
26 font-size: 24px;
27 margin-bottom: 1em;
28}
29
30h3 {
31 font-size: 20px;
32 margin-bottom: 1em;
33 margin-top: 1em;
34}
35
36pre, code {
37 line-height: 1.5;
38 font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace;
39}
40
41pre {
42 margin-top: 0.5em;
43}
44
45h1, h2, h3, p {
46 font-family: Arial, sans serif;
47}
48
49h1, h2, h3 {
50 border-bottom: solid #CCC 1px;
51}
52
53.toc_element {
54 margin-top: 0.5em;
55}
56
57.firstline {
58 margin-left: 2 em;
59}
60
61.method {
62 margin-top: 1em;
63 border: solid 1px #CCC;
64 padding: 1em;
65 background: #EEE;
66}
67
68.details {
69 font-weight: bold;
70 font-size: 14px;
71}
72
73</style>
74
75<h1><a href="drive_v2.html">Drive API</a> . <a href="drive_v2.changes.html">changes</a></h1>
76<h2>Instance Methods</h2>
77<p class="toc_element">
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040078 <code><a href="#get">get(changeId, supportsTeamDrives=None, teamDriveId=None)</a></code></p>
John Asmuth614db982014-04-24 15:46:26 -040079<p class="firstline">Gets a specific change.</p>
80<p class="toc_element">
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040081 <code><a href="#getStartPageToken">getStartPageToken(supportsTeamDrives=None, teamDriveId=None)</a></code></p>
82<p class="firstline">Gets the starting pageToken for listing future changes.</p>
83<p class="toc_element">
84 <code><a href="#list">list(includeSubscribed=None, includeDeleted=None, includeTeamDriveItems=None, pageToken=None, supportsTeamDrives=None, maxResults=None, startChangeId=None, spaces=None, teamDriveId=None, includeCorpusRemovals=None)</a></code></p>
85<p class="firstline">Lists the changes for a user or Team Drive.</p>
John Asmuth614db982014-04-24 15:46:26 -040086<p class="toc_element">
87 <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p>
88<p class="firstline">Retrieves the next page of results.</p>
89<p class="toc_element">
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040090 <code><a href="#watch">watch(body, supportsTeamDrives=None, spaces=None, startChangeId=None, pageToken=None, includeSubscribed=None, includeDeleted=None, maxResults=None, teamDriveId=None, includeTeamDriveItems=None, includeCorpusRemovals=None)</a></code></p>
John Asmuth614db982014-04-24 15:46:26 -040091<p class="firstline">Subscribe to changes for a user.</p>
92<h3>Method Details</h3>
93<div class="method">
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040094 <code class="details" id="get">get(changeId, supportsTeamDrives=None, teamDriveId=None)</code>
John Asmuth614db982014-04-24 15:46:26 -040095 <pre>Gets a specific change.
96
97Args:
98 changeId: string, The ID of the change. (required)
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040099 supportsTeamDrives: boolean, Whether the requesting application supports Team Drives.
100 teamDriveId: string, The Team Drive from which the change will be returned.
John Asmuth614db982014-04-24 15:46:26 -0400101
102Returns:
103 An object of the form:
104
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400105 { # Representation of a change to a file or Team Drive.
106 "teamDrive": { # Representation of a Team Drive. # The updated state of the Team Drive. Present if the type is teamDrive, the user is still a member of the Team Drive, and the Team Drive has not been deleted.
107 "kind": "drive#teamDrive", # This is always drive#teamDrive
108 "id": "A String", # The ID of this Team Drive which is also the ID of the top level folder for this Team Drive.
109 "capabilities": { # Capabilities the current user has on this Team Drive.
110 "canReadRevisions": True or False, # Whether the current user has read access to the Revisions resource of files in this Team Drive.
111 "canCopy": True or False, # Whether files in this Team Drive can be copied by the current user.
112 "canRename": True or False, # Whether files or folders in this Team Drive can be renamed by the current user.
113 "canListChildren": True or False, # Whether the current user can list the children of folders in this Team Drive.
114 "canShare": True or False, # Whether the current user can share files or folders in this Team Drive.
115 "canManageMembers": True or False, # Whether the current user can add members to this Team Drive or remove them or change their role.
116 "canDownload": True or False, # Whether files in this Team Drive can be downloaded by the current user.
117 "canComment": True or False, # Whether the current user can comment on files in this Team Drive.
118 "canDeleteTeamDrive": True or False, # Whether this Team Drive can be deleted by the current user.
119 "canRenameTeamDrive": True or False, # Whether this Team Drive can be renamed by the current user.
120 "canRemoveChildren": True or False, # Whether the current user can remove children from folders in this Team Drive.
121 "canAddChildren": True or False, # Whether the current user can add children to folders in this Team Drive.
122 "canEdit": True or False, # Whether files in this Team Drive can be edited by the current user.
123 },
124 "name": "A String", # The name of this Team Drive.
125 },
John Asmuth614db982014-04-24 15:46:26 -0400126 "kind": "drive#change", # This is always drive#change.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400127 "deleted": True or False, # Whether the file or Team Drive has been removed from this list of changes, for example by deletion or loss of access.
128 "file": { # The metadata for a file. # The updated state of the file. Present if the type is file and the file has not been removed from this list of changes.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800129 "hasThumbnail": True or False, # Whether this file has a thumbnail.
John Asmuth614db982014-04-24 15:46:26 -0400130 "lastViewedByMeDate": "A String", # Last time this file was viewed by the user (formatted RFC 3339 timestamp).
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400131 "trashedDate": "A String", # The time that the item was trashed (formatted RFC 3339 timestamp). Only populated for Team Drive files.
Craig Citro065b5302014-08-14 00:47:23 -0700132 "version": "A String", # A monotonically increasing version number for the file. This reflects every change made to the file on the server, even those not visible to the requesting user.
133 "appDataContents": True or False, # Whether this file is in the Application Data folder.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800134 "thumbnailLink": "A String", # A short-lived link to the file's thumbnail. Typically lasts on the order of hours. Only populated when the requesting app can access the file's content.
John Asmuth614db982014-04-24 15:46:26 -0400135 "labels": { # A group of labels for the file.
Takashi Matsuo06694102015-09-11 13:55:40 -0700136 "restricted": True or False, # Whether viewers and commenters are prevented from downloading, printing, and copying this file.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800137 "modified": True or False, # Whether the file has been modified by this user.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000138 "trashed": True or False, # Whether this file has been trashed. This label applies to all users accessing the file; however, only owners are allowed to see and untrash files.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800139 "hidden": True or False, # Deprecated.
140 "starred": True or False, # Whether this file is starred by the user.
141 "viewed": True or False, # Whether this file has been viewed by this user.
John Asmuth614db982014-04-24 15:46:26 -0400142 },
143 "indexableText": { # Indexable text attributes for the file (can only be written)
144 "text": "A String", # The text to be indexed for this file.
145 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400146 "thumbnailVersion": "A String", # The thumbnail version for use in thumbnail cache invalidation.
Takashi Matsuo06694102015-09-11 13:55:40 -0700147 "explicitlyTrashed": True or False, # Whether this file has been explicitly trashed, as opposed to recursively trashed.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700148 "isAppAuthorized": True or False, # Whether the file was created or opened by the requesting app.
John Asmuth614db982014-04-24 15:46:26 -0400149 "lastModifyingUserName": "A String", # Name of the last user to modify this file.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400150 "writersCanShare": True or False, # Whether writers can share the document with other users. Not populated for Team Drive files.
151 "owners": [ # The owner(s) of this file. Not populated for Team Drive files.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700152 { # Information about a Drive user.
John Asmuth614db982014-04-24 15:46:26 -0400153 "picture": { # The user's profile picture.
154 "url": "A String", # A URL that points to a profile picture of this user.
155 },
156 "kind": "drive#user", # This is always drive#user.
John Asmuth614db982014-04-24 15:46:26 -0400157 "displayName": "A String", # A plain text displayable name for this user.
158 "permissionId": "A String", # The user's ID as visible in the permissions collection.
Craig Citro065b5302014-08-14 00:47:23 -0700159 "isAuthenticatedUser": True or False, # Whether this user is the same as the authenticated user for whom the request was made.
160 "emailAddress": "A String", # The email address of the user.
John Asmuth614db982014-04-24 15:46:26 -0400161 },
162 ],
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400163 "ownedByMe": True or False, # Whether the file is owned by the current user. Not populated for Team Drive files.
John Asmuth614db982014-04-24 15:46:26 -0400164 "id": "A String", # The ID of the file.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700165 "sharingUser": { # Information about a Drive user. # User that shared the item with the current user, if available.
Craig Citro065b5302014-08-14 00:47:23 -0700166 "picture": { # The user's profile picture.
167 "url": "A String", # A URL that points to a profile picture of this user.
168 },
169 "kind": "drive#user", # This is always drive#user.
170 "displayName": "A String", # A plain text displayable name for this user.
171 "permissionId": "A String", # The user's ID as visible in the permissions collection.
172 "isAuthenticatedUser": True or False, # Whether this user is the same as the authenticated user for whom the request was made.
173 "emailAddress": "A String", # The email address of the user.
174 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400175 "trashingUser": { # Information about a Drive user. # If the file has been explicitly trashed, the user who trashed it. Only populated for Team Drive files.
176 "picture": { # The user's profile picture.
177 "url": "A String", # A URL that points to a profile picture of this user.
178 },
179 "kind": "drive#user", # This is always drive#user.
180 "displayName": "A String", # A plain text displayable name for this user.
181 "permissionId": "A String", # The user's ID as visible in the permissions collection.
182 "isAuthenticatedUser": True or False, # Whether this user is the same as the authenticated user for whom the request was made.
183 "emailAddress": "A String", # The email address of the user.
184 },
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800185 "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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700186 "lastModifyingUser": { # Information about a Drive user. # The last user to modify this file.
John Asmuth614db982014-04-24 15:46:26 -0400187 "picture": { # The user's profile picture.
188 "url": "A String", # A URL that points to a profile picture of this user.
189 },
190 "kind": "drive#user", # This is always drive#user.
John Asmuth614db982014-04-24 15:46:26 -0400191 "displayName": "A String", # A plain text displayable name for this user.
192 "permissionId": "A String", # The user's ID as visible in the permissions collection.
Craig Citro065b5302014-08-14 00:47:23 -0700193 "isAuthenticatedUser": True or False, # Whether this user is the same as the authenticated user for whom the request was made.
194 "emailAddress": "A String", # The email address of the user.
John Asmuth614db982014-04-24 15:46:26 -0400195 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400196 "copyable": True or False, # Whether the file can be copied by the current user. Deprecated: use capabilities/canCopy.
197 "folderColorRgb": "A String", # Folder color as an RGB hex string if the file is a folder. The list of supported colors is available in the folderColorPalette field of the About resource. If an unsupported color is specified, it will be changed to the closest color in the palette. Not populated for Team Drive files.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700198 "markedViewedByMeDate": "A String", # Deprecated.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400199 "ownerNames": [ # Name(s) of the owner(s) of this file. Not populated for Team Drive files.
John Asmuth614db982014-04-24 15:46:26 -0400200 "A String",
201 ],
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400202 "capabilities": { # Capabilities the current user has on the file. Each capability corresponds to a fine-grained action that a user may take.
203 "canReadRevisions": True or False, # Whether the current user has read access to the Revisions resource of the file. For a Team Drive item, whether revisions of non-folder descendants of this item, or this item itself if it is not a folder, can be read.
204 "canTrash": True or False, # Whether the file can be trashed by the current user.
205 "canCopy": True or False, # Whether the file can be copied by the current user. For a Team Drive item, whether non-folder descendants of this item, or this item itself if it is not a folder, can be copied.
206 "canShare": True or False, # Whether the file's sharing settings can be modified by the current user.
207 "canDelete": True or False, # Whether the file can be deleted by the current user.
208 "canMoveTeamDriveItem": True or False, # Whether the current user can move this Team Drive item by changing its parent. Note that a request to change the parent for this item may still fail depending on the new parent that is being added. Only populated for Team Drive files.
209 "canRename": True or False, # Whether the file can be renamed by the current user.
210 "canListChildren": True or False, # Whether the current user can list the children of this folder. This is always false when the item is not a folder.
211 "canMoveItemIntoTeamDrive": True or False, # Whether the current user can move this item into a Team Drive. If the item is in a Team Drive, this field is equivalent to canMoveTeamDriveItem.
212 "canDownload": True or False, # Whether the file can be downloaded by the current user.
213 "canComment": True or False, # Whether the current user can comment on the file.
214 "canRemoveChildren": True or False, # Whether the current user can remove children from this folder. This is always false when the item is not a folder.
215 "canReadTeamDrive": True or False, # Whether the current user has read access to the Team Drive to which this file belongs. Only populated for Team Drive files.
216 "canAddChildren": True or False, # Whether the current user can add children to this folder. This is always false when the item is not a folder.
217 "canEdit": True or False, # Whether the file can be edited by the current user.
218 "canUntrash": True or False, # Whether the file can be restored from the trash by the current user.
219 },
John Asmuth614db982014-04-24 15:46:26 -0400220 "sharedWithMeDate": "A String", # Time at which this file was shared with the user (formatted RFC 3339 timestamp).
221 "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.
222 "etag": "A String", # ETag of the file.
223 "parents": [ # Collection of parent folders which contain this file.
224 # 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.
225 { # A reference to a file's parent.
226 "selfLink": "A String", # A link back to this reference.
227 "kind": "drive#parentReference", # This is always drive#parentReference.
228 "id": "A String", # The ID of the parent.
229 "isRoot": True or False, # Whether or not the parent is the root folder.
230 "parentLink": "A String", # A link to the parent.
231 },
232 ],
233 "exportLinks": { # Links for exporting Google Docs to specific formats.
234 "a_key": "A String", # A mapping from export format to URL
235 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400236 "shared": True or False, # Whether the file has been shared. Not populated for Team Drive files.
237 "permissions": [ # The list of permissions for users with access to this file. Not populated for Team Drive files.
Craig Citro065b5302014-08-14 00:47:23 -0700238 { # A permission for a file.
239 "withLink": True or False, # Whether the link is required for this permission.
240 "domain": "A String", # The domain name of the entity this permission refers to. This is an output-only field which is present when the permission type is user, group or domain.
241 "name": "A String", # The name for this permission.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400242 "teamDrivePermissionDetails": [ # Details of whether the Permissions on this Team Drive item are inherited or directly on this item. This is an output-only field which is present only for Team Drive items.
243 {
244 "inheritedFrom": "A String", # The ID of the item from which this permission is inherited. This is an output-only field and is only populated for members of the Team Drive.
245 "role": "A String", # The primary role for this user. While new values may be added in the future, the following are currently possible:
246 # - organizer
247 # - reader
248 # - writer
249 "additionalRoles": [ # Additional roles for this user. Only commenter is currently possible, though more may be supported in the future.
250 "A String",
251 ],
252 "teamDrivePermissionType": "A String", # The Team Drive permission type for this user. While new values may be added in future, the following are currently possible:
253 # - file
254 # - member
255 "inherited": True or False, # Whether this permission is inherited. This field is always populated. This is an output-only field.
256 },
257 ],
Craig Citro065b5302014-08-14 00:47:23 -0700258 "kind": "drive#permission", # This is always drive#permission.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800259 "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 the id or value fields must be specified unless the permission type is anyone, in which case both id and value are ignored.
260 "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 the id or value fields must be specified unless the permission type is anyone, in which case both id and value are ignored.
Craig Citro065b5302014-08-14 00:47:23 -0700261 "authKey": "A String", # The authkey parameter required for this permission.
262 "etag": "A String", # The ETag of the permission.
Craig Citroe633be12015-03-02 13:40:36 -0800263 "emailAddress": "A String", # The email address of the user or group this permission refers to. This is an output-only field which is present when the permission type is user or group.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400264 "expirationDate": "A String", # The time at which this permission will expire (RFC 3339 date-time). Expiration dates have the following restrictions:
265 # - They can only be set on user and group permissions
266 # - The date must be in the future
267 # - The date cannot be more than a year in the future
268 # - The date can only be set on drive.permissions.update requests
269 "role": "A String", # The primary role for this user. While new values may be supported in the future, the following are currently allowed:
270 # - organizer
Craig Citro065b5302014-08-14 00:47:23 -0700271 # - owner
272 # - reader
273 # - writer
274 "type": "A String", # The account type. Allowed values are:
275 # - user
276 # - group
277 # - domain
278 # - anyone
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400279 "additionalRoles": [ # Additional roles for this user. Only commenter is currently allowed, though more may be supported in the future.
Craig Citro065b5302014-08-14 00:47:23 -0700280 "A String",
281 ],
282 "selfLink": "A String", # A link back to this permission.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700283 "photoLink": "A String", # A link to the profile photo, if available.
Craig Citro065b5302014-08-14 00:47:23 -0700284 },
285 ],
Takashi Matsuo06694102015-09-11 13:55:40 -0700286 "fullFileExtension": "A String", # The full file extension; extracted from the title. May contain multiple concatenated extensions, such as "tar.gz". Removing an extension from the title does not clear this field; however, changing the extension on the title does update this field. This field is only populated for files with content stored in Drive; it is not populated for Google Docs or shortcut files.
John Asmuth614db982014-04-24 15:46:26 -0400287 "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.
288 "a_key": "A String",
289 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400290 "canReadRevisions": True or False, # Whether the current user has read access to the Revisions resource of the file. Deprecated: use capabilities/canReadRevisions.
John Asmuth614db982014-04-24 15:46:26 -0400291 "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.
292 "exposureBias": 3.14, # The exposure bias of the photo (APEX value).
293 "exposureTime": 3.14, # The length of the exposure, in seconds.
294 "cameraMake": "A String", # The make of the camera used to create the photo.
295 "maxApertureValue": 3.14, # The smallest f-number of the lens at the focal length used to create the photo (APEX value).
296 "isoSpeed": 42, # The ISO speed used to create the photo.
297 "focalLength": 3.14, # The focal length used to create the photo, in millimeters.
298 "exposureMode": "A String", # The exposure mode used to create the photo.
299 "colorSpace": "A String", # The color space of the photo.
300 "location": { # Geographic location information stored in the image.
301 "latitude": 3.14, # The latitude stored in the image.
302 "altitude": 3.14, # The altitude stored in the image.
303 "longitude": 3.14, # The longitude stored in the image.
304 },
305 "subjectDistance": 42, # The distance to the subject of the photo, in meters.
306 "height": 42, # The height of the image in pixels.
307 "lens": "A String", # The lens used to create the photo.
308 "date": "A String", # The date and time the photo was taken (EXIF format timestamp).
309 "width": 42, # The width of the image in pixels.
310 "meteringMode": "A String", # The metering mode used to create the photo.
311 "flashUsed": True or False, # Whether a flash was used to create the photo.
312 "aperture": 3.14, # The aperture used to create the photo (f-number).
313 "rotation": 42, # The rotation in clockwise degrees from the image's original orientation.
314 "sensor": "A String", # The type of sensor used to create the photo.
315 "whiteBalance": "A String", # The white balance mode used to create the photo.
316 "cameraModel": "A String", # The model of the camera used to create the photo.
317 },
318 "description": "A String", # A short description of the file.
319 "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.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800320 "videoMediaMetadata": { # Metadata about video media. This will only be present for video types.
321 "width": 42, # The width of the video in pixels.
322 "durationMillis": "A String", # The duration of the video in milliseconds.
323 "height": 42, # The height of the video in pixels.
324 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400325 "editable": True or False, # Whether the file can be edited by the current user. Deprecated: use capabilities/canEdit.
John Asmuth614db982014-04-24 15:46:26 -0400326 "kind": "drive#file", # The type of file. This is always drive#file.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400327 "canComment": True or False, # Whether the current user can comment on the file. Deprecated: use capabilities/canComment.
John Asmuth614db982014-04-24 15:46:26 -0400328 "quotaBytesUsed": "A String", # The number of quota bytes used by this file.
Takashi Matsuo06694102015-09-11 13:55:40 -0700329 "fileSize": "A String", # The size of the file in bytes. This field is only populated for files with content stored in Drive; it is not populated for Google Docs or shortcut files.
Craig Citro0e5b9bf2014-10-15 10:26:14 -0700330 "createdDate": "A String", # Create time for this file (formatted RFC 3339 timestamp).
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400331 "teamDriveId": "A String", # ID of the Team Drive the file resides in.
John Asmuth614db982014-04-24 15:46:26 -0400332 "properties": [ # The list of properties.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000333 { # A key-value pair attached to a file that is either public or private to an application.
334 # The following limits apply to file properties:
335 # - Maximum of 100 properties total per file
336 # - Maximum of 30 private properties per app
337 # - Maximum of 30 public properties
338 # - Maximum of 124 bytes size limit on (key + value) string in UTF-8 encoding for a single property.
John Asmuth614db982014-04-24 15:46:26 -0400339 "kind": "drive#property", # This is always drive#property.
340 "value": "A String", # The value of this property.
341 "etag": "A String", # ETag of the property.
342 "visibility": "A String", # The visibility of this property.
343 "key": "A String", # The key of this property.
344 "selfLink": "A String", # The link back to this property.
345 },
346 ],
Takashi Matsuo06694102015-09-11 13:55:40 -0700347 "md5Checksum": "A String", # An MD5 checksum for the content of this file. This field is only populated for files with content stored in Drive; it is not populated for Google Docs or shortcut files.
John Asmuth614db982014-04-24 15:46:26 -0400348 "iconLink": "A String", # A link to the file's icon.
349 "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.
350 "embedLink": "A String", # A link for embedding the file.
Craig Citro0e5b9bf2014-10-15 10:26:14 -0700351 "alternateLink": "A String", # A link for opening the file in a relevant Google editor or viewer.
John Asmuth614db982014-04-24 15:46:26 -0400352 "title": "A String", # The title of this file.
353 "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.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800354 "thumbnail": { # A thumbnail for the file. This will only be used if Drive cannot generate a standard thumbnail.
Takashi Matsuo06694102015-09-11 13:55:40 -0700355 "mimeType": "A String", # The MIME type of the thumbnail.
356 "image": "A String", # The URL-safe Base64 encoded bytes of the thumbnail image. It should conform to RFC 4648 section 5.
357 },
358 "downloadUrl": "A String",
John Asmuth614db982014-04-24 15:46:26 -0400359 "userPermission": { # A permission for a file. # The permissions for the authenticated user on this file.
360 "withLink": True or False, # Whether the link is required for this permission.
Craig Citro065b5302014-08-14 00:47:23 -0700361 "domain": "A String", # The domain name of the entity this permission refers to. This is an output-only field which is present when the permission type is user, group or domain.
John Asmuth614db982014-04-24 15:46:26 -0400362 "name": "A String", # The name for this permission.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400363 "teamDrivePermissionDetails": [ # Details of whether the Permissions on this Team Drive item are inherited or directly on this item. This is an output-only field which is present only for Team Drive items.
364 {
365 "inheritedFrom": "A String", # The ID of the item from which this permission is inherited. This is an output-only field and is only populated for members of the Team Drive.
366 "role": "A String", # The primary role for this user. While new values may be added in the future, the following are currently possible:
367 # - organizer
368 # - reader
369 # - writer
370 "additionalRoles": [ # Additional roles for this user. Only commenter is currently possible, though more may be supported in the future.
371 "A String",
372 ],
373 "teamDrivePermissionType": "A String", # The Team Drive permission type for this user. While new values may be added in future, the following are currently possible:
374 # - file
375 # - member
376 "inherited": True or False, # Whether this permission is inherited. This field is always populated. This is an output-only field.
377 },
378 ],
John Asmuth614db982014-04-24 15:46:26 -0400379 "kind": "drive#permission", # This is always drive#permission.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800380 "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 the id or value fields must be specified unless the permission type is anyone, in which case both id and value are ignored.
381 "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 the id or value fields must be specified unless the permission type is anyone, in which case both id and value are ignored.
John Asmuth614db982014-04-24 15:46:26 -0400382 "authKey": "A String", # The authkey parameter required for this permission.
383 "etag": "A String", # The ETag of the permission.
Craig Citroe633be12015-03-02 13:40:36 -0800384 "emailAddress": "A String", # The email address of the user or group this permission refers to. This is an output-only field which is present when the permission type is user or group.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400385 "expirationDate": "A String", # The time at which this permission will expire (RFC 3339 date-time). Expiration dates have the following restrictions:
386 # - They can only be set on user and group permissions
387 # - The date must be in the future
388 # - The date cannot be more than a year in the future
389 # - The date can only be set on drive.permissions.update requests
390 "role": "A String", # The primary role for this user. While new values may be supported in the future, the following are currently allowed:
391 # - organizer
John Asmuth614db982014-04-24 15:46:26 -0400392 # - owner
393 # - reader
394 # - writer
395 "type": "A String", # The account type. Allowed values are:
396 # - user
397 # - group
398 # - domain
399 # - anyone
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400400 "additionalRoles": [ # Additional roles for this user. Only commenter is currently allowed, though more may be supported in the future.
John Asmuth614db982014-04-24 15:46:26 -0400401 "A String",
402 ],
403 "selfLink": "A String", # A link back to this permission.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700404 "photoLink": "A String", # A link to the profile photo, if available.
John Asmuth614db982014-04-24 15:46:26 -0400405 },
Takashi Matsuo06694102015-09-11 13:55:40 -0700406 "spaces": [ # The list of spaces which contain the file. Supported values are 'drive', 'appDataFolder' and 'photos'.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000407 "A String",
408 ],
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400409 "shareable": True or False, # Whether the file's sharing settings can be modified by the current user. Deprecated: use capabilities/canShare.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700410 "originalFilename": "A String", # The original filename of the uploaded content if available, or else the original value of the title field. This is only available for files with binary content in Drive.
Takashi Matsuo06694102015-09-11 13:55:40 -0700411 "fileExtension": "A String", # The final component of fullFileExtension with trailing text that does not appear to be part of the extension removed. This field is only populated for files with content stored in Drive; it is not populated for Google Docs or shortcut files.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400412 "hasAugmentedPermissions": True or False, # Whether any users are granted file access directly on this file. This field is only populated for Team Drive files.
Takashi Matsuo06694102015-09-11 13:55:40 -0700413 "headRevisionId": "A String", # The ID of the file's head revision. This field is only populated for files with content stored in Drive; it is not populated for Google Docs or shortcut files.
John Asmuth614db982014-04-24 15:46:26 -0400414 "selfLink": "A String", # A link back to this file.
415 "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.
416 },
417 "modificationDate": "A String", # The time of this modification.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400418 "teamDriveId": "A String", # The ID of the Team Drive associated with this change.
419 "type": "A String", # The type of the change. Possible values are file and teamDrive.
John Asmuth614db982014-04-24 15:46:26 -0400420 "id": "A String", # The ID of the change.
421 "selfLink": "A String", # A link back to this change.
422 "fileId": "A String", # The ID of the file associated with this change.
423 }</pre>
424</div>
425
426<div class="method">
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400427 <code class="details" id="getStartPageToken">getStartPageToken(supportsTeamDrives=None, teamDriveId=None)</code>
428 <pre>Gets the starting pageToken for listing future changes.
429
430Args:
431 supportsTeamDrives: boolean, Whether the requesting application supports Team Drives.
432 teamDriveId: string, The ID of the Team Drive for which the starting pageToken for listing future changes from that Team Drive will be returned.
433
434Returns:
435 An object of the form:
436
437 {
438 "kind": "drive#startPageToken", # Identifies what kind of resource this is. Value: the fixed string "drive#startPageToken".
439 "startPageToken": "A String", # The starting page token for listing changes.
440 }</pre>
441</div>
442
443<div class="method">
444 <code class="details" id="list">list(includeSubscribed=None, includeDeleted=None, includeTeamDriveItems=None, pageToken=None, supportsTeamDrives=None, maxResults=None, startChangeId=None, spaces=None, teamDriveId=None, includeCorpusRemovals=None)</code>
445 <pre>Lists the changes for a user or Team Drive.
John Asmuth614db982014-04-24 15:46:26 -0400446
447Args:
Craig Citro065b5302014-08-14 00:47:23 -0700448 includeSubscribed: boolean, Whether to include public files the user has opened and shared files. When set to false, the list only includes owned files plus any shared or public files the user has explicitly added to a folder they own.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400449 includeDeleted: boolean, Whether to include changes indicating that items have been removed from the list of changes, for example by deletion or loss of access.
450 includeTeamDriveItems: boolean, Whether Team Drive files or changes should be included in results.
451 pageToken: string, The token for continuing a previous list request on the next page. This should be set to the value of 'nextPageToken' from the previous response or to the response from the getStartPageToken method.
452 supportsTeamDrives: boolean, Whether the requesting application supports Team Drives.
John Asmuth614db982014-04-24 15:46:26 -0400453 maxResults: integer, Maximum number of changes to return.
454 startChangeId: string, Change ID to start listing changes from.
Takashi Matsuo06694102015-09-11 13:55:40 -0700455 spaces: string, A comma-separated list of spaces to query. Supported values are 'drive', 'appDataFolder' and 'photos'.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400456 teamDriveId: string, The Team Drive from which changes will be returned. If specified the change IDs will be reflective of the Team Drive; use the combined Team Drive ID and change ID as an identifier.
457 includeCorpusRemovals: boolean, Whether changes should include the file resource if the file is still accessible by the user at the time of the request, even when a file was removed from the list of changes and there will be no further change entries for this file.
John Asmuth614db982014-04-24 15:46:26 -0400458
459Returns:
460 An object of the form:
461
462 { # A list of changes for a user.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400463 "nextPageToken": "A String", # The page token for the next page of changes. This will be absent if the end of the changes list has been reached. If the token is rejected for any reason, it should be discarded, and pagination should be restarted from the first page of results.
John Asmuth614db982014-04-24 15:46:26 -0400464 "kind": "drive#changeList", # This is always drive#changeList.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400465 "items": [ # The list of changes. If nextPageToken is populated, then this list may be incomplete and an additional page of results should be fetched.
466 { # Representation of a change to a file or Team Drive.
467 "teamDrive": { # Representation of a Team Drive. # The updated state of the Team Drive. Present if the type is teamDrive, the user is still a member of the Team Drive, and the Team Drive has not been deleted.
468 "kind": "drive#teamDrive", # This is always drive#teamDrive
469 "id": "A String", # The ID of this Team Drive which is also the ID of the top level folder for this Team Drive.
470 "capabilities": { # Capabilities the current user has on this Team Drive.
471 "canReadRevisions": True or False, # Whether the current user has read access to the Revisions resource of files in this Team Drive.
472 "canCopy": True or False, # Whether files in this Team Drive can be copied by the current user.
473 "canRename": True or False, # Whether files or folders in this Team Drive can be renamed by the current user.
474 "canListChildren": True or False, # Whether the current user can list the children of folders in this Team Drive.
475 "canShare": True or False, # Whether the current user can share files or folders in this Team Drive.
476 "canManageMembers": True or False, # Whether the current user can add members to this Team Drive or remove them or change their role.
477 "canDownload": True or False, # Whether files in this Team Drive can be downloaded by the current user.
478 "canComment": True or False, # Whether the current user can comment on files in this Team Drive.
479 "canDeleteTeamDrive": True or False, # Whether this Team Drive can be deleted by the current user.
480 "canRenameTeamDrive": True or False, # Whether this Team Drive can be renamed by the current user.
481 "canRemoveChildren": True or False, # Whether the current user can remove children from folders in this Team Drive.
482 "canAddChildren": True or False, # Whether the current user can add children to folders in this Team Drive.
483 "canEdit": True or False, # Whether files in this Team Drive can be edited by the current user.
484 },
485 "name": "A String", # The name of this Team Drive.
486 },
John Asmuth614db982014-04-24 15:46:26 -0400487 "kind": "drive#change", # This is always drive#change.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400488 "deleted": True or False, # Whether the file or Team Drive has been removed from this list of changes, for example by deletion or loss of access.
489 "file": { # The metadata for a file. # The updated state of the file. Present if the type is file and the file has not been removed from this list of changes.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800490 "hasThumbnail": True or False, # Whether this file has a thumbnail.
John Asmuth614db982014-04-24 15:46:26 -0400491 "lastViewedByMeDate": "A String", # Last time this file was viewed by the user (formatted RFC 3339 timestamp).
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400492 "trashedDate": "A String", # The time that the item was trashed (formatted RFC 3339 timestamp). Only populated for Team Drive files.
Craig Citro065b5302014-08-14 00:47:23 -0700493 "version": "A String", # A monotonically increasing version number for the file. This reflects every change made to the file on the server, even those not visible to the requesting user.
494 "appDataContents": True or False, # Whether this file is in the Application Data folder.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800495 "thumbnailLink": "A String", # A short-lived link to the file's thumbnail. Typically lasts on the order of hours. Only populated when the requesting app can access the file's content.
John Asmuth614db982014-04-24 15:46:26 -0400496 "labels": { # A group of labels for the file.
Takashi Matsuo06694102015-09-11 13:55:40 -0700497 "restricted": True or False, # Whether viewers and commenters are prevented from downloading, printing, and copying this file.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800498 "modified": True or False, # Whether the file has been modified by this user.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000499 "trashed": True or False, # Whether this file has been trashed. This label applies to all users accessing the file; however, only owners are allowed to see and untrash files.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800500 "hidden": True or False, # Deprecated.
501 "starred": True or False, # Whether this file is starred by the user.
502 "viewed": True or False, # Whether this file has been viewed by this user.
John Asmuth614db982014-04-24 15:46:26 -0400503 },
504 "indexableText": { # Indexable text attributes for the file (can only be written)
505 "text": "A String", # The text to be indexed for this file.
506 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400507 "thumbnailVersion": "A String", # The thumbnail version for use in thumbnail cache invalidation.
Takashi Matsuo06694102015-09-11 13:55:40 -0700508 "explicitlyTrashed": True or False, # Whether this file has been explicitly trashed, as opposed to recursively trashed.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700509 "isAppAuthorized": True or False, # Whether the file was created or opened by the requesting app.
John Asmuth614db982014-04-24 15:46:26 -0400510 "lastModifyingUserName": "A String", # Name of the last user to modify this file.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400511 "writersCanShare": True or False, # Whether writers can share the document with other users. Not populated for Team Drive files.
512 "owners": [ # The owner(s) of this file. Not populated for Team Drive files.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700513 { # Information about a Drive user.
John Asmuth614db982014-04-24 15:46:26 -0400514 "picture": { # The user's profile picture.
515 "url": "A String", # A URL that points to a profile picture of this user.
516 },
517 "kind": "drive#user", # This is always drive#user.
John Asmuth614db982014-04-24 15:46:26 -0400518 "displayName": "A String", # A plain text displayable name for this user.
519 "permissionId": "A String", # The user's ID as visible in the permissions collection.
Craig Citro065b5302014-08-14 00:47:23 -0700520 "isAuthenticatedUser": True or False, # Whether this user is the same as the authenticated user for whom the request was made.
521 "emailAddress": "A String", # The email address of the user.
John Asmuth614db982014-04-24 15:46:26 -0400522 },
523 ],
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400524 "ownedByMe": True or False, # Whether the file is owned by the current user. Not populated for Team Drive files.
John Asmuth614db982014-04-24 15:46:26 -0400525 "id": "A String", # The ID of the file.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700526 "sharingUser": { # Information about a Drive user. # User that shared the item with the current user, if available.
Craig Citro065b5302014-08-14 00:47:23 -0700527 "picture": { # The user's profile picture.
528 "url": "A String", # A URL that points to a profile picture of this user.
529 },
530 "kind": "drive#user", # This is always drive#user.
531 "displayName": "A String", # A plain text displayable name for this user.
532 "permissionId": "A String", # The user's ID as visible in the permissions collection.
533 "isAuthenticatedUser": True or False, # Whether this user is the same as the authenticated user for whom the request was made.
534 "emailAddress": "A String", # The email address of the user.
535 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400536 "trashingUser": { # Information about a Drive user. # If the file has been explicitly trashed, the user who trashed it. Only populated for Team Drive files.
537 "picture": { # The user's profile picture.
538 "url": "A String", # A URL that points to a profile picture of this user.
539 },
540 "kind": "drive#user", # This is always drive#user.
541 "displayName": "A String", # A plain text displayable name for this user.
542 "permissionId": "A String", # The user's ID as visible in the permissions collection.
543 "isAuthenticatedUser": True or False, # Whether this user is the same as the authenticated user for whom the request was made.
544 "emailAddress": "A String", # The email address of the user.
545 },
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800546 "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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700547 "lastModifyingUser": { # Information about a Drive user. # The last user to modify this file.
John Asmuth614db982014-04-24 15:46:26 -0400548 "picture": { # The user's profile picture.
549 "url": "A String", # A URL that points to a profile picture of this user.
550 },
551 "kind": "drive#user", # This is always drive#user.
John Asmuth614db982014-04-24 15:46:26 -0400552 "displayName": "A String", # A plain text displayable name for this user.
553 "permissionId": "A String", # The user's ID as visible in the permissions collection.
Craig Citro065b5302014-08-14 00:47:23 -0700554 "isAuthenticatedUser": True or False, # Whether this user is the same as the authenticated user for whom the request was made.
555 "emailAddress": "A String", # The email address of the user.
John Asmuth614db982014-04-24 15:46:26 -0400556 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400557 "copyable": True or False, # Whether the file can be copied by the current user. Deprecated: use capabilities/canCopy.
558 "folderColorRgb": "A String", # Folder color as an RGB hex string if the file is a folder. The list of supported colors is available in the folderColorPalette field of the About resource. If an unsupported color is specified, it will be changed to the closest color in the palette. Not populated for Team Drive files.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700559 "markedViewedByMeDate": "A String", # Deprecated.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400560 "ownerNames": [ # Name(s) of the owner(s) of this file. Not populated for Team Drive files.
John Asmuth614db982014-04-24 15:46:26 -0400561 "A String",
562 ],
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400563 "capabilities": { # Capabilities the current user has on the file. Each capability corresponds to a fine-grained action that a user may take.
564 "canReadRevisions": True or False, # Whether the current user has read access to the Revisions resource of the file. For a Team Drive item, whether revisions of non-folder descendants of this item, or this item itself if it is not a folder, can be read.
565 "canTrash": True or False, # Whether the file can be trashed by the current user.
566 "canCopy": True or False, # Whether the file can be copied by the current user. For a Team Drive item, whether non-folder descendants of this item, or this item itself if it is not a folder, can be copied.
567 "canShare": True or False, # Whether the file's sharing settings can be modified by the current user.
568 "canDelete": True or False, # Whether the file can be deleted by the current user.
569 "canMoveTeamDriveItem": True or False, # Whether the current user can move this Team Drive item by changing its parent. Note that a request to change the parent for this item may still fail depending on the new parent that is being added. Only populated for Team Drive files.
570 "canRename": True or False, # Whether the file can be renamed by the current user.
571 "canListChildren": True or False, # Whether the current user can list the children of this folder. This is always false when the item is not a folder.
572 "canMoveItemIntoTeamDrive": True or False, # Whether the current user can move this item into a Team Drive. If the item is in a Team Drive, this field is equivalent to canMoveTeamDriveItem.
573 "canDownload": True or False, # Whether the file can be downloaded by the current user.
574 "canComment": True or False, # Whether the current user can comment on the file.
575 "canRemoveChildren": True or False, # Whether the current user can remove children from this folder. This is always false when the item is not a folder.
576 "canReadTeamDrive": True or False, # Whether the current user has read access to the Team Drive to which this file belongs. Only populated for Team Drive files.
577 "canAddChildren": True or False, # Whether the current user can add children to this folder. This is always false when the item is not a folder.
578 "canEdit": True or False, # Whether the file can be edited by the current user.
579 "canUntrash": True or False, # Whether the file can be restored from the trash by the current user.
580 },
John Asmuth614db982014-04-24 15:46:26 -0400581 "sharedWithMeDate": "A String", # Time at which this file was shared with the user (formatted RFC 3339 timestamp).
582 "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.
583 "etag": "A String", # ETag of the file.
584 "parents": [ # Collection of parent folders which contain this file.
585 # 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.
586 { # A reference to a file's parent.
587 "selfLink": "A String", # A link back to this reference.
588 "kind": "drive#parentReference", # This is always drive#parentReference.
589 "id": "A String", # The ID of the parent.
590 "isRoot": True or False, # Whether or not the parent is the root folder.
591 "parentLink": "A String", # A link to the parent.
592 },
593 ],
594 "exportLinks": { # Links for exporting Google Docs to specific formats.
595 "a_key": "A String", # A mapping from export format to URL
596 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400597 "shared": True or False, # Whether the file has been shared. Not populated for Team Drive files.
598 "permissions": [ # The list of permissions for users with access to this file. Not populated for Team Drive files.
Craig Citro065b5302014-08-14 00:47:23 -0700599 { # A permission for a file.
600 "withLink": True or False, # Whether the link is required for this permission.
601 "domain": "A String", # The domain name of the entity this permission refers to. This is an output-only field which is present when the permission type is user, group or domain.
602 "name": "A String", # The name for this permission.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400603 "teamDrivePermissionDetails": [ # Details of whether the Permissions on this Team Drive item are inherited or directly on this item. This is an output-only field which is present only for Team Drive items.
604 {
605 "inheritedFrom": "A String", # The ID of the item from which this permission is inherited. This is an output-only field and is only populated for members of the Team Drive.
606 "role": "A String", # The primary role for this user. While new values may be added in the future, the following are currently possible:
607 # - organizer
608 # - reader
609 # - writer
610 "additionalRoles": [ # Additional roles for this user. Only commenter is currently possible, though more may be supported in the future.
611 "A String",
612 ],
613 "teamDrivePermissionType": "A String", # The Team Drive permission type for this user. While new values may be added in future, the following are currently possible:
614 # - file
615 # - member
616 "inherited": True or False, # Whether this permission is inherited. This field is always populated. This is an output-only field.
617 },
618 ],
Craig Citro065b5302014-08-14 00:47:23 -0700619 "kind": "drive#permission", # This is always drive#permission.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800620 "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 the id or value fields must be specified unless the permission type is anyone, in which case both id and value are ignored.
621 "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 the id or value fields must be specified unless the permission type is anyone, in which case both id and value are ignored.
Craig Citro065b5302014-08-14 00:47:23 -0700622 "authKey": "A String", # The authkey parameter required for this permission.
623 "etag": "A String", # The ETag of the permission.
Craig Citroe633be12015-03-02 13:40:36 -0800624 "emailAddress": "A String", # The email address of the user or group this permission refers to. This is an output-only field which is present when the permission type is user or group.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400625 "expirationDate": "A String", # The time at which this permission will expire (RFC 3339 date-time). Expiration dates have the following restrictions:
626 # - They can only be set on user and group permissions
627 # - The date must be in the future
628 # - The date cannot be more than a year in the future
629 # - The date can only be set on drive.permissions.update requests
630 "role": "A String", # The primary role for this user. While new values may be supported in the future, the following are currently allowed:
631 # - organizer
Craig Citro065b5302014-08-14 00:47:23 -0700632 # - owner
633 # - reader
634 # - writer
635 "type": "A String", # The account type. Allowed values are:
636 # - user
637 # - group
638 # - domain
639 # - anyone
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400640 "additionalRoles": [ # Additional roles for this user. Only commenter is currently allowed, though more may be supported in the future.
Craig Citro065b5302014-08-14 00:47:23 -0700641 "A String",
642 ],
643 "selfLink": "A String", # A link back to this permission.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700644 "photoLink": "A String", # A link to the profile photo, if available.
Craig Citro065b5302014-08-14 00:47:23 -0700645 },
646 ],
Takashi Matsuo06694102015-09-11 13:55:40 -0700647 "fullFileExtension": "A String", # The full file extension; extracted from the title. May contain multiple concatenated extensions, such as "tar.gz". Removing an extension from the title does not clear this field; however, changing the extension on the title does update this field. This field is only populated for files with content stored in Drive; it is not populated for Google Docs or shortcut files.
John Asmuth614db982014-04-24 15:46:26 -0400648 "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.
649 "a_key": "A String",
650 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400651 "canReadRevisions": True or False, # Whether the current user has read access to the Revisions resource of the file. Deprecated: use capabilities/canReadRevisions.
John Asmuth614db982014-04-24 15:46:26 -0400652 "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.
653 "exposureBias": 3.14, # The exposure bias of the photo (APEX value).
654 "exposureTime": 3.14, # The length of the exposure, in seconds.
655 "cameraMake": "A String", # The make of the camera used to create the photo.
656 "maxApertureValue": 3.14, # The smallest f-number of the lens at the focal length used to create the photo (APEX value).
657 "isoSpeed": 42, # The ISO speed used to create the photo.
658 "focalLength": 3.14, # The focal length used to create the photo, in millimeters.
659 "exposureMode": "A String", # The exposure mode used to create the photo.
660 "colorSpace": "A String", # The color space of the photo.
661 "location": { # Geographic location information stored in the image.
662 "latitude": 3.14, # The latitude stored in the image.
663 "altitude": 3.14, # The altitude stored in the image.
664 "longitude": 3.14, # The longitude stored in the image.
665 },
666 "subjectDistance": 42, # The distance to the subject of the photo, in meters.
667 "height": 42, # The height of the image in pixels.
668 "lens": "A String", # The lens used to create the photo.
669 "date": "A String", # The date and time the photo was taken (EXIF format timestamp).
670 "width": 42, # The width of the image in pixels.
671 "meteringMode": "A String", # The metering mode used to create the photo.
672 "flashUsed": True or False, # Whether a flash was used to create the photo.
673 "aperture": 3.14, # The aperture used to create the photo (f-number).
674 "rotation": 42, # The rotation in clockwise degrees from the image's original orientation.
675 "sensor": "A String", # The type of sensor used to create the photo.
676 "whiteBalance": "A String", # The white balance mode used to create the photo.
677 "cameraModel": "A String", # The model of the camera used to create the photo.
678 },
679 "description": "A String", # A short description of the file.
680 "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.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800681 "videoMediaMetadata": { # Metadata about video media. This will only be present for video types.
682 "width": 42, # The width of the video in pixels.
683 "durationMillis": "A String", # The duration of the video in milliseconds.
684 "height": 42, # The height of the video in pixels.
685 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400686 "editable": True or False, # Whether the file can be edited by the current user. Deprecated: use capabilities/canEdit.
John Asmuth614db982014-04-24 15:46:26 -0400687 "kind": "drive#file", # The type of file. This is always drive#file.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400688 "canComment": True or False, # Whether the current user can comment on the file. Deprecated: use capabilities/canComment.
John Asmuth614db982014-04-24 15:46:26 -0400689 "quotaBytesUsed": "A String", # The number of quota bytes used by this file.
Takashi Matsuo06694102015-09-11 13:55:40 -0700690 "fileSize": "A String", # The size of the file in bytes. This field is only populated for files with content stored in Drive; it is not populated for Google Docs or shortcut files.
Craig Citro0e5b9bf2014-10-15 10:26:14 -0700691 "createdDate": "A String", # Create time for this file (formatted RFC 3339 timestamp).
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400692 "teamDriveId": "A String", # ID of the Team Drive the file resides in.
John Asmuth614db982014-04-24 15:46:26 -0400693 "properties": [ # The list of properties.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000694 { # A key-value pair attached to a file that is either public or private to an application.
695 # The following limits apply to file properties:
696 # - Maximum of 100 properties total per file
697 # - Maximum of 30 private properties per app
698 # - Maximum of 30 public properties
699 # - Maximum of 124 bytes size limit on (key + value) string in UTF-8 encoding for a single property.
John Asmuth614db982014-04-24 15:46:26 -0400700 "kind": "drive#property", # This is always drive#property.
701 "value": "A String", # The value of this property.
702 "etag": "A String", # ETag of the property.
703 "visibility": "A String", # The visibility of this property.
704 "key": "A String", # The key of this property.
705 "selfLink": "A String", # The link back to this property.
706 },
707 ],
Takashi Matsuo06694102015-09-11 13:55:40 -0700708 "md5Checksum": "A String", # An MD5 checksum for the content of this file. This field is only populated for files with content stored in Drive; it is not populated for Google Docs or shortcut files.
John Asmuth614db982014-04-24 15:46:26 -0400709 "iconLink": "A String", # A link to the file's icon.
710 "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.
711 "embedLink": "A String", # A link for embedding the file.
Craig Citro0e5b9bf2014-10-15 10:26:14 -0700712 "alternateLink": "A String", # A link for opening the file in a relevant Google editor or viewer.
John Asmuth614db982014-04-24 15:46:26 -0400713 "title": "A String", # The title of this file.
714 "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.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800715 "thumbnail": { # A thumbnail for the file. This will only be used if Drive cannot generate a standard thumbnail.
Takashi Matsuo06694102015-09-11 13:55:40 -0700716 "mimeType": "A String", # The MIME type of the thumbnail.
717 "image": "A String", # The URL-safe Base64 encoded bytes of the thumbnail image. It should conform to RFC 4648 section 5.
718 },
719 "downloadUrl": "A String",
John Asmuth614db982014-04-24 15:46:26 -0400720 "userPermission": { # A permission for a file. # The permissions for the authenticated user on this file.
721 "withLink": True or False, # Whether the link is required for this permission.
Craig Citro065b5302014-08-14 00:47:23 -0700722 "domain": "A String", # The domain name of the entity this permission refers to. This is an output-only field which is present when the permission type is user, group or domain.
John Asmuth614db982014-04-24 15:46:26 -0400723 "name": "A String", # The name for this permission.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400724 "teamDrivePermissionDetails": [ # Details of whether the Permissions on this Team Drive item are inherited or directly on this item. This is an output-only field which is present only for Team Drive items.
725 {
726 "inheritedFrom": "A String", # The ID of the item from which this permission is inherited. This is an output-only field and is only populated for members of the Team Drive.
727 "role": "A String", # The primary role for this user. While new values may be added in the future, the following are currently possible:
728 # - organizer
729 # - reader
730 # - writer
731 "additionalRoles": [ # Additional roles for this user. Only commenter is currently possible, though more may be supported in the future.
732 "A String",
733 ],
734 "teamDrivePermissionType": "A String", # The Team Drive permission type for this user. While new values may be added in future, the following are currently possible:
735 # - file
736 # - member
737 "inherited": True or False, # Whether this permission is inherited. This field is always populated. This is an output-only field.
738 },
739 ],
John Asmuth614db982014-04-24 15:46:26 -0400740 "kind": "drive#permission", # This is always drive#permission.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800741 "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 the id or value fields must be specified unless the permission type is anyone, in which case both id and value are ignored.
742 "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 the id or value fields must be specified unless the permission type is anyone, in which case both id and value are ignored.
John Asmuth614db982014-04-24 15:46:26 -0400743 "authKey": "A String", # The authkey parameter required for this permission.
744 "etag": "A String", # The ETag of the permission.
Craig Citroe633be12015-03-02 13:40:36 -0800745 "emailAddress": "A String", # The email address of the user or group this permission refers to. This is an output-only field which is present when the permission type is user or group.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400746 "expirationDate": "A String", # The time at which this permission will expire (RFC 3339 date-time). Expiration dates have the following restrictions:
747 # - They can only be set on user and group permissions
748 # - The date must be in the future
749 # - The date cannot be more than a year in the future
750 # - The date can only be set on drive.permissions.update requests
751 "role": "A String", # The primary role for this user. While new values may be supported in the future, the following are currently allowed:
752 # - organizer
John Asmuth614db982014-04-24 15:46:26 -0400753 # - owner
754 # - reader
755 # - writer
756 "type": "A String", # The account type. Allowed values are:
757 # - user
758 # - group
759 # - domain
760 # - anyone
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400761 "additionalRoles": [ # Additional roles for this user. Only commenter is currently allowed, though more may be supported in the future.
John Asmuth614db982014-04-24 15:46:26 -0400762 "A String",
763 ],
764 "selfLink": "A String", # A link back to this permission.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700765 "photoLink": "A String", # A link to the profile photo, if available.
John Asmuth614db982014-04-24 15:46:26 -0400766 },
Takashi Matsuo06694102015-09-11 13:55:40 -0700767 "spaces": [ # The list of spaces which contain the file. Supported values are 'drive', 'appDataFolder' and 'photos'.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000768 "A String",
769 ],
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400770 "shareable": True or False, # Whether the file's sharing settings can be modified by the current user. Deprecated: use capabilities/canShare.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700771 "originalFilename": "A String", # The original filename of the uploaded content if available, or else the original value of the title field. This is only available for files with binary content in Drive.
Takashi Matsuo06694102015-09-11 13:55:40 -0700772 "fileExtension": "A String", # The final component of fullFileExtension with trailing text that does not appear to be part of the extension removed. This field is only populated for files with content stored in Drive; it is not populated for Google Docs or shortcut files.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400773 "hasAugmentedPermissions": True or False, # Whether any users are granted file access directly on this file. This field is only populated for Team Drive files.
Takashi Matsuo06694102015-09-11 13:55:40 -0700774 "headRevisionId": "A String", # The ID of the file's head revision. This field is only populated for files with content stored in Drive; it is not populated for Google Docs or shortcut files.
John Asmuth614db982014-04-24 15:46:26 -0400775 "selfLink": "A String", # A link back to this file.
776 "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.
777 },
778 "modificationDate": "A String", # The time of this modification.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400779 "teamDriveId": "A String", # The ID of the Team Drive associated with this change.
780 "type": "A String", # The type of the change. Possible values are file and teamDrive.
John Asmuth614db982014-04-24 15:46:26 -0400781 "id": "A String", # The ID of the change.
782 "selfLink": "A String", # A link back to this change.
783 "fileId": "A String", # The ID of the file associated with this change.
784 },
785 ],
786 "nextLink": "A String", # A link to the next page of changes.
787 "etag": "A String", # The ETag of the list.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400788 "newStartPageToken": "A String", # The starting page token for future changes. This will be present only if the end of the current changes list has been reached.
John Asmuth614db982014-04-24 15:46:26 -0400789 "largestChangeId": "A String", # The current largest change ID.
790 "selfLink": "A String", # A link back to this list.
791 }</pre>
792</div>
793
794<div class="method">
795 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
796 <pre>Retrieves the next page of results.
797
798Args:
799 previous_request: The request for the previous page. (required)
800 previous_response: The response from the request for the previous page. (required)
801
802Returns:
803 A request object that you can call 'execute()' on to request the next
804 page. Returns None if there are no more items in the collection.
805 </pre>
806</div>
807
808<div class="method">
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400809 <code class="details" id="watch">watch(body, supportsTeamDrives=None, spaces=None, startChangeId=None, pageToken=None, includeSubscribed=None, includeDeleted=None, maxResults=None, teamDriveId=None, includeTeamDriveItems=None, includeCorpusRemovals=None)</code>
John Asmuth614db982014-04-24 15:46:26 -0400810 <pre>Subscribe to changes for a user.
811
812Args:
813 body: object, The request body. (required)
814 The object takes the form of:
815
816{ # An notification channel used to watch for resource changes.
817 "resourceUri": "A String", # A version-specific identifier for the watched resource.
818 "kind": "api#channel", # Identifies this as a notification channel used to watch for changes to a resource. Value: the fixed string "api#channel".
819 "resourceId": "A String", # An opaque ID that identifies the resource being watched on this channel. Stable across different API versions.
820 "payload": True or False, # A Boolean value to indicate whether payload is wanted. Optional.
821 "token": "A String", # An arbitrary string delivered to the target address with each notification delivered over this channel. Optional.
822 "params": { # Additional parameters controlling delivery channel behavior. Optional.
823 "a_key": "A String", # Declares a new parameter by name.
824 },
825 "expiration": "A String", # Date and time of notification channel expiration, expressed as a Unix timestamp, in milliseconds. Optional.
826 "address": "A String", # The address where notifications are delivered for this channel.
827 "type": "A String", # The type of delivery mechanism used for this channel.
828 "id": "A String", # A UUID or similar unique string that identifies this channel.
829 }
830
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400831 supportsTeamDrives: boolean, Whether the requesting application supports Team Drives.
Takashi Matsuo06694102015-09-11 13:55:40 -0700832 spaces: string, A comma-separated list of spaces to query. Supported values are 'drive', 'appDataFolder' and 'photos'.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400833 startChangeId: string, Change ID to start listing changes from.
834 pageToken: string, The token for continuing a previous list request on the next page. This should be set to the value of 'nextPageToken' from the previous response or to the response from the getStartPageToken method.
835 includeSubscribed: boolean, Whether to include public files the user has opened and shared files. When set to false, the list only includes owned files plus any shared or public files the user has explicitly added to a folder they own.
836 includeDeleted: boolean, Whether to include changes indicating that items have been removed from the list of changes, for example by deletion or loss of access.
837 maxResults: integer, Maximum number of changes to return.
838 teamDriveId: string, The Team Drive from which changes will be returned. If specified the change IDs will be reflective of the Team Drive; use the combined Team Drive ID and change ID as an identifier.
839 includeTeamDriveItems: boolean, Whether Team Drive files or changes should be included in results.
840 includeCorpusRemovals: boolean, Whether changes should include the file resource if the file is still accessible by the user at the time of the request, even when a file was removed from the list of changes and there will be no further change entries for this file.
John Asmuth614db982014-04-24 15:46:26 -0400841
842Returns:
843 An object of the form:
844
845 { # An notification channel used to watch for resource changes.
846 "resourceUri": "A String", # A version-specific identifier for the watched resource.
847 "kind": "api#channel", # Identifies this as a notification channel used to watch for changes to a resource. Value: the fixed string "api#channel".
848 "resourceId": "A String", # An opaque ID that identifies the resource being watched on this channel. Stable across different API versions.
849 "payload": True or False, # A Boolean value to indicate whether payload is wanted. Optional.
850 "token": "A String", # An arbitrary string delivered to the target address with each notification delivered over this channel. Optional.
851 "params": { # Additional parameters controlling delivery channel behavior. Optional.
852 "a_key": "A String", # Declares a new parameter by name.
853 },
854 "expiration": "A String", # Date and time of notification channel expiration, expressed as a Unix timestamp, in milliseconds. Optional.
855 "address": "A String", # The address where notifications are delivered for this channel.
856 "type": "A String", # The type of delivery mechanism used for this channel.
857 "id": "A String", # A UUID or similar unique string that identifies this channel.
858 }</pre>
859</div>
860
861</body></html>