Class HostAppDataSource
BarındırıcıUygulamaVeriKaynağı
Çoklu seçim menüsü kullanan bir SelectionInput
widget için Google Workspace uygulamasından bir veri kaynağı. Veri kaynağı, çoklu seçim menüsü için seçim öğelerini doldurur.
const chatSpaceDataSource =
CardService.newChatSpaceDataSource().setDefaultToCurrentSpace(true);
const chatClientDataSource =
CardService.newChatClientDataSource().setSpaceDataSource(
chatSpaceDataSource);
const hostAppDataSource =
CardService.newHostAppDataSource().setChatDataSource(chatClientDataSource);
Yalnızca Google Chat uygulamaları için kullanılabilir. Google Workspace eklentilerinde kullanılamaz.
Ayrıntılı dokümanlar
setChatDataSource(chatClientDataSource)
Google Chat'teki veri kaynağını ayarlar.
const chatSpaceDataSource =
CardService.newChatSpaceDataSource().setDefaultToCurrentSpace(true);
const chatClientDataSource =
CardService.newChatClientDataSource().setSpaceDataSource(
chatSpaceDataSource);
const hostAppDataSource =
CardService.newHostAppDataSource().setChatDataSource(chatClientDataSource);
Yalnızca Google Chat uygulamaları için kullanılabilir. Google Workspace eklentilerinde kullanılamaz.
Parametreler
Return
HostAppDataSource
: Zincirleme için bu nesne.
Aksi belirtilmediği sürece bu sayfanın içeriği Creative Commons Atıf 4.0 Lisansı altında ve kod örnekleri Apache 2.0 Lisansı altında lisanslanmıştır. Ayrıntılı bilgi için Google Developers Site Politikaları'na göz atın. Java, Oracle ve/veya satış ortaklarının tescilli ticari markasıdır.
Son güncelleme tarihi: 2025-01-30 UTC.
[null,null,["Son güncelleme tarihi: 2025-01-30 UTC."],[[["`HostAppDataSource` is used for populating selection items in a multiselect menu within a Google Chat app."],["It leverages a data source from Google Chat, configured using `ChatClientDataSource` and `ChatSpaceDataSource`."],["This functionality is exclusive to Google Chat apps and is not available for Google Workspace Add-ons."],["The key method is `setChatDataSource()`, used for setting the Google Chat data source."]]],["`HostAppDataSource` provides a data source for multiselect menus in Google Chat apps, using `SelectionInput`. It's created via `CardService.newHostAppDataSource()`. `setChatDataSource()` is used to specify the data source, which must be a `ChatClientDataSource`. In turn, `ChatClientDataSource` is configured with a `ChatSpaceDataSource`. Only available for Chat apps, it sets the data source for populating selection items within the menu, and returns the current `HostAppDataSource` object.\n"]]