Package com.google.api.services.calendar

Examples of com.google.api.services.calendar.Calendar


        bodyTrackHelper.setDefaultStyle(apiKey.getGuestId(), "google_calendar", "events", channelStyle);
    }

    private void loadHistory(UpdateInfo updateInfo, boolean incremental) throws Exception {
        Calendar calendar = getCalendar(updateInfo.apiKey);
        String pageToken = null;
        long apiKeyId = updateInfo.apiKey.getId();
        settingsService.getConnectorSettings(updateInfo.apiKey.getId());
        List<String> existingCalendarIds = getExistingCalendarIds(apiKeyId);
        List<CalendarListEntry> remoteCalendars = new ArrayList<CalendarListEntry>();
        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);
View Full Code Here


                        " connector=" + apiKey.getConnector().getName() + " guestId=" + apiKey.getGuestId() + " status=permanently failed");
            // Notify the user that the tokens need to be manually renewed
            throw new UpdateFailedException("refresh token attempt failed", e, true, ApiKey.PermanentFailReason.NEEDS_REAUTH);
        }
        final Calendar.Builder calendarBuilder = new Calendar.Builder(httpTransport, jsonFactory, credential);
        final Calendar calendar = calendarBuilder.build();
        return calendar;
    }
View Full Code Here

TOP

Related Classes of com.google.api.services.calendar.Calendar

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.