views:

33

answers:

1

Hello again, I think the title says it all. I'm using

Reminder fifteenMinReminder = new Reminder();
fifteenMinReminder.Minutes = 15;
fifteenMinReminder.Method = Reminder.ReminderMethod.email;
entry.Reminders.Add(fifteenMinReminder);

on a brand new entry (where Reminder and Reminders are Nothing), but I cannot add a reminder using the above code (taken straight from the Google Docs), or set the entry.Reminder to fifteenMinReminder directly either.

What am I doing wrong? I've had no trouble .adding When and Where's to the entry, but the Reminder doesn't want to follow the same pattern.

Any ideas?

A: 

After comparing the PHP docs with the .NET docs, I finally found out that the Google .NET API docs are wrong. You need to add the Reminder to the EventEntry.Times property:

Dim eventTimes As New [When]()

// Add StartTime and EndTime etc'

Dim fifteenMinReminder As New Google.GData.Extensions.Reminder()
fifteenMinReminder.Minutes = 15
fifteenMinReminder.Method = Reminder.ReminderMethod.alert //.all doesn't work for me 
eventTimes.Reminders.Add(fifteenMinReminder)
entry.Times.Add(eventTimes)

Unfortunately, this only works for single events because recurring events do not have a Times property (well you can set one, but it doesn't have any effect) - which brings me to my next stackoverflow question...