Method: users.spaces.updateSpaceReadState
Permintaan HTTP
PATCH https://chat.googleapis.com/v1/{spaceReadState.name=users/*/spaces/*/spaceReadState}
URL menggunakan sintaksis gRPC Transcoding.
Parameter jalur
Parameter |
spaceReadState.name |
string
Nama resource status baca ruang. Format: users/{user}/spaces/{space}/spaceReadState
|
Parameter kueri
Parameter |
updateMask |
string (FieldMask format)
Wajib. Jalur kolom yang akan diperbarui. Jalur kolom yang saat ini didukung:
Jika lastReadTime berada sebelum waktu pembuatan pesan terbaru, ruang akan muncul sebagai belum dibaca di UI. Untuk menandai ruang sebagai telah dibaca, setel lastReadTime ke nilai apa pun setelah itu (lebih besar) dari waktu pembuatan pesan terbaru. lastReadTime dipaksa agar cocok dengan waktu pembuatan pesan terbaru. Perlu diketahui bahwa status baca ruang hanya memengaruhi status sudah dibaca pada pesan yang terlihat di percakapan tingkat teratas ruang. Balasan dalam thread tidak terpengaruh oleh stempel waktu ini, dan sebagai gantinya mengandalkan status baca thread.
|
Isi permintaan
Isi permintaan memuat instance SpaceReadState
.
Isi respons
Jika berhasil, isi respons akan berisi instance SpaceReadState
.
Cakupan otorisasi
Memerlukan cakupan OAuth berikut ini:
https://www.googleapis.com/auth/chat.users.readstate
Untuk informasi selengkapnya, lihat Panduan otorisasi.
Kecuali dinyatakan lain, konten di halaman ini dilisensikan berdasarkan Lisensi Creative Commons Attribution 4.0, sedangkan contoh kode dilisensikan berdasarkan Lisensi Apache 2.0. Untuk mengetahui informasi selengkapnya, lihat Kebijakan Situs Google Developers. Java adalah merek dagang terdaftar dari Oracle dan/atau afiliasinya.
Terakhir diperbarui pada 2025-02-27 UTC.
[null,null,["Terakhir diperbarui pada 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"]]