2011-10-02 6 views
1

내가 코드를 가지고 :Google 캘린더 API

// Create a CalenderService and authenticate 
CalendarService myService = new CalendarService("exampleCo-exampleApp-1"); 
myService.setUserCredentials("[email protected]", "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()); 
} 

이 코드는 모든 달력의 목록을 제공합니다. 나에게 - 상자 달력, 친구들의 생일 달력, 휴일 일정. 오늘 일어나는 모든 사건, 즉 내 노트, 친구들의 생일 및 휴일을 모두 받아야합니다. 나는 그것을 어떻게 할 수 있는가?

답변