Class EditorFileScopeActionResponseBuilder
Documentación detallada
requestFileScopeForActiveDocument()
Solicita el alcance de drive.file
para el documento activo actual del 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();
Nota: Para llamar a este método, debes agregar el permiso drive.file
al manifiesto del complemento.
Volver
EditorFileScopeActionResponseBuilder
: Este objeto, para encadenar.
Salvo que se indique lo contrario, el contenido de esta página está sujeto a la licencia Atribución 4.0 de Creative Commons, y los ejemplos de código están sujetos a la licencia Apache 2.0. Para obtener más información, consulta las políticas del sitio de Google Developers. Java es una marca registrada de Oracle o sus afiliados.
Última actualización: 2024-12-21 (UTC)
[null,null,["Última actualización: 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"]]