Calendar Service
透過集合功能整理內容
你可以依據偏好儲存及分類內容。
日曆
這項服務允許指令碼存取及修改使用者的 Google 日曆
這包括使用者訂閱的其他日曆。
類別
方法
方法 | 傳回類型 | 簡短說明 |
createAllDayEvent(title, date) | CalendarEvent | 建立新的全天活動。 |
createAllDayEvent(title, startDate, endDate) | CalendarEvent | 建立橫跨多天的新全天活動。 |
createAllDayEvent(title, startDate, endDate, options) | CalendarEvent | 建立橫跨多天的新全天活動。 |
createAllDayEvent(title, date, options) | CalendarEvent | 建立新的全天活動。 |
createAllDayEventSeries(title, startDate, recurrence) | CalendarEventSeries | 建立新的全天活動系列。 |
createAllDayEventSeries(title, startDate, recurrence, options) | CalendarEventSeries | 建立新的全天活動系列。 |
createEvent(title, startTime, endTime) | CalendarEvent | 建立新事件。 |
createEvent(title, startTime, endTime, options) | CalendarEvent | 建立新事件。 |
createEventFromDescription(description) | CalendarEvent | 使用任意形式的說明建立活動。 |
createEventSeries(title, startTime, endTime, recurrence) | CalendarEventSeries | 建立新的活動系列。 |
createEventSeries(title, startTime, endTime, recurrence, options) | CalendarEventSeries | 建立新的活動系列。 |
deleteCalendar() | void | 永久刪除日曆。 |
getColor() | String | 取得日曆的顏色。 |
getDescription() | String | 取得日曆的說明。 |
getEventById(iCalId) | CalendarEvent | 取得含有指定 ID 的事件。 |
getEventSeriesById(iCalId) | CalendarEventSeries | 使用指定 ID 取得事件系列。 |
getEvents(startTime, endTime) | CalendarEvent[] | 取得特定時間範圍內發生的所有事件。 |
getEvents(startTime, endTime, options) | CalendarEvent[] | 取得在指定時間範圍內發生且符合指定條件的所有事件。 |
getEventsForDay(date) | CalendarEvent[] | 取得在特定日期發生的所有事件。 |
getEventsForDay(date, options) | CalendarEvent[] | 取得特定日期發生的所有事件,且符合指定條件。 |
getId() | String | 取得日曆的 ID。 |
getName() | String | 取得日曆的名稱。 |
getTimeZone() | String | 取得日曆的時區。 |
isHidden() | Boolean | 指定是否要在使用者介面中隱藏日曆。 |
isMyPrimaryCalendar() | Boolean | 判斷這個日曆是否為有效使用者的主要日曆。 |
isOwnedByMe() | Boolean | 決定日曆的擁有者是否為你所有。 |
isSelected() | Boolean | 決定是否要在使用者介面中顯示日曆活動。 |
setColor(color) | Calendar | 設定日曆的顏色。 |
setDescription(description) | Calendar | 設定日曆的說明。 |
setHidden(hidden) | Calendar | 設定是否要在使用者介面中顯示日曆。 |
setName(name) | Calendar | 設定日曆的名稱。 |
setSelected(selected) | Calendar | 設定是否要在使用者介面中顯示日曆活動。 |
setTimeZone(timeZone) | Calendar | 設定日曆的時區。 |
unsubscribeFromCalendar() | void | 為使用者取消訂閱日曆。 |
方法
方法 | 傳回類型 | 簡短說明 |
createAllDayEvent(title, date) | CalendarEvent | 建立新的全天活動。 |
createAllDayEvent(title, startDate, endDate) | CalendarEvent | 建立橫跨多天的新全天活動。 |
createAllDayEvent(title, startDate, endDate, options) | CalendarEvent | 建立橫跨多天的新全天活動。 |
createAllDayEvent(title, date, options) | CalendarEvent | 建立新的全天活動。 |
createAllDayEventSeries(title, startDate, recurrence) | CalendarEventSeries | 建立新的全天活動系列。 |
createAllDayEventSeries(title, startDate, recurrence, options) | CalendarEventSeries | 建立新的全天活動系列。 |
createCalendar(name) | Calendar | 建立使用者擁有的新日曆。 |
createCalendar(name, options) | Calendar | 建立使用者擁有的新日曆。 |
createEvent(title, startTime, endTime) | CalendarEvent | 建立新事件。 |
createEvent(title, startTime, endTime, options) | CalendarEvent | 建立新事件。 |
createEventFromDescription(description) | CalendarEvent | 使用任意形式的說明建立活動。 |
createEventSeries(title, startTime, endTime, recurrence) | CalendarEventSeries | 建立新的活動系列。 |
createEventSeries(title, startTime, endTime, recurrence, options) | CalendarEventSeries | 建立新的活動系列。 |
getAllCalendars() | Calendar[] | 取得使用者擁有或訂閱的所有日曆。 |
getAllOwnedCalendars() | Calendar[] | 取得使用者擁有的所有日曆。 |
getCalendarById(id) | Calendar | 取得具有指定 ID 的日曆。 |
getCalendarsByName(name) | Calendar[] | 取得使用者擁有或訂閱的指定名稱的所有日曆。 |
getColor() | String | 取得日曆的顏色。 |
getDefaultCalendar() | Calendar | 取得使用者的預設日曆。 |
getDescription() | String | 取得日曆的說明。 |
getEventById(iCalId) | CalendarEvent | 取得含有指定 ID 的事件。 |
getEventSeriesById(iCalId) | CalendarEventSeries | 使用指定 ID 取得事件系列。 |
getEvents(startTime, endTime) | CalendarEvent[] | 取得特定時間範圍內發生的所有事件。 |
getEvents(startTime, endTime, options) | CalendarEvent[] | 取得在指定時間範圍內發生且符合指定條件的所有事件。 |
getEventsForDay(date) | CalendarEvent[] | 取得在特定日期發生的所有事件。 |
getEventsForDay(date, options) | CalendarEvent[] | 取得特定日期發生的所有事件,且符合指定條件。 |
getId() | String | 取得日曆的 ID。 |
getName() | String | 取得日曆的名稱。 |
getOwnedCalendarById(id) | Calendar | 取得含有指定 ID 的日曆 (如果使用者擁有該日曆)。 |
getOwnedCalendarsByName(name) | Calendar[] | 取得使用者擁有的指定名稱的所有日曆。 |
getTimeZone() | String | 取得日曆的時區。 |
isHidden() | Boolean | 指定是否要在使用者介面中隱藏日曆。 |
isMyPrimaryCalendar() | Boolean | 判斷這個日曆是否為有效使用者的主要日曆。 |
isOwnedByMe() | Boolean | 決定日曆的擁有者是否為你所有。 |
isSelected() | Boolean | 決定是否要在使用者介面中顯示日曆活動。 |
newRecurrence() | EventRecurrence | 建立新的重複活動物件,可用來建立活動重複規則。 |
setColor(color) | Calendar | 設定日曆的顏色。 |
setDescription(description) | Calendar | 設定日曆的說明。 |
setHidden(hidden) | Calendar | 設定是否要在使用者介面中顯示日曆。 |
setName(name) | Calendar | 設定日曆的名稱。 |
setSelected(selected) | Calendar | 設定是否要在使用者介面中顯示日曆活動。 |
setTimeZone(timeZone) | Calendar | 設定日曆的時區。 |
subscribeToCalendar(id) | Calendar | 在使用者可以訂閱的情況下,以指定 ID 為使用者訂閱日曆。 |
subscribeToCalendar(id, options) | Calendar | 在使用者可以訂閱的情況下,以指定 ID 為使用者訂閱日曆。 |
屬性
屬性 | 類型 | 說明 |
BLUE | Enum |
藍色 (#2952A3 )。 |
BROWN | Enum |
棕色 (#8D6F47 )。 |
CHARCOAL | Enum |
石墨黑 (#4E5D6C )。 |
CHESTNUT | Enum |
栗色 (#865A5A )。 |
GRAY | Enum |
灰色 (#5A6986 )。 |
GREEN | Enum |
綠色 (#0D7813 )。 |
INDIGO | Enum |
Indigo (#5229A3 )。 |
LIME | Enum |
萊姆 (#528800 )。 |
MUSTARD | Enum |
芥末 (#88880E )。 |
OLIVE | Enum |
橄欖綠 (#6E6E41 )。 |
ORANGE | Enum |
橘色 (#BE6D00 )。 |
PINK | Enum |
粉紅色 (#B1365F )。 |
PLUM | Enum |
梅紅色 (#705770 )。 |
PURPLE | Enum |
紫色 (#7A367A )。 |
RED | Enum |
紅色 (#A32929 )。 |
RED_ORANGE | Enum |
紅橘色 (#B1440E )。 |
SEA_BLUE | Enum |
海水藍 (#29527A ), |
SLATE | Enum |
插入畫面 (#4A716C )。 |
TEAL | Enum |
藍綠色 (#28754E )。 |
TURQOISE | Enum |
綠松石 (#1B887A )。 |
YELLOW | Enum |
黃色 (#AB8B00 )。 |
屬性
屬性 | 類型 | 說明 |
PALE_BLUE | Enum |
淡藍色 ("1" )。 |
PALE_GREEN | Enum |
淡綠色 ("2" )。 |
MAUVE | Enum |
Mauve ("3" )。 |
PALE_RED | Enum |
淡紅色 ("4" )。 |
YELLOW | Enum |
黃色 ("5" )。 |
ORANGE | Enum |
橘色 ("6" )。 |
CYAN | Enum |
青色 ("7" )。 |
GRAY | Enum |
灰色 ("8" )。 |
BLUE | Enum |
藍色 ("9" )。 |
GREEN | Enum |
綠色 ("10" )。 |
RED | Enum |
紅色 ("11" )。 |
屬性
屬性 | 類型 | 說明 |
DEFAULT | Enum | 此為一般活動。 |
BIRTHDAY | Enum | 本次活動是特別的全天活動,每年都會定期舉辦。 |
FOCUS_TIME | Enum | 這是專注時間活動。 |
FROM_GMAIL | Enum | 該活動是 Gmail 中的活動。 |
OUT_OF_OFFICE | Enum | 這項活動是「不在辦公室」活動。 |
WORKING_LOCATION | Enum | 這個活動是工作地點事件。 |
屬性
屬性 | 類型 | 說明 |
INVITED | Enum | 邀請對像已受邀,但未註明是否參加。 |
MAYBE | Enum | 邀請對象表示可能會參加。 |
NO | Enum | 邀請對象表示他們不參加。 |
OWNER | Enum | 邀請對像是活動的擁有者。 |
YES | Enum | 邀請對象表示會參加。 |
屬性
屬性 | 類型 | 說明 |
CONFIDENTIAL | Enum | 此為私人活動。 |
DEFAULT | Enum | 使用日曆上活動的預設顯示設定。 |
PRIVATE | Enum | 此為私人活動,只有活動與會者可以查看活動詳細資訊。 |
PUBLIC | Enum | 這是公開活動,日曆的所有讀者都能看到活動詳細資訊。 |
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2024-07-24 (世界標準時間)。
[{
"type": "thumb-down",
"id": "missingTheInformationINeed",
"label":"缺少我需要的資訊"
},{
"type": "thumb-down",
"id": "tooComplicatedTooManySteps",
"label":"過於複雜/步驟過多"
},{
"type": "thumb-down",
"id": "outOfDate",
"label":"過時"
},{
"type": "thumb-down",
"id": "translationIssue",
"label":"翻譯問題"
},{
"type": "thumb-down",
"id": "samplesCodeIssue",
"label":"示例/程式碼問題"
},{
"type": "thumb-down",
"id": "otherDown",
"label":"其他"
}]
[{
"type": "thumb-up",
"id": "easyToUnderstand",
"label":"容易理解"
},{
"type": "thumb-up",
"id": "solvedMyProblem",
"label":"確實解決了我的問題"
},{
"type": "thumb-up",
"id": "otherUp",
"label":"其他"
}]
{"lastModified": "\u4e0a\u6b21\u66f4\u65b0\u6642\u9593\uff1a2024-07-24 (\u4e16\u754c\u6a19\u6e96\u6642\u9593)\u3002"}
[[["容易理解","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"]],["上次更新時間:2024-07-24 (世界標準時間)。"]]