diff --git a/Octokit.Tests/Clients/AuthorizationsClientTests.cs b/Octokit.Tests/Clients/AuthorizationsClientTests.cs index c9b2a41b..e108b9c0 100644 --- a/Octokit.Tests/Clients/AuthorizationsClientTests.cs +++ b/Octokit.Tests/Clients/AuthorizationsClientTests.cs @@ -60,7 +60,7 @@ namespace Octokit.Tests.Clients authEndpoint.Update(1, new AuthorizationUpdate()); - client.Received().Update(Arg.Is(u => u.ToString() == "/authorizations/1"), + client.Received().Patch(Arg.Is(u => u.ToString() == "/authorizations/1"), Args.AuthorizationUpdate); } } diff --git a/Octokit.Tests/Clients/SshKeysClientTests.cs b/Octokit.Tests/Clients/SshKeysClientTests.cs index 2466aaf0..fa1d50d8 100644 --- a/Octokit.Tests/Clients/SshKeysClientTests.cs +++ b/Octokit.Tests/Clients/SshKeysClientTests.cs @@ -79,7 +79,7 @@ namespace Octokit.Tests.Clients sshKeysClient.Update(42, data); - client.Received().Update(endpoint, data); + client.Received().Patch(endpoint, data); } [Fact] diff --git a/Octokit.Tests/Clients/UsersClientTests.cs b/Octokit.Tests/Clients/UsersClientTests.cs index 7e11eab5..d5173025 100644 --- a/Octokit.Tests/Clients/UsersClientTests.cs +++ b/Octokit.Tests/Clients/UsersClientTests.cs @@ -80,7 +80,7 @@ namespace Octokit.Tests.Clients usersClient.Update(new UserUpdate()); - client.Received().Update(endpoint, Args.UserUpdate); + client.Received().Patch(endpoint, Args.UserUpdate); } [Fact] diff --git a/Octokit.Tests/Http/ApiConnectionTests.cs b/Octokit.Tests/Http/ApiConnectionTests.cs index 4cde5e14..2c9d753e 100644 --- a/Octokit.Tests/Http/ApiConnectionTests.cs +++ b/Octokit.Tests/Http/ApiConnectionTests.cs @@ -104,7 +104,7 @@ namespace Octokit.Tests.Http connection.PatchAsync(Args.Uri, Args.Object).Returns(Task.FromResult(response)); var apiConnection = new ApiConnection(connection); - var data = await apiConnection.Update(patchUri, sentData); + var data = await apiConnection.Patch(patchUri, sentData); Assert.Same(data, response.BodyAsObject); connection.Received().PatchAsync(patchUri, sentData); @@ -116,8 +116,8 @@ namespace Octokit.Tests.Http { var connection = new ApiConnection(Substitute.For()); var patchUri = new Uri("/", UriKind.Relative); - await AssertEx.Throws(async () => await connection.Update(null, new object())); - await AssertEx.Throws(async () => await connection.Update(patchUri, null)); + await AssertEx.Throws(async () => await connection.Patch(null, new object())); + await AssertEx.Throws(async () => await connection.Patch(patchUri, null)); } } diff --git a/Octokit/Clients/AuthorizationsClient.cs b/Octokit/Clients/AuthorizationsClient.cs index 6c438abf..ffb6bd0f 100644 --- a/Octokit/Clients/AuthorizationsClient.cs +++ b/Octokit/Clients/AuthorizationsClient.cs @@ -148,7 +148,7 @@ namespace Octokit Ensure.ArgumentNotNull(authorizationUpdate, "authorizationUpdate"); var endpoint = "/authorizations/{0}".FormatUri(id); - return await Client.Update(endpoint, authorizationUpdate); + return await Client.Patch(endpoint, authorizationUpdate); } /// diff --git a/Octokit/Clients/SshKeysClient.cs b/Octokit/Clients/SshKeysClient.cs index d825d27c..477ad698 100644 --- a/Octokit/Clients/SshKeysClient.cs +++ b/Octokit/Clients/SshKeysClient.cs @@ -49,7 +49,7 @@ namespace Octokit Ensure.ArgumentNotNull(key, "key"); var endpoint = "/user/keys/{0}".FormatUri(id); - return await Client.Update(endpoint, key); + return await Client.Patch(endpoint, key); } public async Task Delete(int id) diff --git a/Octokit/Clients/UsersClient.cs b/Octokit/Clients/UsersClient.cs index 4ca0a663..7e0516e5 100644 --- a/Octokit/Clients/UsersClient.cs +++ b/Octokit/Clients/UsersClient.cs @@ -54,7 +54,7 @@ namespace Octokit { Ensure.ArgumentNotNull(user, "user"); - return await Client.Update(userEndpoint, user); + return await Client.Patch(userEndpoint, user); } /// diff --git a/Octokit/Http/ApiConnection.cs b/Octokit/Http/ApiConnection.cs index 97dfd508..df98f4e3 100644 --- a/Octokit/Http/ApiConnection.cs +++ b/Octokit/Http/ApiConnection.cs @@ -79,7 +79,7 @@ namespace Octokit return response.BodyAsObject; } - public async Task Update(Uri endpoint, object data) + public async Task Patch(Uri endpoint, object data) { Ensure.ArgumentNotNull(endpoint, "endpoint"); Ensure.ArgumentNotNull(data, "data"); diff --git a/Octokit/Http/IApiConnection.cs b/Octokit/Http/IApiConnection.cs index ca14320b..51fce882 100644 --- a/Octokit/Http/IApiConnection.cs +++ b/Octokit/Http/IApiConnection.cs @@ -19,7 +19,7 @@ namespace Octokit Task Post(Uri endpoint, object data); Task Put(Uri endpoint, object data); Task Put(Uri endpoint, object data, string twoFactorAuthenticationCode); - Task Update(Uri endpoint, object data); + Task Patch(Uri endpoint, object data); [SuppressMessage("Microsoft.Design", "CA1004:GenericMethodsShouldProvideTypeParameter", Justification="Legitimate, but I'm not fixing it just yet.")] Task Delete(Uri endpoint); Task Post(Uri uri, Stream rawData, string contentType, string accepts);