Class EditorFileScopeActionResponseBuilder

EditorFileScopeActionResponseBuilder

أداة إنشاء لكائنات EditorFileScopeActionResponse

الطُرق

الطريقةنوع القيمة التي تم إرجاعهاوصف قصير
build()EditorFileScopeActionResponseتنشئ استجابة إجراء "المحرّر" الحالية.
requestFileScopeForActiveDocument()EditorFileScopeActionResponseBuilderتطلب نطاق drive.file لمستند "المحرّر" النشط الحالي.

مستندات تفصيلية

build()

تنشئ استجابة إجراء "المحرّر" الحالية.

الإرجاع

EditorFileScopeActionResponseEditorFileScopeActionResponse تم التحقق منه


requestFileScopeForActiveDocument()

تطلب نطاق drive.file لمستند "المحرّر" النشط الحالي.

// 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 إلى ملف بيان الإضافة.

الإرجاع

EditorFileScopeActionResponseBuilder — هذا الكائن، من أجل الربط المتسلسل