Class ChatClientDataSource
ChatClientDataSource
Untuk widget SelectionInput
yang menggunakan menu multi-pilihan, sumber data dari Google Chat.
Sumber data mengisi item pilihan untuk menu multi-pilihan. Misalnya, pengguna dapat
memilih ruang Google Chat tempat mereka menjadi anggota.
const chatSpaceDataSource =
CardService.newChatSpaceDataSource().setDefaultToCurrentSpace(true);
const chatClientDataSource =
CardService.newChatClientDataSource().setSpaceDataSource(
chatSpaceDataSource);
Hanya tersedia untuk aplikasi Google Chat. Tidak tersedia untuk add-on Google Workspace.
Dokumentasi mendetail
setSpaceDataSource(spaceDataSource)
Sumber data yang mengisi ruang Google Chat sebagai item pilihan untuk menu multipilih. Hanya mengisi ruang yang menjadi anggota pengguna.
const chatSpaceDataSource =
CardService.newChatSpaceDataSource().setDefaultToCurrentSpace(true);
const chatClientDataSource =
CardService.newChatClientDataSource().setSpaceDataSource(
chatSpaceDataSource);
Hanya tersedia untuk aplikasi Google Chat. Tidak tersedia untuk add-on Google Workspace.
Parameter
Pulang pergi
ChatClientDataSource
— Objek ini, untuk pembuatan rantai.
Kecuali dinyatakan lain, konten di halaman ini dilisensikan berdasarkan Lisensi Creative Commons Attribution 4.0, sedangkan contoh kode dilisensikan berdasarkan Lisensi Apache 2.0. Untuk mengetahui informasi selengkapnya, lihat Kebijakan Situs Google Developers. Java adalah merek dagang terdaftar dari Oracle dan/atau afiliasinya.
Terakhir diperbarui pada 2025-01-30 UTC.
[null,null,["Terakhir diperbarui pada 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"]]