REST Resource: comments

資源:Comment

檔案註解。

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

JSON 表示法
{
  "replies": [
    {
      object (Reply)
    }
  ],
  "id": string,
  "kind": string,
  "createdTime": string,
  "modifiedTime": string,
  "resolved": boolean,
  "anchor": string,
  "author": {
    object (User)
  },
  "deleted": boolean,
  "htmlContent": string,
  "content": string,
  "quotedFileContent": {
    "mimeType": string,
    "value": string
  }
}
欄位
replies[]

object (Reply)

僅供輸出。回覆留言的完整清單,依時間順序排列。

id

string

僅供輸出。留言的 ID。

kind

string

僅供輸出。表示資源的種類。值:固定字串 "drive#comment"

createdTime

string

僅供輸出。留言的建立時間 (RFC 3339 日期時間)。

modifiedTime

string

僅供輸出。註解或任何回覆最近一次修改的時間 (RFC 3339 日期時間)。

resolved

boolean

僅供輸出。留言是否已透過回覆解決。

anchor

string

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

author

object (User)

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

deleted

boolean

僅供輸出。留言是否已刪除。已刪除的留言沒有內容。

htmlContent

string

僅供輸出。含有 HTML 格式的註解內容。

content

string

留言的純文字內容。這個欄位用於設定內容,同時應顯示 htmlContent

quotedFileContent

object

註解參照的檔案內容,通常位於錨定區域內。如果是文字檔,這會是註解位置的文字。

quotedFileContent.mimeType

string

引號內容的 MIME 類型。

quotedFileContent.value

string

引用的內容本身。如果透過 API 設定,系統會將其解讀為純文字。

方法

create

在檔案中建立註解。

delete

刪除留言。

get

依 ID 取得留言。

list

列出檔案的註解。

update

使用 patch 語意更新留言。