From 301bb268bc7a3b4e33435b2c4c5b105c411d3d9f Mon Sep 17 00:00:00 2001 From: "aedampir@gmail.com" Date: Wed, 15 Jun 2016 18:40:56 +0700 Subject: [PATCH] added new overloads --- ...PullRequestReviewCommentReactionsClient.cs | 19 +++++++++++++ ...PullRequestReviewCommentReactionsClient.cs | 27 +++++++++++++++++++ ...PullRequestReviewCommentReactionsClient.cs | 19 +++++++++++++ ...PullRequestReviewCommentReactionsClient.cs | 27 +++++++++++++++++++ 4 files changed, 92 insertions(+) diff --git a/Octokit.Reactive/Clients/IObservablePullRequestReviewCommentReactionsClient.cs b/Octokit.Reactive/Clients/IObservablePullRequestReviewCommentReactionsClient.cs index bc9e9fb0..f2db63c4 100644 --- a/Octokit.Reactive/Clients/IObservablePullRequestReviewCommentReactionsClient.cs +++ b/Octokit.Reactive/Clients/IObservablePullRequestReviewCommentReactionsClient.cs @@ -20,6 +20,15 @@ namespace Octokit.Reactive /// An representing s for a specified pull request review comment. IObservable GetAll(string owner, string name, int number); + /// + /// Get all reactions for a specified Pull Request Review Comment. + /// + /// https://developer.github.com/v3/reactions/#list-reactions-for-a-pull-request-review-comment + /// The ID of the repository + /// The comment id + /// An representing s for a specified pull request review comment. + IObservable GetAll(int repositoryId, int number); + /// /// Creates a reaction for a specified Pull Request Review Comment. /// @@ -30,5 +39,15 @@ namespace Octokit.Reactive /// The reaction to create /// An representing created for a specified pull request review comment. IObservable Create(string owner, string name, int number, NewReaction reaction); + + /// + /// Creates a reaction for a specified Pull Request Review Comment. + /// + /// https://developer.github.com/v3/reactions/#create-reaction-for-a-pull-request-review-comment + /// The owner of the repository + /// The comment id + /// The reaction to create + /// An representing created for a specified pull request review comment. + IObservable Create(int repositoryId, int number, NewReaction reaction); } } diff --git a/Octokit.Reactive/Clients/ObservablePullRequestReviewCommentReactionsClient.cs b/Octokit.Reactive/Clients/ObservablePullRequestReviewCommentReactionsClient.cs index 334e22d8..5f15cf17 100644 --- a/Octokit.Reactive/Clients/ObservablePullRequestReviewCommentReactionsClient.cs +++ b/Octokit.Reactive/Clients/ObservablePullRequestReviewCommentReactionsClient.cs @@ -39,6 +39,18 @@ namespace Octokit.Reactive return _connection.GetAndFlattenAllPages(ApiUrls.PullRequestReviewCommentReaction(owner, name, number), null, AcceptHeaders.ReactionsPreview); } + /// + /// Get all reactions for a specified Pull Request Review Comment. + /// + /// https://developer.github.com/v3/reactions/#list-reactions-for-a-pull-request-review-comment + /// The ID of the repository + /// The comment id + /// An representing s for a specified pull request review comment. + public IObservable GetAll(int repositoryId, int number) + { + return _connection.GetAndFlattenAllPages(ApiUrls.PullRequestReviewCommentReaction(repositoryId, number), null, AcceptHeaders.ReactionsPreview); + } + /// /// Creates a reaction for a specified Pull Request Review Comment. /// @@ -56,5 +68,20 @@ namespace Octokit.Reactive return _client.Create(owner, name, number, reaction).ToObservable(); } + + /// + /// Creates a reaction for a specified Pull Request Review Comment. + /// + /// https://developer.github.com/v3/reactions/#create-reaction-for-a-pull-request-review-comment + /// The owner of the repository + /// The comment id + /// The reaction to create + /// An representing created for a specified pull request review comment. + public IObservable Create(int repositoryId, int number, NewReaction reaction) + { + Ensure.ArgumentNotNull(reaction, "reaction"); + + return _client.Create(repositoryId, number, reaction).ToObservable(); + } } } diff --git a/Octokit/Clients/IPullRequestReviewCommentReactionsClient.cs b/Octokit/Clients/IPullRequestReviewCommentReactionsClient.cs index 4d0c3fac..215a4948 100644 --- a/Octokit/Clients/IPullRequestReviewCommentReactionsClient.cs +++ b/Octokit/Clients/IPullRequestReviewCommentReactionsClient.cs @@ -20,6 +20,15 @@ namespace Octokit /// The comment id /// A of representing s for a specified pull request review comment. Task> GetAll(string owner, string name, int number); + + /// + /// Get all reactions for a specified Pull Request Review Comment. + /// + /// https://developer.github.com/v3/reactions/#list-reactions-for-a-pull-request-review-comment + /// The ID of the repository + /// The comment id + /// A of representing s for a specified pull request review comment. + Task> GetAll(int repositoryId, int number); /// /// Creates a reaction for a specified Pull Request Review Comment. @@ -31,5 +40,15 @@ namespace Octokit /// The reaction to create /// A representing created for a specified pull request review comment. Task Create(string owner, string name, int number, NewReaction reaction); + + /// + /// Creates a reaction for a specified Pull Request Review Comment. + /// + /// https://developer.github.com/v3/reactions/#create-reaction-for-a-pull-request-review-comment + /// The ID of the repository + /// The comment id + /// The reaction to create + /// A representing created for a specified pull request review comment. + Task Create(int repositoryId, int number, NewReaction reaction); } } diff --git a/Octokit/Clients/PullRequestReviewCommentReactionsClient.cs b/Octokit/Clients/PullRequestReviewCommentReactionsClient.cs index 21d63f8c..7c613dcd 100644 --- a/Octokit/Clients/PullRequestReviewCommentReactionsClient.cs +++ b/Octokit/Clients/PullRequestReviewCommentReactionsClient.cs @@ -32,6 +32,18 @@ namespace Octokit return ApiConnection.GetAll(ApiUrls.PullRequestReviewCommentReaction(owner, name, number), AcceptHeaders.ReactionsPreview); } + /// + /// Get all reactions for a specified Pull Request Review Comment. + /// + /// https://developer.github.com/v3/reactions/#list-reactions-for-a-pull-request-review-comment + /// The ID of the repository + /// The comment id + /// A of representing s for a specified pull request review comment. + public Task> GetAll(int repositoryId, int number) + { + return ApiConnection.GetAll(ApiUrls.PullRequestReviewCommentReaction(repositoryId, number), AcceptHeaders.ReactionsPreview); + } + /// /// Creates a reaction for a specified Pull Request Review Comment. /// @@ -49,5 +61,20 @@ namespace Octokit return ApiConnection.Post(ApiUrls.PullRequestReviewCommentReaction(owner, name, number), reaction, AcceptHeaders.ReactionsPreview); } + + /// + /// Creates a reaction for a specified Pull Request Review Comment. + /// + /// https://developer.github.com/v3/reactions/#create-reaction-for-a-pull-request-review-comment + /// The ID of the repository + /// The comment id + /// The reaction to create + /// A representing created for a specified pull request review comment. + public Task Create(int repositoryId, int number, NewReaction reaction) + { + Ensure.ArgumentNotNull(reaction, "reaction"); + + return ApiConnection.Post(ApiUrls.PullRequestReviewCommentReaction(repositoryId, number), reaction, AcceptHeaders.ReactionsPreview); + } } }