Class EditorFileScopeActionResponseBuilder
เอกสารประกอบโดยละเอียด
requestFileScopeForActiveDocument()
ขอขอบเขต drive.file
สําหรับเอกสาร Editor ที่ใช้งานอยู่ในปัจจุบัน
// 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
— ออบเจ็กต์นี้สําหรับการต่อเชื่อม
เนื้อหาของหน้าเว็บนี้ได้รับอนุญาตภายใต้ใบอนุญาตที่ต้องระบุที่มาของครีเอทีฟคอมมอนส์ 4.0 และตัวอย่างโค้ดได้รับอนุญาตภายใต้ใบอนุญาต Apache 2.0 เว้นแต่จะระบุไว้เป็นอย่างอื่น โปรดดูรายละเอียดที่นโยบายเว็บไซต์ Google Developers Java เป็นเครื่องหมายการค้าจดทะเบียนของ Oracle และ/หรือบริษัทในเครือ
อัปเดตล่าสุด 2024-12-21 UTC
[null,null,["อัปเดตล่าสุด 2024-12-21 UTC"],[[["`EditorFileScopeActionResponseBuilder` helps create responses for actions within Google Editors (Docs, Sheets, Slides)."],["It primarily offers two methods: `build()` to finalize the response and `requestFileScopeForActiveDocument()` to request necessary file access permissions."],["`requestFileScopeForActiveDocument()` specifically asks for 'drive.file' scope, enabling the add-on to interact with the user's current document."],["To use this functionality, you need to declare the 'drive.file' scope in your add-on's manifest file."]]],["The `EditorFileScopeActionResponseBuilder` creates `EditorFileScopeActionResponse` objects. It offers two methods: `build()`, which finalizes and validates the response, and `requestFileScopeForActiveDocument()`, which prompts the user for `drive.file` scope permission for the active document. Using `requestFileScopeForActiveDocument()` requires declaring the `drive.file` scope in the add-on's manifest. These methods facilitate the creation and management of actions related to file scope permissions within an editor.\n"]]