SpacesMessages
class SpacesMessages extends Resource (View source)
The "messages" collection of methods.
Typical usage is:
$chatService = new Google\Service\HangoutsChat(...);
$messages = $chatService->spaces_messages;
Methods
Creates a message in a Google Chat space. The maximum message size, including text and cards, is 32,000 bytes. For an example, see Send a message.
Deletes a message. For an example, see Delete a message.
Returns details about a message. For an example, see Get details about a message. Requires authentication. Supports app authentication and user authentication. Note: Might return a message from a blocked member or space. (messages.get)
Lists messages in a space that the caller is a member of, including messages from blocked members and spaces. For an example, see List messages. Requires user authentication. (messages.listSpacesMessages)
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. Requires
authentication. Supports app
authentication and user
authentication. When using app authentication, requests can only update
messages created by the calling Chat app. (messages.patch)
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. Requires
authentication. Supports app
authentication and user
authentication. When using app authentication, requests can only update
messages created by the calling Chat app. (messages.update)
Details
Message
create(string $parent, Message $postBody, array $optParams = [])
Creates a message in a Google Chat space. The maximum message size, including text and cards, is 32,000 bytes. For an example, see Send a message.
Calling this method requires authentication and supports the following authentication types: - For text messages, user authentication or app authentication are supported. - For card messages, only app authentication is supported. (Only Chat apps can create card messages.) (messages.create)
ChatEmpty
delete(string $name, array $optParams = [])
Deletes a message. For an example, see Delete a message.
Requires authentication. Supports app authentication and user authentication. When using app authentication, requests can only delete messages created by the calling Chat app. (messages.delete)
Message
get(string $name, array $optParams = [])
Returns details about a message. For an example, see Get details about a message. Requires authentication. Supports app authentication and user authentication. Note: Might return a message from a blocked member or space. (messages.get)
ListMessagesResponse
listSpacesMessages(string $parent, array $optParams = [])
Lists messages in a space that the caller is a member of, including messages from blocked members and spaces. For an example, see List messages. Requires user authentication. (messages.listSpacesMessages)
Message
patch(string $name, Message $postBody, array $optParams = [])
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. Requires
authentication. Supports app
authentication and user
authentication. When using app authentication, requests can only update
messages created by the calling Chat app. (messages.patch)
Message
update(string $name, Message $postBody, array $optParams = [])
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. Requires
authentication. Supports app
authentication and user
authentication. When using app authentication, requests can only update
messages created by the calling Chat app. (messages.update)