Google Chat API . users . spaces

Instance Methods

threads()

Returns the threads Resource.

close()

Close httplib2 connections.

getSpaceReadState(name, x__xgafv=None)

Returns details about a user's read state within a space, used to identify read and unread messages. For an example, see [Get details about a user's space read state](https://developers.google.com/workspace/chat/get-space-read-state). Requires [user authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user).

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

Updates a user's read state within a space, used to identify read and unread messages. For an example, see [Update a user's space read state](https://developers.google.com/workspace/chat/update-space-read-state). Requires [user authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user).

Method Details

close()
Close httplib2 connections.
getSpaceReadState(name, x__xgafv=None)
Returns details about a user's read state within a space, used to identify read and unread messages. For an example, see [Get details about a user's space read state](https://developers.google.com/workspace/chat/get-space-read-state). Requires [user authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user).

Args:
  name: string, Required. Resource name of the space 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}/spaceReadState`. - Their Workspace email address. For example, `users/user@example.com/spaces/{space}/spaceReadState`. - Their user id. For example, `users/123456789/spaces/{space}/spaceReadState`. Format: users/{user}/spaces/{space}/spaceReadState (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 space, used to identify read and unread messages.
  "lastReadTime": "A String", # Optional. The time when the user's space read state was updated. Usually this corresponds with either the timestamp of the last read message, or a timestamp specified by the user to mark the last read position in a space.
  "name": "A String", # Resource name of the space read state. Format: `users/{user}/spaces/{space}/spaceReadState`
}
updateSpaceReadState(name, body=None, updateMask=None, x__xgafv=None)
Updates a user's read state within a space, used to identify read and unread messages. For an example, see [Update a user's space read state](https://developers.google.com/workspace/chat/update-space-read-state). Requires [user authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user).

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

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

  updateMask: string, Required. The field paths to update. Currently supported field paths: - `last_read_time` When the `last_read_time` is before the latest message create time, the space appears as unread in the UI. To mark the space as read, set `last_read_time` to any value later (larger) than the latest message create time. The `last_read_time` is coerced to match the latest message create time. Note that the space read state only affects the read state of messages that are visible in the space's top-level conversation. Replies in threads are unaffected by this timestamp, and instead rely on the thread read state.
  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 space, used to identify read and unread messages.
  "lastReadTime": "A String", # Optional. The time when the user's space read state was updated. Usually this corresponds with either the timestamp of the last read message, or a timestamp specified by the user to mark the last read position in a space.
  "name": "A String", # Resource name of the space read state. Format: `users/{user}/spaces/{space}/spaceReadState`
}