Class EditorFileScopeActionResponseBuilder

  • EditorFileScopeActionResponseBuilder is used to build EditorFileScopeActionResponse objects.

  • The build() method constructs the EditorFileScopeActionResponse.

  • The requestFileScopeForActiveDocument() method requests the drive.file scope for the active Editor document.

  • Requesting the drive.file scope requires adding it to the add-on's manifest.

EditorFileScopeActionResponseBuilder

A builder for EditorFileScopeActionResponse objects.

Methods

MethodReturn typeBrief description
build() EditorFileScopeActionResponse Builds the current Editor action response.
requestFileScopeForActiveDocument() EditorFileScopeActionResponseBuilder Requests the drive.file scope for the current active Editor document.

Detailed documentation

build()

Builds the current Editor action response.

Return

EditorFileScopeActionResponse — A validated EditorFileScopeActionResponse .


requestFileScopeForActiveDocument()

Requests the drive.file scope for the current active Editor document.

// 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();

Note: To call this method, you must add the drive.file scope to the add-on's manifest.

Return

EditorFileScopeActionResponseBuilder — This object, for chaining.

Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2024年12月02日 UTC.