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 (שעון UTC).
[null,null,["עדכון אחרון: 2025-01-30 (שעון UTC)."],[[["`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"]]