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