public MVideoList() { Items = new List <IVideoItem>(); NextPageToken = string.Empty; PageInfo = new MPageInfo(); PrevPageToken = string.Empty; VisitorId = string.Empty; }
public MPlaylistList(PlaylistListResponse response) { NextPageToken = response.NextPageToken; PrevPageToken = response.PrevPageToken; PageInfo = new MPageInfo(response.PageInfo); VisitorId = response.VisitorId; var items = response.Items; Items = items.Select(i => new MPlaylist(i)).ToList <IPlaylist>(); }
public MActivityList(ActivityListResponse response, VideoListResponse videoList) { Kind = response.Kind; NextPageToken = response.NextPageToken; PageInfo = new MPageInfo(response.PageInfo); PrevPageToken = response.PrevPageToken; VisitorId = response.VisitorId; Items = videoList.Items.Select(i => new MVideoItem(i)).ToList <IVideoItem>(); Id = Guid.NewGuid().ToString(); }
public MCommentList(CommentThreadListResponse response) { if (response == null) { return; } NextPageToken = response.NextPageToken; PageInfo = new MPageInfo(response.PageInfo); VisitorId = response.VisitorId; Items = response.Items.Select(c => new MComment(c)); }
public MSubscriptionList(SubscriptionListResponse response) { if (response == null) { return; } Items = response.Items.Select(s => new MSubscription(s)).ToList <ISubscription>(); NextPageToken = response.NextPageToken; PageInfo = new MPageInfo(response.PageInfo); PrevPageToken = response.PrevPageToken; VisitorId = response.VisitorId; }
public MPlaylistItemList(PlaylistItemListResponse response) { if (response == null) { return; } NextPageToken = response.NextPageToken; PageInfo = new MPageInfo(response.PageInfo); PrevPageToken = response.PrevPageToken; VisitorId = response.VisitorId; var items = response.Items.Where(i => i.Snippet.Title != "Deleted video"); Items = items.Select(i => new MPlayListItem(i)).ToList <IPlayListItem>(); }
public MChannelList(ChannelListResponse channelListResponse) { if (channelListResponse == null) { return; } ETag = channelListResponse.ETag; EventId = channelListResponse.EventId; NextPageToken = channelListResponse.NextPageToken; PageInfo = new MPageInfo(channelListResponse.PageInfo); PrevPageToken = channelListResponse.PrevPageToken; //TokenPagination = new MTokenPagination(channelListResponse.TokenPagination); VisitorId = channelListResponse.VisitorId; Items = channelListResponse.Items.Select(channel => new MChannel(channel)).Cast <IChannel>().ToList(); }
public MVideoList(VideoListResponse response) : this() { if (response == null) { Items = new List <IVideoItem>(); return; } NextPageToken = response.NextPageToken; PageInfo = new MPageInfo(response.PageInfo); PrevPageToken = response.PrevPageToken; var items = response.Items.Where(i => i.Snippet.Title != "Deleted video"); Items = items.Select(i => new MVideoItem(i)).ToList <IVideoItem>(); VisitorId = response.VisitorId; }
public MVideoList(SearchListResponse response, IEnumerable <IVideoDetails> videoDetails) : this() { NextPageToken = response.NextPageToken; PageInfo = new MPageInfo(response.PageInfo); PrevPageToken = response.PrevPageToken; var items = response.Items.Where(i => i.Snippet.Title != "Deleted video"); Items = new List <IVideoItem>(); foreach (var details in videoDetails) { var item = items.FirstOrDefault(i => i.Id.VideoId == details.VideoId); if (item != null) { Items.Add(new MVideoItem(item, details)); } } VisitorId = response.VisitorId; }