أداة إنشاء لعناصر CardWithId
هذه الفئة هي معرّف فريد لبطاقة في
رسالة عند إرسال بطاقات متعددة.
هذه الميزة متاحة فقط لتطبيقات Google Chat. غير متاحة لإضافات Google Workspace.
const cardSection = CardService.newCardSection(); cardSection.addWidget( CardService.newTextParagraph().setText('This is a text paragraph widget.')); const card = CardService.newCardBuilder() .setHeader(CardService.newCardHeader().setTitle('Card title')) .addSection(cardSection) .build(); const cardWithId = CardService.newCardWithId() .setCardId('card_id') .setCard(card);
الطُرق
الطريقة | نوع القيمة التي يتم إرجاعها | وصف قصير |
---|---|---|
setCard(card) | CardWithId | لضبط بطاقة cardWithId . |
setCardId(id) | CardWithId | لضبط رقم تعريف بطاقة cardWithId الفريد. |
الوثائق التفصيلية
setCard(card)
لضبط بطاقة cardWithId
.
const cardHeader = CardService.newCardHeader() .setTitle('Card Header Title') .setSubtitle('Card Header Subtitle'); const card = CardService.newCardBuilder() .setHeader(cardHeader) .build(); const cardWithId = CardService.newCardWithId() .setCard(card);
المَعلمات
الاسم | النوع | الوصف |
---|---|---|
card | Card | Card التي سيتم استخدامها. |
استرجاع الكرة
CardWithId
: هذا الكائن، للتسلسل.
setCardId(id)
لضبط رقم تعريف بطاقة cardWithId
الفريد.
const cardWithId = CardService.newCardWithId(); // Sets the card ID of the cardWithId. cardWithId.setCardId('card_id');
المَعلمات
الاسم | النوع | الوصف |
---|---|---|
id | String | النص المطلوب استخدامه. |
استرجاع الكرة
CardWithId
: هذا الكائن، للتسلسل.