首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Google Calendar API

Google Calendar API
EN

Stack Overflow用户
提问于 2011-10-02 18:03:54
回答 1查看 528关注 0票数 1

我有代码:

代码语言:javascript
复制
// Create a CalenderService and authenticate
CalendarService myService = new CalendarService("exampleCo-exampleApp-1");
myService.setUserCredentials("j...@gmail.com", "mypassword");

// Send the request and print the response
URL feedUrl = new URL("https://www.google.com/calendar/feeds/default/allcalendars/full");
CalendarFeed resultFeed = myService.getFeed(feedUrl, CalendarFeed.class);
System.out.println("Your calendars:");
System.out.println();
for (int i = 0; i < resultFeed.getEntries().size(); i++) {
CalendarEntry entry = resultFeed.getEntries().get(i);
System.out.println("\t" + entry.getTitle().getPlainText());
}

这段代码给出了所有日历的列表。在我这里-一个盒子日历,一个朋友的生日日历和一个假日日历。我需要接收今天发生的所有事件--即我的笔记、朋友的生日和节假日。我怎么能做到这一点呢?

EN

回答 1

Stack Overflow用户

发布于 2011-10-02 18:52:19

需要执行从该天开始到结束的日期范围查询。看见

http://code.google.com/apis/calendar/data/2.0/developers_guide_java.html#RetrievingDateRange

(我不是100%确定,但我认为使用url https://www.google.com/calendar/feeds/default/allcalendars/full应该可以得到所有日历的结果)

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/7625723

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档