diff --git a/Octokit/Clients/ReactionCommitComment.cs b/Octokit/Clients/ReactionCommitComment.cs index 11162ae2..d145f51c 100644 --- a/Octokit/Clients/ReactionCommitComment.cs +++ b/Octokit/Clients/ReactionCommitComment.cs @@ -37,13 +37,12 @@ namespace Octokit /// The comment id /// The reaction for /// - public Task> ListReactions(string owner, string name, int number, NewReaction reaction) + public Task> ListReactions(string owner, string name, int number) { Ensure.ArgumentNotNullOrEmptyString(owner, "owner"); - Ensure.ArgumentNotNullOrEmptyString(name, "name"); - Ensure.ArgumentNotNull(reaction, "reaction"); + Ensure.ArgumentNotNullOrEmptyString(name, "name"); - return ApiConnection.Get(ApiUrls.CommitCommentReaction(owner, name, number),"", AcceptHeaders.ReactionsPreview); + return ApiConnection.GetAll(ApiUrls.CommitCommentReaction(owner, name, number), AcceptHeaders.ReactionsPreview); } } } diff --git a/Octokit/Http/ApiConnection.cs b/Octokit/Http/ApiConnection.cs index 3838e555..30c9634c 100644 --- a/Octokit/Http/ApiConnection.cs +++ b/Octokit/Http/ApiConnection.cs @@ -144,6 +144,19 @@ namespace Octokit return GetAll(uri, parameters, null, ApiOptions.None); } + /// + /// Gets all API resources in the list at the specified URI. + /// + /// Type of the API resource in the list. + /// URI of the API resource to get + /// Accept header to use for the API request + /// of the The API resources in the list. + /// Thrown when an API error occurs. + public Task> GetAll(Uri uri, string accepts) + { + return GetAll(uri, null, accepts, ApiOptions.None); + } + /// /// Gets all API resources in the list at the specified URI. /// @@ -463,7 +476,7 @@ namespace Octokit Ensure.ArgumentNotNull(uri, "uri"); Ensure.ArgumentNotNull(data, "data"); Ensure.ArgumentNotNull(accepts, "accepts"); - + return Connection.Delete(uri, data, accepts); } /// diff --git a/Octokit/Http/IApiConnection.cs b/Octokit/Http/IApiConnection.cs index 2e50e8c4..0444e3dd 100644 --- a/Octokit/Http/IApiConnection.cs +++ b/Octokit/Http/IApiConnection.cs @@ -91,6 +91,16 @@ namespace Octokit /// Thrown when an API error occurs. Task> GetAll(Uri uri, IDictionary parameters); + /// + /// Gets all API resources in the list at the specified URI. + /// + /// Type of the API resource in the list. + /// URI of the API resource to get + /// Accept header to use for the API request + /// of the The API resources in the list. + /// Thrown when an API error occurs. + Task> GetAll(Uri uri, string accepts); + /// /// Gets all API resources in the list at the specified URI. /// @@ -301,7 +311,7 @@ namespace Octokit /// Specifies accept response media type /// The returned Task Delete(Uri uri, object data, string accepts); - + /// /// Executes a GET to the API object at the specified URI. This operation is appropriate for /// API calls which wants to return the redirect URL.