我使用 Google Calendar API 编写我的应用程序。一切正常,但是当我尝试将重复的事件上传到 Google 时,出现错误。我不知道,有什么不好的。
代码:
EventEntry newEvent = new EventEntry();
newEvent.Title.Text = "Event title";
When time = new When(new DateTime(2013, 02, 12, 15, 0, 0), new DateTime(2013, 02, 12, 17, 0, 0));
newEvent.Times.Add(time);
Where place = new Where();
place.ValueString = "World";
newEvent.Recurrence = new Recurrence();
newEvent.Recurrence.Value = "DTSTART;VALUE=DATE:20130212T15000\r\n" +
"DTEND;VALUE=DATE:20130212T17000\r\n" +
"RRULE:FREQ=DAILY;BYDAY=Tu;\r\n";
service.Insert(query.Uri, newEvent);
在这种情况下,事件应该在星期二每周重复一次。当我运行它时,我有错误:“请求执行失败” - 但是当我评论 newEvent.Recurrence.Value... 时,一切正常,事件在谷歌日历中但没有重复:(
帮助!