Exemplo n.º 1
0
        public static async Task <IVideoItem> GetVideoItemNetAsync(string id, SiteType site)
        {
            try
            {
                VideoItemPOCO poco = null;
                switch (site)
                {
                case SiteType.YouTube:
                    poco = await YouTubeSite.GetVideoItemNetAsync(id).ConfigureAwait(false);

                    break;
                }
                IVideoItem vi = CreateVideoItem(poco, site);
                return(vi);
            }
            catch (Exception ex)
            {
                throw new Exception(ex.Message);
            }
        }
Exemplo n.º 2
0
        public async Task GetVideoItemNetAsync()
        {
            VideoItemPOCO res = await YouTubeSite.GetVideoItemNetAsync("lHgIpxQac3w").ConfigureAwait(false); //

            Assert.AreEqual(res.Title, "Metallica — Unforgiven (FDM edition)");
        }