From ae4f7b93e26b2e2921f27a1c2df011ef97179e10 Mon Sep 17 00:00:00 2001 From: Thomas Pentenrieder Date: Thu, 14 Mar 2024 00:03:33 +0100 Subject: [PATCH] update dependencies, fix GetCurrentUserAsync --- .../WordPressPCL.Tests.Hosted.csproj | 6 +++--- WordPressPCL.Tests.Selfhosted/Comments_Tests.cs | 10 +++++----- WordPressPCL.Tests.Selfhosted/User_Tests.cs | 2 +- .../WordPressPCL.Tests.Selfhosted.csproj | 6 +++--- WordPressPCL/Client/Users.cs | 2 +- WordPressPCL/WordPressPCL.csproj | 10 +++++++--- WordPressPCL/WordPressPCL.xml | 2 +- 7 files changed, 21 insertions(+), 17 deletions(-) diff --git a/WordPressPCL.Tests.Hosted/WordPressPCL.Tests.Hosted.csproj b/WordPressPCL.Tests.Hosted/WordPressPCL.Tests.Hosted.csproj index 3cce4e8..f17e625 100644 --- a/WordPressPCL.Tests.Hosted/WordPressPCL.Tests.Hosted.csproj +++ b/WordPressPCL.Tests.Hosted/WordPressPCL.Tests.Hosted.csproj @@ -7,9 +7,9 @@ - - - + + + diff --git a/WordPressPCL.Tests.Selfhosted/Comments_Tests.cs b/WordPressPCL.Tests.Selfhosted/Comments_Tests.cs index 38d285d..1df8701 100644 --- a/WordPressPCL.Tests.Selfhosted/Comments_Tests.cs +++ b/WordPressPCL.Tests.Selfhosted/Comments_Tests.cs @@ -29,7 +29,7 @@ public async Task Comments_Create() var posts = await _clientAuth.Posts.GetAllAsync(); var postId = posts.First().Id; - var me = await _clientAuth.Users.GetCurrentUser(); + var me = await _clientAuth.Users.GetCurrentUserAsync(); // Create random content to prevent duplicate commment errors var content = $"TestComment {System.Guid.NewGuid()}"; @@ -91,7 +91,7 @@ public async Task Comments_Get() [TestMethod] public async Task Comments_Update() { - var me = await _clientAuth.Users.GetCurrentUser(); + var me = await _clientAuth.Users.GetCurrentUserAsync(); var queryBuilder = new CommentsQueryBuilder() { Authors = new List { me.Id } @@ -114,7 +114,7 @@ public async Task Comments_Delete() var posts = await _clientAuth.Posts.GetAllAsync(); var postId = posts.First().Id; - var me = await _clientAuth.Users.GetCurrentUser(); + var me = await _clientAuth.Users.GetCurrentUserAsync(); // Create random content to prevent duplicate commment errors var comment = new Comment() @@ -155,7 +155,7 @@ public async Task Comments_Query_Pending() // Create new pending comment var posts = await _clientAuth.Posts.GetAllAsync(); var postId = posts.First().Id; - var me = await _clientAuth.Users.GetCurrentUser(); + var me = await _clientAuth.Users.GetCurrentUserAsync(); // Create random content to prevent duplicate commment errors var content = $"TestComment {System.Guid.NewGuid()}"; @@ -194,7 +194,7 @@ public async Task Comments_Query_Pending() [TestMethod] public async Task Comments_GetAllForPost() { - var me = await _clientAuth.Users.GetCurrentUser(); + var me = await _clientAuth.Users.GetCurrentUserAsync(); // create test post and add comments var post = new Post() diff --git a/WordPressPCL.Tests.Selfhosted/User_Tests.cs b/WordPressPCL.Tests.Selfhosted/User_Tests.cs index a196d7b..18b4659 100644 --- a/WordPressPCL.Tests.Selfhosted/User_Tests.cs +++ b/WordPressPCL.Tests.Selfhosted/User_Tests.cs @@ -97,7 +97,7 @@ public async Task Users_Delete() { var user = await CreateRandomUser(); Assert.IsNotNull(user); - var me = await _clientAuth.Users.GetCurrentUser(); + var me = await _clientAuth.Users.GetCurrentUserAsync(); var response = await _clientAuth.Users.Delete(user.Id, me.Id); Assert.IsTrue(response); } diff --git a/WordPressPCL.Tests.Selfhosted/WordPressPCL.Tests.Selfhosted.csproj b/WordPressPCL.Tests.Selfhosted/WordPressPCL.Tests.Selfhosted.csproj index 79f4be1..b01b9dc 100644 --- a/WordPressPCL.Tests.Selfhosted/WordPressPCL.Tests.Selfhosted.csproj +++ b/WordPressPCL.Tests.Selfhosted/WordPressPCL.Tests.Selfhosted.csproj @@ -5,9 +5,9 @@ - - - + + + diff --git a/WordPressPCL/Client/Users.cs b/WordPressPCL/Client/Users.cs index cb0473e..5b82dd7 100644 --- a/WordPressPCL/Client/Users.cs +++ b/WordPressPCL/Client/Users.cs @@ -119,7 +119,7 @@ public async Task UpdateAsync(User Entity) /// Get current User /// /// Current User - public Task GetCurrentUser() + public Task GetCurrentUserAsync() { return _httpHelper.GetRequestAsync($"{METHOD_PATH}/me", true, true); } diff --git a/WordPressPCL/WordPressPCL.csproj b/WordPressPCL/WordPressPCL.csproj index 9cfdac4..7078b50 100644 --- a/WordPressPCL/WordPressPCL.csproj +++ b/WordPressPCL/WordPressPCL.csproj @@ -15,10 +15,14 @@ GitHub 2.0.0.0 2.0.0.0 - 2.0.2 + 2.1.0 9.0 - V2.0.2 + V2.1.0 +- Upgraded dependencies +- Fix GetCurrentUserAsync() naming + +V2.0.2 - Support for Plugins - Support for Statuses in UsersQueryBuilder - Upgraded Newtonsoft.Json dependency to 13.0.3 @@ -139,7 +143,7 @@ V1.2 README.md - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/WordPressPCL/WordPressPCL.xml b/WordPressPCL/WordPressPCL.xml index 5f62022..c814803 100644 --- a/WordPressPCL/WordPressPCL.xml +++ b/WordPressPCL/WordPressPCL.xml @@ -797,7 +797,7 @@ Entity object Updated object - + Get current User