Class EditorFileScopeActionResponseBuilder

EditorFileScopeActionResponseBuilder

เครื่องมือสร้างสำหรับออบเจ็กต์ EditorFileScopeActionResponse

เมธอด

วิธีการประเภทการแสดงผลรายละเอียดแบบย่อ
build()EditorFileScopeActionResponseสร้างการตอบกลับการดำเนินการของเอดิเตอร์ปัจจุบัน
requestFileScopeForActiveDocument()EditorFileScopeActionResponseBuilderขอขอบเขต drive.file สำหรับเอกสารเอดิเตอร์ที่ใช้งานอยู่ปัจจุบัน

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

build()

สร้างการตอบกลับการดำเนินการของเอดิเตอร์ปัจจุบัน

รีเทิร์น

EditorFileScopeActionResponseEditorFileScopeActionResponseที่ได้รับการตรวจสอบแล้ว


requestFileScopeForActiveDocument()

ขอขอบเขต drive.file สำหรับเอกสารเอดิเตอร์ที่ใช้งานอยู่ปัจจุบัน

// Display a permissions dialog to the user, requesting `drive.file` scope for
// the current document on behalf of this add-on.
CardService.newEditorFileScopeActionResponseBuilder()
    .requestFileScopeForActiveDocument()
    .build();

หมายเหตุ: หากต้องการเรียกใช้เมธอดนี้ คุณต้องเพิ่มขอบเขต drive.file ลงในไฟล์ Manifest ของส่วนเสริม

รีเทิร์น

EditorFileScopeActionResponseBuilder — ออบเจ็กต์นี้สำหรับการเชื่อมโยง