mirror of
https://github.com/zoriya/octokit.net.git
synced 2026-06-08 04:40:54 +00:00
added new overloads
This commit is contained in:
@@ -34,6 +34,21 @@ namespace Octokit
|
||||
return ApiConnection.Post<Reaction>(ApiUrls.CommitCommentReactions(owner, name, number), reaction, AcceptHeaders.ReactionsPreview);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Creates a reaction for a specified Commit Comment
|
||||
/// </summary>
|
||||
/// <remarks>https://developer.github.com/v3/reactions/#create-reaction-for-a-commit-comment</remarks>
|
||||
/// <param name="repositoryId">The owner of the repository</param>
|
||||
/// <param name="number">The comment id</param>
|
||||
/// <param name="reaction">The reaction to create</param>
|
||||
/// <returns>A <see cref="Reaction"/> representing created reaction for specified comment id.</returns>
|
||||
public Task<Reaction> Create(int repositoryId, int number, NewReaction reaction)
|
||||
{
|
||||
Ensure.ArgumentNotNull(reaction, "reaction");
|
||||
|
||||
return ApiConnection.Post<Reaction>(ApiUrls.CommitCommentReactions(repositoryId, number), reaction, AcceptHeaders.ReactionsPreview);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get all reactions for a specified Commit Comment
|
||||
/// </summary>
|
||||
@@ -49,5 +64,17 @@ namespace Octokit
|
||||
|
||||
return ApiConnection.GetAll<Reaction>(ApiUrls.CommitCommentReactions(owner, name, number), AcceptHeaders.ReactionsPreview);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get all reactions for a specified Commit Comment
|
||||
/// </summary>
|
||||
/// <remarks>https://developer.github.com/v3/reactions/#list-reactions-for-a-commit-comment</remarks>
|
||||
/// <param name="repositoryId">The owner of the repository</param>
|
||||
/// <param name="number">The comment id</param>
|
||||
/// <returns>A <see cref="IReadOnlyList{Reaction}"/> of <see cref="Reaction"/>s representing all reactions for specified comment id.</returns>
|
||||
public Task<IReadOnlyList<Reaction>> GetAll(int repositoryId, int number)
|
||||
{
|
||||
return ApiConnection.GetAll<Reaction>(ApiUrls.CommitCommentReactions(repositoryId, number), AcceptHeaders.ReactionsPreview);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user