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();
הערה: כדי לקרוא ל-method הזה, צריך להוסיף את ההיקף drive.file
למניפסט של התוסף.
חזרה
EditorFileScopeActionResponseBuilder
– האובייקט הזה, לצורך קישור.
אלא אם צוין אחרת, התוכן של דף זה הוא ברישיון Creative Commons Attribution 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"]]