package feedmeyoutubecrawler;

/* Copyright (C) 2015 Robert Lehmann <lehmrob@gmail.com>
 *
 * This software may be modified and distributed under the terms
 * of the MIT license.  See the LICENSE file for details.
 */

import feedmeyoutubecore.Version;
import feedmeyoutubecore.obj.YouTubeVideo;
import feedmeyoutubecrawler.crawler.VideoCrawler;
import feedmeyoutubecrawler.crawler.YouTubeConnection;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.io.IOException;
import java.util.List;

/**
 * Main class which runs the main application.
 * @author Robert Lehmann
 * @since 1.0
 */
public class Main
{
    private static final Logger LOG = LoggerFactory.getLogger(Main.class);

    public static void main(String[] arg)
    {
        LOG.debug("Starting App in Version {}", Version.VERSION);

        try {
            final VideoCrawler vc = new VideoCrawler(new YouTubeConnection());
            if (vc.hasNext()) {
                List<YouTubeVideo> videos = vc.getNextVideos();
                LOG.info("Size of video list {}", videos.size());
                videos.stream().forEach(video -> LOG.info("Video info {}", video.VideoId));
            }
        } catch (final IOException e) {
            LOG.error("Can't connect to youtube", e);
        }
    }
}

@@ -212,16 +212,71 @@
 s.%0A */%0A%0A
+import com.google.api.services.youtube.model.Playlist;%0A
 import f
@@ -344,16 +344,114 @@
 eVideo;%0A
+import feedmeyoutubecrawler.crawler.Crawler;%0Aimport feedmeyoutubecrawler.crawler.PlaylistCrawler;%0A
 import f
@@ -995,28 +995,37 @@
   final 
-Video
 Crawler
+%3CYouTubeVideo%3E
  vc = ne
@@ -1061,24 +1061,111 @@
 nection());%0A
+            final Crawler%3CPlaylist%3E pc = new PlaylistCrawler(new YouTubeConnection());%0A
             
@@ -1242,14 +1242,8 @@
 Next
-Videos
 ();%0A
@@ -1410,24 +1410,584 @@
           %7D%0A
+            if (pc.hasNext()) %7B%0A                List%3CPlaylist%3E playlists = pc.getNext();%0A                LOG.info(%22Size of Playlist list %7B%7D%22, playlists.size());%0A                playlists.stream().forEach(playlist -%3E LOG.info(%22Playlist info %7B%7D%22, playlist.getId()));%0A            %7D%0A%0A            if (pc.hasNext()) %7B%0A                List%3CPlaylist%3E playlists = pc.getNext();%0A                LOG.info(%22Size of Playlist list %7B%7D%22, playlists.size());%0A                playlists.stream().forEach(playlist -%3E LOG.info(%22Playlist info %7B%7D%22, playlist.getId()));%0A            %7D%0A%0A
         %7D ca

Add Crawler interface