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.
AddOnsResponseService.newEditorFileScopeActionResponseBuilder()
    .requestFileScopeForActiveDocument()
    .build();

ملاحظة: لاستدعاء هذه الطريقة، يجب إضافة النطاق drive.file إلى ملف بيان الإضافة.

الإرجاع

EditorFileScopeActionResponseBuilder: هذا الكائن، للتسلسل