0
A
回答
2
的getEvents()
的options
參數沒有提供方法來搜索事件的客人名單。
這是一個函數,它將返回一個事件列表,該列表僅包含在來賓列表中包含指定電子郵件地址的事件。該功能也是available as a gist。
/**
* Gets all events that occur within a given time range,
* and that include the specified guest email in the
* guest list.
*
* @param {Calendar} calen Calendar to search
* @param {Date} start the start of the time range
* @param {Date} end the end of the time range, non-inclusive
* @param {String} guestEmail Guest email address to search for
*
* @return {CalendarEvent[]} the matching events
*/
function getEventsWithGuest(calen,start,end,guestEmail) {
var events = calen.getEvents(start, end);
var i = events.length;
while (i--) {
if (!events[i].getGuestByEmail(guestEmail)) {
events.splice(i, 1);
}
}
return events;
}
// Test function
function test_getEventsWithGuest() {
var calen = CalendarApp.getDefaultCalendar();
var now = new Date();
// then... four weeks from now
var then = new Date(now.getTime() + (4 * 7 * 24 * 60 * 60 * 1000));
var events = getEventsWithGuest(calen,now,then,'[email protected]');
Logger.log('Number of events: ' + events.length);
}
相關問題
- 1. 檢索基於日期
- 2. 如何基於時間範圍創建新的日曆活動?
- 3. 檢索Salesforce接觸活動歷史
- 4. Tapku日曆活動
- 5. Symfony活動日曆
- 6. 如何通過Google Calendar API檢索相關日曆活動?
- 7. 如何檢索當天的日曆活動?
- 8. 關於日曆和日曆活動的問題
- 9. 啓動日曆活動
- 10. 檢索基於當前日期
- 11. 檢索基於月日在MySQL
- 12. 檢索基於數據的日期mongodb
- 13. 基於日期檢索記錄
- 14. 檢索日曆條目TimeZone
- 15. 檢索log4j的活動日誌級別
- 16. 創建活動日曆
- 17. Google日曆活動創建
- 18. 日曆單擊新活動
- 19. 嵌入Google日曆活動
- 20. 獲取Facebook日曆活動
- 21. PHP日曆多天活動
- 22. Appcelerator鈦活動日曆
- 23. 基於可用日期的日曆
- 24. 檢索基於ID
- 25. Google日曆:獲取活動日期?
- 26. 如何檢索Google日曆中最近更新的所有活動?
- 27. 基於檢索日期的遞增日期
- 28. Google日曆PHP從多個日曆中檢索事件
- 29. 想要添加活動日曆到Android日曆
- 30. Google日曆 - 從特定日曆中獲取活動