Package com.google.api.services.calendar.model

Examples of com.google.api.services.calendar.model.CalendarList


      //System.exit(1);
    }

    private static void showCalendars() throws IOException {
      View.header("Show Calendars");
      CalendarList feed = client.calendarList().list().execute();
      View.display(feed);
    }
View Full Code Here


        List<CalendarConfig> configs = new ArrayList<CalendarConfig>();
        do {
            final long then = System.currentTimeMillis();
            final Calendar.CalendarList.List list = calendar.calendarList().list().setPageToken(pageToken);
            final String query = list.getUriTemplate();
            CalendarList calendarList = null;
            try {
                calendarList = list.execute();
                countSuccessfulApiCall(updateInfo.apiKey, updateInfo.objectTypes, then, query);
            } catch (IOException e) {
                countFailedApiCall(updateInfo.apiKey, updateInfo.objectTypes, then, query, ExceptionUtils.getStackTrace(e),
                                   list.getLastStatusCode(), list.getLastStatusMessage());
            }
            if (calendarList==null) throw new Exception("Could not get calendar list, apiKeyId=" + updateInfo.apiKey.getId());
            List<CalendarListEntry> items = calendarList.getItems();
            for (CalendarListEntry item : items) {
                existingCalendarIds.remove(item.getId());
                remoteCalendars.add(item);
                configs.add(entry2Config(item));
            }
            pageToken = calendarList.getNextPageToken();
        } while (pageToken != null);
        initChannelMapping(updateInfo.apiKey, configs);

        updateInfo.setContext(REMOTE_CALLENDARS_KEY, remoteCalendars);
View Full Code Here

    // authorize
    return new AuthorizationCodeInstalledApp(flow, new LocalServerReceiver()).authorize("user");
  }

  private String getCalendarId(final String name) throws IOException {
    final CalendarList feed = client.calendarList().list().execute();
    if (feed.getItems() != null) {
      for (final CalendarListEntry entry : feed.getItems()) {
        if (entry.getSummary().equals(name)) {
          return entry.getId();
        }
      }
    }
View Full Code Here

TOP

Related Classes of com.google.api.services.calendar.model.CalendarList

Copyright © 2018 www.massapicom. 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.