Reference documentation and code samples for the Google Apps Chat V1 Client class Image.
An image that is specified by a URL and can have an onClick
action. For an
example, see Add an
image.
Google Workspace Add-ons and Chat apps:
Generated from protobuf message google.apps.card.v1.Image
Namespace
Google \ Apps \ Card \ V1Methods
__construct
Constructor.
Parameters | |
---|---|
Name | Description |
data |
array
Optional. Data for populating the Message object. |
↳ image_url |
string
The HTTPS URL that hosts the image. For example: |
↳ on_click |
Google\Apps\Card\V1\OnClick
When a user clicks the image, the click triggers this action. |
↳ alt_text |
string
The alternative text of this image that's used for accessibility. |
getImageUrl
The HTTPS URL that hosts the image.
For example:
https://developers.google.com/workspace/chat/images/quickstart-app-avatar.png
Returns | |
---|---|
Type | Description |
string |
setImageUrl
The HTTPS URL that hosts the image.
For example:
https://developers.google.com/workspace/chat/images/quickstart-app-avatar.png
Parameter | |
---|---|
Name | Description |
var |
string
|
Returns | |
---|---|
Type | Description |
$this |
getOnClick
When a user clicks the image, the click triggers this action.
Returns | |
---|---|
Type | Description |
Google\Apps\Card\V1\OnClick|null |
hasOnClick
clearOnClick
setOnClick
When a user clicks the image, the click triggers this action.
Parameter | |
---|---|
Name | Description |
var |
Google\Apps\Card\V1\OnClick
|
Returns | |
---|---|
Type | Description |
$this |
getAltText
The alternative text of this image that's used for accessibility.
Returns | |
---|---|
Type | Description |
string |
setAltText
The alternative text of this image that's used for accessibility.
Parameter | |
---|---|
Name | Description |
var |
string
|
Returns | |
---|---|
Type | Description |
$this |