예제 #1
0
        public static async Task <IEnumerable <IChannel> > GetRelatedChannelNetAsync(IChannel channel)
        {
            IEnumerable <ChannelPOCO> related = null;

            if (channel is YouChannel)
            {
                related = await YouTubeSite.GetRelatedChannelsByIdAsync(channel.ID).ConfigureAwait(true);
            }

            if (related != null)
            {
                return(related.Select(poco => CreateChannel(poco, channel.DirPath)));
            }
            throw new Exception(channel.ID);
        }
예제 #2
0
        public async Task GetRelatedChannelsByIdAsync()
        {
            List <ChannelPOCO> res = await YouTubeSite.GetRelatedChannelsByIdAsync("UCsNGRSN63gFoo5z6Oqv1A6A").ConfigureAwait(false);

            Assert.IsTrue(res.Any());
        }