import{createClientWithUserCredentials}from'./authentication-utils.js';// Replace SCOPE_NAME here with an authorization scope based on the event typeconstUSER_AUTH_OAUTH_SCOPES=['SCOPE_NAME'];// This sample shows how to get space event with user credentialasyncfunctionmain(){// Create a clientconstchatClient=awaitcreateClientWithUserCredentials(USER_AUTH_OAUTH_SCOPES);// Initialize request argument(s)constrequest={// Replace SPACE_NAME and SPACE_EVENT_NAME herename:'spaces/SPACE_NAME/spaceEvents/SPACE_EVENT_NAME'};// Make the requestconstresponse=awaitchatClient.getSpaceEvent(request);// Handle the responseconsole.log(response);}main().catch(console.error);
[[["容易理解","easyToUnderstand","thumb-up"],["確實解決了我的問題","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["缺少我需要的資訊","missingTheInformationINeed","thumb-down"],["過於複雜/步驟過多","tooComplicatedTooManySteps","thumb-down"],["過時","outOfDate","thumb-down"],["翻譯問題","translationIssue","thumb-down"],["示例/程式碼問題","samplesCodeIssue","thumb-down"],["其他","otherDown","thumb-down"]],["上次更新時間:2025-02-14 (世界標準時間)。"],[[["This guide explains how to retrieve details about specific events within a Google Chat space using the `get()` method of the Google Chat API."],["The `SpaceEvent` resource tracks changes in a space, and this guide details how to access information about these events."],["To use this functionality, you need a Google Workspace account, appropriate authorization, and a configured Google Cloud project."],["You must provide the correct authorization scope, space name, and space event name to successfully retrieve the event details."],["The API returns a `SpaceEvent` object containing comprehensive information about the requested event."]]],["The guide details how to retrieve space event information using the `get()` method on the Google Chat API's `SpaceEvent` resource. This method requires user authentication, and the user must be a space member. To use `get()`, provide an authorization scope and the event's name within a request. The API returns the latest `SpaceEvent` data, up to 28 days old, reflecting any changes to the space or its resources. It requires Node.js, a Google Workspace account, and proper API configuration.\n"]]