Search in sources :

Example 1 with MediaMetadata

use of org.datatransferproject.datatransfer.google.mediaModels.MediaMetadata in project data-transfer-project by google.

the class GooglePhotosExporterTest method setUpSinglePhoto.

/**
 * Sets up a response for a single photo
 */
private GoogleMediaItem setUpSinglePhoto(String imageUri, String photoId) {
    GoogleMediaItem photoEntry = new GoogleMediaItem();
    photoEntry.setDescription("Description");
    photoEntry.setMimeType("image/jpeg");
    photoEntry.setBaseUrl(imageUri);
    photoEntry.setId(photoId);
    photoEntry.setFilename(FILENAME);
    MediaMetadata mediaMetadata = new MediaMetadata();
    mediaMetadata.setPhoto(new Photo());
    photoEntry.setMediaMetadata(mediaMetadata);
    return photoEntry;
}
Also used : MediaMetadata(org.datatransferproject.datatransfer.google.mediaModels.MediaMetadata) Photo(org.datatransferproject.datatransfer.google.mediaModels.Photo) GoogleMediaItem(org.datatransferproject.datatransfer.google.mediaModels.GoogleMediaItem)

Example 2 with MediaMetadata

use of org.datatransferproject.datatransfer.google.mediaModels.MediaMetadata in project data-transfer-project by google.

the class GoogleVideosExporterTest method setUpSingleVideo.

/**
 * Sets up a response for a single video
 */
private GoogleMediaItem setUpSingleVideo(String videoUri, String videoId) {
    GoogleMediaItem videoEntry = new GoogleMediaItem();
    videoEntry.setDescription("Description");
    videoEntry.setMimeType("video/mp4");
    videoEntry.setBaseUrl(videoUri);
    videoEntry.setId(videoId);
    MediaMetadata mediaMetadata = new MediaMetadata();
    mediaMetadata.setVideo(new Video());
    videoEntry.setMediaMetadata(mediaMetadata);
    return videoEntry;
}
Also used : Video(org.datatransferproject.datatransfer.google.mediaModels.Video) MediaMetadata(org.datatransferproject.datatransfer.google.mediaModels.MediaMetadata) GoogleMediaItem(org.datatransferproject.datatransfer.google.mediaModels.GoogleMediaItem)

Aggregations

GoogleMediaItem (org.datatransferproject.datatransfer.google.mediaModels.GoogleMediaItem)2 MediaMetadata (org.datatransferproject.datatransfer.google.mediaModels.MediaMetadata)2 Photo (org.datatransferproject.datatransfer.google.mediaModels.Photo)1 Video (org.datatransferproject.datatransfer.google.mediaModels.Video)1