Method: comments.list

列出檔案的註解。

HTTP 要求

GET https://www.googleapis.com/drive/v2/files/{fileId}/comments

這個網址使用 gRPC 轉碼語法。

路徑參數

參數
fileId

string

檔案的 ID。

查詢參數

參數
includeDeleted

boolean

如果設定這個項目,系統則會傳回所有留言和回覆,包括刪除的留言和回覆 (內容遭到移除)。

maxResults

integer

要加進回應的討論數量上限,用於分頁。

pageToken

string

用於逐頁瀏覽大型結果集的接續權杖。如要取得下一頁的結果,請將這個參數設為「nextPageToken」的值以及上一則回覆的內容

updatedMin

string

系統只會傳回在這個時間戳記之後更新的討論內容。採用 RFC 3339 時間戳記。

要求主體

要求主體必須為空白。

回應主體

Google 雲端硬碟檔案的註解清單。

如果成功,回應主體即會包含具有以下結構的資料:

JSON 表示法
{
  "kind": string,
  "selfLink": string,
  "nextLink": string,
  "items": [
    {
      object (Comment)
    }
  ],
  "nextPageToken": string
}
欄位
kind

string

一律為 drive#commentList

items[]

object (Comment)

註解清單。如果已填入 nextPageToken,則這份清單可能不完整,而且必須擷取多頁的結果。

nextPageToken

string

下一頁註解的頁面憑證。如果觀眾到達留言清單的結尾,就不會顯示這個附註。如果權杖因任何原因而遭拒,請予以捨棄,並在結果第一頁重新開始分頁。

授權範圍

需要下列其中一種 OAuth 範圍:

  • https://www.googleapis.com/auth/docs
  • https://www.googleapis.com/auth/drive
  • https://www.googleapis.com/auth/drive.file
  • https://www.googleapis.com/auth/drive.meet.readonly
  • https://www.googleapis.com/auth/drive.readonly

部分範圍受到限制,必須接受安全性評估,應用程式才能使用這些範圍。詳情請參閱授權指南