Method: users.spaces.updateSpaceReadState
בקשת HTTP
PATCH https://chat.googleapis.com/v1/{spaceReadState.name=users/*/spaces/*/spaceReadState}
בכתובת ה-URL נעשה שימוש בתחביר המרת קידוד של gRPC.
פרמטרים של נתיב
פרמטרים |
spaceReadState.name |
string
שם המשאב של מצב הקריאה במרחב המשותף. פורמט: users/{user}/spaces/{space}/spaceReadState
|
פרמטרים של שאילתה
פרמטרים |
updateMask |
string (FieldMask format)
חובה. נתיבי השדות לעדכון. נתיבי שדות נתמכים בשלב זה:
כשהמרחב המשותף lastReadTime חל לפני זמן היצירה של ההודעה האחרונה, המרחב המשותף מופיע בממשק המשתמש כמרחב משותף שלא נקרא. כדי לסמן את המרחב המשותף כנקרא, צריך להגדיר את lastReadTime לערך מאוחר יותר (גדול יותר) משעת יצירת ההודעה האחרונה. הערך של lastReadTime צריך להתאים לשעת היצירה של ההודעה האחרונה. חשוב לזכור שמצב הקריאה במרחב המשותף משפיע רק על מצב הקריאה של ההודעות שמוצגות בשיחה ברמה העליונה של המרחב המשותף. תשובות בשרשורים לא מושפעות מחותמת הזמן הזו. במקום זאת, הן מסתמכות על מצב הקריאה של השרשור.
|
גוף הבקשה
גוף הבקשה מכיל מופע של SpaceReadState
.
גוף התשובה
אם הפעולה בוצעה ללא שגיאות, גוף התגובה מכיל מופע של SpaceReadState
.
היקפי הרשאות
נדרש היקף ההרשאות הבא של OAuth:
https://www.googleapis.com/auth/chat.users.readstate
למידע נוסף, עיינו במדריך ההרשאות.
אלא אם צוין אחרת, התוכן של דף זה הוא ברישיון Creative Commons Attribution 4.0 ודוגמאות הקוד הן ברישיון Apache 2.0. לפרטים, ניתן לעיין במדיניות האתר Google Developers. Java הוא סימן מסחרי רשום של חברת Oracle ו/או של השותפים העצמאיים שלה.
עדכון אחרון: 2025-02-27 (שעון UTC).
[null,null,["עדכון אחרון: 2025-02-27 (שעון UTC)."],[[["This API updates a user's read state within a Google Chat space, marking messages as read or unread."],["It requires user authentication and the `chat.users.readstate` OAuth scope for authorization."],["The request uses the PATCH method and specifies the space read state resource name in the URL path."],["You can control which fields to update using the `updateMask` query parameter, such as setting the `lastReadTime` to mark a space as read."],["The request and response bodies utilize the `SpaceReadState` object to represent the user's read state information."]]],["This outlines updating a user's read state in a space using a PATCH request to `https://chat.googleapis.com/v1/{spaceReadState.name=users/*/spaces/*/spaceReadState}`. Key components include specifying the `spaceReadState.name` in the path, updating the `lastReadTime` via the `updateMask` query parameter, and providing a `SpaceReadState` instance in the request body. The response, if successful, returns a `SpaceReadState` instance. This operation requires user authentication and the `https://www.googleapis.com/auth/chat.users.readstate` authorization scope.\n"]]