Reference documentation and code samples for the Google Apps Chat V1 Client class Carousel.
A carousel, also known as a slider, rotates and displays a list of widgets in a slideshow format, with buttons navigating to the previous or next widget.
For example, this is a JSON representation of a carousel that contains three text paragraph widgets.
{
"carouselCards": [
{
"widgets": [
{
"textParagraph": {
"text": "First text paragraph in carousel",
}
}
]
},
{
"widgets": [
{
"textParagraph": {
"text": "Second text paragraph in carousel",
}
}
]
},
{
"widgets": [
{
"textParagraph": {
"text": "Third text paragraph in carousel",
}
}
]
}
]
}
Generated from protobuf message google.apps.card.v1.Carousel
Namespace
Google \ Apps \ Card \ V1Methods
__construct
Constructor.
| Parameters | |
|---|---|
| Name | Description |
data |
array
Optional. Data for populating the Message object. |
↳ carousel_cards |
array<Carousel\CarouselCard>
A list of cards included in the carousel. |
getCarouselCards
A list of cards included in the carousel.
| Returns | |
|---|---|
| Type | Description |
Google\Protobuf\Internal\RepeatedField |
|
setCarouselCards
A list of cards included in the carousel.
| Parameter | |
|---|---|
| Name | Description |
var |
array<Carousel\CarouselCard>
|
| Returns | |
|---|---|
| Type | Description |
$this |
|