Class EditorFileScopeActionResponseBuilder
Documentação detalhada
requestFileScopeForActiveDocument()
Solicita o escopo drive.file
para o documento do editor ativo atual.
// 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();
Observação: para chamar esse método, adicione o escopo drive.file
ao manifesto
do complemento.
Retornar
EditorFileScopeActionResponseBuilder
: este objeto, para encadeamento.
Exceto em caso de indicação contrária, o conteúdo desta página é licenciado de acordo com a Licença de atribuição 4.0 do Creative Commons, e as amostras de código são licenciadas de acordo com a Licença Apache 2.0. Para mais detalhes, consulte as políticas do site do Google Developers. Java é uma marca registrada da Oracle e/ou afiliadas.
Última atualização 2024-12-21 UTC.
[null,null,["Última atualização 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"]]