Class ActionResponse

ActionRéponse

Objet de réponse pouvant être renvoyé à partir d'une fonction de rappel (par exemple, un gestionnaire de réponse de formulaire) pour effectuer une ou plusieurs actions sur le client. Certaines combinaisons d'actions ne sont pas acceptées.

// An action that opens a link const actionResponse =     CardService.newActionResponseBuilder()         .setOpenLink(CardService.newOpenLink().setUrl('https://www.google.com'))         .build();  // An action that shows a notification. const notificationActionResponse = CardService.newActionResponseBuilder()                            .setNotification(                                CardService.newNotification().setText(                                    'Some info to display to user'),                                )                            .build();  // An action that shows an additional card. It also sets a flag to indicate that // the original state data has changed.  const cardBuilder = CardService.newCardBuilder(); // Build card ... const navigationActionResponse = CardService.newActionResponseBuilder()                            .setNavigation(CardService.newNavigation().pushCard(                                cardBuilder.build()))                            .setStateChanged(true)                            .build();

Méthodes

MéthodeType renvoyéBrève description
printJson()StringImprime la représentation JSON de cet objet.

Documentation détaillée

printJson()

Imprime la représentation JSON de cet objet. Cette option est réservée au débogage.

Renvois

String