public GenerateChannelItems(InstaTVChannelType type, ListView listView) { Items = new ObservableCollection <InstaMedia>(); LV = listView; Scroll = listView.FindScrollViewer(); if (Scroll != null) { Scroll.ViewChanging += Scroll_ViewChanging; } HasMoreItems = true; ChannelType = type; Pagination = PaginationParameters.MaxPagesToLoad(1); }
public static string GetRealChannelType(this InstaTVChannelType type) { switch (type) { case InstaTVChannelType.ChronoFollowing: return("chrono_following"); case InstaTVChannelType.ContinueWatching: return("continue_watching"); case InstaTVChannelType.Popular: return("popular"); case InstaTVChannelType.User: return("user"); case InstaTVChannelType.ForYou: default: return("for_you"); } }
/// <summary> /// Get channel by <seealso cref="InstaTVChannelType"/> /// </summary> /// <param name="channelType">Channel type</param> /// <param name="paginationParameters">Pagination parameters</param> public async Task <IResult <InstaTVChannel> > GetChannelByTypeAsync(InstaTVChannelType channelType, PaginationParameters paginationParameters) { UserAuthValidator.Validate(_userAuthValidate); return(await GetChannel(channelType, null, paginationParameters)); }