Class ChatClientDataSource
ChatClientDataSource
بالنسبة إلى تطبيق مصغّر SelectionInput
يستخدم قائمة اختيار متعدّد، يجب توفير مصدر بيانات من Google Chat.
يعبّئ مصدر البيانات عناصر الاختيار لقائمة الاختيار المتعدّد. على سبيل المثال، يمكن للمستخدم
اختيار مساحات Google Chat التي يكون عضوًا فيها.
const chatSpaceDataSource =
CardService.newChatSpaceDataSource().setDefaultToCurrentSpace(true);
const chatClientDataSource =
CardService.newChatClientDataSource().setSpaceDataSource(
chatSpaceDataSource);
لا تتوفّر هذه الميزة إلا لتطبيقات Google Chat. لا تتوفّر الإضافات في Google Workspace.
مستندات تفصيلية
setSpaceDataSource(spaceDataSource)
مصدر بيانات يعبّئ مساحات Google Chat كعناصر اختيار لقائمة اختيار متعدّد يتم فقط
ملء المساحات التي يكون المستخدم عضوًا فيها.
const chatSpaceDataSource =
CardService.newChatSpaceDataSource().setDefaultToCurrentSpace(true);
const chatClientDataSource =
CardService.newChatClientDataSource().setSpaceDataSource(
chatSpaceDataSource);
هذه الميزة متاحة فقط لتطبيقات Google Chat. لا تتوفّر الإضافات في Google Workspace.
المعلمات
الإرجاع
ChatClientDataSource
: هذا العنصر، لإنشاء سلسلة.
إنّ محتوى هذه الصفحة مرخّص بموجب ترخيص Creative Commons Attribution 4.0 ما لم يُنصّ على خلاف ذلك، ونماذج الرموز مرخّصة بموجب ترخيص Apache 2.0. للاطّلاع على التفاصيل، يُرجى مراجعة سياسات موقع Google Developers. إنّ Java هي علامة تجارية مسجَّلة لشركة Oracle و/أو شركائها التابعين.
تاريخ التعديل الأخير: 2025-01-30 (حسب التوقيت العالمي المتفَّق عليه)
[null,null,["تاريخ التعديل الأخير: 2025-01-30 (حسب التوقيت العالمي المتفَّق عليه)"],[[["`ChatClientDataSource` is used for multiselect menus in Google Chat apps, allowing users to select items like Google Chat spaces they are members of."],["This data source relies on a `ChatSpaceDataSource` to populate the selectable spaces in the menu."],["It is exclusively available for Google Chat apps and cannot be utilized in Google Workspace Add-ons."],["The `setSpaceDataSource` method configures the data source for populating Google Chat spaces in the selection menu, limited to spaces where the user is a member."]]],["`ChatClientDataSource` is a data source for multiselect menus in Google Chat apps. It populates selection items with Google Chat spaces a user belongs to. The `setSpaceDataSource` method configures this behavior, taking a `ChatSpaceDataSource` as input. Using `CardService.newChatClientDataSource()` allows the setting up the data source and `CardService.newChatSpaceDataSource().setDefaultToCurrentSpace(true)` allows the default current space. The data is only available for Google Chat apps, not Google Workspace add-ons.\n"]]