Methods
create(parent, text, bodyopt)
Creates a new thread in a room message. To create new message in new thread, pass string to text parameter. For more elaborate use, pass null
to text param and use the body parameter for cards, etc.
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
parent |
String |
Required. Space resource name, in the form "spaces/*". Example: spaces/AAAAMpdlehY |
||
text |
String |
The content of the message |
||
body |
Object |
<optional> |
{} |
The Message body |
- Source:
Example
const Chat = ChatService('<privateKey>', '<email>');
const result = Chat.Messages.create('<parentId>', "Content of simple text message in new thread");
delete(name)
Deletes a message
Parameters:
Name | Type | Default | Description |
---|---|---|---|
name |
String | null |
Required. Resource name of the message to be deleted, in the form "spaces/*/messages/*" |
- Source:
get(name) → {Object}
Returns an instance of Message.
Parameters:
Name | Type | Default | Description |
---|---|---|---|
name |
String | null |
Required. Resource name of the message to be retrieved, in the form "spaces/*/messages/*". |
- Source:
update(name, updateMask, body) → {Object}
Updates a message. Returns a message object.
Parameters:
Name | Type | Description |
---|---|---|
name |
String |
Resource name, in the form "spaces/*/messages/*". |
updateMask |
String |
Required. The field paths to be updated, comma separated if there are multiple. |
body |
Object |
An instance of message |
- Source: