blob: 7ab2f4376db5bcf5bfd1a94a47e55d75db4c20fe [file] [log] [blame]
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001<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_v3.html">Drive API</a> . <a href="drive_v3.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="#getStartPageToken">getStartPageToken(supportsTeamDrives=None, teamDriveId=None)</a></code></p>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -080079<p class="firstline">Gets the starting pageToken for listing future changes.</p>
80<p class="toc_element">
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040081 <code><a href="#list">list(pageToken, pageSize=None, includeTeamDriveItems=None, supportsTeamDrives=None, restrictToMyDrive=None, spaces=None, teamDriveId=None, includeCorpusRemovals=None, includeRemoved=None)</a></code></p>
82<p class="firstline">Lists the changes for a user or Team Drive.</p>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -080083<p class="toc_element">
84 <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p>
85<p class="firstline">Retrieves the next page of results.</p>
86<p class="toc_element">
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040087 <code><a href="#watch">watch(pageToken, body, pageSize=None, includeTeamDriveItems=None, includeRemoved=None, supportsTeamDrives=None, restrictToMyDrive=None, spaces=None, includeCorpusRemovals=None, teamDriveId=None)</a></code></p>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -080088<p class="firstline">Subscribes to changes for a user.</p>
89<h3>Method Details</h3>
90<div class="method">
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040091 <code class="details" id="getStartPageToken">getStartPageToken(supportsTeamDrives=None, teamDriveId=None)</code>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -080092 <pre>Gets the starting pageToken for listing future changes.
93
94Args:
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040095 supportsTeamDrives: boolean, Whether the requesting application supports Team Drives.
96 teamDriveId: string, The ID of the Team Drive for which the starting pageToken for listing future changes from that Team Drive will be returned.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -080097
98Returns:
99 An object of the form:
100
101 {
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700102 "kind": "drive#startPageToken", # Identifies what kind of resource this is. Value: the fixed string "drive#startPageToken".
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800103 "startPageToken": "A String", # The starting page token for listing changes.
104 }</pre>
105</div>
106
107<div class="method">
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400108 <code class="details" id="list">list(pageToken, pageSize=None, includeTeamDriveItems=None, supportsTeamDrives=None, restrictToMyDrive=None, spaces=None, teamDriveId=None, includeCorpusRemovals=None, includeRemoved=None)</code>
109 <pre>Lists the changes for a user or Team Drive.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800110
111Args:
112 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. (required)
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400113 pageSize: integer, The maximum number of changes to return per page.
114 includeTeamDriveItems: boolean, Whether Team Drive files or changes should be included in results.
115 supportsTeamDrives: boolean, Whether the requesting application supports Team Drives.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800116 restrictToMyDrive: boolean, Whether to restrict the results to changes inside the My Drive hierarchy. This omits changes to files such as those in the Application Data folder or shared files which have not been added to My Drive.
117 spaces: string, A comma-separated list of spaces to query within the user corpus. Supported values are 'drive', 'appDataFolder' and 'photos'.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400118 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.
119 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.
120 includeRemoved: boolean, Whether to include changes indicating that items have been removed from the list of changes, for example by deletion or loss of access.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800121
122Returns:
123 An object of the form:
124
125 { # A list of changes for a user.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400126 "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.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700127 "kind": "drive#changeList", # Identifies what kind of resource this is. Value: the fixed string "drive#changeList".
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400128 "changes": [ # The list of changes. If nextPageToken is populated, then this list may be incomplete and an additional page of results should be fetched.
129 { # A change to a file or Team Drive.
130 "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 removed.
131 "kind": "drive#teamDrive", # Identifies what kind of resource this is. Value: the fixed string "drive#teamDrive".
132 "id": "A String", # The ID of this Team Drive which is also the ID of the top level folder for this Team Drive.
133 "capabilities": { # Capabilities the current user has on this Team Drive.
134 "canReadRevisions": True or False, # Whether the current user has read access to the Revisions resource of files in this Team Drive.
135 "canCopy": True or False, # Whether files in this Team Drive can be copied by the current user.
136 "canRename": True or False, # Whether files or folders in this Team Drive can be renamed by the current user.
137 "canListChildren": True or False, # Whether the current user can list the children of folders in this Team Drive.
138 "canShare": True or False, # Whether the current user can share files or folders in this Team Drive.
139 "canManageMembers": True or False, # Whether the current user can add members to this Team Drive or remove them or change their role.
140 "canDownload": True or False, # Whether files in this Team Drive can be downloaded by the current user.
141 "canComment": True or False, # Whether the current user can comment on files in this Team Drive.
142 "canDeleteTeamDrive": True or False, # Whether this Team Drive can be deleted by the current user.
143 "canRenameTeamDrive": True or False, # Whether this Team Drive can be renamed by the current user.
144 "canRemoveChildren": True or False, # Whether the current user can remove children from folders in this Team Drive.
145 "canAddChildren": True or False, # Whether the current user can add children to folders in this Team Drive.
146 "canEdit": True or False, # Whether files in this Team Drive can be edited by the current user.
147 },
148 "name": "A String", # The name of this Team Drive.
149 },
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700150 "kind": "drive#change", # Identifies what kind of resource this is. Value: the fixed string "drive#change".
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400151 "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 -0800152 "hasThumbnail": True or False, # Whether this file has a thumbnail.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800153 "mimeType": "A String", # The MIME type of the file.
154 # Drive will attempt to automatically detect an appropriate value from uploaded content if no value is provided. The value cannot be changed unless a new revision is uploaded.
155 # If a file is created with a Google Doc MIME type, the uploaded content will be imported if possible. The supported import formats are published in the About resource.
156 "modifiedByMeTime": "A String", # The last time the file was modified by the user (RFC 3339 date-time).
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800157 "thumbnailLink": "A String", # A short-lived link to the file's thumbnail, if available. Typically lasts on the order of hours. Only populated when the requesting app can access the file's content.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400158 "thumbnailVersion": "A String", # The thumbnail version for use in thumbnail cache invalidation.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800159 "explicitlyTrashed": True or False, # Whether the file has been explicitly trashed, as opposed to recursively trashed from a parent folder.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700160 "isAppAuthorized": True or False, # Whether the file was created or opened by the requesting app.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400161 "writersCanShare": True or False, # Whether users with only writer permission can modify the file's permissions. Not populated for Team Drive files.
162 "ownedByMe": True or False, # Whether the user owns the file. Not populated for Team Drive files.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800163 "viewedByMeTime": "A String", # The last time the file was viewed by the user (RFC 3339 date-time).
164 "id": "A String", # The ID of the file.
165 "sharingUser": { # Information about a Drive user. # The user who shared the file with the requesting user, if applicable.
166 "me": True or False, # Whether this user is the requesting user.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700167 "kind": "drive#user", # Identifies what kind of resource this is. Value: the fixed string "drive#user".
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800168 "displayName": "A String", # A plain text displayable name for this user.
169 "permissionId": "A String", # The user's ID as visible in Permission resources.
170 "emailAddress": "A String", # The email address of the user. This may not be present in certain contexts if the user has not made their email address visible to the requester.
171 "photoLink": "A String", # A link to the user's profile photo, if available.
172 },
173 "size": "A String", # The size of the file's content in bytes. This is only applicable to files with binary content in Drive.
174 "videoMediaMetadata": { # Additional metadata about video media. This may not be available immediately upon upload.
175 "width": 42, # The width of the video in pixels.
176 "durationMillis": "A String", # The duration of the video in milliseconds.
177 "height": 42, # The height of the video in pixels.
178 },
179 "lastModifyingUser": { # Information about a Drive user. # The last user to modify the file.
180 "me": True or False, # Whether this user is the requesting user.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700181 "kind": "drive#user", # Identifies what kind of resource this is. Value: the fixed string "drive#user".
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800182 "displayName": "A String", # A plain text displayable name for this user.
183 "permissionId": "A String", # The user's ID as visible in Permission resources.
184 "emailAddress": "A String", # The email address of the user. This may not be present in certain contexts if the user has not made their email address visible to the requester.
185 "photoLink": "A String", # A link to the user's profile photo, if available.
186 },
187 "folderColorRgb": "A String", # The color for a folder as an RGB hex string. The supported colors are published in the folderColorPalette field of the About resource.
188 # If an unsupported color is specified, the closest color in the palette will be used instead.
189 "appProperties": { # A collection of arbitrary key-value pairs which are private to the requesting app.
190 # Entries with null values are cleared in update and copy requests.
191 "a_key": "A String",
192 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400193 "capabilities": { # Capabilities the current user has on the file. Each capability corresponds to a fine-grained action that a user may take.
194 "canReadRevisions": True or False, # Whether the 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.
195 "canTrash": True or False, # Whether the file can be trashed by the user.
196 "canCopy": True or False, # Whether the user can copy the file. 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.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800197 "canShare": True or False, # Whether the user can modify the file's permissions and sharing settings.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400198 "canDelete": True or False, # Whether the file can be deleted by the user.
199 "canMoveTeamDriveItem": True or False, # Whether the 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.
200 "canRename": True or False, # Whether the file can be renamed by the user.
201 "canListChildren": True or False, # Whether the user can list the children of this folder. This is always false when the item is not a folder.
202 "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.
203 "canDownload": True or False, # Whether the file can be downloaded by the user.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800204 "canComment": True or False, # Whether the user can comment on the file.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400205 "canRemoveChildren": True or False, # Whether the user can remove children from this folder. This is always false when the item is not a folder.
206 "canReadTeamDrive": True or False, # Whether the user has read access to the Team Drive to which this file belongs. Only populated for Team Drive files.
207 "canAddChildren": True or False, # Whether the user can add children to this folder. This is always false when the item is not a folder.
208 "canEdit": True or False, # Whether the user can edit the file's content.
209 "canUntrash": True or False, # Whether the file can be restored from the trash by the current user.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800210 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400211 "trashedTime": "A String", # The time that the item was trashed (RFC 3339 date-time). Only populated for Team Drive files.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800212 "webViewLink": "A String", # A link for opening the file in a relevant Google editor or viewer in a browser.
213 "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 user.
214 "parents": [ # The IDs of the parent folders which contain the file.
215 # If not specified as part of a create request, the file will be placed directly in the My Drive folder. Update requests must use the addParents and removeParents parameters to modify the values.
216 "A String",
217 ],
218 "sharedWithMeTime": "A String", # The time at which the file was shared with the user, if applicable (RFC 3339 date-time).
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400219 "shared": True or False, # Whether the file has been shared. Not populated for Team Drive files.
220 "permissions": [ # The full list of permissions for the file. This is only available if the requesting user can share the file. Not populated for Team Drive files.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800221 { # A permission for a file. A permission grants a user, group, domain or the world access to a file or a folder hierarchy.
222 "domain": "A String", # The domain to which this permission refers.
223 "displayName": "A String", # A displayable name for users, groups or domains.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400224 "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.
225 {
226 "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.
227 "role": "A String", # The primary role for this user. While new values may be added in the future, the following are currently possible:
228 # - organizer
229 # - writer
230 # - commenter
231 # - reader
232 "teamDrivePermissionType": "A String", # The Team Drive permission type for this user. While new values may be added in future, the following are currently possible:
233 # - file
234 # -
235 # - member
236 "inherited": True or False, # Whether this permission is inherited. This field is always populated. This is an output-only field.
237 },
238 ],
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800239 "allowFileDiscovery": True or False, # Whether the permission allows the file to be discovered through search. This is only applicable for permissions of type domain or anyone.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700240 "kind": "drive#permission", # Identifies what kind of resource this is. Value: the fixed string "drive#permission".
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800241 "emailAddress": "A String", # The email address of the user or group to which this permission refers.
242 "photoLink": "A String", # A link to the user's profile photo, if available.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400243 "role": "A String", # The role granted by this permission. While new values may be supported in the future, the following are currently allowed:
244 # - organizer
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800245 # - owner
246 # - writer
247 # - commenter
248 # - reader
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400249 "expirationTime": "A String", # The time at which this permission will expire (RFC 3339 date-time). Expiration times have the following restrictions:
250 # - They can only be set on user and group permissions
251 # - The time must be in the future
252 # - The time cannot be more than a year in the future
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800253 "type": "A String", # The type of the grantee. Valid values are:
254 # - user
255 # - group
256 # - domain
257 # - anyone
258 "id": "A String", # The ID of this permission. This is a unique identifier for the grantee, and is published in User resources as permissionId.
259 },
260 ],
261 "fullFileExtension": "A String", # The full file extension extracted from the name field. May contain multiple concatenated extensions, such as "tar.gz". This is only available for files with binary content in Drive.
262 # This is automatically updated when the name field changes, however it is not cleared if the new name does not contain a valid extension.
263 "originalFilename": "A String", # The original filename of the uploaded content if available, or else the original value of the name field. This is only available for files with binary content in Drive.
264 "viewersCanCopyContent": True or False, # Whether users with only reader or commenter permission can copy the file's content. This affects copy, download, and print operations.
265 "description": "A String", # A short description of the file.
266 "modifiedTime": "A String", # The last time the file was modified by anyone (RFC 3339 date-time).
267 # Note that setting modifiedTime will also update modifiedByMeTime for the user.
268 "viewedByMe": True or False, # Whether the file has been viewed by this user.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800269 "modifiedByMe": True or False, # Whether the file has been modified by this user.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400270 "owners": [ # The owners of the file. Currently, only certain legacy files may have more than one owner. Not populated for Team Drive files.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800271 { # Information about a Drive user.
272 "me": True or False, # Whether this user is the requesting user.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700273 "kind": "drive#user", # Identifies what kind of resource this is. Value: the fixed string "drive#user".
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800274 "displayName": "A String", # A plain text displayable name for this user.
275 "permissionId": "A String", # The user's ID as visible in Permission resources.
276 "emailAddress": "A String", # The email address of the user. This may not be present in certain contexts if the user has not made their email address visible to the requester.
277 "photoLink": "A String", # A link to the user's profile photo, if available.
278 },
279 ],
280 "createdTime": "A String", # The time at which the file was created (RFC 3339 date-time).
281 "quotaBytesUsed": "A String", # The number of storage quota bytes used by the file. This includes the head revision as well as previous revisions with keepForever enabled.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400282 "teamDriveId": "A String", # ID of the Team Drive the file resides in.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800283 "properties": { # A collection of arbitrary key-value pairs which are visible to all apps.
284 # Entries with null values are cleared in update and copy requests.
285 "a_key": "A String",
286 },
287 "md5Checksum": "A String", # The MD5 checksum for the content of the file. This is only applicable to files with binary content in Drive.
288 "iconLink": "A String", # A static, unauthenticated link to the file's icon.
289 "imageMediaMetadata": { # Additional metadata about image media, if available.
290 "exposureBias": 3.14, # The exposure bias of the photo (APEX value).
291 "exposureTime": 3.14, # The length of the exposure, in seconds.
292 "cameraMake": "A String", # The make of the camera used to create the photo.
293 "maxApertureValue": 3.14, # The smallest f-number of the lens at the focal length used to create the photo (APEX value).
294 "width": 42, # The width of the image in pixels.
295 "focalLength": 3.14, # The focal length used to create the photo, in millimeters.
296 "exposureMode": "A String", # The exposure mode used to create the photo.
297 "colorSpace": "A String", # The color space of the photo.
298 "location": { # Geographic location information stored in the image.
299 "latitude": 3.14, # The latitude stored in the image.
300 "altitude": 3.14, # The altitude stored in the image.
301 "longitude": 3.14, # The longitude stored in the image.
302 },
303 "subjectDistance": 42, # The distance to the subject of the photo, in meters.
304 "height": 42, # The height of the image in pixels.
305 "lens": "A String", # The lens used to create the photo.
306 "isoSpeed": 42, # The ISO speed used to create the photo.
307 "meteringMode": "A String", # The metering mode used to create the photo.
308 "flashUsed": True or False, # Whether a flash was used to create the photo.
309 "time": "A String", # The date and time the photo was taken (EXIF DateTime).
310 "aperture": 3.14, # The aperture used to create the photo (f-number).
311 "rotation": 42, # The rotation in clockwise degrees from the image's original orientation.
312 "sensor": "A String", # The type of sensor used to create the photo.
313 "whiteBalance": "A String", # The white balance mode used to create the photo.
314 "cameraModel": "A String", # The model of the camera used to create the photo.
315 },
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700316 "kind": "drive#file", # Identifies what kind of resource this is. Value: the fixed string "drive#file".
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700317 "name": "A String", # The name of the file. This is not necessarily unique within a folder. Note that for immutable items such as the top level folders of Team Drives, My Drive root folder, and Application Data folder the name is constant.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800318 "webContentLink": "A String", # A link for downloading the content of the file in a browser. This is only available for files with binary content in Drive.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400319 "trashingUser": { # Information about a Drive user. # If the file has been explicitly trashed, the user who trashed it. Only populated for Team Drive files.
320 "me": True or False, # Whether this user is the requesting user.
321 "kind": "drive#user", # Identifies what kind of resource this is. Value: the fixed string "drive#user".
322 "displayName": "A String", # A plain text displayable name for this user.
323 "permissionId": "A String", # The user's ID as visible in Permission resources.
324 "emailAddress": "A String", # The email address of the user. This may not be present in certain contexts if the user has not made their email address visible to the requester.
325 "photoLink": "A String", # A link to the user's profile photo, if available.
326 },
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800327 "spaces": [ # The list of spaces which contain the file. The currently supported values are 'drive', 'appDataFolder' and 'photos'.
328 "A String",
329 ],
330 "trashed": True or False, # Whether the file has been trashed, either explicitly or from a trashed parent folder. Only the owner may trash a file, and other users cannot see files in the owner's trash.
331 "contentHints": { # Additional information about the content of the file. These fields are never populated in responses.
332 "indexableText": "A String", # Text to be indexed for the file to improve fullText queries. This is limited to 128KB in length and may contain HTML elements.
333 "thumbnail": { # A thumbnail for the file. This will only be used if Drive cannot generate a standard thumbnail.
334 "mimeType": "A String", # The MIME type of the thumbnail.
335 "image": "A String", # The thumbnail data encoded with URL-safe Base64 (RFC 4648 section 5).
336 },
337 },
338 "fileExtension": "A String", # The final component of fullFileExtension. This is only available for files with binary content in Drive.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400339 "hasAugmentedPermissions": True or False, # Whether any users are granted file access directly on this file. This field is only populated for Team Drive files.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800340 "starred": True or False, # Whether the user has starred the file.
341 "headRevisionId": "A String", # The ID of the file's head revision. This is currently only available for files with binary content in Drive.
342 },
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400343 "time": "A String", # The time of this change (RFC 3339 date-time).
344 "teamDriveId": "A String", # The ID of the Team Drive associated with this change.
345 "removed": 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.
346 "type": "A String", # The type of the change. Possible values are file and teamDrive.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800347 "fileId": "A String", # The ID of the file which has changed.
348 },
349 ],
350 "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.
351 }</pre>
352</div>
353
354<div class="method">
355 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
356 <pre>Retrieves the next page of results.
357
358Args:
359 previous_request: The request for the previous page. (required)
360 previous_response: The response from the request for the previous page. (required)
361
362Returns:
363 A request object that you can call 'execute()' on to request the next
364 page. Returns None if there are no more items in the collection.
365 </pre>
366</div>
367
368<div class="method">
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400369 <code class="details" id="watch">watch(pageToken, body, pageSize=None, includeTeamDriveItems=None, includeRemoved=None, supportsTeamDrives=None, restrictToMyDrive=None, spaces=None, includeCorpusRemovals=None, teamDriveId=None)</code>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800370 <pre>Subscribes to changes for a user.
371
372Args:
373 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. (required)
374 body: object, The request body. (required)
375 The object takes the form of:
376
377{ # An notification channel used to watch for resource changes.
378 "resourceUri": "A String", # A version-specific identifier for the watched resource.
379 "kind": "api#channel", # Identifies this as a notification channel used to watch for changes to a resource. Value: the fixed string "api#channel".
380 "resourceId": "A String", # An opaque ID that identifies the resource being watched on this channel. Stable across different API versions.
381 "payload": True or False, # A Boolean value to indicate whether payload is wanted. Optional.
382 "token": "A String", # An arbitrary string delivered to the target address with each notification delivered over this channel. Optional.
383 "params": { # Additional parameters controlling delivery channel behavior. Optional.
384 "a_key": "A String", # Declares a new parameter by name.
385 },
386 "expiration": "A String", # Date and time of notification channel expiration, expressed as a Unix timestamp, in milliseconds. Optional.
387 "address": "A String", # The address where notifications are delivered for this channel.
388 "type": "A String", # The type of delivery mechanism used for this channel.
389 "id": "A String", # A UUID or similar unique string that identifies this channel.
390 }
391
392 pageSize: integer, The maximum number of changes to return per page.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400393 includeTeamDriveItems: boolean, Whether Team Drive files or changes should be included in results.
394 includeRemoved: boolean, Whether to include changes indicating that items have been removed from the list of changes, for example by deletion or loss of access.
395 supportsTeamDrives: boolean, Whether the requesting application supports Team Drives.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800396 restrictToMyDrive: boolean, Whether to restrict the results to changes inside the My Drive hierarchy. This omits changes to files such as those in the Application Data folder or shared files which have not been added to My Drive.
397 spaces: string, A comma-separated list of spaces to query within the user corpus. Supported values are 'drive', 'appDataFolder' and 'photos'.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400398 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.
399 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.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800400
401Returns:
402 An object of the form:
403
404 { # An notification channel used to watch for resource changes.
405 "resourceUri": "A String", # A version-specific identifier for the watched resource.
406 "kind": "api#channel", # Identifies this as a notification channel used to watch for changes to a resource. Value: the fixed string "api#channel".
407 "resourceId": "A String", # An opaque ID that identifies the resource being watched on this channel. Stable across different API versions.
408 "payload": True or False, # A Boolean value to indicate whether payload is wanted. Optional.
409 "token": "A String", # An arbitrary string delivered to the target address with each notification delivered over this channel. Optional.
410 "params": { # Additional parameters controlling delivery channel behavior. Optional.
411 "a_key": "A String", # Declares a new parameter by name.
412 },
413 "expiration": "A String", # Date and time of notification channel expiration, expressed as a Unix timestamp, in milliseconds. Optional.
414 "address": "A String", # The address where notifications are delivered for this channel.
415 "type": "A String", # The type of delivery mechanism used for this channel.
416 "id": "A String", # A UUID or similar unique string that identifies this channel.
417 }</pre>
418</div>
419
420</body></html>