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

שיטות

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

תיעוד מפורט

printJson()

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

החזרות

String