Пример #1
0
        public MChannel(Channel channel)
        {
            if (channel == null)
            {
                return;
            }

            Id = channel.Id;
            if (channel.BrandingSettings != null)
            {
                if (channel.BrandingSettings.Image != null)
                {
                    Image = channel.BrandingSettings.Image.BannerMobileImageUrl;
                }
            }

            Thumbnails = new MThumbnailDetails();
            Statistics = new MChannelStatistics();

            if (channel.Snippet == null)
            {
                return;
            }

            Title       = channel.Snippet.Title;
            Description = channel.Snippet.Description;
            Thumbnails  = new MThumbnailDetails(channel.Snippet.Thumbnails);
            Statistics  = new MChannelStatistics(channel.Statistics);
        }
Пример #2
0
        public MChannel(SearchResult channel)
        {
            if (channel == null)
            {
                return;
            }

            if (channel.Id != null)
            {
                Id = channel.Id.ChannelId;
            }

            Thumbnails = new MThumbnailDetails();
            Statistics = new MChannelStatistics();

            if (channel.Snippet == null)
            {
                return;
            }

            Title       = channel.Snippet.Title;
            Description = channel.Snippet.Description;
            Thumbnails  = new MThumbnailDetails(channel.Snippet.Thumbnails);
        }