use of org.datatransferproject.transfer.rememberthemilk.tasks.RememberTheMilkTasksImporter in project data-transfer-project by google.
the class RememberTheMilkTransferExtension method initialize.
@Override
public void initialize(ExtensionContext context) {
if (initialized)
return;
AppCredentials credentials;
try {
credentials = context.getService(AppCredentialStore.class).getAppCredentials(RTM_KEY, RTM_SECRET);
} catch (IOException e) {
Monitor monitor = context.getMonitor();
monitor.info(() -> format("Unable to retrieve RememberTheMilk AppCredentials. Did you set %s and %s?", RTM_KEY, RTM_SECRET), e);
return;
}
Monitor monitor = context.getMonitor();
exporter = new RememberTheMilkTasksExporter(credentials);
importer = new RememberTheMilkTasksImporter(credentials, monitor);
initialized = true;
}
Aggregations