یک پیام گوگل چت.
برای افزونههای Google Workspace که Google Chat را توسعه میدهند، موجود است.
const card = CardService.newCardBuilder() .setHeader(CardService.newCardHeader().setTitle("Card Title")) .addSection(CardService.newCardSection() .addWidget(CardService.newTextParagraph().setText("Text paragraph"))) .build(); const cardWithId = CardService.newCardWithId().setCardId("card_one").setCard(card); const message = AddOnsResponseService.newChatMessage().addCardWithId(cardWithId);
روشها
| روش | نوع بازگشتی | شرح مختصر |
|---|---|---|
add Card With Id(cardWithId) | Chat Message | کارت پیام را تنظیم میکند. |
set Text(text) | Chat Message | متن پیام را تنظیم میکند. |
مستندات دقیق
add Card With Id(cardWithId)
کارت پیام را تنظیم میکند.
const card = CardService.newCardBuilder() .setHeader(CardService.newCardHeader().setTitle("Card Title")) .addSection(CardService.newCardSection() .addWidget(CardService.newTextParagraph().setText("Text paragraph"))) .build(); const cardWithId = CardService.newCardWithId().setCardId("card_one").setCard(card); const message = AddOnsResponseService.newChatMessage().addCardWithId(cardWithId);
پارامترها
| نام | نوع | توضیحات |
|---|---|---|
card With Id | Card With Id | مقدار cardWithId برای تنظیم. |
بازگشت
Chat Message - این شیء، برای زنجیرهسازی.
set Text(text)
متن پیام را تنظیم میکند.
const message = AddOnsResponseService.newChatMessage().setText("Example text");
پارامترها
| نام | نوع | توضیحات |
|---|---|---|
text | String | بخش متنی یک پیام. |
بازگشت
Chat Message - این شیء، برای زنجیرهسازی.