REST Resource: comments

資源:Comment

Google 雲端硬碟檔案的註解。

部分資源方法 (例如 comments.update) 需要 commentId。使用 comments.list 方法擷取檔案中留言的 ID。

JSON 表示法
{
  "replies": [
    {
      object (CommentReply)
    }
  ],
  "commentId": string,
  "kind": string,
  "createdDate": string,
  "modifiedDate": string,
  "fileId": string,
  "status": string,
  "anchor": string,
  "author": {
    object (User)
  },
  "deleted": boolean,
  "selfLink": string,
  "htmlContent": string,
  "content": string,
  "context": {
    "type": string,
    "value": string
  },
  "fileTitle": string
}
欄位
replies[]

object (CommentReply)

僅供輸出。回覆這則貼文。

commentId

string

僅供輸出。留言的 ID。

kind

string

僅供輸出。這個值一律為 drive#comment

createdDate

string

僅供輸出。首次建立這則留言的日期。

modifiedDate

string

僅供輸出。這個留言或任何回覆上次修改的日期。

fileId

string

僅供輸出。註解所指的檔案。

status

string

僅供輸出。這則留言的狀態。如要變更狀態,請回覆留言並附上所需狀態。

  • open - 註解仍處於開啟狀態。
  • resolved - 留言已透過其中一則回覆解決。
anchor

string

以 JSON 字串表示的文件區域。如要進一步瞭解如何定義錨點屬性,請參閱「新增留言與回覆」。

author

object (User)

僅供輸出。留言作者。系統不會填入作者的電子郵件地址和權限 ID。

deleted

boolean

僅供輸出。是否已刪除這則留言。如果留言已遭刪除,內容就會清除,只會顯示這則留言曾經存在。

htmlContent

string

僅供輸出。這則留言的 HTML 格式內容。

content

string

用於建立這則留言的純文字內容。這並非 HTML 安全,僅做為編輯留言內容的起點。

context

object

要加註的檔案內容。

context.type

string

情境程式碼片段的 MIME 類型。

context.value

string

檔案中加上註解的片段所代表的資料。舉例來說,如果是文字檔,這就是留言所指的實際文字。

fileTitle

string

僅供輸出。註解所指檔案的標題。

方法

delete

刪除留言。

get

依 ID 取得留言。

insert

在指定檔案中建立新留言。

list

列出檔案的註解。

patch

更新現有留言。

update

更新現有留言。