AI-generated Key Takeaways
-
UniversalActionResponseBuilder facilitates constructing UniversalActionResponse objects for handling user actions within Google Workspace add-ons.
-
It provides methods to define the response behavior, including displaying add-on cards (
displayAddOnCards
) or opening URLs (setOpenLink
). -
The
build()
method finalizes and validates the response configuration.
A builder for the Universal
objects.
Methods
Method | Return type | Brief description |
---|---|---|
build() | Universal | Builds the current universal action response and validates it. |
display | Universal | Displays the add-on with the specified cards. |
set | Universal | Sets the URL to open when the universal action is selected. |
Detailed documentation
build()
Builds the current universal action response and validates it.
Return
Universal
— A validated UniversalActionResponse.
Throws
Error
— if the constructed universal action response isn't valid.
displayAddOnCards(cardObjects)
Displays the add-on with the specified cards.
Parameters
Name | Type | Description |
---|---|---|
card | Object[] | An array of Card s to display. |
Return
Universal
— This object, for chaining.
setOpenLink(openLink)
Sets the URL to open when the universal action is selected.
Parameters
Name | Type | Description |
---|---|---|
open | Open | The link object to use. |
Return
Universal
— This object, for chaining.