列出 Google Chat 聊天室的事件。每個事件的酬載都包含最新版本的 Chat 資源。舉例來說,如果您列出有關新空間成員的事件,伺服器會傳回包含最新成員詳細資料的 Membership 資源。如果新成員在要求期間遭到移除,活動酬載會包含空白的 Membership 資源。
支援下列類型的驗證,並提供適當的授權範圍,可讀取所要求的資料:
應用程式驗證 (須經管理員核准) 開發人員預覽版,並使用下列其中一個授權範圍:
https://www.googleapis.com/auth/chat.app.spaceshttps://www.googleapis.com/auth/chat.app.messages.readonlyhttps://www.googleapis.com/auth/chat.app.memberships
使用者驗證,並使用下列其中一個授權範圍:
https://www.googleapis.com/auth/chat.spaces.readonlyhttps://www.googleapis.com/auth/chat.spaceshttps://www.googleapis.com/auth/chat.messages.readonlyhttps://www.googleapis.com/auth/chat.messageshttps://www.googleapis.com/auth/chat.messages.reactions.readonlyhttps://www.googleapis.com/auth/chat.messages.reactionshttps://www.googleapis.com/auth/chat.memberships.readonlyhttps://www.googleapis.com/auth/chat.memberships
如要列出活動,已驗證的呼叫者必須是聊天室成員。
如需範例,請參閱「列出 Google Chat 聊天室中的活動」。
HTTP 要求
GET https://chat.googleapis.com/v1/{parent=spaces/*}/spaceEvents
這個網址使用 gRPC 轉碼語法。
路徑參數
| 參數 | |
|---|---|
parent | 
                
                   
 必要欄位。發生事件的 Google Chat 聊天室資源名稱。 格式:  | 
              
查詢參數
| 參數 | |
|---|---|
pageSize | 
                
                   
 (選用步驟) 傳回的即時通訊空間事件數量上限。服務傳回的產品數量可能會少於這個值。 負值會傳回   | 
              
pageToken | 
                
                   
 (選用步驟) 這是接收自前一個 list space events 呼叫的網頁權杖。提供此項目即可擷取後續網頁。 進行分頁時,提供至清單空間事件的所有其他參數,須與提供網頁權杖的呼叫相符。將不同值傳遞至其他參數可能會導致非預期的結果。  | 
              
filter | 
                
                   
 必要欄位。查詢篩選器。 您必須使用 has  你也可以選擇依開始時間 ( 
 如要指定開始或結束時間,請使用等號  舉例來說,下列查詢皆有效: 下列查詢無效: 伺服器會拒絕無效的查詢,並傳回   | 
              
要求主體
要求主體必須為空白。
回應主體
列出聊天室活動的回覆訊息。
如果成功,回應主體會含有以下結構的資料:
| JSON 表示法 | 
|---|
{
  "spaceEvents": [
    {
      object ( | 
                  
| 欄位 | |
|---|---|
spaceEvents[] | 
                    
                       
 系統會依時間順序傳回結果 (最舊的事件在前)。注意:系統不會在清單要求的 Space 物件中傳回   | 
                  
nextPageToken | 
                    
                       
 用來擷取更多事件的接續權杖。如果省略這個欄位,就不會有後續頁面。  | 
                  
授權範圍
需要下列其中一種 OAuth 範圍:
https://www.googleapis.com/auth/chat.app.membershipshttps://www.googleapis.com/auth/chat.app.messages.readonlyhttps://www.googleapis.com/auth/chat.app.spaceshttps://www.googleapis.com/auth/chat.spaceshttps://www.googleapis.com/auth/chat.spaces.readonlyhttps://www.googleapis.com/auth/chat.messageshttps://www.googleapis.com/auth/chat.messages.readonlyhttps://www.googleapis.com/auth/chat.membershipshttps://www.googleapis.com/auth/chat.memberships.readonlyhttps://www.googleapis.com/auth/chat.messages.reactionshttps://www.googleapis.com/auth/chat.messages.reactions.readonly
詳情請參閱授權指南。