Package com.google.gdata.client.calendar

Examples of com.google.gdata.client.calendar.CalendarService.query()


      URL calUrl = new URL ( CALENDAR_FEED_URL );

      // Get Number of calendars 
      Query calQuery = new Query(calUrl);
      calQuery.setMaxResults(1);    
      CalendarFeed calFeed = calService.query(calQuery, CalendarFeed.class);
      if (calFeed.getTotalResults() == 0) {
        System.out.println("No Calendars");
      } else {
        // Set Number of calendars for query
        calQuery.setMaxResults(calFeed.getTotalResults());
View Full Code Here


      if (calFeed.getTotalResults() == 0) {
        System.out.println("No Calendars");
      } else {
        // Set Number of calendars for query
        calQuery.setMaxResults(calFeed.getTotalResults());
        calFeed = calService.query(calQuery, CalendarFeed.class)
      }
     
      // Search calendar
      System.out.println("Calendar to use for birthdays");
      for (CalendarEntry entry : calFeed.getEntries()) {
View Full Code Here

          // Insert the calendar
        calService.insert(calUrl, calEntry);
        System.out.println("\tCreated: " + calEntry.getTitle().getPlainText());
        //Thread.sleep(5000);
        calQuery.setMaxResults(calFeed.getTotalResults()+1);
        calFeed = calService.query(calQuery, CalendarFeed.class)
        for (CalendarEntry entry : calFeed.getEntries()) {
          if ( entry.getTitle().getPlainText().equals( CALENDAR_NAME ) ) {
            calEntry = entry;
          }
        }
View Full Code Here

      URL eventUrl = new URL ( calEntry.getLink(Link.Rel.ALTERNATE, Link.Type.ATOM).getHref() );
     
      // Get Number of events 
      Query eventQuery = new Query(eventUrl);
      eventQuery.setMaxResults(1);    
      CalendarEventFeed eventFeed = calService.query(eventQuery, CalendarEventFeed.class)
      if (eventFeed.getTotalResults() == 0) {
        System.out.println("No Events");
      } else {
        // Set Number of events for query
        eventQuery.setMaxResults(eventFeed.getTotalResults());
View Full Code Here

      if (eventFeed.getTotalResults() == 0) {
        System.out.println("No Events");
      } else {
        // Set Number of events for query
        eventQuery.setMaxResults(eventFeed.getTotalResults());
        eventFeed = calService.query(eventQuery, CalendarEventFeed.class);       
      }

      Boolean exists = false;
      Boolean update = false;
      Integer batchid = 0;
View Full Code Here

            service.setUserCredentials(username, password);

            CalendarQuery calendarQuery = new CalendarQuery(
                new URL(
                    "https://www.google.com/calendar/feeds/default/owncalendars/full"));
            CalendarFeed calendarFeed = service.query(
                calendarQuery, CalendarFeed.class);
            for (CalendarEntry curCalendar : calendarFeed
                .getEntries()) {
              if (curCalendar.getId().endsWith(
                  calendarId.replaceAll("@", "%40"))
View Full Code Here

          cal.add(Calendar.MONTH, -2);
          myQuery.setMaxResults(100);
          myQuery.setIntegerCustomParameter("max-results", 100);

          // Send the request and receive the response:
          CalendarEventFeed resultFeed = service.query(myQuery,
              CalendarEventFeed.class);

          for (CalendarEventEntry eventEntry : resultFeed
              .getEntries()) {
            for (When curTime : eventEntry.getTimes()) {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.