我一直在尝试使用事件更新日历,但似乎没有通过。你能评论一下我是否正确地格式化了我的活动吗?我已经为此苦苦挣扎了一段时间。
private void InsertEventIntoCalendar()
{
List<EventAttendee> ef = new List<EventAttendee>();
ef.Add(new EventAttendee{ Email = "event@gmail.com"});
List<EventReminder> eventReminder = new List<EventReminder>();
eventReminder.Add(new EventReminder{ Minutes = 4, Method = "email"});
Event.RemindersData de = new Event.RemindersData();
de.Overrides = eventReminder;
Event newEvent = new Event
{
Attendees = ef,
Reminders = de,
Summary = "Tin Roof",
Description = "Its gonna be epic",
Location = "Claremont",
Start = new EventDateTime
{
Date = "2012-09-30",
DateTime = "2012-09-30T10:00:00.000-02:00",
TimeZone = "Cape Town"
},
End = new EventDateTime
{
Date = "2012-09-30",
DateTime = new DateTime( "2012-09-30T10:25:00.000-02:00",
TimeZone = "Cape Town"
},
};
_service.Events.Insert(newEvent, "event@gmail.com").Fetch();
}