REST Resource: comments

資源:留言

Google 雲端硬碟檔案的註解。

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

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

string

僅供輸出。留言的 ID。

kind

string

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

createdDate

string

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

modifiedDate

string

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

fileId

string

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

status

string

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

  • open - 註解仍處於開放狀態。
  • resolved:留言已由其中一個回覆解決。
anchor

string

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

replies[]

object (CommentReply)

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

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

更新現有留言。