Package com.google.api.services.gmail

Examples of com.google.api.services.gmail.Gmail


    private Gmail getGmailService(ApiKey apiKey) throws UpdateFailedException{
        HttpTransport httpTransport = new NetHttpTransport();
        JacksonFactory jsonFactory = new JacksonFactory();
        GoogleCredential credential = getCredentials(apiKey);
        return new Gmail(httpTransport, jsonFactory, credential);
    }
View Full Code Here


    long then = System.currentTimeMillis();
    String query = "(incremental sms log retrieval)";
    ObjectType smsObjectType = ObjectType.getObjectType(connector(), "sms");
    String smsFolderName = getSettingsOrPortLegacySettings(updateInfo.apiKey).smsFolderName;
    try {
            Gmail gmail = getGmailService(updateInfo.apiKey);
            String email = getEmailAddress(updateInfo.apiKey);

            BigInteger originalHistoryId = historyId;

            Label smsLabel = null;

            for (Label label : gmail.users().labels().list(email).execute().getLabels()){
                if (label.getName().equals(smsFolderName)){
                    smsLabel = label;
                }
            }
            if (smsLabel == null)
View Full Code Here

    String query = "(incremental call log retrieval)";
    ObjectType callLogObjectType = ObjectType.getObjectType(connector(),
        "call_log");
    String callLogFolderName = getSettingsOrPortLegacySettings(updateInfo.apiKey).callLogFolderName;
    try {
            Gmail gmail = getGmailService(updateInfo.apiKey);
            String email = getEmailAddress(updateInfo.apiKey);

            BigInteger originalHistoryId = historyId;

            Label callLogLabel = null;

            for (Label label : gmail.users().labels().list(email).execute().getLabels()){
                if (label.getName().equals(callLogFolderName)){
                    callLogLabel = label;
                }
            }
            if (callLogLabel == null)
View Full Code Here

TOP

Related Classes of com.google.api.services.gmail.Gmail

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.