Google Chat API . users . spaces . threads

Instance Methods

close()

Close httplib2 connections.

getThreadReadState(name, x__xgafv=None)

Returns details about a user's read state within a thread, used to identify read and unread messages. For an example, see [Get details about a user's thread read state](https://developers.google.com/workspace/chat/get-thread-read-state). Requires [user authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) with one of the following [authorization scopes](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes): - `https://www.googleapis.com/auth/chat.users.readstate.readonly` - `https://www.googleapis.com/auth/chat.users.readstate`

updateThreadReadState(name, body=None, updateMask=None, x__xgafv=None)

Updates a user's read state within a thread, used to identify read and unread messages. For an example, see [Update a user's thread read state](https://developers.google.com/workspace/chat/update-thread-read-state). Requires [user authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) with the [authorization scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes): - `https://www.googleapis.com/auth/chat.users.readstate`

Method Details

close()
Close httplib2 connections.
getThreadReadState(name, x__xgafv=None)
Returns details about a user's read state within a thread, used to identify read and unread messages. For an example, see [Get details about a user's thread read state](https://developers.google.com/workspace/chat/get-thread-read-state). Requires [user authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) with one of the following [authorization scopes](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes): - `https://www.googleapis.com/auth/chat.users.readstate.readonly` - `https://www.googleapis.com/auth/chat.users.readstate`

Args:
  name: string, Required. Resource name of the thread read state to retrieve. Only supports getting read state for the calling user. To refer to the calling user, set one of the following: - The `me` alias. For example, `users/me/spaces/{space}/threads/{thread}/threadReadState`. - Their Workspace email address. For example, `users/user@example.com/spaces/{space}/threads/{thread}/threadReadState`. - Their user id. For example, `users/123456789/spaces/{space}/threads/{thread}/threadReadState`. Format: users/{user}/spaces/{space}/threads/{thread}/threadReadState (required)
  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format

Returns:
  An object of the form:

    { # A user's read state within a thread, used to identify read and unread messages.
  "lastReadTime": "A String", # The time when the user's thread read state was updated. Usually this corresponds with the timestamp of the last read message in a thread.
  "name": "A String", # Resource name of the thread read state. Format: `users/{user}/spaces/{space}/threads/{thread}/threadReadState`
}
updateThreadReadState(name, body=None, updateMask=None, x__xgafv=None)
Updates a user's read state within a thread, used to identify read and unread messages. For an example, see [Update a user's thread read state](https://developers.google.com/workspace/chat/update-thread-read-state). Requires [user authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) with the [authorization scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes): - `https://www.googleapis.com/auth/chat.users.readstate`

Args:
  name: string, Resource name of the thread read state. Format: `users/{user}/spaces/{space}/threads/{thread}/threadReadState` (required)
  body: object, The request body.
    The object takes the form of:

{ # A user's read state within a thread, used to identify read and unread messages.
  "lastReadTime": "A String", # The time when the user's thread read state was updated. Usually this corresponds with the timestamp of the last read message in a thread.
  "name": "A String", # Resource name of the thread read state. Format: `users/{user}/spaces/{space}/threads/{thread}/threadReadState`
}

  updateMask: string, Required. The field paths to update. Currently supported field paths: - `last_read_time` When `last_read_time` is before the latest message create time, the thread appears as unread in the UI. To mark the thread as read, set `last_read_time` to a timestamp equal to or later than the latest message create time. Future timestamps are coerced to the current request time. Setting a negative timestamp (before `1970-01-01T00:00:00Z`) returns an `INVALID_ARGUMENT` error.
  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format

Returns:
  An object of the form:

    { # A user's read state within a thread, used to identify read and unread messages.
  "lastReadTime": "A String", # The time when the user's thread read state was updated. Usually this corresponds with the timestamp of the last read message in a thread.
  "name": "A String", # Resource name of the thread read state. Format: `users/{user}/spaces/{space}/threads/{thread}/threadReadState`
}