Examples of YouTubeClient


Examples of services.video.YouTubeClient

      Type dataType = new TypeToken<Data<ImageExt>>(){}.getType();
      //renderJSON(imageSearchService.search(q, offset, limit), dataType);
      Data<ImageExt> data = imageSearchService.search(q, offset, limit);
      renderTemplate("api/internet/images.json", data);
    } else if(SearchType.VIDEOS.name().equals(type.toUpperCase())) {
      YouTubeClient client = new YouTubeClient();
      View.header("Get Videos");
      // build URL for the video feed for "search stories"
        YouTubeUrl url = YouTubeUrl.forVideosFeed();
        url.q = q;
        url.maxResults = limit;
        //Youtube api's offset starts at 1.
        offset++;
        url.startIndex = offset;
        // execute GData request for the feed
        VideoFeed data = client.executeGetVideoFeed(url);
        Type dataType = new TypeToken<VideoFeed>(){}.getType();
        //renderJSON(feed, dataType);
        renderTemplate("api/internet/videos.json", data);
    } else {
      String message = "El parámetro type debe tener uno de los siguientes valores: ";
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.