Search in sources :

Example 1 with CookiesAndUrlAuthData

use of org.datatransferproject.types.transfer.auth.CookiesAndUrlAuthData in project data-transfer-project by google.

the class ManualTest method main.

public static void main(String[] args) throws Exception {
    MastodonActivityExport exporter = new MastodonActivityExport();
    UUID jobId = UUID.randomUUID();
    CookiesAndUrlAuthData authData = new CookiesAndUrlAuthData(ImmutableList.of(ACCESS_TOKEN), HOST_URL);
    ExportResult<SocialActivityContainerResource> result = exporter.export(jobId, authData, Optional.empty());
    MastodonActivityImport mastodonActivityImport = new MastodonActivityImport();
    mastodonActivityImport.importItem(jobId, EXECUTOR, authData, result.getExportedData());
}
Also used : MastodonActivityImport(org.datatransferproject.transfer.mastodon.social.MastodonActivityImport) CookiesAndUrlAuthData(org.datatransferproject.types.transfer.auth.CookiesAndUrlAuthData) SocialActivityContainerResource(org.datatransferproject.types.common.models.social.SocialActivityContainerResource) MastodonActivityExport(org.datatransferproject.transfer.mastodon.social.MastodonActivityExport) UUID(java.util.UUID)

Aggregations

UUID (java.util.UUID)1 MastodonActivityExport (org.datatransferproject.transfer.mastodon.social.MastodonActivityExport)1 MastodonActivityImport (org.datatransferproject.transfer.mastodon.social.MastodonActivityImport)1 SocialActivityContainerResource (org.datatransferproject.types.common.models.social.SocialActivityContainerResource)1 CookiesAndUrlAuthData (org.datatransferproject.types.transfer.auth.CookiesAndUrlAuthData)1