Class: Google::Apis::ChatV1::HangoutsChatService
- Inherits:
-
Google::Apis::Core::BaseService
- Object
- Google::Apis::Core::BaseService
- Google::Apis::ChatV1::HangoutsChatService
- Defined in:
- lib/google/apis/chat_v1/service.rb
Overview
Google Chat API
The Google Chat API lets you build Chat apps to integrate your services with Google Chat and manage Chat resources such as spaces, members, and messages.
Constant Summary collapse
- DEFAULT_ENDPOINT_TEMPLATE =
"https://chat.$UNIVERSE_DOMAIN$/"
Instance Attribute Summary collapse
-
#key ⇒ String
API key.
-
#quota_user ⇒ String
Available to use for quota purposes for server-side applications.
Instance Method Summary collapse
-
#complete_import_space(name, complete_import_space_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::ChatV1::CompleteImportSpaceResponse
Completes the import process for the specified space and makes it visible to users.
-
#create_custom_emoji(custom_emoji_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::ChatV1::CustomEmoji
Creates a custom emoji.
-
#create_space(space_object = nil, request_id: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::ChatV1::Space
Creates a space.
-
#create_space_member(parent, membership_object = nil, use_admin_access: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::ChatV1::Membership
Creates a membership for the calling Chat app, a user, or a Google Group.
-
#create_space_message(parent, message_object = nil, create_message_notification_options_notification_type: nil, message_id: nil, message_reply_option: nil, request_id: nil, thread_key: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::ChatV1::Message
Creates a message in a Google Chat space.
-
#create_space_message_reaction(parent, reaction_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::ChatV1::Reaction
Creates a reaction and adds it to a message.
-
#create_user_section(parent, google_chat_v1_section_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::ChatV1::GoogleChatV1Section
Creates a section in Google Chat.
-
#delete_custom_emoji(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::ChatV1::Empty
Deletes a custom emoji.
-
#delete_space(name, use_admin_access: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::ChatV1::Empty
Deletes a named space.
-
#delete_space_member(name, use_admin_access: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::ChatV1::Membership
Deletes a membership.
-
#delete_space_message(name, force: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::ChatV1::Empty
Deletes a message.
-
#delete_space_message_reaction(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::ChatV1::Empty
Deletes a reaction to a message.
-
#delete_user_section(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::ChatV1::Empty
Deletes a section of type
CUSTOM_SECTION. -
#download_medium(resource_name, fields: nil, quota_user: nil, download_dest: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::ChatV1::Media
Downloads media.
-
#find_space_direct_message(name: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::ChatV1::Space
Returns the existing direct message with the specified user.
-
#find_space_group_chats(page_size: nil, page_token: nil, space_view: nil, users: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::ChatV1::FindGroupChatsResponse
Returns all spaces with
spaceType == GROUP_CHAT, whose human memberships contain exactly the calling user, and the users specified inFindGroupChatsRequest.users. -
#get_custom_emoji(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::ChatV1::CustomEmoji
Returns details about a custom emoji.
-
#get_space(name, use_admin_access: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::ChatV1::Space
Returns details about a space.
-
#get_space_member(name, use_admin_access: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::ChatV1::Membership
Returns details about a membership.
-
#get_space_message(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::ChatV1::Message
Returns details about a message.
-
#get_space_message_attachment(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::ChatV1::Attachment
Gets the metadata of a message attachment.
-
#get_space_space_event(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::ChatV1::SpaceEvent
Returns an event from a Google Chat space.
-
#get_user_availability(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::ChatV1::Availability
Returns availability information for a human user in Google Chat.
-
#get_user_space_space_notification_setting(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::ChatV1::SpaceNotificationSetting
Gets the space notification setting.
-
#get_user_space_space_read_state(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::ChatV1::SpaceReadState
Returns details about a user's read state within a space, used to identify read and unread messages.
-
#get_user_space_thread_thread_read_state(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::ChatV1::ThreadReadState
Returns details about a user's read state within a thread, used to identify read and unread messages.
-
#initialize ⇒ HangoutsChatService
constructor
A new instance of HangoutsChatService.
-
#list_custom_emojis(filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::ChatV1::ListCustomEmojisResponse
Lists custom emojis visible to the authenticated user.
-
#list_space_members(parent, filter: nil, page_size: nil, page_token: nil, show_groups: nil, show_invited: nil, use_admin_access: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::ChatV1::ListMembershipsResponse
Lists memberships in a space.
-
#list_space_message_reactions(parent, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::ChatV1::ListReactionsResponse
Lists reactions to a message.
-
#list_space_messages(parent, filter: nil, order_by: nil, page_size: nil, page_token: nil, show_deleted: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::ChatV1::ListMessagesResponse
Lists messages in a space that the caller is a member of, including messages from blocked members and spaces.
-
#list_space_space_events(parent, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::ChatV1::ListSpaceEventsResponse
Lists events from a Google Chat space.
-
#list_spaces(filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::ChatV1::ListSpacesResponse
Lists spaces the caller is a member of.
-
#list_user_section_items(parent, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::ChatV1::ListSectionItemsResponse
Lists items in a section.
-
#list_user_sections(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::ChatV1::ListSectionsResponse
Lists sections available to the Chat user.
-
#mark_availability_as_active(name, mark_as_active_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::ChatV1::Availability
Marks user as
ACTIVEin Google Chat. -
#mark_availability_as_away(name, mark_as_away_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::ChatV1::Availability
Marks user as
AWAYin Google Chat. -
#mark_availability_as_do_not_disturb(name, mark_as_do_not_disturb_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::ChatV1::Availability
Marks user as
DO_NOT_DISTURBin Google Chat. -
#move_section_item(name, move_section_item_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::ChatV1::MoveSectionItemResponse
Moves an item from one section to another.
-
#patch_space(name, space_object = nil, update_mask: nil, use_admin_access: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::ChatV1::Space
Updates a space.
-
#patch_space_member(name, membership_object = nil, update_mask: nil, use_admin_access: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::ChatV1::Membership
Updates a membership.
-
#patch_space_message(name, message_object = nil, allow_missing: nil, update_mask: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::ChatV1::Message
Updates a message.
-
#patch_user_availability(name, availability_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::ChatV1::Availability
Updates availability information for a human user.
-
#patch_user_section(name, google_chat_v1_section_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::ChatV1::GoogleChatV1Section
Updates a section.
-
#patch_user_space_space_notification_setting(name, space_notification_setting_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::ChatV1::SpaceNotificationSetting
Updates the space notification setting.
-
#position_section(name, position_section_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::ChatV1::PositionSectionResponse
Changes the sort order of a section.
-
#search_spaces(order_by: nil, page_size: nil, page_token: nil, query: nil, use_admin_access: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::ChatV1::SearchSpacesResponse
Returns a list of spaces in a Google Workspace organization.
-
#setup_space(set_up_space_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::ChatV1::Space
Creates a space and adds specified users to it.
-
#update_space_message(name, message_object = nil, allow_missing: nil, update_mask: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::ChatV1::Message
Updates a message.
-
#update_user_space_space_read_state(name, space_read_state_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::ChatV1::SpaceReadState
Updates a user's read state within a space, used to identify read and unread messages.
-
#upload_medium_attachment(parent, upload_attachment_request_object = nil, fields: nil, quota_user: nil, upload_source: nil, content_type: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::ChatV1::UploadAttachmentResponse
Uploads an attachment.
Constructor Details
#initialize ⇒ HangoutsChatService
Returns a new instance of HangoutsChatService.
48 49 50 51 52 53 |
# File 'lib/google/apis/chat_v1/service.rb', line 48 def initialize super(DEFAULT_ENDPOINT_TEMPLATE, '', client_name: 'google-apis-chat_v1', client_version: Google::Apis::ChatV1::GEM_VERSION) @batch_path = 'batch' end |
Instance Attribute Details
#key ⇒ String
Returns API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
41 42 43 |
# File 'lib/google/apis/chat_v1/service.rb', line 41 def key @key end |
#quota_user ⇒ String
Returns Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.
46 47 48 |
# File 'lib/google/apis/chat_v1/service.rb', line 46 def quota_user @quota_user end |
Instance Method Details
#complete_import_space(name, complete_import_space_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::ChatV1::CompleteImportSpaceResponse
Completes the import process for the specified space and makes it visible to users. Requires
user authentication and domain-wide delegation with the authorization scope: - https://www.googleapis.com/auth/chat.import For more information,
see Authorize Google Chat apps to import data.
356 357 358 359 360 361 362 363 364 365 366 |
# File 'lib/google/apis/chat_v1/service.rb', line 356 def complete_import_space(name, complete_import_space_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v1/{+name}:completeImport', ) command.request_representation = Google::Apis::ChatV1::CompleteImportSpaceRequest::Representation command.request_object = complete_import_space_request_object command.response_representation = Google::Apis::ChatV1::CompleteImportSpaceResponse::Representation command.response_class = Google::Apis::ChatV1::CompleteImportSpaceResponse command.params['name'] = name unless name.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#create_custom_emoji(custom_emoji_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::ChatV1::CustomEmoji
Creates a custom emoji. Custom emojis are only available for Google Workspace
accounts, and the administrator must turn custom emojis on for the
organization. For more information, see Learn about custom emojis in Google
Chat and Manage custom
emoji permissions. Requires
user authentication with the authorization scope: - https://www.
googleapis.com/auth/chat.customemojis
82 83 84 85 86 87 88 89 90 91 |
# File 'lib/google/apis/chat_v1/service.rb', line 82 def create_custom_emoji(custom_emoji_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v1/customEmojis', ) command.request_representation = Google::Apis::ChatV1::CustomEmoji::Representation command.request_object = custom_emoji_object command.response_representation = Google::Apis::ChatV1::CustomEmoji::Representation command.response_class = Google::Apis::ChatV1::CustomEmoji command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#create_space(space_object = nil, request_id: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::ChatV1::Space
Creates a space. Can be used to create a named space, or a group chat in
Import mode. For an example, see Create a space. Supports the following types of
authentication: - App authentication with administrator approval and one of the following authorization
scopes: - https://www.googleapis.com/auth/chat.app.spaces.create - https://
www.googleapis.com/auth/chat.app.spaces - User authentication with
one of the following authorization scopes: - https://www.googleapis.com/auth/
chat.spaces.create - https://www.googleapis.com/auth/chat.spaces - https://
www.googleapis.com/auth/chat.import (import mode spaces only) When
authenticating as an app, the space.customer field must be set in the
request. When authenticating as an app, the Chat app is added as a member of
the space. However, unlike human authentication, the Chat app is not added as
a space manager. By default, the Chat app can be removed from the space by all
space members. To allow only space managers to remove the app from a space,
set space.permission_settings.manage_apps to managers_allowed. Space
membership upon creation depends on whether the space is created in Import
mode: * Import mode: No members are created. * All other modes: The
calling user is added as a member. This is: * The app itself when using app
authentication. * The human user when using user authentication. If you
receive the error message ALREADY_EXISTS when creating a space, try a
different displayName. An existing space within the Google Workspace
organization might already use this display name.
417 418 419 420 421 422 423 424 425 426 427 |
# File 'lib/google/apis/chat_v1/service.rb', line 417 def create_space(space_object = nil, request_id: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v1/spaces', ) command.request_representation = Google::Apis::ChatV1::Space::Representation command.request_object = space_object command.response_representation = Google::Apis::ChatV1::Space::Representation command.response_class = Google::Apis::ChatV1::Space command.query['requestId'] = request_id unless request_id.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#create_space_member(parent, membership_object = nil, use_admin_access: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::ChatV1::Membership
Creates a membership for the calling Chat app, a user, or a Google Group.
Creating memberships for other Chat apps isn't supported. When creating a
membership, if the specified member has their auto-accept policy turned off,
then they're invited, and must accept the space invitation before joining.
Otherwise, creating a membership adds the member directly to the specified
space. Supports the following types of authentication: - App authentication
with administrator approval
and the authorization scope: - https://www.googleapis.com/auth/chat.app.
memberships - User authentication with one of the following authorization
scopes: - https://www.googleapis.com/auth/chat.memberships - https://www.
googleapis.com/auth/chat.memberships.app (to add the calling app to the space)
https://www.googleapis.com/auth/chat.import(import mode spaces only) - User authentication grants administrator privileges when an administrator account authenticates,use_admin_accessistrue, and the following authorization scope is used: -https://www.googleapis.com/auth/chat.admin. membershipsApp authentication is not supported for the following use cases: - Inviting users external to the Workspace organization that owns the space. - Adding a Google Group to a space. - Adding a Chat app to a space. For example usage, see: - Invite or add a user to a space. - Invite or add a Google Group to a space. - Add the Chat app to a space.
1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 |
# File 'lib/google/apis/chat_v1/service.rb', line 1102 def create_space_member(parent, membership_object = nil, use_admin_access: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v1/{+parent}/members', ) command.request_representation = Google::Apis::ChatV1::Membership::Representation command.request_object = membership_object command.response_representation = Google::Apis::ChatV1::Membership::Representation command.response_class = Google::Apis::ChatV1::Membership command.params['parent'] = parent unless parent.nil? command.query['useAdminAccess'] = use_admin_access unless use_admin_access.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#create_space_message(parent, message_object = nil, create_message_notification_options_notification_type: nil, message_id: nil, message_reply_option: nil, request_id: nil, thread_key: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::ChatV1::Message
Creates a message in a Google Chat space. For an example, see Send a message. Supports the
following types of authentication: - App authentication with the authorization
scope: - https://www.googleapis.com/auth/chat.bot - User authentication
with one of the following authorization scopes: - https://www.googleapis.com/
auth/chat.messages.create - https://www.googleapis.com/auth/chat.messages -
https://www.googleapis.com/auth/chat.import (import mode spaces only) Chat
attributes the message sender differently depending on the type of
authentication that you use in your request. The following image shows how
Chat attributes a message when you use app authentication. Chat displays the
Chat app as the message sender. The content of the message can contain text (
text), cards (cardsV2), and accessory widgets (accessoryWidgets). The following image shows how Chat
attributes a message when you use user authentication. Chat displays the user
as the message sender and attributes the Chat app to the message by displaying
its name. The content of message can only contain text (
text). The maximum message size, including the message
contents, is 32,000 bytes. For webhook requests, the response doesn't contain the
full message. The response only populates the
name and thread.name fields
in addition to the information that was in the request.
1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 |
# File 'lib/google/apis/chat_v1/service.rb', line 1485 def (parent, = nil, create_message_notification_options_notification_type: nil, message_id: nil, message_reply_option: nil, request_id: nil, thread_key: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v1/{+parent}/messages', ) command.request_representation = Google::Apis::ChatV1::Message::Representation command.request_object = command.response_representation = Google::Apis::ChatV1::Message::Representation command.response_class = Google::Apis::ChatV1::Message command.params['parent'] = parent unless parent.nil? command.query['createMessageNotificationOptions.notificationType'] = unless .nil? command.query['messageId'] = unless .nil? command.query['messageReplyOption'] = unless .nil? command.query['requestId'] = request_id unless request_id.nil? command.query['threadKey'] = thread_key unless thread_key.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#create_space_message_reaction(parent, reaction_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::ChatV1::Reaction
Creates a reaction and adds it to a message. For an example, see Add a
reaction to a message. Requires user authentication with one of the following
authorization scopes: - https://www.googleapis.com/auth/
chat.messages.reactions.create - https://www.googleapis.com/auth/chat.
messages.reactions - https://www.googleapis.com/auth/chat.messages - https:
//www.googleapis.com/auth/chat.import (import mode spaces only)
1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 |
# File 'lib/google/apis/chat_v1/service.rb', line 1899 def (parent, reaction_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v1/{+parent}/reactions', ) command.request_representation = Google::Apis::ChatV1::Reaction::Representation command.request_object = reaction_object command.response_representation = Google::Apis::ChatV1::Reaction::Representation command.response_class = Google::Apis::ChatV1::Reaction command.params['parent'] = parent unless parent.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#create_user_section(parent, google_chat_v1_section_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::ChatV1::GoogleChatV1Section
Creates a section in Google Chat. Sections help users group conversations and
customize the list of spaces displayed in Chat navigation panel. Only sections
of type CUSTOM_SECTION can be created. For details, see Create and organize
sections in Google Chat.
Requires user authentication with the authorization scope: -
https://www.googleapis.com/auth/chat.users.sections
2427 2428 2429 2430 2431 2432 2433 2434 2435 2436 2437 |
# File 'lib/google/apis/chat_v1/service.rb', line 2427 def create_user_section(parent, google_chat_v1_section_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v1/{+parent}/sections', ) command.request_representation = Google::Apis::ChatV1::GoogleChatV1Section::Representation command.request_object = google_chat_v1_section_object command.response_representation = Google::Apis::ChatV1::GoogleChatV1Section::Representation command.response_class = Google::Apis::ChatV1::GoogleChatV1Section command.params['parent'] = parent unless parent.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#delete_custom_emoji(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::ChatV1::Empty
Deletes a custom emoji. By default, users can only delete custom emoji they
created. Emoji managers
assigned by the administrator can delete any custom emoji in the organization.
See Learn about custom emojis in Google Chat. Custom emojis are only available for Google Workspace
accounts, and the administrator must turn custom emojis on for the
organization. For more information, see Learn about custom emojis in Google
Chat and Manage custom
emoji permissions. Requires
user authentication with the authorization scope: - https://www.
googleapis.com/auth/chat.customemojis
128 129 130 131 132 133 134 135 136 |
# File 'lib/google/apis/chat_v1/service.rb', line 128 def delete_custom_emoji(name, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:delete, 'v1/{+name}', ) command.response_representation = Google::Apis::ChatV1::Empty::Representation command.response_class = Google::Apis::ChatV1::Empty command.params['name'] = name unless name.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#delete_space(name, use_admin_access: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::ChatV1::Empty
Deletes a named space. Always performs a cascading delete, which means that
the space's child resources—like messages posted in the space and memberships
in the space—are also deleted. For an example, see Delete a space. Supports the following
types of authentication: - App authentication with administrator approval and the authorization scope: -
https://www.googleapis.com/auth/chat.app.delete (only in spaces the app
created) - User authentication with one of the following authorization
scopes: - https://www.googleapis.com/auth/chat.delete - https://www.
googleapis.com/auth/chat.import (import mode spaces only) - User
authentication grants administrator privileges when an administrator account
authenticates, use_admin_access is true, and the following authorization
scope is used: - https://www.googleapis.com/auth/chat.admin.delete
471 472 473 474 475 476 477 478 479 480 |
# File 'lib/google/apis/chat_v1/service.rb', line 471 def delete_space(name, use_admin_access: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:delete, 'v1/{+name}', ) command.response_representation = Google::Apis::ChatV1::Empty::Representation command.response_class = Google::Apis::ChatV1::Empty command.params['name'] = name unless name.nil? command.query['useAdminAccess'] = use_admin_access unless use_admin_access.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#delete_space_member(name, use_admin_access: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::ChatV1::Membership
Deletes a membership. For an example, see Remove a user or a Google Chat app
from a space.
Supports the following types of authentication: - App authentication with
administrator approval and the
authorization scope: - https://www.googleapis.com/auth/chat.app.memberships -
User authentication with one of the following authorization
scopes: - https://www.googleapis.com/auth/chat.memberships - https://www.
googleapis.com/auth/chat.memberships.app (to remove the calling app from the
space) - https://www.googleapis.com/auth/chat.import (import mode spaces
only) - User authentication grants administrator privileges when an
administrator account authenticates, use_admin_access is true, and the
following authorization scope is used: - https://www.googleapis.com/auth/chat.
admin.memberships App authentication is not supported for the following use
cases: - Removing a Google Group from a space. - Removing a Chat app from a
space. To delete memberships for space managers, the requester must be a space
manager. If you're using app authentication the Chat app must be the space
creator.
1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 |
# File 'lib/google/apis/chat_v1/service.rb', line 1174 def delete_space_member(name, use_admin_access: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:delete, 'v1/{+name}', ) command.response_representation = Google::Apis::ChatV1::Membership::Representation command.response_class = Google::Apis::ChatV1::Membership command.params['name'] = name unless name.nil? command.query['useAdminAccess'] = use_admin_access unless use_admin_access.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#delete_space_message(name, force: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::ChatV1::Empty
Deletes a message. For an example, see Delete a message. Supports the following types of
authentication: - App authentication with the authorization scope: - https://
www.googleapis.com/auth/chat.bot - User authentication with one of the
following authorization scopes: - https://www.googleapis.com/auth/chat.
messages - https://www.googleapis.com/auth/chat.import (import mode spaces
only) When using app authentication, requests can only delete messages created
by the calling Chat app.
1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 |
# File 'lib/google/apis/chat_v1/service.rb', line 1543 def (name, force: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:delete, 'v1/{+name}', ) command.response_representation = Google::Apis::ChatV1::Empty::Representation command.response_class = Google::Apis::ChatV1::Empty command.params['name'] = name unless name.nil? command.query['force'] = force unless force.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#delete_space_message_reaction(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::ChatV1::Empty
Deletes a reaction to a message. For an example, see Delete a reaction. Requires user
authentication with one of the following authorization scopes: -
https://www.googleapis.com/auth/chat.messages.reactions - https://www.
googleapis.com/auth/chat.messages - https://www.googleapis.com/auth/chat.
import (import mode spaces only)
1939 1940 1941 1942 1943 1944 1945 1946 1947 |
# File 'lib/google/apis/chat_v1/service.rb', line 1939 def (name, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:delete, 'v1/{+name}', ) command.response_representation = Google::Apis::ChatV1::Empty::Representation command.response_class = Google::Apis::ChatV1::Empty command.params['name'] = name unless name.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#delete_user_section(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::ChatV1::Empty
Deletes a section of type CUSTOM_SECTION. If the section contains items,
such as spaces, the items are moved to Google Chat's default sections and are
not deleted. For details, see Create and organize sections in Google Chat. Requires user
authentication with the authorization scope: - https://www.
googleapis.com/auth/chat.users.sections
2467 2468 2469 2470 2471 2472 2473 2474 2475 |
# File 'lib/google/apis/chat_v1/service.rb', line 2467 def delete_user_section(name, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:delete, 'v1/{+name}', ) command.response_representation = Google::Apis::ChatV1::Empty::Representation command.response_class = Google::Apis::ChatV1::Empty command.params['name'] = name unless name.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#download_medium(resource_name, fields: nil, quota_user: nil, download_dest: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::ChatV1::Media
Downloads media. Download is supported on the URI /v1/media/+name?alt=media
.
259 260 261 262 263 264 265 266 267 268 269 270 271 272 |
# File 'lib/google/apis/chat_v1/service.rb', line 259 def download_medium(resource_name, fields: nil, quota_user: nil, download_dest: nil, options: nil, &block) if download_dest.nil? command = make_simple_command(:get, 'v1/media/{+resourceName}', ) else command = make_download_command(:get, 'v1/media/{+resourceName}', ) command.download_dest = download_dest end command.response_representation = Google::Apis::ChatV1::Media::Representation command.response_class = Google::Apis::ChatV1::Media command.params['resourceName'] = resource_name unless resource_name.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#find_space_direct_message(name: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::ChatV1::Space
Returns the existing direct message with the specified user. If no direct
message space is found, returns a 404 NOT_FOUND error. For an example, see
Find a direct message. With
app authentication, returns the direct message space between the specified
user and the calling Chat app. With user authentication, returns the
direct message space between the specified user and the authenticated user.
Supports the following types of authentication: - App authentication with the
authorization scope: - https://www.googleapis.com/auth/chat.bot - User
authentication with one of the following authorization scopes: - https:/
/www.googleapis.com/auth/chat.spaces.readonly - https://www.googleapis.com/
auth/chat.spaces
526 527 528 529 530 531 532 533 534 |
# File 'lib/google/apis/chat_v1/service.rb', line 526 def (name: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1/spaces:findDirectMessage', ) command.response_representation = Google::Apis::ChatV1::Space::Representation command.response_class = Google::Apis::ChatV1::Space command.query['name'] = name unless name.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#find_space_group_chats(page_size: nil, page_token: nil, space_view: nil, users: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::ChatV1::FindGroupChatsResponse
Returns all spaces with spaceType == GROUP_CHAT, whose human memberships
contain exactly the calling user, and the users specified in
FindGroupChatsRequest.users. Only members that have joined the conversation
are supported. For an example, see Find group chats. If the calling user blocks, or is
blocked by, some users, and no spaces with the entire specified set of users
are found, this method returns spaces that don't include the blocked or
blocking users. The specified set of users must contain only human (non-app)
memberships. A request that contains non-human users doesn't return any spaces.
Requires user authentication with one of the following authorization
scopes: - https://www.googleapis.com/auth/chat.memberships.readonly
https://www.googleapis.com/auth/chat.memberships
595 596 597 598 599 600 601 602 603 604 605 606 |
# File 'lib/google/apis/chat_v1/service.rb', line 595 def find_space_group_chats(page_size: nil, page_token: nil, space_view: nil, users: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1/spaces:findGroupChats', ) command.response_representation = Google::Apis::ChatV1::FindGroupChatsResponse::Representation command.response_class = Google::Apis::ChatV1::FindGroupChatsResponse command.query['pageSize'] = page_size unless page_size.nil? command.query['pageToken'] = page_token unless page_token.nil? command.query['spaceView'] = space_view unless space_view.nil? command.query['users'] = users unless users.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#get_custom_emoji(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::ChatV1::CustomEmoji
Returns details about a custom emoji. Custom emojis are only available for
Google Workspace accounts, and the administrator must turn custom emojis on
for the organization. For more information, see Learn about custom emojis in
Google Chat and Manage
custom emoji permissions.
Requires user authentication with one of the following authorization
scopes: - https://www.googleapis.com/auth/chat.customemojis.
readonly - https://www.googleapis.com/auth/chat.customemojis
170 171 172 173 174 175 176 177 178 |
# File 'lib/google/apis/chat_v1/service.rb', line 170 def get_custom_emoji(name, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1/{+name}', ) command.response_representation = Google::Apis::ChatV1::CustomEmoji::Representation command.response_class = Google::Apis::ChatV1::CustomEmoji command.params['name'] = name unless name.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#get_space(name, use_admin_access: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::ChatV1::Space
Returns details about a space. For an example, see Get details about a space. Supports the
following types of authentication: - App authentication with one of the following
authorization scopes: - https://www.googleapis.com/auth/chat.bot - https://
www.googleapis.com/auth/chat.app.spaces with administrator approval - User authentication with
one of the following authorization scopes: - https://www.googleapis.com/auth/
chat.spaces.readonly - https://www.googleapis.com/auth/chat.spaces - User
authentication grants administrator privileges when an administrator account
authenticates, use_admin_access is true, and one of the following
authorization scopes is used: - https://www.googleapis.com/auth/chat.admin.
spaces.readonly - https://www.googleapis.com/auth/chat.admin.spaces App
authentication has the following limitations: - space.access_settings is
only populated when using the chat.app.spaces scope. - space.
predefind_permission_settings and space.permission_settings are only
populated when using the chat.app.spaces scope, and only for spaces the app
created.
655 656 657 658 659 660 661 662 663 664 |
# File 'lib/google/apis/chat_v1/service.rb', line 655 def get_space(name, use_admin_access: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1/{+name}', ) command.response_representation = Google::Apis::ChatV1::Space::Representation command.response_class = Google::Apis::ChatV1::Space command.params['name'] = name unless name.nil? command.query['useAdminAccess'] = use_admin_access unless use_admin_access.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#get_space_member(name, use_admin_access: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::ChatV1::Membership
Returns details about a membership. For an example, see Get details about a
user's or Google Chat app's membership. Supports the following types of authentication: - App
authentication with one of the following authorization scopes: - https://
www.googleapis.com/auth/chat.bot - https://www.googleapis.com/auth/chat.app.
memberships (requires administrator approval) - User authentication with one of the following
authorization scopes: - https://www.googleapis.com/auth/chat.memberships.
readonly - https://www.googleapis.com/auth/chat.memberships - User
authentication grants administrator privileges when an administrator account
authenticates, use_admin_access is true, and one of the following
authorization scopes is used: - https://www.googleapis.com/auth/chat.admin.
memberships.readonly - https://www.googleapis.com/auth/chat.admin.
memberships
1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 |
# File 'lib/google/apis/chat_v1/service.rb', line 1235 def get_space_member(name, use_admin_access: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1/{+name}', ) command.response_representation = Google::Apis::ChatV1::Membership::Representation command.response_class = Google::Apis::ChatV1::Membership command.params['name'] = name unless name.nil? command.query['useAdminAccess'] = use_admin_access unless use_admin_access.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#get_space_message(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::ChatV1::Message
Returns details about a message. For an example, see Get details about a
message. Supports
the following types of authentication: - App authentication with one
of the following authorization scopes: - https://www.googleapis.com/auth/chat.
bot: When using this authorization scope, this method returns details about a
message the Chat app has access to, like direct messages and slash commands that invoke the
Chat app. - https://www.googleapis.com/auth/chat.app.messages.readonly with
administrator approval. When
using this authentication scope, this method returns details about a public
message in a space. - User authentication with one of the following
authorization scopes: - https://www.googleapis.com/auth/chat.messages.
readonly - https://www.googleapis.com/auth/chat.messages Note: Might return
a message from a blocked member or space.
1594 1595 1596 1597 1598 1599 1600 1601 1602 |
# File 'lib/google/apis/chat_v1/service.rb', line 1594 def (name, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1/{+name}', ) command.response_representation = Google::Apis::ChatV1::Message::Representation command.response_class = Google::Apis::ChatV1::Message command.params['name'] = name unless name.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#get_space_message_attachment(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::ChatV1::Attachment
Gets the metadata of a message attachment. The attachment data is fetched
using the media API. For an example, see Get metadata about a
message attachment. Requires app authentication with the authorization scope: - https://www.googleapis.com/auth/chat.bot
1859 1860 1861 1862 1863 1864 1865 1866 1867 |
# File 'lib/google/apis/chat_v1/service.rb', line 1859 def (name, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1/{+name}', ) command.response_representation = Google::Apis::ChatV1::Attachment::Representation command.response_class = Google::Apis::ChatV1::Attachment command.params['name'] = name unless name.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#get_space_space_event(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::ChatV1::SpaceEvent
Returns an event from a Google Chat space. The event payload contains the most recent version of the
resource that changed. For example, if you request an event about a new
message but the message was later updated, the server returns the updated
Message resource in the event payload. Note: The permissionSettings field
is not returned in the Space object of the Space event data for this request.
Supports the following types of authentication with an authorization scope
appropriate for reading the requested data: - App authentication with
administrator approval with one
of the following authorization scopes: - https://www.googleapis.com/auth/chat.
app.spaces - https://www.googleapis.com/auth/chat.app.spaces.readonly -
https://www.googleapis.com/auth/chat.app.messages.readonly - https://www.
googleapis.com/auth/chat.app.memberships - https://www.googleapis.com/auth/
chat.app.memberships.readonly - User authentication with one of the
following authorization scopes: - https://www.googleapis.com/auth/chat.spaces.
readonly - https://www.googleapis.com/auth/chat.spaces - https://www.
googleapis.com/auth/chat.messages.readonly - https://www.googleapis.com/auth/
chat.messages - https://www.googleapis.com/auth/chat.messages.reactions.
readonly - https://www.googleapis.com/auth/chat.messages.reactions - https:
//www.googleapis.com/auth/chat.memberships.readonly - https://www.googleapis.
com/auth/chat.memberships To get an event, the authenticated caller must be a
member of the space. For an example, see Get details about an event from a
Google Chat space.
2070 2071 2072 2073 2074 2075 2076 2077 2078 |
# File 'lib/google/apis/chat_v1/service.rb', line 2070 def get_space_space_event(name, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1/{+name}', ) command.response_representation = Google::Apis::ChatV1::SpaceEvent::Representation command.response_class = Google::Apis::ChatV1::SpaceEvent command.params['name'] = name unless name.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#get_user_availability(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::ChatV1::Availability
Returns availability information for a human user in Google Chat. For example,
this can be used to check if a user is online or away, or to retrieve their
custom status message. This method only retrieves the authenticated user's
availability. Requires user authentication with one of the following
authorization scopes: - https://www.googleapis.com/auth/
chat.users.availability.readonly - https://www.googleapis.com/auth/chat.
users.availability
2210 2211 2212 2213 2214 2215 2216 2217 2218 |
# File 'lib/google/apis/chat_v1/service.rb', line 2210 def get_user_availability(name, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1/{+name}', ) command.response_representation = Google::Apis::ChatV1::Availability::Representation command.response_class = Google::Apis::ChatV1::Availability command.params['name'] = name unless name.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#get_user_space_space_notification_setting(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::ChatV1::SpaceNotificationSetting
Gets the space notification setting. For an example, see Get the caller's
space notification setting. Requires user authentication with the
authorization scope: - https://www.googleapis.com/auth/chat.users.
spacesettings
2842 2843 2844 2845 2846 2847 2848 2849 2850 |
# File 'lib/google/apis/chat_v1/service.rb', line 2842 def get_user_space_space_notification_setting(name, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1/{+name}', ) command.response_representation = Google::Apis::ChatV1::SpaceNotificationSetting::Representation command.response_class = Google::Apis::ChatV1::SpaceNotificationSetting command.params['name'] = name unless name.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#get_user_space_space_read_state(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::ChatV1::SpaceReadState
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. Requires user authentication with one of the following
authorization scopes: - https://www.googleapis.com/auth/
chat.users.readstate.readonly - https://www.googleapis.com/auth/chat.users.
readstate
2752 2753 2754 2755 2756 2757 2758 2759 2760 |
# File 'lib/google/apis/chat_v1/service.rb', line 2752 def get_user_space_space_read_state(name, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1/{+name}', ) command.response_representation = Google::Apis::ChatV1::SpaceReadState::Representation command.response_class = Google::Apis::ChatV1::SpaceReadState command.params['name'] = name unless name.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#get_user_space_thread_thread_read_state(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::ChatV1::ThreadReadState
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. Requires user authentication with one of the following
authorization scopes: - https://www.googleapis.com/auth/
chat.users.readstate.readonly - https://www.googleapis.com/auth/chat.users.
readstate
2930 2931 2932 2933 2934 2935 2936 2937 2938 |
# File 'lib/google/apis/chat_v1/service.rb', line 2930 def get_user_space_thread_thread_read_state(name, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1/{+name}', ) command.response_representation = Google::Apis::ChatV1::ThreadReadState::Representation command.response_class = Google::Apis::ChatV1::ThreadReadState command.params['name'] = name unless name.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#list_custom_emojis(filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::ChatV1::ListCustomEmojisResponse
Lists custom emojis visible to the authenticated user. Custom emojis are only
available for Google Workspace accounts, and the administrator must turn
custom emojis on for the organization. For more information, see Learn about
custom emojis in Google Chat
and Manage custom emoji permissions. Requires user authentication with one of the following
authorization scopes: - https://www.googleapis.com/auth/
chat.customemojis.readonly - https://www.googleapis.com/auth/chat.
customemojis
224 225 226 227 228 229 230 231 232 233 234 |
# File 'lib/google/apis/chat_v1/service.rb', line 224 def list_custom_emojis(filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1/customEmojis', ) command.response_representation = Google::Apis::ChatV1::ListCustomEmojisResponse::Representation command.response_class = Google::Apis::ChatV1::ListCustomEmojisResponse command.query['filter'] = filter unless filter.nil? command.query['pageSize'] = page_size unless page_size.nil? command.query['pageToken'] = page_token unless page_token.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#list_space_members(parent, filter: nil, page_size: nil, page_token: nil, show_groups: nil, show_invited: nil, use_admin_access: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::ChatV1::ListMembershipsResponse
Lists memberships in a space. For an example, see List users and Google Chat
apps in a space.
Listing memberships with app authentication lists memberships in spaces
that the Chat app has access to, but excludes Chat app memberships, including
its own. Listing memberships with User authentication lists memberships
in spaces that the authenticated user has access to. Supports the following
types of authentication: - App authentication with one of the following
authorization scopes: - https://www.googleapis.com/auth/chat.bot - https://
www.googleapis.com/auth/chat.app.memberships (requires administrator
approval) - User
authentication with one of the following authorization scopes: - https:/
/www.googleapis.com/auth/chat.memberships.readonly - https://www.googleapis.
com/auth/chat.memberships - https://www.googleapis.com/auth/chat.import (
import mode spaces only) - User authentication grants administrator privileges
when an administrator account authenticates, use_admin_access is true, and
one of the following authorization scopes is used: - https://www.googleapis.
com/auth/chat.admin.memberships.readonly - https://www.googleapis.com/auth/
chat.admin.memberships
1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 |
# File 'lib/google/apis/chat_v1/service.rb', line 1335 def list_space_members(parent, filter: nil, page_size: nil, page_token: nil, show_groups: nil, show_invited: nil, use_admin_access: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1/{+parent}/members', ) command.response_representation = Google::Apis::ChatV1::ListMembershipsResponse::Representation command.response_class = Google::Apis::ChatV1::ListMembershipsResponse command.params['parent'] = parent unless parent.nil? command.query['filter'] = filter unless filter.nil? command.query['pageSize'] = page_size unless page_size.nil? command.query['pageToken'] = page_token unless page_token.nil? command.query['showGroups'] = show_groups unless show_groups.nil? command.query['showInvited'] = show_invited unless show_invited.nil? command.query['useAdminAccess'] = use_admin_access unless use_admin_access.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#list_space_message_reactions(parent, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::ChatV1::ListReactionsResponse
Lists reactions to a message. For an example, see List reactions for a
message.
Requires user authentication with one of the following authorization
scopes: - https://www.googleapis.com/auth/chat.messages.reactions.
readonly - https://www.googleapis.com/auth/chat.messages.reactions - https:
//www.googleapis.com/auth/chat.messages.readonly - https://www.googleapis.
com/auth/chat.messages
2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 |
# File 'lib/google/apis/chat_v1/service.rb', line 2008 def (parent, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1/{+parent}/reactions', ) command.response_representation = Google::Apis::ChatV1::ListReactionsResponse::Representation command.response_class = Google::Apis::ChatV1::ListReactionsResponse command.params['parent'] = parent unless parent.nil? command.query['filter'] = filter unless filter.nil? command.query['pageSize'] = page_size unless page_size.nil? command.query['pageToken'] = page_token unless page_token.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#list_space_messages(parent, filter: nil, order_by: nil, page_size: nil, page_token: nil, show_deleted: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::ChatV1::ListMessagesResponse
Lists messages in a space that the caller is a member of, including messages
from blocked members and spaces. System messages, like those announcing new
space members, aren't included. If you list messages from a space with no
messages, the response is an empty object. When using a REST/HTTP interface,
the response contains an empty JSON object, ```. For an example, see [List
messages](https://developers.google.com/workspace/chat/api/guides/v1/messages/
list). Supports the following types of [authentication](https://developers.
google.com/workspace/chat/authenticate-authorize): - [App authentication](
https://developers.google.com/workspace/chat/authenticate-authorize-chat-app)
with [administrator approval](https://support.google.com/a?p=chat-app-auth)
with the authorization scope: -https://www.googleapis.com/auth/chat.app.
messages.readonly. When using this authentication scope, this method only
returns public messages in a space. It doesn't include private messages. - [
User authentication](https://developers.google.com/workspace/chat/authenticate-
authorize-chat-user) with one of the following authorization scopes: -https:/
/www.googleapis.com/auth/chat.messages.readonly` - https://www.googleapis.com/
auth/chat.messages - https://www.googleapis.com/auth/chat.import (import
mode spaces only)
1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 |
# File 'lib/google/apis/chat_v1/service.rb', line 1680 def (parent, filter: nil, order_by: nil, page_size: nil, page_token: nil, show_deleted: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1/{+parent}/messages', ) command.response_representation = Google::Apis::ChatV1::ListMessagesResponse::Representation command.response_class = Google::Apis::ChatV1::ListMessagesResponse command.params['parent'] = parent unless parent.nil? command.query['filter'] = filter unless filter.nil? command.query['orderBy'] = order_by unless order_by.nil? command.query['pageSize'] = page_size unless page_size.nil? command.query['pageToken'] = page_token unless page_token.nil? command.query['showDeleted'] = show_deleted unless show_deleted.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#list_space_space_events(parent, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::ChatV1::ListSpaceEventsResponse
Lists events from a Google Chat space. For each event, the payload contains the most recent version of the Chat
resource. For example, if you list events about new space members, the server
returns Membership resources that contain the latest membership details. If
new members were removed during the requested period, the event payload
contains an empty Membership resource. Supports the following types of
authentication with an authorization scope appropriate for reading
the requested data: - App authentication with administrator approval with one of the following
authorization scopes: - https://www.googleapis.com/auth/chat.app.spaces -
https://www.googleapis.com/auth/chat.app.spaces.readonly - https://www.
googleapis.com/auth/chat.app.messages.readonly - https://www.googleapis.com/
auth/chat.app.memberships - https://www.googleapis.com/auth/chat.app.
memberships.readonly - User authentication with one of the following
authorization scopes: - https://www.googleapis.com/auth/chat.spaces.readonly
https://www.googleapis.com/auth/chat.spaces-https://www.googleapis.com/ auth/chat.messages.readonly-https://www.googleapis.com/auth/chat.messageshttps://www.googleapis.com/auth/chat.messages.reactions.readonly-https:/ /www.googleapis.com/auth/chat.messages.reactions-https://www.googleapis. com/auth/chat.memberships.readonly-https://www.googleapis.com/auth/chat. membershipsTo list events, the authenticated caller must be a member of the space. For an example, see List events from a Google Chat space.
2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176 |
# File 'lib/google/apis/chat_v1/service.rb', line 2165 def list_space_space_events(parent, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1/{+parent}/spaceEvents', ) command.response_representation = Google::Apis::ChatV1::ListSpaceEventsResponse::Representation command.response_class = Google::Apis::ChatV1::ListSpaceEventsResponse command.params['parent'] = parent unless parent.nil? command.query['filter'] = filter unless filter.nil? command.query['pageSize'] = page_size unless page_size.nil? command.query['pageToken'] = page_token unless page_token.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#list_spaces(filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::ChatV1::ListSpacesResponse
Lists spaces the caller is a member of. Group chats and DMs aren't listed
until the first message is sent. For an example, see List spaces. Supports the following
types of authentication: - App authentication with the authorization scope: -
https://www.googleapis.com/auth/chat.bot - User authentication with
one of the following authorization scopes: - https://www.googleapis.com/auth/
chat.spaces.readonly - https://www.googleapis.com/auth/chat.spaces To list
all named spaces by Google Workspace organization, use the spaces.search() method using Workspace administrator privileges instead.
715 716 717 718 719 720 721 722 723 724 725 |
# File 'lib/google/apis/chat_v1/service.rb', line 715 def list_spaces(filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1/spaces', ) command.response_representation = Google::Apis::ChatV1::ListSpacesResponse::Representation command.response_class = Google::Apis::ChatV1::ListSpacesResponse command.query['filter'] = filter unless filter.nil? command.query['pageSize'] = page_size unless page_size.nil? command.query['pageToken'] = page_token unless page_token.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#list_user_section_items(parent, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::ChatV1::ListSectionItemsResponse
Lists items in a section. Only spaces can be section items. For details, see
Create and organize sections in Google Chat. Requires user authentication with the authorization scope: - https://www.googleapis.com/auth/chat.users.sections - https://
www.googleapis.com/auth/chat.users.sections.readonly
2664 2665 2666 2667 2668 2669 2670 2671 2672 2673 2674 2675 |
# File 'lib/google/apis/chat_v1/service.rb', line 2664 def list_user_section_items(parent, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1/{+parent}/items', ) command.response_representation = Google::Apis::ChatV1::ListSectionItemsResponse::Representation command.response_class = Google::Apis::ChatV1::ListSectionItemsResponse command.params['parent'] = parent unless parent.nil? command.query['filter'] = filter unless filter.nil? command.query['pageSize'] = page_size unless page_size.nil? command.query['pageToken'] = page_token unless page_token.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#list_user_sections(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::ChatV1::ListSectionsResponse
Lists sections available to the Chat user. Sections help users group their
conversations and customize the list of spaces displayed in Chat navigation
panel. For details, see Create and organize sections in Google Chat. Requires user authentication with
the authorization scope: - https://www.googleapis.com/auth/
chat.users.sections - https://www.googleapis.com/auth/chat.users.sections.
readonly
2520 2521 2522 2523 2524 2525 2526 2527 2528 2529 2530 |
# File 'lib/google/apis/chat_v1/service.rb', line 2520 def list_user_sections(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1/{+parent}/sections', ) command.response_representation = Google::Apis::ChatV1::ListSectionsResponse::Representation command.response_class = Google::Apis::ChatV1::ListSectionsResponse command.params['parent'] = parent unless parent.nil? command.query['pageSize'] = page_size unless page_size.nil? command.query['pageToken'] = page_token unless page_token.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#mark_availability_as_active(name, mark_as_active_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::ChatV1::Availability
Marks user as ACTIVE in Google Chat. Sets the user's availability state to
ACTIVE. The ACTIVE state lasts until the specified expiration, at which
point the user's state becomes AWAY. Note that if the user is actively using
Chat, the ACTIVE state duration may extend beyond the provided expiration.
This method only updates the authenticated user's availability. Requires user
authentication with authorization scope: - https://www.
googleapis.com/auth/chat.users.availability
2253 2254 2255 2256 2257 2258 2259 2260 2261 2262 2263 |
# File 'lib/google/apis/chat_v1/service.rb', line 2253 def mark_availability_as_active(name, mark_as_active_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v1/{+name}:markAsActive', ) command.request_representation = Google::Apis::ChatV1::MarkAsActiveRequest::Representation command.request_object = mark_as_active_request_object command.response_representation = Google::Apis::ChatV1::Availability::Representation command.response_class = Google::Apis::ChatV1::Availability command.params['name'] = name unless name.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#mark_availability_as_away(name, mark_as_away_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::ChatV1::Availability
Marks user as AWAY in Google Chat. Sets the user's state to away and is not
affected by the user's activity. This method only updates the authenticated
user's availability. Requires user authentication with authorization scope: - https://www.googleapis.com/auth/chat.users.availability
2295 2296 2297 2298 2299 2300 2301 2302 2303 2304 2305 |
# File 'lib/google/apis/chat_v1/service.rb', line 2295 def mark_availability_as_away(name, mark_as_away_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v1/{+name}:markAsAway', ) command.request_representation = Google::Apis::ChatV1::MarkAsAwayRequest::Representation command.request_object = mark_as_away_request_object command.response_representation = Google::Apis::ChatV1::Availability::Representation command.response_class = Google::Apis::ChatV1::Availability command.params['name'] = name unless name.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#mark_availability_as_do_not_disturb(name, mark_as_do_not_disturb_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::ChatV1::Availability
Marks user as DO_NOT_DISTURB in Google Chat. Sets a user's availability
state to DO_NOT_DISTURB until a specified expiration time. When in
DO_NOT_DISTURB, users typically won't receive notifications. This method only
updates the authenticated user's availability. Requires user authentication
with authorization scope: - https://www.googleapis.com/auth/
chat.users.availability
2339 2340 2341 2342 2343 2344 2345 2346 2347 2348 2349 |
# File 'lib/google/apis/chat_v1/service.rb', line 2339 def mark_availability_as_do_not_disturb(name, mark_as_do_not_disturb_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v1/{+name}:markAsDoNotDisturb', ) command.request_representation = Google::Apis::ChatV1::MarkAsDoNotDisturbRequest::Representation command.request_object = mark_as_do_not_disturb_request_object command.response_representation = Google::Apis::ChatV1::Availability::Representation command.response_class = Google::Apis::ChatV1::Availability command.params['name'] = name unless name.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#move_section_item(name, move_section_item_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::ChatV1::MoveSectionItemResponse
Moves an item from one section to another. For example, if a section contains
spaces, this method can be used to move a space to a different section. For
details, see Create and organize sections in Google Chat. Requires user authentication with
the authorization scope: - https://www.googleapis.com/auth/
chat.users.sections
2706 2707 2708 2709 2710 2711 2712 2713 2714 2715 2716 |
# File 'lib/google/apis/chat_v1/service.rb', line 2706 def move_section_item(name, move_section_item_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v1/{+name}:move', ) command.request_representation = Google::Apis::ChatV1::MoveSectionItemRequest::Representation command.request_object = move_section_item_request_object command.response_representation = Google::Apis::ChatV1::MoveSectionItemResponse::Representation command.response_class = Google::Apis::ChatV1::MoveSectionItemResponse command.params['name'] = name unless name.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#patch_space(name, space_object = nil, update_mask: nil, use_admin_access: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::ChatV1::Space
Updates a space. For an example, see Update a space. If you're updating the displayName
field and receive the error message ALREADY_EXISTS, try a different display
name.. An existing space within the Google Workspace organization might
already use this display name. Supports the following types of authentication: - App
authentication with administrator approval and one of the following authorization scopes: - https://www.
googleapis.com/auth/chat.app.spaces - User authentication with
one of the following authorization scopes: - https://www.googleapis.com/auth/
chat.spaces - https://www.googleapis.com/auth/chat.import (import mode
spaces only) - User authentication grants administrator privileges when an
administrator account authenticates, use_admin_access is true, and the
following authorization scopes is used: - https://www.googleapis.com/auth/
chat.admin.spaces App authentication has the following limitations: - To
update either space.predefined_permission_settings or space.
permission_settings, the app must be the space creator. - Updating the space.
access_settings.audience is not supported for app authentication.
834 835 836 837 838 839 840 841 842 843 844 845 846 |
# File 'lib/google/apis/chat_v1/service.rb', line 834 def patch_space(name, space_object = nil, update_mask: nil, use_admin_access: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:patch, 'v1/{+name}', ) command.request_representation = Google::Apis::ChatV1::Space::Representation command.request_object = space_object command.response_representation = Google::Apis::ChatV1::Space::Representation command.response_class = Google::Apis::ChatV1::Space command.params['name'] = name unless name.nil? command.query['updateMask'] = update_mask unless update_mask.nil? command.query['useAdminAccess'] = use_admin_access unless use_admin_access.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#patch_space_member(name, membership_object = nil, update_mask: nil, use_admin_access: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::ChatV1::Membership
Updates a membership. For an example, see Update a user's membership in a
space. Supports
the following types of authentication: - App authentication with
administrator approval and the
authorization scope: - https://www.googleapis.com/auth/chat.app.memberships (
only in spaces the app created) - User authentication with one of the
following authorization scopes: - https://www.googleapis.com/auth/chat.
memberships - https://www.googleapis.com/auth/chat.import (import mode
spaces only) - User authentication grants administrator privileges when an
administrator account authenticates, use_admin_access is true, and the
following authorization scope is used: - https://www.googleapis.com/auth/chat.
admin.memberships
1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 |
# File 'lib/google/apis/chat_v1/service.rb', line 1397 def patch_space_member(name, membership_object = nil, update_mask: nil, use_admin_access: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:patch, 'v1/{+name}', ) command.request_representation = Google::Apis::ChatV1::Membership::Representation command.request_object = membership_object command.response_representation = Google::Apis::ChatV1::Membership::Representation command.response_class = Google::Apis::ChatV1::Membership command.params['name'] = name unless name.nil? command.query['updateMask'] = update_mask unless update_mask.nil? command.query['useAdminAccess'] = use_admin_access unless use_admin_access.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#patch_space_message(name, message_object = nil, allow_missing: nil, update_mask: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::ChatV1::Message
Updates a message. There's a difference between the patch and update
methods. The patch method uses a patch request while the update method
uses a put request. We recommend using the patch method. For an example,
see Update a message. Supports the following types of authentication: - App authentication
with the authorization scope: - https://www.googleapis.com/auth/chat.bot -
User authentication with one of the following authorization scopes: - https:/
/www.googleapis.com/auth/chat.messages - https://www.googleapis.com/auth/
chat.import (import mode spaces only) When using app authentication, requests
can only update messages created by the calling Chat app.
1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 |
# File 'lib/google/apis/chat_v1/service.rb', line 1749 def (name, = nil, allow_missing: nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:patch, 'v1/{+name}', ) command.request_representation = Google::Apis::ChatV1::Message::Representation command.request_object = command.response_representation = Google::Apis::ChatV1::Message::Representation command.response_class = Google::Apis::ChatV1::Message command.params['name'] = name unless name.nil? command.query['allowMissing'] = allow_missing unless allow_missing.nil? command.query['updateMask'] = update_mask unless update_mask.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#patch_user_availability(name, availability_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::ChatV1::Availability
Updates availability information for a human user. Only the custom_status
field can be updated through this method. This method only updates the
authenticated user's availability. Requires user authentication with
one of the following authorization scopes: - https://www.
googleapis.com/auth/chat.users.availability
2385 2386 2387 2388 2389 2390 2391 2392 2393 2394 2395 2396 |
# File 'lib/google/apis/chat_v1/service.rb', line 2385 def patch_user_availability(name, availability_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:patch, 'v1/{+name}', ) command.request_representation = Google::Apis::ChatV1::Availability::Representation command.request_object = availability_object command.response_representation = Google::Apis::ChatV1::Availability::Representation command.response_class = Google::Apis::ChatV1::Availability command.params['name'] = name unless name.nil? command.query['updateMask'] = update_mask unless update_mask.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#patch_user_section(name, google_chat_v1_section_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::ChatV1::GoogleChatV1Section
Updates a section. Only sections of type CUSTOM_SECTION can be updated. For
details, see Create and organize sections in Google Chat. Requires user authentication with
the authorization scope: - https://www.googleapis.com/auth/
chat.users.sections
2566 2567 2568 2569 2570 2571 2572 2573 2574 2575 2576 2577 |
# File 'lib/google/apis/chat_v1/service.rb', line 2566 def patch_user_section(name, google_chat_v1_section_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:patch, 'v1/{+name}', ) command.request_representation = Google::Apis::ChatV1::GoogleChatV1Section::Representation command.request_object = google_chat_v1_section_object command.response_representation = Google::Apis::ChatV1::GoogleChatV1Section::Representation command.response_class = Google::Apis::ChatV1::GoogleChatV1Section command.params['name'] = name unless name.nil? command.query['updateMask'] = update_mask unless update_mask.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#patch_user_space_space_notification_setting(name, space_notification_setting_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::ChatV1::SpaceNotificationSetting
Updates the space notification setting. For an example, see Update the caller'
s space notification setting. Requires user authentication with
the authorization scope: - https://www.googleapis.com/auth/
chat.users.spacesettings
2882 2883 2884 2885 2886 2887 2888 2889 2890 2891 2892 2893 |
# File 'lib/google/apis/chat_v1/service.rb', line 2882 def patch_user_space_space_notification_setting(name, space_notification_setting_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:patch, 'v1/{+name}', ) command.request_representation = Google::Apis::ChatV1::SpaceNotificationSetting::Representation command.request_object = space_notification_setting_object command.response_representation = Google::Apis::ChatV1::SpaceNotificationSetting::Representation command.response_class = Google::Apis::ChatV1::SpaceNotificationSetting command.params['name'] = name unless name.nil? command.query['updateMask'] = update_mask unless update_mask.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#position_section(name, position_section_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::ChatV1::PositionSectionResponse
Changes the sort order of a section. For details, see Create and organize
sections in Google Chat.
Requires user authentication with the authorization scope: -
https://www.googleapis.com/auth/chat.users.sections
2606 2607 2608 2609 2610 2611 2612 2613 2614 2615 2616 |
# File 'lib/google/apis/chat_v1/service.rb', line 2606 def position_section(name, position_section_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v1/{+name}:position', ) command.request_representation = Google::Apis::ChatV1::PositionSectionRequest::Representation command.request_object = position_section_request_object command.response_representation = Google::Apis::ChatV1::PositionSectionResponse::Representation command.response_class = Google::Apis::ChatV1::PositionSectionResponse command.params['name'] = name unless name.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#search_spaces(order_by: nil, page_size: nil, page_token: nil, query: nil, use_admin_access: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::ChatV1::SearchSpacesResponse
Returns a list of spaces in a Google Workspace organization. For an example,
see Search for and manage spaces. When use_admin_access is set to false, the
results are limited to spaces where the calling user is a joined member. To
search with administrator privileges, set use_admin_access to true.
Setting use_admin_access to false is available under Developer Preview.
Supports the following types of authentication: - User authentication with
one of the following authorization scopes: - https://www.googleapis.com/auth/
chat.spaces.readonly - https://www.googleapis.com/auth/chat.spaces - User
authentication with administrator privileges and one of
the following authorization scopes: - https://www.googleapis.com/
auth/chat.admin.spaces.readonly - https://www.googleapis.com/auth/chat.admin.
spaces
961 962 963 964 965 966 967 968 969 970 971 972 973 |
# File 'lib/google/apis/chat_v1/service.rb', line 961 def search_spaces(order_by: nil, page_size: nil, page_token: nil, query: nil, use_admin_access: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1/spaces:search', ) command.response_representation = Google::Apis::ChatV1::SearchSpacesResponse::Representation command.response_class = Google::Apis::ChatV1::SearchSpacesResponse command.query['orderBy'] = order_by unless order_by.nil? command.query['pageSize'] = page_size unless page_size.nil? command.query['pageToken'] = page_token unless page_token.nil? command.query['query'] = query unless query.nil? command.query['useAdminAccess'] = use_admin_access unless use_admin_access.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#setup_space(set_up_space_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::ChatV1::Space
Creates a space and adds specified users to it. The calling user is
automatically added to the space, and shouldn't be specified as a membership
in the request. For an example, see Set up a space with initial members. To specify the
human members to add, add memberships with the appropriate membership.member.
name. To add a human user, use users/user, whereusercan be the
email address for the user. For users in the same Workspace organization
usercan also be the `id` for the person from the People API, or the `id`
for the user in the Directory API. For example, if the People API Person
profile ID for `user@example.com` is `123456789`, you can add the user to the
space by setting the `membership.member.name` to `users/user@example.com` or `
users/123456789`. To specify the Google groups to add, add memberships with
the appropriate `membership.group_member.name`. To add or invite a Google
group, use `groups/`group, where group is the id for the group from
the Cloud Identity Groups API. For example, you can use Cloud Identity Groups
lookup API to retrieve the ID 123456789 for group email group@example.com,
then you can add the group to the space by setting the membership.
group_member.name to groups/123456789. Group email is not supported, and
Google groups can only be added as members in named spaces. For a named space
or group chat, if the caller blocks, or is blocked by some members, or doesn't
have permission to add some members, then those members aren't added to the
created space. To create a direct message (DM) between the calling user and
another human user, specify exactly one membership to represent the human user.
If one user blocks the other, the request fails and the DM isn't created. To
create a DM between the calling user and the calling app, set Space.
singleUserBotDm to true and don't specify any memberships. You can only use
this method to set up a DM with the calling app. To add the calling app as a
member of a space or an existing DM between two human users, see Invite or
add a user or app to a space. If a DM already exists between two users, even when one user
blocks the other at the time a request is made, then the existing DM is
returned. Spaces with threaded replies aren't supported. If you receive the
error message ALREADY_EXISTS when setting up a space, try a different
displayName. An existing space within the Google Workspace organization might
already use this display name. Requires user authentication with
one of the following authorization scopes: - https://www.
googleapis.com/auth/chat.spaces.create - https://www.googleapis.com/auth/
chat.spaces
1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 |
# File 'lib/google/apis/chat_v1/service.rb', line 1034 def setup_space(set_up_space_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v1/spaces:setup', ) command.request_representation = Google::Apis::ChatV1::SetUpSpaceRequest::Representation command.request_object = set_up_space_request_object command.response_representation = Google::Apis::ChatV1::Space::Representation command.response_class = Google::Apis::ChatV1::Space command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#update_space_message(name, message_object = nil, allow_missing: nil, update_mask: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::ChatV1::Message
Updates a message. There's a difference between the patch and update
methods. The patch method uses a patch request while the update method
uses a put request. We recommend using the patch method. For an example,
see Update a message. Supports the following types of authentication: - App authentication
with the authorization scope: - https://www.googleapis.com/auth/chat.bot -
User authentication with one of the following authorization scopes: - https:/
/www.googleapis.com/auth/chat.messages - https://www.googleapis.com/auth/
chat.import (import mode spaces only) When using app authentication, requests
can only update messages created by the calling Chat app.
1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 |
# File 'lib/google/apis/chat_v1/service.rb', line 1817 def (name, = nil, allow_missing: nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:put, 'v1/{+name}', ) command.request_representation = Google::Apis::ChatV1::Message::Representation command.request_object = command.response_representation = Google::Apis::ChatV1::Message::Representation command.response_class = Google::Apis::ChatV1::Message command.params['name'] = name unless name.nil? command.query['allowMissing'] = allow_missing unless allow_missing.nil? command.query['updateMask'] = update_mask unless update_mask.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#update_user_space_space_read_state(name, space_read_state_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::ChatV1::SpaceReadState
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. Requires user
authentication with the authorization scope: - https://www.
googleapis.com/auth/chat.users.readstate
2799 2800 2801 2802 2803 2804 2805 2806 2807 2808 2809 2810 |
# File 'lib/google/apis/chat_v1/service.rb', line 2799 def update_user_space_space_read_state(name, space_read_state_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:patch, 'v1/{+name}', ) command.request_representation = Google::Apis::ChatV1::SpaceReadState::Representation command.request_object = space_read_state_object command.response_representation = Google::Apis::ChatV1::SpaceReadState::Representation command.response_class = Google::Apis::ChatV1::SpaceReadState command.params['name'] = name unless name.nil? command.query['updateMask'] = update_mask unless update_mask.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#upload_medium_attachment(parent, upload_attachment_request_object = nil, fields: nil, quota_user: nil, upload_source: nil, content_type: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::ChatV1::UploadAttachmentResponse
Uploads an attachment. For an example, see Upload media as a file attachment.
Requires user authentication with one of the following authorization
scopes: - https://www.googleapis.com/auth/chat.messages.create -
https://www.googleapis.com/auth/chat.messages - https://www.googleapis.com/
auth/chat.import (import mode spaces only) You can upload attachments up to
200 MB. Certain file types aren't supported. For details, see File types
blocked by Google Chat.
310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 |
# File 'lib/google/apis/chat_v1/service.rb', line 310 def (parent, = nil, fields: nil, quota_user: nil, upload_source: nil, content_type: nil, options: nil, &block) if upload_source.nil? command = make_simple_command(:post, 'v1/{+parent}/attachments:upload', ) else command = make_upload_command(:post, 'v1/{+parent}/attachments:upload', ) command.upload_source = upload_source command.upload_content_type = content_type end command.request_representation = Google::Apis::ChatV1::UploadAttachmentRequest::Representation command.request_object = command.response_representation = Google::Apis::ChatV1::UploadAttachmentResponse::Representation command.response_class = Google::Apis::ChatV1::UploadAttachmentResponse command.params['parent'] = parent unless parent.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |