Skip to content
This repository has been archived by the owner on Feb 16, 2021. It is now read-only.

Commit

Permalink
完成所有的旧方法到新方法的迁移
Browse files Browse the repository at this point in the history
  • Loading branch information
tobiichiamane committed May 12, 2020
1 parent 48ac3bc commit 69b6e65
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
12 changes: 6 additions & 6 deletions PixivFSUWP/UserDetailPage.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ private async void BtnFollow_Click(object sender, RoutedEventArgs e)
try
{
await new PixivAppAPI(Data.OverAll.GlobalBaseAPI)
.UserFollowAdd(detail.ID.ToString());
.PostUserFollowAddAsync(detail.ID.ToString());
res = true;
}
catch
Expand All @@ -187,7 +187,7 @@ private async void BtnFollow_Click(object sender, RoutedEventArgs e)
try
{
await new PixivAppAPI(Data.OverAll.GlobalBaseAPI)
.UserFollowDelete(detail.ID.ToString());
.PostUserFollowDeleteAsync(detail.ID.ToString());
res = true;
}
catch
Expand Down Expand Up @@ -267,7 +267,7 @@ private async void QuickStar_Click(object sender, RoutedEventArgs e)
try
{
await new PixivAppAPI(Data.OverAll.GlobalBaseAPI)
.IllustBookmarkDelete(i.ItemId.ToString());
.PostIllustBookmarkDeleteAsync(i.ItemId.ToString());
res = true;
}
catch
Expand All @@ -294,7 +294,7 @@ private async void QuickStar_Click(object sender, RoutedEventArgs e)
try
{
await new PixivAppAPI(Data.OverAll.GlobalBaseAPI)
.IllustBookmarkAdd(i.ItemId.ToString());
.PostIllustBookmarkAddAsync(i.ItemId.ToString());
res = true;
}
catch
Expand Down Expand Up @@ -336,8 +336,8 @@ private async void QuickSave_Click(object sender, RoutedEventArgs e)
{
CachedFileManager.DeferUpdates(file);
var res = await new PixivAppAPI(Data.OverAll.GlobalBaseAPI)
.IllustDetail(i.ItemId.ToString());
var illust = Data.IllustDetail.FromJsonValue(res);
.GetIllustDetailAsync(i.ItemId.ToString());
var illust = Data.IllustDetail.FromObject(res);
using (var imgstream = await Data.OverAll.DownloadImage(illust.OriginalUrls[0]))
{
using (var filestream = await file.OpenAsync(FileAccessMode.ReadWrite))
Expand Down
6 changes: 3 additions & 3 deletions PixivFSUWP/WaterfallPage.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ private async void QuickStar_Click(object sender, RoutedEventArgs e)
try
{
await new PixivAppAPI(Data.OverAll.GlobalBaseAPI)
.IllustBookmarkAdd(i.ItemId.ToString());
.PostIllustBookmarkAddAsync(i.ItemId.ToString());
res = true;
}
catch
Expand Down Expand Up @@ -229,8 +229,8 @@ private async void QuickSave_Click(object sender, RoutedEventArgs e)
{
CachedFileManager.DeferUpdates(file);
var res = await new PixivAppAPI(Data.OverAll.GlobalBaseAPI)
.IllustDetail(i.ItemId.ToString());
var illust = Data.IllustDetail.FromJsonValue(res);
.GetIllustDetailAsync(i.ItemId.ToString());
var illust = Data.IllustDetail.FromObject(res);
using (var imgstream = await Data.OverAll.DownloadImage(illust.OriginalUrls[0]))
{
using (var filestream = await file.OpenAsync(FileAccessMode.ReadWrite))
Expand Down

0 comments on commit 69b6e65

Please sign in to comment.