Exemplo n.º 1
0
        /// <summary>
        /// Run when page is loaded
        /// </summary>
        public void OnLoad()
        {
            var video = new Video()
            {
                Title = "S-White Street Drummer",
                Code = "qVTHoXRrhq4"
            };

            videoRepository.Save(video);

            Videos = videoRepository.FindAll();
        }
Exemplo n.º 2
0
        /// <summary>
        /// 
        /// </summary>
        public void OnLoad()
        {
            var code = "qVTHoXRrhq4";
            var request = youTubeService.Videos.List("snippet");
            request.Id = code;

            var response = request.Execute();
            var snippet = response.Items.First().Snippet;

            Video = new Video()
            {
                Title = snippet.Title,
                Description = snippet.Description,
                Code = code
            };
        }