[英]google calendar api not returning recurring events
我正在嘗試根據日期范圍從我的 Google 日歷中提取事件列表,其中大部分是重復事件。 以下代碼返回在日期范圍內輸入的事件,但不返回在該日期范圍內發生的重復事件。 知道我做錯了什么嗎?
EventQuery eventQuery = new EventQuery(calendarUri);
eventQuery.SingleEvents = true;
eventQuery.StartDate = startDate;
eventQuery.EndDate = endDate;
EventFeed resultsFeed = calendarService.Query(eventQuery);
請注意,查詢僅返回 25 個條目 + NextChunk 是否還有更多。 您需要在 NextChunk 上再次查詢。
EventFeed calFeed = service.Query(query) as EventFeed;
// now populate the calendar
while (calFeed != null && calFeed.Entries.Count > 0)
{
// look for the one with dinner time...
foreach (EventEntry entry in calFeed.Entries)
{
this.entryList.Add(entry);
if (entry.Times.Count > 0)
{
foreach (When w in entry.Times)
{
dates.Add(w.StartTime);
}
}
}
// just query the same query again.
if (calFeed.NextChunk != null)
{
query.Uri = new Uri(calFeed.NextChunk);
calFeed = service.Query(query) as EventFeed;
}
else
calFeed = null;
}
進一步:何時包含有關重復事件的條目數。 需要尋找合適的。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.