Class HostAppDataSource
호스트앱데이터소스
다중 선택 메뉴를 사용하는 SelectionInput
위젯의 경우 Google Workspace 애플리케이션의 데이터 소스입니다. 데이터 소스는 다중 선택 메뉴의 선택 항목을 채웁니다.
const chatSpaceDataSource =
CardService.newChatSpaceDataSource().setDefaultToCurrentSpace(true);
const chatClientDataSource =
CardService.newChatClientDataSource().setSpaceDataSource(
chatSpaceDataSource);
const hostAppDataSource =
CardService.newHostAppDataSource().setChatDataSource(chatClientDataSource);
Google Chat 앱에서만 사용할 수 있습니다. Google Workspace 부가기능에는 사용할 수 없습니다.
자세한 문서
setChatDataSource(chatClientDataSource)
Google Chat에서 데이터 소스를 설정합니다.
const chatSpaceDataSource =
CardService.newChatSpaceDataSource().setDefaultToCurrentSpace(true);
const chatClientDataSource =
CardService.newChatClientDataSource().setSpaceDataSource(
chatSpaceDataSource);
const hostAppDataSource =
CardService.newHostAppDataSource().setChatDataSource(chatClientDataSource);
Google Chat 앱에서만 사용할 수 있습니다. Google Workspace 부가기능에는 사용할 수 없습니다.
매개변수
리턴
HostAppDataSource
: 연결을 위한 객체입니다.
달리 명시되지 않는 한 이 페이지의 콘텐츠에는 Creative Commons Attribution 4.0 라이선스에 따라 라이선스가 부여되며, 코드 샘플에는 Apache 2.0 라이선스에 따라 라이선스가 부여됩니다. 자세한 내용은 Google Developers 사이트 정책을 참조하세요. 자바는 Oracle 및/또는 Oracle 계열사의 등록 상표입니다.
최종 업데이트: 2025-01-30(UTC)
[null,null,["최종 업데이트: 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"]]