mirror of
https://github.com/zoriya/octokit.net.git
synced 2026-06-01 10:25:36 +00:00
added new overloads
This commit is contained in:
@@ -20,6 +20,15 @@ namespace Octokit.Reactive
|
||||
/// <returns>An <see cref="IObservable{Reaction}"/> representing <see cref="Reaction"/>s for a specified pull request review comment.</returns>
|
||||
IObservable<Reaction> GetAll(string owner, string name, int number);
|
||||
|
||||
/// <summary>
|
||||
/// Get all reactions for a specified Pull Request Review Comment.
|
||||
/// </summary>
|
||||
/// <remarks>https://developer.github.com/v3/reactions/#list-reactions-for-a-pull-request-review-comment</remarks>
|
||||
/// <param name="repositoryId">The ID of the repository</param>
|
||||
/// <param name="number">The comment id</param>
|
||||
/// <returns>An <see cref="IObservable{Reaction}"/> representing <see cref="Reaction"/>s for a specified pull request review comment.</returns>
|
||||
IObservable<Reaction> GetAll(int repositoryId, int number);
|
||||
|
||||
/// <summary>
|
||||
/// Creates a reaction for a specified Pull Request Review Comment.
|
||||
/// </summary>
|
||||
@@ -30,5 +39,15 @@ namespace Octokit.Reactive
|
||||
/// <param name="reaction">The reaction to create</param>
|
||||
/// <returns>An <see cref="IObservable{Reaction}"/> representing created <see cref="Reaction"/> for a specified pull request review comment.</returns>
|
||||
IObservable<Reaction> Create(string owner, string name, int number, NewReaction reaction);
|
||||
|
||||
/// <summary>
|
||||
/// Creates a reaction for a specified Pull Request Review Comment.
|
||||
/// </summary>
|
||||
/// <remarks>https://developer.github.com/v3/reactions/#create-reaction-for-a-pull-request-review-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>An <see cref="IObservable{Reaction}"/> representing created <see cref="Reaction"/> for a specified pull request review comment.</returns>
|
||||
IObservable<Reaction> Create(int repositoryId, int number, NewReaction reaction);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -39,6 +39,18 @@ namespace Octokit.Reactive
|
||||
return _connection.GetAndFlattenAllPages<Reaction>(ApiUrls.PullRequestReviewCommentReaction(owner, name, number), null, AcceptHeaders.ReactionsPreview);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get all reactions for a specified Pull Request Review Comment.
|
||||
/// </summary>
|
||||
/// <remarks>https://developer.github.com/v3/reactions/#list-reactions-for-a-pull-request-review-comment</remarks>
|
||||
/// <param name="repositoryId">The ID of the repository</param>
|
||||
/// <param name="number">The comment id</param>
|
||||
/// <returns>An <see cref="IObservable{Reaction}"/> representing <see cref="Reaction"/>s for a specified pull request review comment.</returns>
|
||||
public IObservable<Reaction> GetAll(int repositoryId, int number)
|
||||
{
|
||||
return _connection.GetAndFlattenAllPages<Reaction>(ApiUrls.PullRequestReviewCommentReaction(repositoryId, number), null, AcceptHeaders.ReactionsPreview);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Creates a reaction for a specified Pull Request Review Comment.
|
||||
/// </summary>
|
||||
@@ -56,5 +68,20 @@ namespace Octokit.Reactive
|
||||
|
||||
return _client.Create(owner, name, number, reaction).ToObservable();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Creates a reaction for a specified Pull Request Review Comment.
|
||||
/// </summary>
|
||||
/// <remarks>https://developer.github.com/v3/reactions/#create-reaction-for-a-pull-request-review-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>An <see cref="IObservable{Reaction}"/> representing created <see cref="Reaction"/> for a specified pull request review comment.</returns>
|
||||
public IObservable<Reaction> Create(int repositoryId, int number, NewReaction reaction)
|
||||
{
|
||||
Ensure.ArgumentNotNull(reaction, "reaction");
|
||||
|
||||
return _client.Create(repositoryId, number, reaction).ToObservable();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,6 +20,15 @@ namespace Octokit
|
||||
/// <param name="number">The comment id</param>
|
||||
/// <returns>A <see cref="Task{T}"/> of <see cref="IReadOnlyList{Reactions}"/> representing <see cref="Reaction"/>s for a specified pull request review comment.</returns>
|
||||
Task<IReadOnlyList<Reaction>> GetAll(string owner, string name, int number);
|
||||
|
||||
/// <summary>
|
||||
/// Get all reactions for a specified Pull Request Review Comment.
|
||||
/// </summary>
|
||||
/// <remarks>https://developer.github.com/v3/reactions/#list-reactions-for-a-pull-request-review-comment</remarks>
|
||||
/// <param name="repositoryId">The ID of the repository</param>
|
||||
/// <param name="number">The comment id</param>
|
||||
/// <returns>A <see cref="Task{T}"/> of <see cref="IReadOnlyList{Reactions}"/> representing <see cref="Reaction"/>s for a specified pull request review comment.</returns>
|
||||
Task<IReadOnlyList<Reaction>> GetAll(int repositoryId, int number);
|
||||
|
||||
/// <summary>
|
||||
/// Creates a reaction for a specified Pull Request Review Comment.
|
||||
@@ -31,5 +40,15 @@ namespace Octokit
|
||||
/// <param name="reaction">The reaction to create</param>
|
||||
/// <returns>A <see cref="Task{Reaction}"/> representing created <see cref="Reaction"/> for a specified pull request review comment.</returns>
|
||||
Task<Reaction> Create(string owner, string name, int number, NewReaction reaction);
|
||||
|
||||
/// <summary>
|
||||
/// Creates a reaction for a specified Pull Request Review Comment.
|
||||
/// </summary>
|
||||
/// <remarks>https://developer.github.com/v3/reactions/#create-reaction-for-a-pull-request-review-comment</remarks>
|
||||
/// <param name="repositoryId">The ID of the repository</param>
|
||||
/// <param name="number">The comment id</param>
|
||||
/// <param name="reaction">The reaction to create</param>
|
||||
/// <returns>A <see cref="Task{Reaction}"/> representing created <see cref="Reaction"/> for a specified pull request review comment.</returns>
|
||||
Task<Reaction> Create(int repositoryId, int number, NewReaction reaction);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -32,6 +32,18 @@ namespace Octokit
|
||||
return ApiConnection.GetAll<Reaction>(ApiUrls.PullRequestReviewCommentReaction(owner, name, number), AcceptHeaders.ReactionsPreview);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get all reactions for a specified Pull Request Review Comment.
|
||||
/// </summary>
|
||||
/// <remarks>https://developer.github.com/v3/reactions/#list-reactions-for-a-pull-request-review-comment</remarks>
|
||||
/// <param name="repositoryId">The ID of the repository</param>
|
||||
/// <param name="number">The comment id</param>
|
||||
/// <returns>A <see cref="Task{T}"/> of <see cref="IReadOnlyList{Reactions}"/> representing <see cref="Reaction"/>s for a specified pull request review comment.</returns>
|
||||
public Task<IReadOnlyList<Reaction>> GetAll(int repositoryId, int number)
|
||||
{
|
||||
return ApiConnection.GetAll<Reaction>(ApiUrls.PullRequestReviewCommentReaction(repositoryId, number), AcceptHeaders.ReactionsPreview);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Creates a reaction for a specified Pull Request Review Comment.
|
||||
/// </summary>
|
||||
@@ -49,5 +61,20 @@ namespace Octokit
|
||||
|
||||
return ApiConnection.Post<Reaction>(ApiUrls.PullRequestReviewCommentReaction(owner, name, number), reaction, AcceptHeaders.ReactionsPreview);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Creates a reaction for a specified Pull Request Review Comment.
|
||||
/// </summary>
|
||||
/// <remarks>https://developer.github.com/v3/reactions/#create-reaction-for-a-pull-request-review-comment</remarks>
|
||||
/// <param name="repositoryId">The ID of the repository</param>
|
||||
/// <param name="number">The comment id</param>
|
||||
/// <param name="reaction">The reaction to create</param>
|
||||
/// <returns>A <see cref="Task{Reaction}"/> representing created <see cref="Reaction"/> for a specified pull request review comment.</returns>
|
||||
public Task<Reaction> Create(int repositoryId, int number, NewReaction reaction)
|
||||
{
|
||||
Ensure.ArgumentNotNull(reaction, "reaction");
|
||||
|
||||
return ApiConnection.Post<Reaction>(ApiUrls.PullRequestReviewCommentReaction(repositoryId, number), reaction, AcceptHeaders.ReactionsPreview);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user