I'm using the Java API to iterate over my calendar events.  Everything
was going swimmingly until I tried to access the reminders.  I'm
getting a reminder for each event that has one, but any method I call
on the reminder returns null.  The code is pretty much straight from
the dev guide and the events do have reminders on them.  I'm using
gdata 1.31.1 on a mac.  Here's the code:

                URL feedUrl = new 
URL("http://www.google.com/calendar/feeds/default/
private/full");

                // get future cal events

                CalendarQuery myQuery = new CalendarQuery(feedUrl);
                myQuery.setMinimumStartTime(DateTime.now());
                // TODO max time should be out as far as the maximum reminder (4
weeks)
                myQuery.setMaximumStartTime(DateTime.parseDateTime
("2010-03-24T23:59:59"));

                // Send the request and receive the response:
                CalendarEventFeed resultFeed = service.query(myQuery,
CalendarEventFeed.class);

                for (int i = 0; i < resultFeed.getEntries().size(); i++) {
                          CalendarEventEntry entry = 
resultFeed.getEntries().get(i);

                          System.out.println(entry.getTitle().getPlainText() + 
", id is " +
entry.getIcalUID());

                          for (Reminder reminder : entry.getReminder()) {
                                  System.out.println("reminder is " + 
reminder.getAbsoluteTime());
                          }

                          for (When when : entry.getTimes()) {
                                  System.out.println("when is start is " + 
when.getStartTime() +
                                                  ", end is " + 
when.getEndTime());
                          }
                }

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Calendar Data API" group.
To post to this group, send email to 
[email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/google-calendar-help-dataapi?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to