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); } }
public async Task GetVideoItemNetAsync() { VideoItemPOCO res = await YouTubeSite.GetVideoItemNetAsync("lHgIpxQac3w").ConfigureAwait(false); // Assert.AreEqual(res.Title, "Metallica — Unforgiven (FDM edition)"); }