Class InsertSection

InsertSection

ตัวสร้างสำหรับออบเจ็กต์ InsertSection นักพัฒนาแอปสามารถแทรกส่วนใหม่ลงในการ์ดได้โดยส่ง InsertSection ไปยัง ModifyCard

ใช้ได้เฉพาะกับส่วนเสริมของ Google Workspace ที่ขยาย Google Workspace Studio

ตัวอย่างการใช้งาน

const insertSection = AddOnsResponseService.newInsertSection().insertBelowSection('sample_id')
.setSection(CardService.newCardSection().setHeader('New Section'));

const modifyCard = AddOnsResponseService.newModifyCard()
.setInsertSection(insertSection);

เมธอด

เมธอดประเภทการแสดงผลรายละเอียดแบบย่อ
insertAtTop(onCardTop)InsertSectionตั้งค่าแฟล็ก onCardTop ซึ่งระบุว่าควรแทรกส่วนใหม่ที่ด้านบนของการ์ดหรือไม่
insertBelowSection(sectionId)InsertSectionตั้งค่ารหัสส่วนและแทรกส่วนใหม่ไว้ด้านล่าง
setSection(section)InsertSectionตั้งค่าส่วนของการ์ดที่จะแทรก

เอกสารโดยละเอียด

insertAtTop(onCardTop)

ตั้งค่าแฟล็ก onCardTop ซึ่งระบุว่าควรแทรกส่วนใหม่ที่ด้านบนของการ์ดหรือไม่

พารามิเตอร์

ชื่อประเภทคำอธิบาย
onCardTopBooleanแฟล็ก onCardTop

รีเทิร์น

InsertSection \- ออบเจ็กต์ส่วนแทรกสำหรับการเชื่อมโยง


insertBelowSection(sectionId)

ตั้งค่ารหัสส่วนและแทรกส่วนใหม่ไว้ด้านล่าง หากไม่พบรหัสส่วน ระบบจะแทรกส่วนใหม่ไว้ที่ส่วนท้ายของการ์ด

พารามิเตอร์

ชื่อประเภทคำอธิบาย
sectionIdStringรหัสของส่วนที่จะแทรกไว้ด้านล่าง

รีเทิร์น

InsertSection \- ออบเจ็กต์ส่วนแทรกสำหรับการเชื่อมโยง


setSection(section)

ตั้งค่าส่วนของการ์ดที่จะแทรก

พารามิเตอร์

ชื่อประเภทคำอธิบาย
sectionCardSectionCardSection ที่จะแทรก

รีเทิร์น

InsertSection \- ออบเจ็กต์ส่วนแทรกสำหรับการเชื่อมโยง