开发者

Google-API Calendar Feed for Java

开发者 https://www.devze.com 2023-04-10 07:55 出处:网络
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 t

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 wor开发者_JAVA技巧th 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();
}
0

精彩评论

暂无评论...
验证码 换一张
取 消