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: ";