Method: spaces.messagePins.list

列出聊天室中的訊息釘選。使用者可以在聊天室中釘選重要訊息,方便日後查看。詳情請參閱「在 Google Chat 中釘選或取消釘選對話」。

需要使用者驗證,並使用下列其中一個授權範圍

  • https://www.googleapis.com/auth/chat.spaces.pins.readonly
  • https://www.googleapis.com/auth/chat.spaces.pins
  • https://www.googleapis.com/auth/chat.spaces.readonly
  • https://www.googleapis.com/auth/chat.spaces

HTTP 要求

GET https://chat.googleapis.com/v1/{parent=spaces/*}/messagePins

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

路徑參數

參數
parent

string

必填。擁有釘選項目集合的父項空間。格式:spaces/{space}

查詢參數

參數
pageSize

integer

(選用步驟) 傳回的訊息釘選數量上限。服務傳回的訊息數量可能會少於這個值。值的上限為 100。如果使用超過 100 的值,系統會自動變更為 100。如未指定,最多將傳回 100 則訊息釘選。負值會傳回 INVALID_ARGUMENT 錯誤。

pageToken

string

(選用步驟) 先前呼叫 list message pins 時收到的頁面權杖。提供此參數即可擷取後續網頁。

進行分頁時,提供的所有其他參數應與提供網頁權杖的呼叫相符。將不同值傳遞至其他參數可能會導致非預期的結果。

要求主體

要求主體必須為空白。

回應主體

列出訊息釘選的回應訊息。

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

JSON 表示法
{
  "messagePins": [
    {
      object (MessagePin)
    }
  ],
  "nextPageToken": string
}
欄位
messagePins[]

object (MessagePin)

指定聊天室中已釘選的訊息。

nextPageToken

string

您可以將權杖做為 pageToken 傳送,用於擷取下一頁結果。如果留空,表示沒有後續網頁。

授權範圍

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

  • https://www.googleapis.com/auth/chat.spaces.pins
  • https://www.googleapis.com/auth/chat.spaces.pins.readonly
  • https://www.googleapis.com/auth/chat.spaces
  • https://www.googleapis.com/auth/chat.spaces.readonly

詳情請參閱授權指南