Method: spaces.messages.reactions.list
HTTP 要求
GET https://chat.googleapis.com/v1/{parent=spaces/*/messages/*}/reactions
這個網址使用 gRPC 轉碼語法。
路徑參數
參數 |
parent |
string
必要欄位。使用者回應的訊息。 格式:spaces/{space}/messages/{message}
|
查詢參數
參數 |
pageSize |
integer
選用設定。傳回的回應數量上限。服務傳回的回應數可以少於這個值。如未指定,則預設值為 25。許可的最大值為 200;超出的數值將一律指定為 200。
|
pageToken |
string
選用設定。(如果恢復先前的查詢)。 接收自前一個清單回應呼叫的頁面符記。提供此項目即可擷取後續網頁。 進行分頁時,篩選器值應與提供網頁權杖的呼叫相符。傳遞其他值可能會導致非預期的結果。
|
filter |
string
選用設定。查詢篩選器。 你可以依表情符號 (emoji.unicode 或 emoji.custom_emoji.uid ) 和使用者 (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" 。 如果查詢同時使用 AND 和 OR ,請使用括號將查詢分組。 舉例來說,以下查詢是有效的查詢:
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
詳情請參閱授權指南。
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2025-02-27 (世界標準時間)。
[null,null,["上次更新時間:2025-02-27 (世界標準時間)。"],[[["Lists reactions for a specific message within a Google Chat space."],["Allows filtering reactions by emoji (unicode or custom) and user, using operators like `AND` and `OR`."],["Supports pagination to retrieve large result sets with `pageSize` and `pageToken` parameters."],["Requires specific authorization scopes related to message and reaction access."],["Returns a list of reactions with details like user and emoji, along with a token for fetching further pages."]]],["This describes how to list reactions to a message using a `GET` request to `https://chat.googleapis.com/v1/{parent=spaces/*/messages/*}/reactions`. The `parent` path parameter specifies the message. Optional query parameters include `pageSize` (max reactions returned), `pageToken` (for pagination), and `filter` (to filter by emoji or user). The request body must be empty. The response body contains a list of `reactions` and an optional `nextPageToken` for pagination. User authentication and specific authorization scopes are required.\n"]]