use of org.datatransferproject.types.common.models.videos.VideoAlbum in project data-transfer-project by google.
the class KoofrVideosExporter method export.
@Override
public ExportResult<VideosContainerResource> export(UUID jobId, TokensAndUrlAuthData authData, Optional<ExportInformation> exportInformation) throws CopyExceptionWithFailureReason {
Preconditions.checkNotNull(authData);
KoofrClient koofrClient = koofrClientFactory.create(authData);
KoofrMediaExport export = new KoofrMediaExport(koofrClient, monitor);
try {
export.export();
List<VideoAlbum> exportAlbums = export.getVideoAlbums();
List<VideoModel> exportVideos = export.getVideos();
VideosContainerResource containerResource = new VideosContainerResource(exportAlbums, exportVideos);
return new ExportResult<>(ExportResult.ResultType.END, containerResource, null);
} catch (IOException e) {
return new ExportResult<>(e);
}
}
Aggregations