示例#1
0
        public static YoutubeChannelSections ForChannelId(this YoutubeChannelSections channelSections, string id)
        {
            var settings = channelSections.Settings.Clone();

            settings.ChannelId = id;
            return(ChannelSections(settings, channelSections.PartTypes.ToArray()));
        }
示例#2
0
        public static YoutubeChannelSections RequestId(this YoutubeChannelSections channelSections, params string[] ids)
        {
            var settings = channelSections.Settings.Clone();

            settings.Id = settings.Id.AddItems(ids);
            return(ChannelSections(settings, channelSections.PartTypes.ToArray()));
        }
示例#3
0
 public static YoutubeChannelSections RequestAllParts(this YoutubeChannelSections channelSections)
 {
     return(channelSections.RequestContentDetails()
            .RequestLocalizations()
            .RequestTargeting()
            .RequestSnippet());
 }
示例#4
0
 public static YoutubeChannelSections RequestLocalizations(this YoutubeChannelSections channelSections)
 {
     return(channelSections.RequestPart(PartType.Localizations));
 }
示例#5
0
 public static YoutubeChannelSections RequestContentDetails(this YoutubeChannelSections channelSections)
 {
     return(channelSections.RequestPart(PartType.ContentDetails));
 }
示例#6
0
 public static IEnumerable <YoutubeChannelSection> TakePages(this YoutubeChannelSections channelSections, int pageCount)
 {
     return(channelSections.Take(channelSections.ResultsPerPage.GetValueOrDefault(ResultsPerPage) * pageCount));
 }
示例#7
0
 public static YoutubeChannelSections RequestPart(this YoutubeChannelSections channelSections, PartType partType)
 {
     return(ChannelSections(channelSections.Settings.Clone(), channelSections.PartTypes.Append(partType).ToArray()));
 }
示例#8
0
 public static IEnumerable <YoutubeChannelSection> TakePage(this YoutubeChannelSections channelSections)
 {
     return(channelSections.TakePages(1));
 }
示例#9
0
 public static YoutubeChannelSections RequestSnippet(this YoutubeChannelSections channelSections)
 {
     return(channelSections.RequestPart(PartType.Snippet));
 }
示例#10
0
 public static YoutubeChannelSections RequestTargeting(this YoutubeChannelSections channelSections)
 {
     return(channelSections.RequestPart(PartType.Targeting));
 }