1<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.comments.html">comments</a></h1> 76<h2>Instance Methods</h2> 77<p class="toc_element"> 78 <code><a href="#close">close()</a></code></p> 79<p class="firstline">Close httplib2 connections.</p> 80<p class="toc_element"> 81 <code><a href="#delete">delete(fileId, commentId)</a></code></p> 82<p class="firstline">Deletes a comment.</p> 83<p class="toc_element"> 84 <code><a href="#get">get(fileId, commentId, includeDeleted=None)</a></code></p> 85<p class="firstline">Gets a comment by ID.</p> 86<p class="toc_element"> 87 <code><a href="#insert">insert(fileId, body=None)</a></code></p> 88<p class="firstline">Creates a new comment on the given file.</p> 89<p class="toc_element"> 90 <code><a href="#list">list(fileId, includeDeleted=None, maxResults=None, pageToken=None, updatedMin=None)</a></code></p> 91<p class="firstline">Lists a file's comments.</p> 92<p class="toc_element"> 93 <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p> 94<p class="firstline">Retrieves the next page of results.</p> 95<p class="toc_element"> 96 <code><a href="#patch">patch(fileId, commentId, body=None)</a></code></p> 97<p class="firstline">Updates an existing comment.</p> 98<p class="toc_element"> 99 <code><a href="#update">update(fileId, commentId, body=None)</a></code></p> 100<p class="firstline">Updates an existing comment.</p> 101<h3>Method Details</h3> 102<div class="method"> 103 <code class="details" id="close">close()</code> 104 <pre>Close httplib2 connections.</pre> 105</div> 106 107<div class="method"> 108 <code class="details" id="delete">delete(fileId, commentId)</code> 109 <pre>Deletes a comment. 110 111Args: 112 fileId: string, The ID of the file. (required) 113 commentId: string, The ID of the comment. (required) 114</pre> 115</div> 116 117<div class="method"> 118 <code class="details" id="get">get(fileId, commentId, includeDeleted=None)</code> 119 <pre>Gets a comment by ID. 120 121Args: 122 fileId: string, The ID of the file. (required) 123 commentId: string, The ID of the comment. (required) 124 includeDeleted: boolean, If set, this will succeed when retrieving a deleted comment, and will include any deleted replies. 125 126Returns: 127 An object of the form: 128 129 { # A comment on a file in Google Drive. 130 "anchor": "A String", # A region of the document represented as a JSON string. For details on defining anchor properties, refer to Add comments and replies. 131 "author": { # Information about a Drive user. # The author of the comment. The author's email address and permission ID will not be populated. 132 "displayName": "A String", # A plain text displayable name for this user. 133 "emailAddress": "A String", # The email address of the user. 134 "isAuthenticatedUser": True or False, # Whether this user is the same as the authenticated user for whom the request was made. 135 "kind": "drive#user", # This is always drive#user. 136 "permissionId": "A String", # The user's ID as visible in the permissions collection. 137 "picture": { # The user's profile picture. 138 "url": "A String", # A URL that points to a profile picture of this user. 139 }, 140 }, 141 "commentId": "A String", # The ID of the comment. 142 "content": "A String", # The plain text content used to create this comment. This is not HTML safe and should only be used as a starting point to make edits to a comment's content. 143 "context": { # The context of the file which is being commented on. 144 "type": "A String", # The MIME type of the context snippet. 145 "value": "A String", # Data representation of the segment of the file being commented on. In the case of a text file for example, this would be the actual text that the comment is about. 146 }, 147 "createdDate": "A String", # The date when this comment was first created. 148 "deleted": True or False, # Whether this comment has been deleted. If a comment has been deleted the content will be cleared and this will only represent a comment that once existed. 149 "fileId": "A String", # The file which this comment is addressing. 150 "fileTitle": "A String", # The title of the file which this comment is addressing. 151 "htmlContent": "A String", # HTML formatted content for this comment. 152 "kind": "drive#comment", # This is always drive#comment. 153 "modifiedDate": "A String", # The date when this comment or any of its replies were last modified. 154 "replies": [ # Replies to this post. 155 { # A comment on a file in Google Drive. 156 "author": { # Information about a Drive user. # The author of the reply. The author's email address and permission ID will not be populated. 157 "displayName": "A String", # A plain text displayable name for this user. 158 "emailAddress": "A String", # The email address of the user. 159 "isAuthenticatedUser": True or False, # Whether this user is the same as the authenticated user for whom the request was made. 160 "kind": "drive#user", # This is always drive#user. 161 "permissionId": "A String", # The user's ID as visible in the permissions collection. 162 "picture": { # The user's profile picture. 163 "url": "A String", # A URL that points to a profile picture of this user. 164 }, 165 }, 166 "content": "A String", # The plain text content used to create this reply. This is not HTML safe and should only be used as a starting point to make edits to a reply's content. This field is required on inserts if no verb is specified (resolve/reopen). 167 "createdDate": "A String", # The date when this reply was first created. 168 "deleted": True or False, # Whether this reply has been deleted. If a reply has been deleted the content will be cleared and this will only represent a reply that once existed. 169 "htmlContent": "A String", # HTML formatted content for this reply. 170 "kind": "drive#commentReply", # This is always drive#commentReply. 171 "modifiedDate": "A String", # The date when this reply was last modified. 172 "replyId": "A String", # The ID of the reply. 173 "verb": "A String", # The action this reply performed to the parent comment. When creating a new reply this is the action to be perform to the parent comment. Possible values are: 174 # - "resolve" - To resolve a comment. 175 # - "reopen" - To reopen (un-resolve) a comment. 176 }, 177 ], 178 "selfLink": "A String", # A link back to this comment. 179 "status": "A String", # The status of this comment. Status can be changed by posting a reply to a comment with the desired status. 180 # - "open" - The comment is still open. 181 # - "resolved" - The comment has been resolved by one of its replies. 182}</pre> 183</div> 184 185<div class="method"> 186 <code class="details" id="insert">insert(fileId, body=None)</code> 187 <pre>Creates a new comment on the given file. 188 189Args: 190 fileId: string, The ID of the file. (required) 191 body: object, The request body. 192 The object takes the form of: 193 194{ # A comment on a file in Google Drive. 195 "anchor": "A String", # A region of the document represented as a JSON string. For details on defining anchor properties, refer to Add comments and replies. 196 "author": { # Information about a Drive user. # The author of the comment. The author's email address and permission ID will not be populated. 197 "displayName": "A String", # A plain text displayable name for this user. 198 "emailAddress": "A String", # The email address of the user. 199 "isAuthenticatedUser": True or False, # Whether this user is the same as the authenticated user for whom the request was made. 200 "kind": "drive#user", # This is always drive#user. 201 "permissionId": "A String", # The user's ID as visible in the permissions collection. 202 "picture": { # The user's profile picture. 203 "url": "A String", # A URL that points to a profile picture of this user. 204 }, 205 }, 206 "commentId": "A String", # The ID of the comment. 207 "content": "A String", # The plain text content used to create this comment. This is not HTML safe and should only be used as a starting point to make edits to a comment's content. 208 "context": { # The context of the file which is being commented on. 209 "type": "A String", # The MIME type of the context snippet. 210 "value": "A String", # Data representation of the segment of the file being commented on. In the case of a text file for example, this would be the actual text that the comment is about. 211 }, 212 "createdDate": "A String", # The date when this comment was first created. 213 "deleted": True or False, # Whether this comment has been deleted. If a comment has been deleted the content will be cleared and this will only represent a comment that once existed. 214 "fileId": "A String", # The file which this comment is addressing. 215 "fileTitle": "A String", # The title of the file which this comment is addressing. 216 "htmlContent": "A String", # HTML formatted content for this comment. 217 "kind": "drive#comment", # This is always drive#comment. 218 "modifiedDate": "A String", # The date when this comment or any of its replies were last modified. 219 "replies": [ # Replies to this post. 220 { # A comment on a file in Google Drive. 221 "author": { # Information about a Drive user. # The author of the reply. The author's email address and permission ID will not be populated. 222 "displayName": "A String", # A plain text displayable name for this user. 223 "emailAddress": "A String", # The email address of the user. 224 "isAuthenticatedUser": True or False, # Whether this user is the same as the authenticated user for whom the request was made. 225 "kind": "drive#user", # This is always drive#user. 226 "permissionId": "A String", # The user's ID as visible in the permissions collection. 227 "picture": { # The user's profile picture. 228 "url": "A String", # A URL that points to a profile picture of this user. 229 }, 230 }, 231 "content": "A String", # The plain text content used to create this reply. This is not HTML safe and should only be used as a starting point to make edits to a reply's content. This field is required on inserts if no verb is specified (resolve/reopen). 232 "createdDate": "A String", # The date when this reply was first created. 233 "deleted": True or False, # Whether this reply has been deleted. If a reply has been deleted the content will be cleared and this will only represent a reply that once existed. 234 "htmlContent": "A String", # HTML formatted content for this reply. 235 "kind": "drive#commentReply", # This is always drive#commentReply. 236 "modifiedDate": "A String", # The date when this reply was last modified. 237 "replyId": "A String", # The ID of the reply. 238 "verb": "A String", # The action this reply performed to the parent comment. When creating a new reply this is the action to be perform to the parent comment. Possible values are: 239 # - "resolve" - To resolve a comment. 240 # - "reopen" - To reopen (un-resolve) a comment. 241 }, 242 ], 243 "selfLink": "A String", # A link back to this comment. 244 "status": "A String", # The status of this comment. Status can be changed by posting a reply to a comment with the desired status. 245 # - "open" - The comment is still open. 246 # - "resolved" - The comment has been resolved by one of its replies. 247} 248 249 250Returns: 251 An object of the form: 252 253 { # A comment on a file in Google Drive. 254 "anchor": "A String", # A region of the document represented as a JSON string. For details on defining anchor properties, refer to Add comments and replies. 255 "author": { # Information about a Drive user. # The author of the comment. The author's email address and permission ID will not be populated. 256 "displayName": "A String", # A plain text displayable name for this user. 257 "emailAddress": "A String", # The email address of the user. 258 "isAuthenticatedUser": True or False, # Whether this user is the same as the authenticated user for whom the request was made. 259 "kind": "drive#user", # This is always drive#user. 260 "permissionId": "A String", # The user's ID as visible in the permissions collection. 261 "picture": { # The user's profile picture. 262 "url": "A String", # A URL that points to a profile picture of this user. 263 }, 264 }, 265 "commentId": "A String", # The ID of the comment. 266 "content": "A String", # The plain text content used to create this comment. This is not HTML safe and should only be used as a starting point to make edits to a comment's content. 267 "context": { # The context of the file which is being commented on. 268 "type": "A String", # The MIME type of the context snippet. 269 "value": "A String", # Data representation of the segment of the file being commented on. In the case of a text file for example, this would be the actual text that the comment is about. 270 }, 271 "createdDate": "A String", # The date when this comment was first created. 272 "deleted": True or False, # Whether this comment has been deleted. If a comment has been deleted the content will be cleared and this will only represent a comment that once existed. 273 "fileId": "A String", # The file which this comment is addressing. 274 "fileTitle": "A String", # The title of the file which this comment is addressing. 275 "htmlContent": "A String", # HTML formatted content for this comment. 276 "kind": "drive#comment", # This is always drive#comment. 277 "modifiedDate": "A String", # The date when this comment or any of its replies were last modified. 278 "replies": [ # Replies to this post. 279 { # A comment on a file in Google Drive. 280 "author": { # Information about a Drive user. # The author of the reply. The author's email address and permission ID will not be populated. 281 "displayName": "A String", # A plain text displayable name for this user. 282 "emailAddress": "A String", # The email address of the user. 283 "isAuthenticatedUser": True or False, # Whether this user is the same as the authenticated user for whom the request was made. 284 "kind": "drive#user", # This is always drive#user. 285 "permissionId": "A String", # The user's ID as visible in the permissions collection. 286 "picture": { # The user's profile picture. 287 "url": "A String", # A URL that points to a profile picture of this user. 288 }, 289 }, 290 "content": "A String", # The plain text content used to create this reply. This is not HTML safe and should only be used as a starting point to make edits to a reply's content. This field is required on inserts if no verb is specified (resolve/reopen). 291 "createdDate": "A String", # The date when this reply was first created. 292 "deleted": True or False, # Whether this reply has been deleted. If a reply has been deleted the content will be cleared and this will only represent a reply that once existed. 293 "htmlContent": "A String", # HTML formatted content for this reply. 294 "kind": "drive#commentReply", # This is always drive#commentReply. 295 "modifiedDate": "A String", # The date when this reply was last modified. 296 "replyId": "A String", # The ID of the reply. 297 "verb": "A String", # The action this reply performed to the parent comment. When creating a new reply this is the action to be perform to the parent comment. Possible values are: 298 # - "resolve" - To resolve a comment. 299 # - "reopen" - To reopen (un-resolve) a comment. 300 }, 301 ], 302 "selfLink": "A String", # A link back to this comment. 303 "status": "A String", # The status of this comment. Status can be changed by posting a reply to a comment with the desired status. 304 # - "open" - The comment is still open. 305 # - "resolved" - The comment has been resolved by one of its replies. 306}</pre> 307</div> 308 309<div class="method"> 310 <code class="details" id="list">list(fileId, includeDeleted=None, maxResults=None, pageToken=None, updatedMin=None)</code> 311 <pre>Lists a file's comments. 312 313Args: 314 fileId: string, The ID of the file. (required) 315 includeDeleted: boolean, If set, all comments and replies, including deleted comments and replies (with content stripped) will be returned. 316 maxResults: integer, The maximum number of discussions to include in the response, used for paging. 317 pageToken: string, The continuation token, used to page through large result sets. To get the next page of results, set this parameter to the value of "nextPageToken" from the previous response. 318 updatedMin: string, Only discussions that were updated after this timestamp will be returned. Formatted as an RFC 3339 timestamp. 319 320Returns: 321 An object of the form: 322 323 { # A list of comments on a file in Google Drive. 324 "items": [ # The list of comments. If nextPageToken is populated, then this list may be incomplete and an additional page of results should be fetched. 325 { # A comment on a file in Google Drive. 326 "anchor": "A String", # A region of the document represented as a JSON string. For details on defining anchor properties, refer to Add comments and replies. 327 "author": { # Information about a Drive user. # The author of the comment. The author's email address and permission ID will not be populated. 328 "displayName": "A String", # A plain text displayable name for this user. 329 "emailAddress": "A String", # The email address of the user. 330 "isAuthenticatedUser": True or False, # Whether this user is the same as the authenticated user for whom the request was made. 331 "kind": "drive#user", # This is always drive#user. 332 "permissionId": "A String", # The user's ID as visible in the permissions collection. 333 "picture": { # The user's profile picture. 334 "url": "A String", # A URL that points to a profile picture of this user. 335 }, 336 }, 337 "commentId": "A String", # The ID of the comment. 338 "content": "A String", # The plain text content used to create this comment. This is not HTML safe and should only be used as a starting point to make edits to a comment's content. 339 "context": { # The context of the file which is being commented on. 340 "type": "A String", # The MIME type of the context snippet. 341 "value": "A String", # Data representation of the segment of the file being commented on. In the case of a text file for example, this would be the actual text that the comment is about. 342 }, 343 "createdDate": "A String", # The date when this comment was first created. 344 "deleted": True or False, # Whether this comment has been deleted. If a comment has been deleted the content will be cleared and this will only represent a comment that once existed. 345 "fileId": "A String", # The file which this comment is addressing. 346 "fileTitle": "A String", # The title of the file which this comment is addressing. 347 "htmlContent": "A String", # HTML formatted content for this comment. 348 "kind": "drive#comment", # This is always drive#comment. 349 "modifiedDate": "A String", # The date when this comment or any of its replies were last modified. 350 "replies": [ # Replies to this post. 351 { # A comment on a file in Google Drive. 352 "author": { # Information about a Drive user. # The author of the reply. The author's email address and permission ID will not be populated. 353 "displayName": "A String", # A plain text displayable name for this user. 354 "emailAddress": "A String", # The email address of the user. 355 "isAuthenticatedUser": True or False, # Whether this user is the same as the authenticated user for whom the request was made. 356 "kind": "drive#user", # This is always drive#user. 357 "permissionId": "A String", # The user's ID as visible in the permissions collection. 358 "picture": { # The user's profile picture. 359 "url": "A String", # A URL that points to a profile picture of this user. 360 }, 361 }, 362 "content": "A String", # The plain text content used to create this reply. This is not HTML safe and should only be used as a starting point to make edits to a reply's content. This field is required on inserts if no verb is specified (resolve/reopen). 363 "createdDate": "A String", # The date when this reply was first created. 364 "deleted": True or False, # Whether this reply has been deleted. If a reply has been deleted the content will be cleared and this will only represent a reply that once existed. 365 "htmlContent": "A String", # HTML formatted content for this reply. 366 "kind": "drive#commentReply", # This is always drive#commentReply. 367 "modifiedDate": "A String", # The date when this reply was last modified. 368 "replyId": "A String", # The ID of the reply. 369 "verb": "A String", # The action this reply performed to the parent comment. When creating a new reply this is the action to be perform to the parent comment. Possible values are: 370 # - "resolve" - To resolve a comment. 371 # - "reopen" - To reopen (un-resolve) a comment. 372 }, 373 ], 374 "selfLink": "A String", # A link back to this comment. 375 "status": "A String", # The status of this comment. Status can be changed by posting a reply to a comment with the desired status. 376 # - "open" - The comment is still open. 377 # - "resolved" - The comment has been resolved by one of its replies. 378 }, 379 ], 380 "kind": "drive#commentList", # This is always drive#commentList. 381 "nextLink": "A String", # A link to the next page of comments. 382 "nextPageToken": "A String", # The page token for the next page of comments. This will be absent if the end of the comments 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. 383 "selfLink": "A String", # A link back to this list. 384}</pre> 385</div> 386 387<div class="method"> 388 <code class="details" id="list_next">list_next(previous_request, previous_response)</code> 389 <pre>Retrieves the next page of results. 390 391Args: 392 previous_request: The request for the previous page. (required) 393 previous_response: The response from the request for the previous page. (required) 394 395Returns: 396 A request object that you can call 'execute()' on to request the next 397 page. Returns None if there are no more items in the collection. 398 </pre> 399</div> 400 401<div class="method"> 402 <code class="details" id="patch">patch(fileId, commentId, body=None)</code> 403 <pre>Updates an existing comment. 404 405Args: 406 fileId: string, The ID of the file. (required) 407 commentId: string, The ID of the comment. (required) 408 body: object, The request body. 409 The object takes the form of: 410 411{ # A comment on a file in Google Drive. 412 "anchor": "A String", # A region of the document represented as a JSON string. For details on defining anchor properties, refer to Add comments and replies. 413 "author": { # Information about a Drive user. # The author of the comment. The author's email address and permission ID will not be populated. 414 "displayName": "A String", # A plain text displayable name for this user. 415 "emailAddress": "A String", # The email address of the user. 416 "isAuthenticatedUser": True or False, # Whether this user is the same as the authenticated user for whom the request was made. 417 "kind": "drive#user", # This is always drive#user. 418 "permissionId": "A String", # The user's ID as visible in the permissions collection. 419 "picture": { # The user's profile picture. 420 "url": "A String", # A URL that points to a profile picture of this user. 421 }, 422 }, 423 "commentId": "A String", # The ID of the comment. 424 "content": "A String", # The plain text content used to create this comment. This is not HTML safe and should only be used as a starting point to make edits to a comment's content. 425 "context": { # The context of the file which is being commented on. 426 "type": "A String", # The MIME type of the context snippet. 427 "value": "A String", # Data representation of the segment of the file being commented on. In the case of a text file for example, this would be the actual text that the comment is about. 428 }, 429 "createdDate": "A String", # The date when this comment was first created. 430 "deleted": True or False, # Whether this comment has been deleted. If a comment has been deleted the content will be cleared and this will only represent a comment that once existed. 431 "fileId": "A String", # The file which this comment is addressing. 432 "fileTitle": "A String", # The title of the file which this comment is addressing. 433 "htmlContent": "A String", # HTML formatted content for this comment. 434 "kind": "drive#comment", # This is always drive#comment. 435 "modifiedDate": "A String", # The date when this comment or any of its replies were last modified. 436 "replies": [ # Replies to this post. 437 { # A comment on a file in Google Drive. 438 "author": { # Information about a Drive user. # The author of the reply. The author's email address and permission ID will not be populated. 439 "displayName": "A String", # A plain text displayable name for this user. 440 "emailAddress": "A String", # The email address of the user. 441 "isAuthenticatedUser": True or False, # Whether this user is the same as the authenticated user for whom the request was made. 442 "kind": "drive#user", # This is always drive#user. 443 "permissionId": "A String", # The user's ID as visible in the permissions collection. 444 "picture": { # The user's profile picture. 445 "url": "A String", # A URL that points to a profile picture of this user. 446 }, 447 }, 448 "content": "A String", # The plain text content used to create this reply. This is not HTML safe and should only be used as a starting point to make edits to a reply's content. This field is required on inserts if no verb is specified (resolve/reopen). 449 "createdDate": "A String", # The date when this reply was first created. 450 "deleted": True or False, # Whether this reply has been deleted. If a reply has been deleted the content will be cleared and this will only represent a reply that once existed. 451 "htmlContent": "A String", # HTML formatted content for this reply. 452 "kind": "drive#commentReply", # This is always drive#commentReply. 453 "modifiedDate": "A String", # The date when this reply was last modified. 454 "replyId": "A String", # The ID of the reply. 455 "verb": "A String", # The action this reply performed to the parent comment. When creating a new reply this is the action to be perform to the parent comment. Possible values are: 456 # - "resolve" - To resolve a comment. 457 # - "reopen" - To reopen (un-resolve) a comment. 458 }, 459 ], 460 "selfLink": "A String", # A link back to this comment. 461 "status": "A String", # The status of this comment. Status can be changed by posting a reply to a comment with the desired status. 462 # - "open" - The comment is still open. 463 # - "resolved" - The comment has been resolved by one of its replies. 464} 465 466 467Returns: 468 An object of the form: 469 470 { # A comment on a file in Google Drive. 471 "anchor": "A String", # A region of the document represented as a JSON string. For details on defining anchor properties, refer to Add comments and replies. 472 "author": { # Information about a Drive user. # The author of the comment. The author's email address and permission ID will not be populated. 473 "displayName": "A String", # A plain text displayable name for this user. 474 "emailAddress": "A String", # The email address of the user. 475 "isAuthenticatedUser": True or False, # Whether this user is the same as the authenticated user for whom the request was made. 476 "kind": "drive#user", # This is always drive#user. 477 "permissionId": "A String", # The user's ID as visible in the permissions collection. 478 "picture": { # The user's profile picture. 479 "url": "A String", # A URL that points to a profile picture of this user. 480 }, 481 }, 482 "commentId": "A String", # The ID of the comment. 483 "content": "A String", # The plain text content used to create this comment. This is not HTML safe and should only be used as a starting point to make edits to a comment's content. 484 "context": { # The context of the file which is being commented on. 485 "type": "A String", # The MIME type of the context snippet. 486 "value": "A String", # Data representation of the segment of the file being commented on. In the case of a text file for example, this would be the actual text that the comment is about. 487 }, 488 "createdDate": "A String", # The date when this comment was first created. 489 "deleted": True or False, # Whether this comment has been deleted. If a comment has been deleted the content will be cleared and this will only represent a comment that once existed. 490 "fileId": "A String", # The file which this comment is addressing. 491 "fileTitle": "A String", # The title of the file which this comment is addressing. 492 "htmlContent": "A String", # HTML formatted content for this comment. 493 "kind": "drive#comment", # This is always drive#comment. 494 "modifiedDate": "A String", # The date when this comment or any of its replies were last modified. 495 "replies": [ # Replies to this post. 496 { # A comment on a file in Google Drive. 497 "author": { # Information about a Drive user. # The author of the reply. The author's email address and permission ID will not be populated. 498 "displayName": "A String", # A plain text displayable name for this user. 499 "emailAddress": "A String", # The email address of the user. 500 "isAuthenticatedUser": True or False, # Whether this user is the same as the authenticated user for whom the request was made. 501 "kind": "drive#user", # This is always drive#user. 502 "permissionId": "A String", # The user's ID as visible in the permissions collection. 503 "picture": { # The user's profile picture. 504 "url": "A String", # A URL that points to a profile picture of this user. 505 }, 506 }, 507 "content": "A String", # The plain text content used to create this reply. This is not HTML safe and should only be used as a starting point to make edits to a reply's content. This field is required on inserts if no verb is specified (resolve/reopen). 508 "createdDate": "A String", # The date when this reply was first created. 509 "deleted": True or False, # Whether this reply has been deleted. If a reply has been deleted the content will be cleared and this will only represent a reply that once existed. 510 "htmlContent": "A String", # HTML formatted content for this reply. 511 "kind": "drive#commentReply", # This is always drive#commentReply. 512 "modifiedDate": "A String", # The date when this reply was last modified. 513 "replyId": "A String", # The ID of the reply. 514 "verb": "A String", # The action this reply performed to the parent comment. When creating a new reply this is the action to be perform to the parent comment. Possible values are: 515 # - "resolve" - To resolve a comment. 516 # - "reopen" - To reopen (un-resolve) a comment. 517 }, 518 ], 519 "selfLink": "A String", # A link back to this comment. 520 "status": "A String", # The status of this comment. Status can be changed by posting a reply to a comment with the desired status. 521 # - "open" - The comment is still open. 522 # - "resolved" - The comment has been resolved by one of its replies. 523}</pre> 524</div> 525 526<div class="method"> 527 <code class="details" id="update">update(fileId, commentId, body=None)</code> 528 <pre>Updates an existing comment. 529 530Args: 531 fileId: string, The ID of the file. (required) 532 commentId: string, The ID of the comment. (required) 533 body: object, The request body. 534 The object takes the form of: 535 536{ # A comment on a file in Google Drive. 537 "anchor": "A String", # A region of the document represented as a JSON string. For details on defining anchor properties, refer to Add comments and replies. 538 "author": { # Information about a Drive user. # The author of the comment. The author's email address and permission ID will not be populated. 539 "displayName": "A String", # A plain text displayable name for this user. 540 "emailAddress": "A String", # The email address of the user. 541 "isAuthenticatedUser": True or False, # Whether this user is the same as the authenticated user for whom the request was made. 542 "kind": "drive#user", # This is always drive#user. 543 "permissionId": "A String", # The user's ID as visible in the permissions collection. 544 "picture": { # The user's profile picture. 545 "url": "A String", # A URL that points to a profile picture of this user. 546 }, 547 }, 548 "commentId": "A String", # The ID of the comment. 549 "content": "A String", # The plain text content used to create this comment. This is not HTML safe and should only be used as a starting point to make edits to a comment's content. 550 "context": { # The context of the file which is being commented on. 551 "type": "A String", # The MIME type of the context snippet. 552 "value": "A String", # Data representation of the segment of the file being commented on. In the case of a text file for example, this would be the actual text that the comment is about. 553 }, 554 "createdDate": "A String", # The date when this comment was first created. 555 "deleted": True or False, # Whether this comment has been deleted. If a comment has been deleted the content will be cleared and this will only represent a comment that once existed. 556 "fileId": "A String", # The file which this comment is addressing. 557 "fileTitle": "A String", # The title of the file which this comment is addressing. 558 "htmlContent": "A String", # HTML formatted content for this comment. 559 "kind": "drive#comment", # This is always drive#comment. 560 "modifiedDate": "A String", # The date when this comment or any of its replies were last modified. 561 "replies": [ # Replies to this post. 562 { # A comment on a file in Google Drive. 563 "author": { # Information about a Drive user. # The author of the reply. The author's email address and permission ID will not be populated. 564 "displayName": "A String", # A plain text displayable name for this user. 565 "emailAddress": "A String", # The email address of the user. 566 "isAuthenticatedUser": True or False, # Whether this user is the same as the authenticated user for whom the request was made. 567 "kind": "drive#user", # This is always drive#user. 568 "permissionId": "A String", # The user's ID as visible in the permissions collection. 569 "picture": { # The user's profile picture. 570 "url": "A String", # A URL that points to a profile picture of this user. 571 }, 572 }, 573 "content": "A String", # The plain text content used to create this reply. This is not HTML safe and should only be used as a starting point to make edits to a reply's content. This field is required on inserts if no verb is specified (resolve/reopen). 574 "createdDate": "A String", # The date when this reply was first created. 575 "deleted": True or False, # Whether this reply has been deleted. If a reply has been deleted the content will be cleared and this will only represent a reply that once existed. 576 "htmlContent": "A String", # HTML formatted content for this reply. 577 "kind": "drive#commentReply", # This is always drive#commentReply. 578 "modifiedDate": "A String", # The date when this reply was last modified. 579 "replyId": "A String", # The ID of the reply. 580 "verb": "A String", # The action this reply performed to the parent comment. When creating a new reply this is the action to be perform to the parent comment. Possible values are: 581 # - "resolve" - To resolve a comment. 582 # - "reopen" - To reopen (un-resolve) a comment. 583 }, 584 ], 585 "selfLink": "A String", # A link back to this comment. 586 "status": "A String", # The status of this comment. Status can be changed by posting a reply to a comment with the desired status. 587 # - "open" - The comment is still open. 588 # - "resolved" - The comment has been resolved by one of its replies. 589} 590 591 592Returns: 593 An object of the form: 594 595 { # A comment on a file in Google Drive. 596 "anchor": "A String", # A region of the document represented as a JSON string. For details on defining anchor properties, refer to Add comments and replies. 597 "author": { # Information about a Drive user. # The author of the comment. The author's email address and permission ID will not be populated. 598 "displayName": "A String", # A plain text displayable name for this user. 599 "emailAddress": "A String", # The email address of the user. 600 "isAuthenticatedUser": True or False, # Whether this user is the same as the authenticated user for whom the request was made. 601 "kind": "drive#user", # This is always drive#user. 602 "permissionId": "A String", # The user's ID as visible in the permissions collection. 603 "picture": { # The user's profile picture. 604 "url": "A String", # A URL that points to a profile picture of this user. 605 }, 606 }, 607 "commentId": "A String", # The ID of the comment. 608 "content": "A String", # The plain text content used to create this comment. This is not HTML safe and should only be used as a starting point to make edits to a comment's content. 609 "context": { # The context of the file which is being commented on. 610 "type": "A String", # The MIME type of the context snippet. 611 "value": "A String", # Data representation of the segment of the file being commented on. In the case of a text file for example, this would be the actual text that the comment is about. 612 }, 613 "createdDate": "A String", # The date when this comment was first created. 614 "deleted": True or False, # Whether this comment has been deleted. If a comment has been deleted the content will be cleared and this will only represent a comment that once existed. 615 "fileId": "A String", # The file which this comment is addressing. 616 "fileTitle": "A String", # The title of the file which this comment is addressing. 617 "htmlContent": "A String", # HTML formatted content for this comment. 618 "kind": "drive#comment", # This is always drive#comment. 619 "modifiedDate": "A String", # The date when this comment or any of its replies were last modified. 620 "replies": [ # Replies to this post. 621 { # A comment on a file in Google Drive. 622 "author": { # Information about a Drive user. # The author of the reply. The author's email address and permission ID will not be populated. 623 "displayName": "A String", # A plain text displayable name for this user. 624 "emailAddress": "A String", # The email address of the user. 625 "isAuthenticatedUser": True or False, # Whether this user is the same as the authenticated user for whom the request was made. 626 "kind": "drive#user", # This is always drive#user. 627 "permissionId": "A String", # The user's ID as visible in the permissions collection. 628 "picture": { # The user's profile picture. 629 "url": "A String", # A URL that points to a profile picture of this user. 630 }, 631 }, 632 "content": "A String", # The plain text content used to create this reply. This is not HTML safe and should only be used as a starting point to make edits to a reply's content. This field is required on inserts if no verb is specified (resolve/reopen). 633 "createdDate": "A String", # The date when this reply was first created. 634 "deleted": True or False, # Whether this reply has been deleted. If a reply has been deleted the content will be cleared and this will only represent a reply that once existed. 635 "htmlContent": "A String", # HTML formatted content for this reply. 636 "kind": "drive#commentReply", # This is always drive#commentReply. 637 "modifiedDate": "A String", # The date when this reply was last modified. 638 "replyId": "A String", # The ID of the reply. 639 "verb": "A String", # The action this reply performed to the parent comment. When creating a new reply this is the action to be perform to the parent comment. Possible values are: 640 # - "resolve" - To resolve a comment. 641 # - "reopen" - To reopen (un-resolve) a comment. 642 }, 643 ], 644 "selfLink": "A String", # A link back to this comment. 645 "status": "A String", # The status of this comment. Status can be changed by posting a reply to a comment with the desired status. 646 # - "open" - The comment is still open. 647 # - "resolved" - The comment has been resolved by one of its replies. 648}</pre> 649</div> 650 651</body></html>