Class ActionResponse

ActionResponse

אובייקט התגובה שעשוי להיות מוחזר מפונקציית קריאה חוזרת (למשל, handler של תגובות בטופס) כדי לבצע פעולה אחת או יותר בצד הלקוח. חלק מהשילובים של פעולות לא נתמכים.

// 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();

Methods

שיטהסוג הערך שמוחזרתיאור קצר
printJson()Stringמדפיס את הייצוג של האובייקט הזה ב-JSON.

תיעוד מפורט

printJson()

מדפיס את הייצוג של האובייקט הזה ב-JSON. הפעולה הזו מיועדת לניפוי באגים בלבד.

חזרה

String