【发布时间】:2011-07-14 03:06:43
【问题描述】:
我正在尝试使用Google's .NET Calendar API retrieve 南非公共假期。
我有以下问题:
- 某些检索到的数据超出了指定的
EventQuery范围。 (在给定日期范围之前和之后) - 缺少一些日历条目。其中之一是圣诞节 2011-12-25
我通过查看online 验证了这个特定的公共日历的日期正确。
我的最佳猜测是我错误地使用了 API,并且我正在查询诸如日历条目的创建/更新日期而不是事件日期之类的内容。
代码:
var feedUrl = "http://www.google.com/calendar/feeds/en.sa%23holiday%40group.v.calendar.google.com/public/full";
var service = new CalendarService("My application name");
var qry = new EventQuery(feedUrl);
qry.StartDate = new DateTime(2011, 1, 1);
qry.EndDate = new DateTime(2012, 1, 1);
EventFeed results = service.Query(qry);
foreach (EventEntry entry in results.Entries)
{
if (entry.Times.Count == 0)
continue;
// Using entry.Times[0].StartTime results in
// missing data and data outside of the given search criteria.
}
我正在使用最新可用的Google .NET Data API 1.7.0.1
我做错了什么?
【问题讨论】:
标签: .net google-calendar-api gdata-api