Method: spaces.messages.reactions.list

透過集合功能整理內容 你可以依據偏好儲存及分類內容。

列出對訊息的回應。必須具備使用者驗證以及 chat.messageschat.messages.readonlychat.messages.reactionschat.messages.reactions.readonly 範圍。

HTTP 要求

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

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

路徑參數

參數
parent

string

必要欄位。使用者回應的訊息。

格式:Spaces/{space}/messages/{message}

查詢參數

參數
pageSize

integer

選填欄位,傳回的回應數量上限。服務傳回的回應數量可能少於這個值。如果未指定,預設值為 25。最大值是 200; 200 以上的值為 200。

pageToken

string

選填欄位,(從先前的查詢恢復執行)。

從先前的清單回應呼叫收到的網頁憑證。請提供這個 ID 以擷取後續網頁。

進行分頁時,篩選器值必須與提供網頁憑證的呼叫相符。傳遞不同的值可能會導致非預期的結果。

filter

string

選填欄位,查詢篩選器。

您可以使用 emoji (emoji.unicodeemoji.custom_emoji.uid) 和 user (user.name) 來篩選回應。

如要篩選多個表情符號或使用者的回應,請透過 OR 運算子彙整類似的欄位,例如 emoji.unicode = "🙂" OR emoji.unicode = "👍"user.name = "users/AAAAAA" OR user.name = "users/BBBBBB"

如要依表情符號與使用者篩選回應,請使用 AND 運算子,例如 emoji.unicode = "🙂" AND user.name = "users/AAAAAA"

如果查詢同時使用 ANDOR,請以括號加以分組。

例如,以下查詢是有效的:

user.name = "users/{user}"
emoji.unicode = "🙂"
emoji.custom_emoji.uid = "{uid}"
emoji.unicode = "🙂" OR emoji.unicode = "👍"
emoji.unicode = "🙂" OR emoji.custom_emoji.uid = "{uid}"
emoji.unicode = "🙂" AND user.name = "users/{user}"
(emoji.unicode = "🙂" OR emoji.custom_emoji.uid = "{uid}")
AND user.name = "users/{user}"

以下查詢無效:

emoji.unicode = "🙂" AND emoji.unicode = "👍"
emoji.unicode = "🙂" AND emoji.custom_emoji.uid = "{uid}"
emoji.unicode = "🙂" OR user.name = "users/{user}"
emoji.unicode = "🙂" OR emoji.custom_emoji.uid = "{uid}" OR
user.name = "users/{user}"
emoji.unicode = "🙂" OR emoji.custom_emoji.uid = "{uid}"
AND user.name = "users/{user}"

伺服器已拒絕 INVALID_ARGUMENT 錯誤,導致查詢無效。

要求主體

要求主體必須為空白。

回應主體

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

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

object (Reaction)

所要求 (或第一個) 頁面中的回應清單。

nextPageToken

string

用於擷取下一頁結果的接續權杖。如果搜尋結果的最後一頁是空白的,

授權範圍

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

  • https://www.googleapis.com/auth/chat.messages
  • https://www.googleapis.com/auth/chat.messages.readonly
  • https://www.googleapis.com/auth/chat.messages.reactions
  • https://www.googleapis.com/auth/chat.messages.reactions.readonly

詳情請參閱授權指南