Events: get

根據 Google 日曆 ID 傳回活動。如要使用 iCalendar ID 擷取活動,請使用 iCalUID 參數呼叫 events.list 方法。立即試用。

要求

HTTP 要求

GET https://www.googleapis.com/calendar/v3/calendars/calendarId/events/eventId

參數

參數名稱 值 說明
路徑參數
calendarId string 日曆 ID。如要擷取日曆 ID,請呼叫 calendarList.list 方法。如要存取目前登入使用者的主日曆,請使用「primary」關鍵字。
eventId string 事件 ID。
選用查詢參數
alwaysIncludeEmail boolean 已淘汰且遭到忽略。即使沒有可用的真實電子郵件地址,系統仍會一律在 email 欄位中傳回值 (也就是提供產生的無效值),以供發起人、創作者和出席者使用。
maxAttendees integer 回應中可納入的出席者人數上限。如果出席者人數超過指定數量,系統只會傳回參與者。選用。
timeZone string 回應中使用的時區。(非必要) 預設為日曆的時區。

授權

這項要求允許使用下列其中一個範圍進行授權:

範圍
https://www.googleapis.com/auth/calendar.readonly
https://www.googleapis.com/auth/calendar
https://www.googleapis.com/auth/calendar.events.readonly
https://www.googleapis.com/auth/calendar.events
https://www.googleapis.com/auth/calendar.app.created
https://www.googleapis.com/auth/calendar.events.freebusy
https://www.googleapis.com/auth/calendar.events.owned
https://www.googleapis.com/auth/calendar.events.owned.readonly
https://www.googleapis.com/auth/calendar.events.public.readonly

詳情請參閱「驗證與授權」頁面。

要求主體

請勿透過此方法提供要求主體。

回應

如果成功的話,這個方法會在回應內文中傳回 Events 資源。

試試看!

您可以使用下方的 API Explorer,針對即時資料呼叫這個方法,然後查看回應。