Method: users.spaces.updateSpaceReadState
HTTP リクエスト
PATCH https://chat.googleapis.com/v1/{spaceReadState.name=users/*/spaces/*/spaceReadState}
この URL は gRPC Transcoding 構文を使用します。
パスパラメータ
パラメータ |
spaceReadState.name |
string
Space の読み取り状態のリソース名。 形式: users/{user}/spaces/{space}/spaceReadState
|
クエリ パラメータ
パラメータ |
updateMask |
string (FieldMask format)
必須。更新するフィールドパス。現在サポートされているフィールドパスは次のとおりです。
lastReadTime が最新のメッセージの作成時間より前の場合、スペースは UI で未読として表示されます。
スペースを既読としてマークするには、lastReadTime を最新のメッセージ作成時間より後の値(大きい値)に設定します。lastReadTime は、最新のメッセージ作成時間に合わせて強制変換されます。スペースの未読ステータスは、スペースの最上位の会話に表示されるメッセージの未読ステータスにのみ影響します。スレッド内の返信は、このタイムスタンプの影響を受けず、スレッドの読み取り状態に依存します。
|
リクエストの本文
リクエストの本文には SpaceReadState
のインスタンスが含まれます。
レスポンスの本文
成功した場合、レスポンスの本文には SpaceReadState
のインスタンスが含まれます。
認可スコープ
次の OAuth スコープが必要です。
https://www.googleapis.com/auth/chat.users.readstate
詳しくは、認可ガイドをご覧ください。
特に記載のない限り、このページのコンテンツはクリエイティブ・コモンズの表示 4.0 ライセンスにより使用許諾されます。コードサンプルは Apache 2.0 ライセンスにより使用許諾されます。詳しくは、Google Developers サイトのポリシーをご覧ください。Java は Oracle および関連会社の登録商標です。
最終更新日 2025-05-07 UTC。
[null,null,["最終更新日 2025-05-07 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"]]