Note that there are some explanatory texts on larger screens.

plurals
  1. POExtracting events from Google Calendar
    primarykey
    data
    text
    <p>Today I created code:</p> <pre><code>// 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 &lt; resultFeed.getEntries().size(); i++) { CalendarEntry entry = resultFeed.getEntries().get(i); System.out.println("\t" + entry.getTitle().getPlainText()); } </code></pre> <p>This code gives out the list of all calendars. At me - a box calendar, a calendar of birthdays of friends and a calendar of holidays. I need to receive all events occurring today - i.e. both my notes, and birthdays of friends, and holidays. How I am able to do it?</p> <p>This code returns event for specified data range, but it is work for private calendar only; i tried to replace "private" for "allcalendars", but it doesn't work:</p> <pre><code>URL feedUrl = new URL("https://www.google.com/calendar/feeds/default/private/full"); CalendarQuery myQuery = new CalendarQuery(feedUrl); myQuery.setMinimumStartTime(DateTime.parseDateTime("2006-03-16T00:00:00")); myQuery.setMaximumStartTime(DateTime.parseDateTime("2006-03-24T23:59:59")); CalendarService myService = new CalendarService("exampleCo-exampleApp-1"); myService.setUserCredentials("jo@gmail.com", "mypassword"); // Send the request and receive the response: CalendarEventFeed resultFeed = myService.query(myQuery, Feed.class); </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload