所有現有日曆的集合。另請參閱日曆與 CalendarList 的比較。
如需本資源的方法清單,請見本頁結尾。
資源表示法
{
"kind": "calendar#calendar",
"etag": etag,
"id": string,
"summary": string,
"description": string,
"location": string,
"timeZone": string,
"dataOwner": string,
"conferenceProperties": {
"allowedConferenceSolutionTypes": [
string
]
},
"labelProperties": {
"eventLabels": [
{
"id": string,
"backgroundColor": string,
"name": string
}
]
},
"autoAcceptInvitations": boolean
}| 屬性名稱 | 值 | 說明 | 附註 |
|---|---|---|---|
autoAcceptInvitations |
boolean |
這個日曆是否會自動接受邀請。僅適用於資源日曆。 | |
conferenceProperties |
nested object |
這個日曆的會議屬性,例如允許的會議類型。 | |
conferenceProperties.allowedConferenceSolutionTypes[] |
list |
這個日曆支援的會議解決方案類型。 可能的值為:
|
|
dataOwner |
string |
日曆擁有者的電子郵件地址。僅適用於次要日曆。唯讀。 | |
description |
string |
日曆說明。選填。 | 可寫入 |
etag |
etag |
資源的 ETag。 | |
id |
string |
日曆的 ID。如要擷取 ID,請呼叫 calendarList.list() 方法。 | |
kind |
string |
資源類型 (「calendar#calendar」)。 |
|
labelProperties |
nested object |
這個日曆上定義的標籤屬性。如果指定,則會覆寫現有標籤屬性。如未指定,標籤屬性會維持不變。 | 可寫入 |
labelProperties.eventLabels[] |
list |
這個日曆上定義的活動標籤。如果更新日曆時提供這項資訊,系統會取代現有的活動標籤。 展開清單即可新增活動標籤,從清單中移除實體則可從日曆中刪除標籤。 每個日曆最多可有 200 個標籤。 |
可寫入 |
labelProperties.eventLabels[].backgroundColor |
string |
標籤的背景顏色,以十六進位格式表示,例如 "#039be5"。系統會以這個顏色顯示具有此標籤的活動。必填。 |
可寫入 |
labelProperties.eventLabels[].id |
string |
標籤的 ID。插入新標籤時為選用步驟。如未提供,系統會產生專屬 ID。更新標籤時必須提供, 如果提供 ID,該 ID 在日曆中不得重複,且必須採用 UUID 格式。 |
可寫入 |
labelProperties.eventLabels[].name |
string |
標籤名稱。選用。 如有提供,不得超過 50 個半形字元。 |
可寫入 |
location |
string |
日曆的地理位置,以自由格式文字表示。選填。 | 可寫入 |
summary |
string |
日曆的名稱。 | 可寫入 |
timeZone |
string |
日曆的時區。(格式為 IANA 時區資料庫名稱,例如「Europe/Zurich」)。選填。 | 可寫入 |
方法
- 更清楚
- 清除主要日曆。這項作業會刪除與帳戶主要日曆相關聯的所有活動。
- 刪除
- 刪除次要日曆。使用 calendars.clear 清除主要日曆中的所有活動。
- get
- 傳回日曆的中繼資料。
- 插入
- 建立次要日曆。
系統會將要求中經過驗證的使用者設為新日曆的資料擁有者。
- 修補程式
- 更新日曆的中繼資料。這個方法支援 patch 語意。請注意,每個修補程式要求會耗用三個配額單位,建議使用
get,然後再使用update。您指定的欄位值會取代現有值。要求中未指定的欄位會維持不變。如果指定陣列欄位,系統會覆寫現有陣列,並捨棄先前的陣列元素。 - transferOwnership
- 在 Google Workspace 機構內的使用者之間轉移次要日曆。使用者必須通過驗證,並具備「管理日曆」管理員權限,以及下列其中一個授權範圍:
https://www.googleapis.com/auth/calendarhttps://www.googleapis.com/auth/calendar.calendars
useAdminAccess設為true。次要日曆必須處於有效狀態才能轉移。系統不支援轉移已停用或刪除的日曆。 - 更新
- 更新日曆的中繼資料。