Class Notification

الإشعار

إشعار يتم عرضه للمستخدم كردّ على تفاعله مع أحد عناصر واجهة المستخدم

const 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();
}

الطُرق

الطريقةنوع القيمة التي تم إرجاعهاوصف قصير
setText(text)Notificationتضبط هذه السمة النص الذي سيظهر في الإشعار.

مستندات تفصيلية

setText(text)

تضبط هذه السمة النص الذي سيظهر في الإشعار. الحقل مطلوب.

المَعلمات

الاسمالنوعالوصف
textStringنص الإشعار

الإرجاع

Notification: هذا العنصر، للتسلسل