Method: spaces.spaceEvents.get

הפונקציה מחזירה אירוע ממרחב ב-Google Chat. המטען הייעודי (Payload) של האירוע מכיל את הגרסה העדכנית ביותר של המשאב שהשתנה. לדוגמה, אם מבקשים אירוע לגבי הודעה חדשה, אבל ההודעה מתעדכנת מאוחר יותר, השרת מחזיר את משאב Message המעודכן במטען הייעודי (payload) של האירוע.

הערה: השדה permissionSettings לא מוחזר באובייקט Space של נתוני האירוע של המרחב בבקשה הזו.

תומך בסוגי אימות הבאים עם היקף הרשאות שמתאים לקריאת הנתונים המבוקשים:

  • אימות אפליקציות עם אישור אדמין בגרסת Developer Preview עם אחת מהרשאות הגישה הבאות:

    • https://www.googleapis.com/auth/chat.app.spaces
    • https://www.googleapis.com/auth/chat.app.messages.readonly
    • https://www.googleapis.com/auth/chat.app.memberships
  • אימות משתמש עם אחת מהרשאות הגישה הבאות:

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

כדי לקבל אירוע, המתקשר המאומת צריך להיות חבר במרחב.

לדוגמה, אפשר לעיין במאמר איך מקבלים פרטים על אירוע ממרחב ב-Google Chat.

בקשת HTTP

GET https://chat.googleapis.com/v1/{name=spaces/*/spaceEvents/*}

כתובת ה-URL כתובה בתחביר של gRPC Transcoding.

פרמטרים של נתיב

פרמטרים
name

string

חובה. שם המשאב של אירוע במרחב.

פורמט: spaces/{space}/spaceEvents/{spaceEvent}

גוף הבקשה

גוף הבקשה צריך להיות ריק.

גוף התשובה

אם הפעולה בוצעה ללא שגיאות, גוף התגובה יכיל מופע של SpaceEvent.

היקפי הרשאה

נדרש אחד מהיקפי ההרשאות הבאים של OAuth:

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

מידע נוסף זמין במדריך ההרשאות.