简体   繁体   中英

Google-API Calendar Feed for Java

I'm currently using the new Google API 1.5 beta, and I can't find any examples for retrieving a calendar feed. The examples posted here only seem to provide a list of calendars per account and not their events. Is the old GData API the only way to retrieve a calendar feed right now? And if so, is it worth waiting for this feature to appear in the new API if I only want to retrieve an event feed?

Did some digging around in the other non-Android examples and found this to work:

CalendarUrl url = new CalendarUrl(calendar.getEventFeedLink());
try {
  EventFeed feed = client.eventFeed().list().execute(url);
  for(EventEntry entry : feed.getEntries()) {
    // etc....
  }
}
catch(IOException e) {
  e.printStackTrace();
}

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM