Class Notification

Notification

Notification présentée à l'utilisateur en réponse à son interaction avec un élément d'interface utilisateur.

var action = CardService.newAction().setFunctionName("notificationCallback");
CardService.newTextButton().setText('Save').setOnClickAction(action);

// ...

function notificationCallback() {
  return CardService.newActionResponseBuilder()
      .setNotification(CardService.newNotification()
          .setText("Some info to display to user"))
      .build();
}

Méthodes

MéthodeType renvoyéBrève description
setText(text)NotificationDéfinit le texte à afficher dans la notification.

Documentation détaillée

setText(text)

Définit le texte à afficher dans la notification. Obligatoire.

Paramètres

NomTypeDescription
textStringTexte de la notification.

Renvois

Notification : cet objet, pour le chaînage.