Пример #1
0
        public override VideoResponse GetVideo(VideoRequest videoRequest)
        {
            Uri videoUrl = new Uri("http://gdata.youtube.com/feeds/api/videos/" + videoRequest.VideoId);

            try
            {
                var request = new YouTubeRequest(new YouTubeRequestSettings(Application, ApiKey));
                var video = request.Retrieve<Video>(videoUrl);
                return new VideoResponse() { Video = video };
            }
            catch (Exception e)
            {
                return new VideoResponse() { Video = null };
            }
        }
 public abstract VideoResponse GetVideo(VideoRequest videoRequest);