Search in sources :

Example 1 with InstagramPhotoExporter

use of org.datatransferproject.transfer.instagram.photos.InstagramPhotoExporter in project data-transfer-project by google.

the class InstagramTransferExtension method initialize.

@Override
public void initialize(ExtensionContext context) {
    if (initialized) {
        Monitor monitor = context.getMonitor();
        monitor.severe(() -> "InstagramTransferExtension already initialized");
        return;
    }
    ObjectMapper mapper = new ObjectMapper().configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
    HttpTransport httpTransport = context.getService(HttpTransport.class);
    exporter = new InstagramPhotoExporter(mapper, httpTransport);
    initialized = true;
}
Also used : HttpTransport(com.google.api.client.http.HttpTransport) InstagramPhotoExporter(org.datatransferproject.transfer.instagram.photos.InstagramPhotoExporter) Monitor(org.datatransferproject.api.launcher.Monitor) ObjectMapper(com.fasterxml.jackson.databind.ObjectMapper)

Aggregations

ObjectMapper (com.fasterxml.jackson.databind.ObjectMapper)1 HttpTransport (com.google.api.client.http.HttpTransport)1 Monitor (org.datatransferproject.api.launcher.Monitor)1 InstagramPhotoExporter (org.datatransferproject.transfer.instagram.photos.InstagramPhotoExporter)1