Class ChatClientDataSource
ChatClientDatenQuelle
Für ein SelectionInput
-Widget mit einem Mehrfachauswahlmenü eine Datenquelle aus Google Chat.
Die Datenquelle füllt die Auswahlelemente für das Mehrfachauswahlmenü. Ein Nutzer kann beispielsweise Google Chat-Gruppenbereiche auswählen, in denen er Mitglied ist.
const chatSpaceDataSource =
CardService.newChatSpaceDataSource().setDefaultToCurrentSpace(true);
const chatClientDataSource =
CardService.newChatClientDataSource().setSpaceDataSource(
chatSpaceDataSource);
Nur für Google Chat-Apps verfügbar. Nicht verfügbar für Google Workspace-Add-ons.
Detaillierte Dokumentation
setSpaceDataSource(spaceDataSource)
Eine Datenquelle, die Google Chat-Gruppenbereiche als Auswahlelemente für ein Mehrfachauswahlmenü enthält. Es werden nur Gruppenbereiche angezeigt, in denen der Nutzer Mitglied ist.
const chatSpaceDataSource =
CardService.newChatSpaceDataSource().setDefaultToCurrentSpace(true);
const chatClientDataSource =
CardService.newChatClientDataSource().setSpaceDataSource(
chatSpaceDataSource);
Nur für Google Chat-Apps verfügbar. Nicht verfügbar für Google Workspace-Add-ons.
Parameter
Name | Typ | Beschreibung |
spaceDataSource | ChatSpaceDataSource | Die Datenquelle, die festgelegt werden soll. |
Rückflug
ChatClientDataSource
– Dieses Objekt für die Verkettung.
Sofern nicht anders angegeben, sind die Inhalte dieser Seite unter der Creative Commons Attribution 4.0 License und Codebeispiele unter der Apache 2.0 License lizenziert. Weitere Informationen finden Sie in den Websiterichtlinien von Google Developers. Java ist eine eingetragene Marke von Oracle und/oder seinen Partnern.
Zuletzt aktualisiert: 2025-01-30 (UTC).
[null,null,["Zuletzt aktualisiert: 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"]]