diff --git a/PixivFSUWP/Data/Collections/RankingIllustsCollection.cs b/PixivFSUWP/Data/Collections/RankingIllustsCollection.cs index d897645..981a3e2 100644 --- a/PixivFSUWP/Data/Collections/RankingIllustsCollection.cs +++ b/PixivFSUWP/Data/Collections/RankingIllustsCollection.cs @@ -63,28 +63,28 @@ protected async Task LoadMoreItemsAsync(CancellationToken c { if (!HasMoreItems) return new LoadMoreItemsResult() { Count = 0 }; LoadMoreItemsResult toret = new LoadMoreItemsResult() { Count = 0 }; - JsonObject rankingres = null; + PixivCS.Objects.UserIllusts rankingres = null; try { if (nexturl == "begin") rankingres = await new PixivCS .PixivAppAPI(OverAll.GlobalBaseAPI) - .IllustRanking(); + .GetIllustRankingAsync(); else { Uri next = new Uri(nexturl); string getparam(string param) => HttpUtility.ParseQueryString(next.Query).Get(param); rankingres = await new PixivCS .PixivAppAPI(OverAll.GlobalBaseAPI) - .IllustRanking(Mode: getparam("mode"), Filter: getparam("filter"), Offset: getparam("offset")); + .GetIllustRankingAsync(Mode: getparam("mode"), Filter: getparam("filter"), Offset: getparam("offset")); } } catch { return toret; } - nexturl = rankingres["next_url"].TryGetString(); - foreach (var recillust in rankingres["illusts"].GetArray()) + nexturl = rankingres.NextUrl?.ToString(); + foreach (var recillust in rankingres.Illusts) { await Task.Run(() => pause.WaitOne()); if (_emergencyStop) @@ -93,7 +93,7 @@ protected async Task LoadMoreItemsAsync(CancellationToken c Clear(); return new LoadMoreItemsResult() { Count = 0 }; } - WaterfallItem recommendi = WaterfallItem.FromJsonValue(recillust.GetObject()); + WaterfallItem recommendi = WaterfallItem.FromObject(recillust); var recommendmodel = ViewModels.WaterfallItemViewModel.FromItem(recommendi); await recommendmodel.LoadImageAsync(); Add(recommendmodel);