Package com.google.api.services.youtube.model

Examples of com.google.api.services.youtube.model.PlaylistItem


        System.out.println("=============================================================");
        System.out.println("\t\tTotal Videos Uploaded: " + size);
        System.out.println("=============================================================\n");

        while (playlistEntries.hasNext()) {
            PlaylistItem playlistItem = playlistEntries.next();
            System.out.println(" video name  = " + playlistItem.getSnippet().getTitle());
            System.out.println(" video id    = " + playlistItem.getContentDetails().getVideoId());
            System.out.println(" upload date = " + playlistItem.getSnippet().getPublishedAt());
            System.out.println("\n-------------------------------------------------------------\n");
        }
    }
View Full Code Here


    playlistItemSnippet.setPlaylistId(playlistId);
    playlistItemSnippet.setResourceId(resourceId);

    // Create the playlistItem resource and set its snippet to the
    // object created above.
    PlaylistItem playlistItem = new PlaylistItem();
    playlistItem.setSnippet(playlistItemSnippet);

    // Call the API to add the playlist item to the specified playlist.
    // In the API call, the first argument identifies the resource parts
    // that the API response should contain, and the second argument is
    // the playlist item being inserted.
    YouTube.PlaylistItems.Insert playlistItemsInsertCommand = youtube
        .playlistItems().insert("snippet,contentDetails", playlistItem);
    PlaylistItem returnedPlaylistItem = playlistItemsInsertCommand
        .execute();

    log.debug("New PlaylistItem name: "
        + returnedPlaylistItem.getSnippet().getTitle());
    log.debug(" -Video id: "
        + returnedPlaylistItem.getSnippet().getResourceId()
            .getVideoId());
    log.debug(" -Posted: "
        + returnedPlaylistItem.getSnippet().getPublishedAt());
    log.debug(" -Channel: "
        + returnedPlaylistItem.getSnippet().getChannelId());
    return returnedPlaylistItem.getId();
  }
View Full Code Here

TOP

Related Classes of com.google.api.services.youtube.model.PlaylistItem

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.