public async Task <IAsyncEnumerable <MylistPlaylist> > GetPagedItems(int head, int count) { var result = await SearchProvider.MylistSearchAsync( SearchOption.Keyword , (uint)head , (uint)count , SearchOption.Sort , SearchOption.Order ); return(result.IsSuccess ? result.Items.ToAsyncEnumerable() : AsyncEnumerable.Empty <MylistPlaylist>()); }
public async Task <int> ResetSource() { // Note: 件数が1だとJsonのParseがエラーになる _MylistGroupResponse = await SearchProvider.MylistSearchAsync( SearchOption.Keyword, 0, 2, SearchOption.Sort, SearchOption.Order ); return((int)_MylistGroupResponse.GetTotalCount()); }
public async Task <int> ResetSource() { // Note: 件数が1だとJsonのParseがエラーになる var res = await SearchProvider.MylistSearchAsync( SearchOption.Keyword, 0, 2, SearchOption.Sort, SearchOption.Order ); return(res.TotalCount); }
public async Task <IAsyncEnumerable <Interfaces.IMylist> > GetPagedItems(int head, int count) { var response = await SearchProvider.MylistSearchAsync( SearchOption.Keyword , (uint)head , (uint)count , SearchOption.Sort , SearchOption.Order ); return(response.MylistGroupItems? .Select(item => new OtherOwneredMylist(item.VideoInfoItems.Select(x => x.Video.Id).ToList() ?? Enumerable.Empty <string>().ToList()) { Label = item.Name, Description = item.Description, ItemCount = (int)item.ItemCount, } as Interfaces.IMylist) .ToAsyncEnumerable() ?? AsyncEnumerable.Empty <Interfaces.IMylist>()); }