Class ChatResponse

ChatResponse

אובייקט התגובה להודעת כרטיס ב-Google Chat.

האפשרות הזו זמינה רק באפליקציות של Google Chat. לא זמין לתוספים של Google Workspace.

// Creates a card message in Chat.
const cardHeader = CardService.newCardHeader()
                       .setTitle('Card Header Title')
                       .setSubtitle('Card Header Subtitle');

const card = CardService.newCardBuilder().setHeader(cardHeader).build();

const chatResponse =
    CardService.newChatResponseBuilder()
        .setText('Example text')
        .addCardsV2(
            CardService.newCardWithId().setCardId('card_id').setCard(card))
        .build();

console.log(chatResponse.printJson());

Methods

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

תיעוד מפורט

printJson()

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

חזרה

String