private async Task QueryAsync() { IBookmarkTags tags; if (_searchType == SearchType.IllustsAndManga) { tags = await _queryCacheService.RunAsync(_pixivClient.User.BookmarkTags.IllustAsync, restrict => _restrict.ToParamString(), offset => _offset); } else if (_searchType == SearchType.Novels) { tags = await _queryCacheService.RunAsync(_pixivClient.User.BookmarkTags.NovelAsync, restrict => _restrict.ToParamString(), offset => _offset); } else { throw new NotSupportedException(); } tags?.BookmarkTagList.ForEach(w => BookmarkTags.Add(w)); if (string.IsNullOrWhiteSpace(tags?.NextUrl)) { HasMoreItems = false; } else { _offset = UrlParameter.ParseQuery(tags.NextUrl)["offset"]; } }
private async Task Fetch() { var users = await _queryCacheService.RunAsync(_pixivClient.User.FollowerAsync, user_id => _userId, restrict => _restrict.ToParamString(), offset => _offset); users?.UserPreviewList.ForEach(w => Users.Add(w)); if (string.IsNullOrWhiteSpace(users?.NextUrl)) { HasMoreItems = false; } else { _offset = UrlParameter.ParseQuery(users.NextUrl)["offset"]; } }