O objeto de resposta que pode ser retornado de uma função de callback (por exemplo, um manipulador de respostas de formulário) para realizar uma ou mais ações no cliente. Algumas combinações de ações não são compatíveis.
// 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étodos
| Método | Tipo de retorno | Breve descrição |
|---|---|---|
print | String | Imprime a representação JSON deste objeto. |
Documentação detalhada
printJson()
Imprime a representação JSON deste objeto. Isso é apenas para depuração.
Retornar
String