Google Drive SDK

Comments

For a list of methods for this resource, see the end of this page.

Resource representations

A JSON representation of a comment on a file in Google Drive.

{
  "kind": "drive#comment",
  "selfLink": string,
  "commentId": string,
  "createdDate": datetime,
  "modifiedDate": datetime,
  "author": {
    "kind": "drive#user",
    "displayName": string,
    "picture": {
      "url": string
    },
    "isAuthenticatedUser": boolean,
    "permissionId": string
  },
  "htmlContent": string,
  "content": string,
  "deleted": boolean,
  "status": string,
  "context": {
    "type": string,
    "value": string
  },
  "anchor": string,
  "fileId": string,
  "fileTitle": string,
  "replies": [
    replies Resource
  ]
}
Property name Value Description Notes
anchor string A region of the document represented as a JSON string. See anchor documentation for details on how to define and interpret anchor properties.
author nested object The user who wrote this comment.
author.displayName string A plain text displayable name for this user.
author.isAuthenticatedUser boolean Whether this user is the same as the authenticated user for whom the request was made.
author.kind string This is always drive#user.
author.permissionId string The user's ID as visible in the permissions collection.
author.picture object The user's profile picture.
author.picture.url string A URL that points to a profile picture of this user.
commentId string The ID of the comment.
content 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. writable
context object The context of the file which is being commented on.
context.type string The MIME type of the context snippet. writable
context.value 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. writable
createdDate datetime The date when this comment was first created.
deleted boolean 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.
fileId string The file which this comment is addressing.
fileTitle string The title of the file which this comment is addressing.
htmlContent string HTML formatted content for this comment.
kind string This is always drive#comment.
modifiedDate datetime The date when this comment or any of its replies were last modified.
replies[] list Replies to this post.
status string The status of this comment. Status can be changed by posting a reply to a comment with the desired status.
  • "open" - The comment is still open.
  • "resolved" - The comment has been resolved by one of its replies.

Methods

delete
Deletes a comment.
get
Gets a comment by ID.
insert
Creates a new comment on the given file.
list
Lists a file's comments.
patch
Updates an existing comment. This method supports patch semantics.
update
Updates an existing comment.

Authentication required

You need to be signed in with Google+ to do that.

Signing you in...

Google Developers needs your permission to do that.