diff --git a/Octokit.Reactive/Clients/IObservableCommitCommentReactionsClient.cs b/Octokit.Reactive/Clients/IObservableCommitCommentReactionsClient.cs index e76acd4d..0e4c36d4 100644 --- a/Octokit.Reactive/Clients/IObservableCommitCommentReactionsClient.cs +++ b/Octokit.Reactive/Clients/IObservableCommitCommentReactionsClient.cs @@ -17,20 +17,20 @@ namespace Octokit.Reactive /// https://developer.github.com/v3/reactions/#create-reaction-for-a-commit-comment /// The owner of the repository /// The name of the repository - /// The comment id + /// The comment id /// The reaction to create /// - IObservable Create(string owner, string name, int number, NewReaction reaction); + IObservable Create(string owner, string name, long commentId, NewReaction reaction); /// /// Creates a reaction for a specified Commit Comment /// /// https://developer.github.com/v3/reactions/#create-reaction-for-a-commit-comment /// The Id of the repository - /// The comment id + /// The comment id /// The reaction to create /// - IObservable Create(long repositoryId, int number, NewReaction reaction); + IObservable Create(long repositoryId, long commentId, NewReaction reaction); /// /// List reactions for a specified Commit Comment @@ -38,9 +38,9 @@ namespace Octokit.Reactive /// https://developer.github.com/v3/reactions/#list-reactions-for-a-commit-comment /// The owner of the repository /// The name of the repository - /// The comment id + /// The comment id /// - IObservable GetAll(string owner, string name, int number); + IObservable GetAll(string owner, string name, long commentId); /// /// List reactions for a specified Commit Comment @@ -48,29 +48,29 @@ namespace Octokit.Reactive /// https://developer.github.com/v3/reactions/#list-reactions-for-a-commit-comment /// The owner of the repository /// The name of the repository - /// The comment id + /// The comment id /// Options for changing the API response /// - IObservable GetAll(string owner, string name, int number, ApiOptions options); + IObservable GetAll(string owner, string name, long commentId, ApiOptions options); /// /// List reactions for a specified Commit Comment /// /// https://developer.github.com/v3/reactions/#list-reactions-for-a-commit-comment /// The owner of the repository - /// The comment id + /// The comment id /// - IObservable GetAll(long repositoryId, int number); + IObservable GetAll(long repositoryId, long commentId); /// /// List reactions for a specified Commit Comment /// /// https://developer.github.com/v3/reactions/#list-reactions-for-a-commit-comment /// The owner of the repository - /// The comment id + /// The comment id /// Options for changing the API response /// - IObservable GetAll(long repositoryId, int number, ApiOptions options); + IObservable GetAll(long repositoryId, long commentId, ApiOptions options); /// /// Deletes a reaction for a specified Commit Comment @@ -81,7 +81,7 @@ namespace Octokit.Reactive /// The comment id /// The reaction id /// - IObservable Delete(string owner, string name, int commentId, int reactionId); + IObservable Delete(string owner, string name, long commentId, long reactionId); /// /// Deletes a reaction for a specified Commit Comment @@ -91,6 +91,6 @@ namespace Octokit.Reactive /// The comment id /// The reaction id /// - IObservable Delete(long repositoryId, int commentId, int reactionId); + IObservable Delete(long repositoryId, long commentId, long reactionId); } } diff --git a/Octokit.Reactive/Clients/IObservableGistCommentsClient.cs b/Octokit.Reactive/Clients/IObservableGistCommentsClient.cs index ea817b2f..aa106161 100644 --- a/Octokit.Reactive/Clients/IObservableGistCommentsClient.cs +++ b/Octokit.Reactive/Clients/IObservableGistCommentsClient.cs @@ -15,7 +15,7 @@ namespace Octokit.Reactive /// IObservable{GistComment}. [SuppressMessage("Microsoft.Naming", "CA1716:IdentifiersShouldNotMatchKeywords", MessageId = "Get", Justification = "Method makes a network request")] - IObservable Get(string gistId, int commentId); + IObservable Get(string gistId, long commentId); /// /// Gets all comments for the gist with the specified id. @@ -51,7 +51,7 @@ namespace Octokit.Reactive /// The id of the comment /// The updated body of the comment /// IObservable{GistComment}. - IObservable Update(string gistId, int commentId, string comment); + IObservable Update(string gistId, long commentId, string comment); /// /// Deletes the comment with the specified gist- and comment id. @@ -60,6 +60,6 @@ namespace Octokit.Reactive /// The id of the gist /// The id of the comment /// IObservable{Unit}. - IObservable Delete(string gistId, int commentId); + IObservable Delete(string gistId, long commentId); } } \ No newline at end of file diff --git a/Octokit.Reactive/Clients/IObservableIssueCommentReactionsClient.cs b/Octokit.Reactive/Clients/IObservableIssueCommentReactionsClient.cs index 22f74fbd..39bdc62a 100644 --- a/Octokit.Reactive/Clients/IObservableIssueCommentReactionsClient.cs +++ b/Octokit.Reactive/Clients/IObservableIssueCommentReactionsClient.cs @@ -17,18 +17,18 @@ namespace Octokit.Reactive /// https://developer.github.com/v3/reactions/#create-reaction-for-an-issue-comment /// The owner of the repository /// The name of the repository - /// The comment id + /// The comment id /// The reaction to create - IObservable Create(string owner, string name, int number, NewReaction reaction); + IObservable Create(string owner, string name, long commentId, NewReaction reaction); /// /// Creates a reaction for a specified Issue Comment /// /// https://developer.github.com/v3/reactions/#create-reaction-for-an-issue-comment /// The Id of the repository - /// The comment id + /// The comment id /// The reaction to create - IObservable Create(long repositoryId, int number, NewReaction reaction); + IObservable Create(long repositoryId, long commentId, NewReaction reaction); /// /// List reactions for a specified Issue Comment @@ -36,8 +36,8 @@ namespace Octokit.Reactive /// https://developer.github.com/v3/reactions/#list-reactions-for-an-issue-comment /// The owner of the repository /// The name of the repository - /// The comment id - IObservable GetAll(string owner, string name, int number); + /// The comment id + IObservable GetAll(string owner, string name, long commentId); /// /// List reactions for a specified Issue Comment @@ -45,26 +45,26 @@ namespace Octokit.Reactive /// https://developer.github.com/v3/reactions/#list-reactions-for-an-issue-comment /// The owner of the repository /// The name of the repository - /// The comment id + /// The comment id /// Options for changing the API response - IObservable GetAll(string owner, string name, int number, ApiOptions options); + IObservable GetAll(string owner, string name, long commentId, ApiOptions options); /// /// List reactions for a specified Issue Comment /// /// https://developer.github.com/v3/reactions/#list-reactions-for-an-issue-comment /// The Id of the repository - /// The comment id - IObservable GetAll(long repositoryId, int number); + /// The comment id + IObservable GetAll(long repositoryId, long commentId); /// /// List reactions for a specified Issue Comment /// /// https://developer.github.com/v3/reactions/#list-reactions-for-an-issue-comment /// The Id of the repository - /// The comment id + /// The comment id /// Options for changing the API response - IObservable GetAll(long repositoryId, int number, ApiOptions options); + IObservable GetAll(long repositoryId, long commentId, ApiOptions options); /// /// Deletes a reaction for a specified Issue Comment @@ -75,7 +75,7 @@ namespace Octokit.Reactive /// The comment id /// The reaction id /// - IObservable Delete(string owner, string name, int commentId, int reactionId); + IObservable Delete(string owner, string name, long commentId, long reactionId); /// /// Deletes a reaction for a specified Commit Comment @@ -85,6 +85,6 @@ namespace Octokit.Reactive /// The comment id /// The reaction id /// - IObservable Delete(long repositoryId, int commentId, int reactionId); + IObservable Delete(long repositoryId, long commentId, long reactionId); } } diff --git a/Octokit.Reactive/Clients/IObservableIssueCommentsClient.cs b/Octokit.Reactive/Clients/IObservableIssueCommentsClient.cs index 0744d57a..110515f2 100644 --- a/Octokit.Reactive/Clients/IObservableIssueCommentsClient.cs +++ b/Octokit.Reactive/Clients/IObservableIssueCommentsClient.cs @@ -18,20 +18,20 @@ namespace Octokit.Reactive /// http://developer.github.com/v3/issues/comments/#get-a-single-comment /// The owner of the repository /// The name of the repository - /// The issue comment id + /// The issue comment id [SuppressMessage("Microsoft.Naming", "CA1716:IdentifiersShouldNotMatchKeywords", MessageId = "Get", Justification = "Method makes a network request")] - IObservable Get(string owner, string name, int id); + IObservable Get(string owner, string name, long commentId); /// /// Gets a single Issue Comment by id. /// /// http://developer.github.com/v3/issues/comments/#get-a-single-comment /// The Id of the repository - /// The issue comment id + /// The issue comment id [SuppressMessage("Microsoft.Naming", "CA1716:IdentifiersShouldNotMatchKeywords", MessageId = "Get", Justification = "Method makes a network request")] - IObservable Get(long repositoryId, int id); + IObservable Get(long repositoryId, long commentId); /// /// Gets Issue Comments for a repository. @@ -202,18 +202,18 @@ namespace Octokit.Reactive /// http://developer.github.com/v3/issues/comments/#edit-a-comment /// The owner of the repository /// The name of the repository - /// The comment id + /// The comment id /// The modified comment - IObservable Update(string owner, string name, int id, string commentUpdate); + IObservable Update(string owner, string name, long commentId, string commentUpdate); /// /// Updates a specified Issue Comment. /// /// http://developer.github.com/v3/issues/comments/#edit-a-comment /// The Id of the repository - /// The comment id + /// The comment id /// The modified comment - IObservable Update(long repositoryId, int id, string commentUpdate); + IObservable Update(long repositoryId, long commentId, string commentUpdate); /// /// Deletes the specified Issue Comment @@ -221,15 +221,15 @@ namespace Octokit.Reactive /// http://developer.github.com/v3/issues/comments/#delete-a-comment /// The owner of the repository /// The name of the repository - /// The comment id - IObservable Delete(string owner, string name, int id); + /// The comment id + IObservable Delete(string owner, string name, long commentId); /// /// Deletes the specified Issue Comment /// /// http://developer.github.com/v3/issues/comments/#delete-a-comment /// The Id of the repository - /// The comment id - IObservable Delete(long repositoryId, int id); + /// The comment id + IObservable Delete(long repositoryId, long commentId); } } diff --git a/Octokit.Reactive/Clients/IObservableIssueReactionsClient.cs b/Octokit.Reactive/Clients/IObservableIssueReactionsClient.cs index c8b3baa6..cb04b6d8 100644 --- a/Octokit.Reactive/Clients/IObservableIssueReactionsClient.cs +++ b/Octokit.Reactive/Clients/IObservableIssueReactionsClient.cs @@ -75,7 +75,7 @@ namespace Octokit.Reactive /// The issue number /// The reaction id /// - IObservable Delete(string owner, string name, int issueNumber, int reactionId); + IObservable Delete(string owner, string name, int issueNumber, long reactionId); /// /// Deletes a reaction for a specified Issue @@ -85,6 +85,6 @@ namespace Octokit.Reactive /// The issue number /// The reaction id /// - IObservable Delete(long repositoryId, int issueNumber, int reactionId); + IObservable Delete(long repositoryId, int issueNumber, long reactionId); } } diff --git a/Octokit.Reactive/Clients/IObservablePullRequestReviewCommentReactionsClient.cs b/Octokit.Reactive/Clients/IObservablePullRequestReviewCommentReactionsClient.cs index 4fdf13a0..18ee928b 100644 --- a/Octokit.Reactive/Clients/IObservablePullRequestReviewCommentReactionsClient.cs +++ b/Octokit.Reactive/Clients/IObservablePullRequestReviewCommentReactionsClient.cs @@ -17,8 +17,8 @@ namespace Octokit.Reactive /// https://developer.github.com/v3/reactions/#list-reactions-for-a-pull-request-review-comment /// The owner of the repository /// The name of the repository - /// The comment id - IObservable GetAll(string owner, string name, int number); + /// The comment id + IObservable GetAll(string owner, string name, long commentId); /// /// Get all reactions for a specified Pull Request Review Comment. @@ -26,26 +26,26 @@ namespace Octokit.Reactive /// https://developer.github.com/v3/reactions/#list-reactions-for-a-pull-request-review-comment /// The owner of the repository /// The name of the repository - /// The comment id + /// The comment id /// Options for changing the API response - IObservable GetAll(string owner, string name, int number, ApiOptions options); + IObservable GetAll(string owner, string name, long commentId, ApiOptions options); /// /// 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 - IObservable GetAll(long repositoryId, int number); + /// The comment id + IObservable GetAll(long repositoryId, long commentId); /// /// 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 + /// The comment id /// Options for changing the API response - IObservable GetAll(long repositoryId, int number, ApiOptions options); + IObservable GetAll(long repositoryId, long commentId, ApiOptions options); /// /// Creates a reaction for a specified Pull Request Review Comment. @@ -53,18 +53,18 @@ namespace Octokit.Reactive /// https://developer.github.com/v3/reactions/#create-reaction-for-a-pull-request-review-comment /// The owner of the repository /// The name of the repository - /// The comment id + /// The comment id /// The reaction to create - IObservable Create(string owner, string name, int number, NewReaction reaction); + IObservable Create(string owner, string name, long commentId, 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 comment id /// The reaction to create - IObservable Create(long repositoryId, int number, NewReaction reaction); + IObservable Create(long repositoryId, long commentId, NewReaction reaction); /// /// Deletes a reaction for a specified Pull Request comment @@ -75,7 +75,7 @@ namespace Octokit.Reactive /// The comment id /// The reaction id /// - IObservable Delete(string owner, string name, int commentId, int reactionId); + IObservable Delete(string owner, string name, long commentId, long reactionId); /// /// Deletes a reaction for a specified Pull Request comment @@ -85,6 +85,6 @@ namespace Octokit.Reactive /// The comment id /// The reaction id /// - IObservable Delete(long repositoryId, int commentId, int reactionId); + IObservable Delete(long repositoryId, long commentId, long reactionId); } } diff --git a/Octokit.Reactive/Clients/IObservablePullRequestReviewCommentsClient.cs b/Octokit.Reactive/Clients/IObservablePullRequestReviewCommentsClient.cs index deefcc82..bb78ce43 100644 --- a/Octokit.Reactive/Clients/IObservablePullRequestReviewCommentsClient.cs +++ b/Octokit.Reactive/Clients/IObservablePullRequestReviewCommentsClient.cs @@ -121,16 +121,16 @@ namespace Octokit.Reactive /// http://developer.github.com/v3/pulls/comments/#get-a-single-comment /// The owner of the repository /// The name of the repository - /// The pull request review comment number - IObservable GetComment(string owner, string name, int number); + /// The pull request review comment id + IObservable GetComment(string owner, string name, long commentId); /// /// Gets a single pull request review comment by number. /// /// http://developer.github.com/v3/pulls/comments/#get-a-single-comment /// The Id of the repository - /// The pull request review comment number - IObservable GetComment(long repositoryId, int number); + /// The pull request review comment id + IObservable GetComment(long repositoryId, long commentId); /// /// Creates a comment on a pull request review. @@ -176,18 +176,18 @@ namespace Octokit.Reactive /// http://developer.github.com/v3/pulls/comments/#edit-a-comment /// The owner of the repository /// The name of the repository - /// The pull request review comment number + /// The pull request review comment id /// The edited comment - IObservable Edit(string owner, string name, int number, PullRequestReviewCommentEdit comment); + IObservable Edit(string owner, string name, long commentId, PullRequestReviewCommentEdit comment); /// /// Edits a comment on a pull request review. /// /// http://developer.github.com/v3/pulls/comments/#edit-a-comment /// The Id of the repository - /// The pull request review comment number + /// The pull request review comment id /// The edited comment - IObservable Edit(long repositoryId, int number, PullRequestReviewCommentEdit comment); + IObservable Edit(long repositoryId, long commentId, PullRequestReviewCommentEdit comment); /// /// Deletes a comment on a pull request review. @@ -195,15 +195,15 @@ namespace Octokit.Reactive /// http://developer.github.com/v3/pulls/comments/#delete-a-comment /// The owner of the repository /// The name of the repository - /// The pull request review comment number - IObservable Delete(string owner, string name, int number); + /// The pull request review comment id + IObservable Delete(string owner, string name, long commentId); /// /// Deletes a comment on a pull request review. /// /// http://developer.github.com/v3/pulls/comments/#delete-a-comment /// The Id of the repository - /// The pull request review comment number - IObservable Delete(long repositoryId, int number); + /// The pull request review comment id + IObservable Delete(long repositoryId, long commentId); } } diff --git a/Octokit.Reactive/Clients/IObservableRepositoryCommentsClient.cs b/Octokit.Reactive/Clients/IObservableRepositoryCommentsClient.cs index 261ea009..11e2d6d3 100644 --- a/Octokit.Reactive/Clients/IObservableRepositoryCommentsClient.cs +++ b/Octokit.Reactive/Clients/IObservableRepositoryCommentsClient.cs @@ -18,20 +18,20 @@ namespace Octokit.Reactive /// http://developer.github.com/v3/repos/comments/#get-a-single-commit-comment /// The owner of the repository /// The name of the repository - /// The comment id + /// The comment id [SuppressMessage("Microsoft.Naming", "CA1716:IdentifiersShouldNotMatchKeywords", MessageId = "Get", Justification = "Method makes a network request")] - IObservable Get(string owner, string name, int number); + IObservable Get(string owner, string name, long commentId); /// /// Gets a single Repository Comment by number. /// /// http://developer.github.com/v3/repos/comments/#get-a-single-commit-comment /// The Id of the repository - /// The comment id + /// The comment id [SuppressMessage("Microsoft.Naming", "CA1716:IdentifiersShouldNotMatchKeywords", MessageId = "Get", Justification = "Method makes a network request")] - IObservable Get(long repositoryId, int number); + IObservable Get(long repositoryId, long commentId); /// /// Gets Commit Comments for a repository. @@ -126,18 +126,18 @@ namespace Octokit.Reactive /// http://developer.github.com/v3/repos/comments/#update-a-commit-comment /// The owner of the repository /// The name of the repository - /// The comment number + /// The comment id /// The modified comment - IObservable Update(string owner, string name, int number, string commentUpdate); + IObservable Update(string owner, string name, long commentId, string commentUpdate); /// /// Updates a specified Commit Comment. /// /// http://developer.github.com/v3/repos/comments/#update-a-commit-comment /// The Id of the repository - /// The comment number + /// The comment id /// The modified comment - IObservable Update(long repositoryId, int number, string commentUpdate); + IObservable Update(long repositoryId, long commentId, string commentUpdate); /// /// Deletes the specified Commit Comment @@ -145,15 +145,15 @@ namespace Octokit.Reactive /// http://developer.github.com/v3/repos/comments/#delete-a-commit-comment /// The owner of the repository /// The name of the repository - /// The comment id - IObservable Delete(string owner, string name, int number); + /// The comment id + IObservable Delete(string owner, string name, long commentId); /// /// Deletes the specified Commit Comment /// /// http://developer.github.com/v3/repos/comments/#delete-a-commit-comment /// The Id of the repository - /// The comment id - IObservable Delete(long repositoryId, int number); + /// The comment id + IObservable Delete(long repositoryId, long commentId); } } diff --git a/Octokit.Reactive/Clients/ObservableCommitCommentReactionsClient.cs b/Octokit.Reactive/Clients/ObservableCommitCommentReactionsClient.cs index 36400e87..17a3f030 100644 --- a/Octokit.Reactive/Clients/ObservableCommitCommentReactionsClient.cs +++ b/Octokit.Reactive/Clients/ObservableCommitCommentReactionsClient.cs @@ -30,16 +30,16 @@ namespace Octokit.Reactive /// https://developer.github.com/v3/reactions/#create-reaction-for-a-commit-comment /// The owner of the repository /// The name of the repository - /// The comment id + /// The comment id /// The reaction to create /// - public IObservable Create(string owner, string name, int number, NewReaction reaction) + public IObservable Create(string owner, string name, long commentId, NewReaction reaction) { Ensure.ArgumentNotNullOrEmptyString(owner, nameof(owner)); Ensure.ArgumentNotNullOrEmptyString(name, nameof(name)); Ensure.ArgumentNotNull(reaction, nameof(reaction)); - return _client.Create(owner, name, number, reaction).ToObservable(); + return _client.Create(owner, name, commentId, reaction).ToObservable(); } /// @@ -47,14 +47,14 @@ namespace Octokit.Reactive /// /// https://developer.github.com/v3/reactions/#create-reaction-for-a-commit-comment /// The Id of the repository - /// The comment id + /// The comment id /// The reaction to create /// - public IObservable Create(long repositoryId, int number, NewReaction reaction) + public IObservable Create(long repositoryId, long commentId, NewReaction reaction) { Ensure.ArgumentNotNull(reaction, nameof(reaction)); - return _client.Create(repositoryId, number, reaction).ToObservable(); + return _client.Create(repositoryId, commentId, reaction).ToObservable(); } /// @@ -63,11 +63,11 @@ namespace Octokit.Reactive /// https://developer.github.com/v3/reactions/#list-reactions-for-a-commit-comment /// The owner of the repository /// The name of the repository - /// The comment id + /// The comment id /// - public IObservable GetAll(string owner, string name, int number) + public IObservable GetAll(string owner, string name, long commentId) { - return GetAll(owner, name, number, ApiOptions.None); + return GetAll(owner, name, commentId, ApiOptions.None); } /// @@ -76,16 +76,16 @@ namespace Octokit.Reactive /// https://developer.github.com/v3/reactions/#list-reactions-for-a-commit-comment /// The owner of the repository /// The name of the repository - /// The comment id + /// The comment id /// Options for changing the API response /// - public IObservable GetAll(string owner, string name, int number, ApiOptions options) + public IObservable GetAll(string owner, string name, long commentId, ApiOptions options) { Ensure.ArgumentNotNullOrEmptyString(owner, nameof(owner)); Ensure.ArgumentNotNullOrEmptyString(name, nameof(name)); Ensure.ArgumentNotNull(options, nameof(options)); - return _connection.GetAndFlattenAllPages(ApiUrls.CommitCommentReactions(owner, name, number), null, options); + return _connection.GetAndFlattenAllPages(ApiUrls.CommitCommentReactions(owner, name, commentId), null, options); } /// @@ -93,11 +93,11 @@ namespace Octokit.Reactive /// /// https://developer.github.com/v3/reactions/#list-reactions-for-a-commit-comment /// The owner of the repository - /// The comment id + /// The comment id /// - public IObservable GetAll(long repositoryId, int number) + public IObservable GetAll(long repositoryId, long commentId) { - return GetAll(repositoryId, number, ApiOptions.None); + return GetAll(repositoryId, commentId, ApiOptions.None); } /// @@ -105,14 +105,14 @@ namespace Octokit.Reactive /// /// https://developer.github.com/v3/reactions/#list-reactions-for-a-commit-comment /// The owner of the repository - /// The comment id + /// The comment id /// Options for changing the API response /// - public IObservable GetAll(long repositoryId, int number, ApiOptions options) + public IObservable GetAll(long repositoryId, long commentId, ApiOptions options) { Ensure.ArgumentNotNull(options, nameof(options)); - return _connection.GetAndFlattenAllPages(ApiUrls.CommitCommentReactions(repositoryId, number), null, options); + return _connection.GetAndFlattenAllPages(ApiUrls.CommitCommentReactions(repositoryId, commentId), null, options); } /// @@ -124,7 +124,7 @@ namespace Octokit.Reactive /// The comment id /// The reaction id /// - public IObservable Delete(string owner, string name, int commentId, int reactionId) + public IObservable Delete(string owner, string name, long commentId, long reactionId) { Ensure.ArgumentNotNullOrEmptyString(owner, nameof(owner)); Ensure.ArgumentNotNullOrEmptyString(name, nameof(name)); @@ -139,13 +139,13 @@ namespace Octokit.Reactive /// https://docs.github.com/rest/reactions#delete-a-commit-comment-reaction /// The Id of the repository /// The comment id - /// The reaction id + /// The reaction id /// - public IObservable Delete(long repositoryId, int commentId, int reactionid) + public IObservable Delete(long repositoryId, long commentId, long reactionId) { - Ensure.ArgumentNotNull(reactionid, nameof(reactionid)); + Ensure.ArgumentNotNull(reactionId, nameof(reactionId)); - return _client.Delete(repositoryId, commentId, reactionid).ToObservable(); + return _client.Delete(repositoryId, commentId, reactionId).ToObservable(); } } } diff --git a/Octokit.Reactive/Clients/ObservableGistCommentsClient.cs b/Octokit.Reactive/Clients/ObservableGistCommentsClient.cs index ac16b247..7aefce81 100644 --- a/Octokit.Reactive/Clients/ObservableGistCommentsClient.cs +++ b/Octokit.Reactive/Clients/ObservableGistCommentsClient.cs @@ -25,7 +25,7 @@ namespace Octokit.Reactive /// The id of the gist /// The id of the comment /// IObservable{GistComment}. - public IObservable Get(string gistId, int commentId) + public IObservable Get(string gistId, long commentId) { return _client.Get(gistId, commentId).ToObservable(); } @@ -80,7 +80,7 @@ namespace Octokit.Reactive /// The id of the comment /// The updated body of the comment /// IObservable{GistComment}. - public IObservable Update(string gistId, int commentId, string comment) + public IObservable Update(string gistId, long commentId, string comment) { Ensure.ArgumentNotNullOrEmptyString(comment, nameof(comment)); @@ -94,7 +94,7 @@ namespace Octokit.Reactive /// The id of the gist /// The id of the comment /// IObservable{Unit}. - public IObservable Delete(string gistId, int commentId) + public IObservable Delete(string gistId, long commentId) { return _client.Delete(gistId, commentId).ToObservable(); } diff --git a/Octokit.Reactive/Clients/ObservableIssueCommentReactionsClient.cs b/Octokit.Reactive/Clients/ObservableIssueCommentReactionsClient.cs index 747e5c3f..bf348de6 100644 --- a/Octokit.Reactive/Clients/ObservableIssueCommentReactionsClient.cs +++ b/Octokit.Reactive/Clients/ObservableIssueCommentReactionsClient.cs @@ -30,15 +30,15 @@ namespace Octokit.Reactive /// https://developer.github.com/v3/reactions/#create-reaction-for-an-issue-comment /// The owner of the repository /// The name of the repository - /// The comment id + /// The comment id /// The reaction to create - public IObservable Create(string owner, string name, int number, NewReaction reaction) + public IObservable Create(string owner, string name, long commentId, NewReaction reaction) { Ensure.ArgumentNotNullOrEmptyString(owner, nameof(owner)); Ensure.ArgumentNotNullOrEmptyString(name, nameof(name)); Ensure.ArgumentNotNull(reaction, nameof(reaction)); - return _client.Create(owner, name, number, reaction).ToObservable(); + return _client.Create(owner, name, commentId, reaction).ToObservable(); } /// @@ -46,13 +46,13 @@ namespace Octokit.Reactive /// /// https://developer.github.com/v3/reactions/#create-reaction-for-an-issue-comment /// The Id of the repository - /// The comment id + /// The comment id /// The reaction to create - public IObservable Create(long repositoryId, int number, NewReaction reaction) + public IObservable Create(long repositoryId, long commentId, NewReaction reaction) { Ensure.ArgumentNotNull(reaction, nameof(reaction)); - return _client.Create(repositoryId, number, reaction).ToObservable(); + return _client.Create(repositoryId, commentId, reaction).ToObservable(); } /// @@ -61,13 +61,13 @@ namespace Octokit.Reactive /// https://developer.github.com/v3/reactions/#list-reactions-for-an-issue-comment /// The owner of the repository /// The name of the repository - /// The comment id - public IObservable GetAll(string owner, string name, int number) + /// The comment id + public IObservable GetAll(string owner, string name, long commentId) { Ensure.ArgumentNotNullOrEmptyString(owner, nameof(owner)); Ensure.ArgumentNotNullOrEmptyString(name, nameof(name)); - return GetAll(owner, name, number, ApiOptions.None); + return GetAll(owner, name, commentId, ApiOptions.None); } /// @@ -76,15 +76,15 @@ namespace Octokit.Reactive /// https://developer.github.com/v3/reactions/#list-reactions-for-an-issue-comment /// The owner of the repository /// The name of the repository - /// The comment id + /// The comment id /// Options for changing the API response - public IObservable GetAll(string owner, string name, int number, ApiOptions options) + public IObservable GetAll(string owner, string name, long commentId, ApiOptions options) { Ensure.ArgumentNotNullOrEmptyString(owner, nameof(owner)); Ensure.ArgumentNotNullOrEmptyString(name, nameof(name)); Ensure.ArgumentNotNull(options, nameof(options)); - return _connection.GetAndFlattenAllPages(ApiUrls.IssueCommentReactions(owner, name, number), null, options); + return _connection.GetAndFlattenAllPages(ApiUrls.IssueCommentReactions(owner, name, commentId), null, options); } /// @@ -92,10 +92,10 @@ namespace Octokit.Reactive /// /// https://developer.github.com/v3/reactions/#list-reactions-for-an-issue-comment /// The Id of the repository - /// The comment id - public IObservable GetAll(long repositoryId, int number) + /// The comment id + public IObservable GetAll(long repositoryId, long commentId) { - return GetAll(repositoryId, number, ApiOptions.None); + return GetAll(repositoryId, commentId, ApiOptions.None); } /// @@ -103,13 +103,13 @@ namespace Octokit.Reactive /// /// https://developer.github.com/v3/reactions/#list-reactions-for-an-issue-comment /// The Id of the repository - /// The comment id + /// The comment id /// Options for changing the API response - public IObservable GetAll(long repositoryId, int number, ApiOptions options) + public IObservable GetAll(long repositoryId, long commentId, ApiOptions options) { Ensure.ArgumentNotNull(options, nameof(options)); - return _connection.GetAndFlattenAllPages(ApiUrls.IssueCommentReactions(repositoryId, number), null, options); + return _connection.GetAndFlattenAllPages(ApiUrls.IssueCommentReactions(repositoryId, commentId), null, options); } /// @@ -121,7 +121,7 @@ namespace Octokit.Reactive /// The comment id /// The reaction id /// - public IObservable Delete(string owner, string name, int commentId, int reactionId) + public IObservable Delete(string owner, string name, long commentId, long reactionId) { Ensure.ArgumentNotNullOrEmptyString(owner, nameof(owner)); Ensure.ArgumentNotNullOrEmptyString(name, nameof(name)); @@ -138,7 +138,7 @@ namespace Octokit.Reactive /// The comment id /// The reaction id /// - public IObservable Delete(long repositoryId, int commentId, int reactionId) + public IObservable Delete(long repositoryId, long commentId, long reactionId) { Ensure.ArgumentNotNull(reactionId, nameof(reactionId)); diff --git a/Octokit.Reactive/Clients/ObservableIssueCommentsClient.cs b/Octokit.Reactive/Clients/ObservableIssueCommentsClient.cs index fde61644..b7b1daed 100644 --- a/Octokit.Reactive/Clients/ObservableIssueCommentsClient.cs +++ b/Octokit.Reactive/Clients/ObservableIssueCommentsClient.cs @@ -30,13 +30,13 @@ namespace Octokit.Reactive /// http://developer.github.com/v3/issues/comments/#get-a-single-comment /// The owner of the repository /// The name of the repository - /// The issue comment id - public IObservable Get(string owner, string name, int id) + /// The issue comment id + public IObservable Get(string owner, string name, long commentId) { Ensure.ArgumentNotNullOrEmptyString(owner, nameof(owner)); Ensure.ArgumentNotNullOrEmptyString(name, nameof(name)); - return _client.Get(owner, name, id).ToObservable(); + return _client.Get(owner, name, commentId).ToObservable(); } /// @@ -44,10 +44,10 @@ namespace Octokit.Reactive /// /// http://developer.github.com/v3/issues/comments/#get-a-single-comment /// The Id of the repository - /// The issue comment id - public IObservable Get(long repositoryId, int id) + /// The issue comment id + public IObservable Get(long repositoryId, long commentId) { - return _client.Get(repositoryId, id).ToObservable(); + return _client.Get(repositoryId, commentId).ToObservable(); } /// @@ -326,15 +326,15 @@ namespace Octokit.Reactive /// http://developer.github.com/v3/issues/comments/#edit-a-comment /// The owner of the repository /// The name of the repository - /// The comment id + /// The comment id /// The modified comment - public IObservable Update(string owner, string name, int id, string commentUpdate) + public IObservable Update(string owner, string name, long commentId, string commentUpdate) { Ensure.ArgumentNotNullOrEmptyString(owner, nameof(owner)); Ensure.ArgumentNotNullOrEmptyString(name, nameof(name)); Ensure.ArgumentNotNull(commentUpdate, nameof(commentUpdate)); - return _client.Update(owner, name, id, commentUpdate).ToObservable(); + return _client.Update(owner, name, commentId, commentUpdate).ToObservable(); } /// @@ -342,13 +342,13 @@ namespace Octokit.Reactive /// /// http://developer.github.com/v3/issues/comments/#edit-a-comment /// The Id of the repository - /// The comment id + /// The comment id /// The modified comment - public IObservable Update(long repositoryId, int id, string commentUpdate) + public IObservable Update(long repositoryId, long commentId, string commentUpdate) { Ensure.ArgumentNotNull(commentUpdate, nameof(commentUpdate)); - return _client.Update(repositoryId, id, commentUpdate).ToObservable(); + return _client.Update(repositoryId, commentId, commentUpdate).ToObservable(); } /// @@ -357,13 +357,13 @@ namespace Octokit.Reactive /// http://developer.github.com/v3/issues/comments/#delete-a-comment /// The owner of the repository /// The name of the repository - /// The comment id - public IObservable Delete(string owner, string name, int id) + /// The comment id + public IObservable Delete(string owner, string name, long commentId) { Ensure.ArgumentNotNullOrEmptyString(owner, nameof(owner)); Ensure.ArgumentNotNullOrEmptyString(name, nameof(name)); - return _client.Delete(owner, name, id).ToObservable(); + return _client.Delete(owner, name, commentId).ToObservable(); } /// @@ -371,10 +371,10 @@ namespace Octokit.Reactive /// /// http://developer.github.com/v3/issues/comments/#delete-a-comment /// The Id of the repository - /// The comment id - public IObservable Delete(long repositoryId, int id) + /// The comment id + public IObservable Delete(long repositoryId, long commentId) { - return _client.Delete(repositoryId, id).ToObservable(); + return _client.Delete(repositoryId, commentId).ToObservable(); } } } \ No newline at end of file diff --git a/Octokit.Reactive/Clients/ObservableIssueReactionsClient.cs b/Octokit.Reactive/Clients/ObservableIssueReactionsClient.cs index 00153f0b..d9e45385 100644 --- a/Octokit.Reactive/Clients/ObservableIssueReactionsClient.cs +++ b/Octokit.Reactive/Clients/ObservableIssueReactionsClient.cs @@ -118,7 +118,7 @@ namespace Octokit.Reactive /// The issue number /// The reaction id /// - public IObservable Delete(string owner, string name, int issueNumber, int reactionId) + public IObservable Delete(string owner, string name, int issueNumber, long reactionId) { Ensure.ArgumentNotNullOrEmptyString(owner, nameof(owner)); Ensure.ArgumentNotNullOrEmptyString(name, nameof(name)); @@ -135,7 +135,7 @@ namespace Octokit.Reactive /// The issue number /// The reaction id /// - public IObservable Delete(long repositoryId, int issueNumber, int reactionId) + public IObservable Delete(long repositoryId, int issueNumber, long reactionId) { Ensure.ArgumentNotNull(reactionId, nameof(reactionId)); diff --git a/Octokit.Reactive/Clients/ObservablePullRequestReviewCommentReactionsClient.cs b/Octokit.Reactive/Clients/ObservablePullRequestReviewCommentReactionsClient.cs index 7a4179b9..eeac7570 100644 --- a/Octokit.Reactive/Clients/ObservablePullRequestReviewCommentReactionsClient.cs +++ b/Octokit.Reactive/Clients/ObservablePullRequestReviewCommentReactionsClient.cs @@ -30,19 +30,19 @@ namespace Octokit.Reactive /// https://developer.github.com/v3/reactions/#list-reactions-for-a-pull-request-review-comment /// The owner of the repository /// The name of the repository - /// The comment id - public IObservable GetAll(string owner, string name, int number) + /// The comment id + public IObservable GetAll(string owner, string name, long commentId) { - return GetAll(owner, name, number, ApiOptions.None); + return GetAll(owner, name, commentId, ApiOptions.None); } - public IObservable GetAll(string owner, string name, int number, ApiOptions options) + public IObservable GetAll(string owner, string name, long commentId, ApiOptions options) { Ensure.ArgumentNotNullOrEmptyString(owner, nameof(owner)); Ensure.ArgumentNotNullOrEmptyString(name, nameof(name)); Ensure.ArgumentNotNull(options, nameof(options)); - return _connection.GetAndFlattenAllPages(ApiUrls.PullRequestReviewCommentReactions(owner, name, number), null, options); + return _connection.GetAndFlattenAllPages(ApiUrls.PullRequestReviewCommentReactions(owner, name, commentId), null, options); } /// @@ -50,10 +50,10 @@ namespace Octokit.Reactive /// /// https://developer.github.com/v3/reactions/#list-reactions-for-a-pull-request-review-comment /// The Id of the repository - /// The comment id - public IObservable GetAll(long repositoryId, int number) + /// The comment id + public IObservable GetAll(long repositoryId, long commentId) { - return GetAll(repositoryId, number, ApiOptions.None); + return GetAll(repositoryId, commentId, ApiOptions.None); } /// @@ -61,13 +61,13 @@ namespace Octokit.Reactive /// /// https://developer.github.com/v3/reactions/#list-reactions-for-a-pull-request-review-comment /// The Id of the repository - /// The comment id + /// The comment id /// Options for changing the API response - public IObservable GetAll(long repositoryId, int number, ApiOptions options) + public IObservable GetAll(long repositoryId, long commentId, ApiOptions options) { Ensure.ArgumentNotNull(options, nameof(options)); - return _connection.GetAndFlattenAllPages(ApiUrls.PullRequestReviewCommentReactions(repositoryId, number), null, options); + return _connection.GetAndFlattenAllPages(ApiUrls.PullRequestReviewCommentReactions(repositoryId, commentId), null, options); } /// @@ -76,15 +76,15 @@ namespace Octokit.Reactive /// https://developer.github.com/v3/reactions/#create-reaction-for-a-pull-request-review-comment /// The owner of the repository /// The name of the repository - /// The comment id + /// The comment id /// The reaction to create - public IObservable Create(string owner, string name, int number, NewReaction reaction) + public IObservable Create(string owner, string name, long commentId, NewReaction reaction) { Ensure.ArgumentNotNullOrEmptyString(owner, nameof(owner)); Ensure.ArgumentNotNullOrEmptyString(name, nameof(name)); Ensure.ArgumentNotNull(reaction, nameof(reaction)); - return _client.Create(owner, name, number, reaction).ToObservable(); + return _client.Create(owner, name, commentId, reaction).ToObservable(); } /// @@ -92,13 +92,13 @@ namespace Octokit.Reactive /// /// https://developer.github.com/v3/reactions/#create-reaction-for-a-pull-request-review-comment /// The owner of the repository - /// The comment id + /// The comment id /// The reaction to create - public IObservable Create(long repositoryId, int number, NewReaction reaction) + public IObservable Create(long repositoryId, long commentId, NewReaction reaction) { Ensure.ArgumentNotNull(reaction, nameof(reaction)); - return _client.Create(repositoryId, number, reaction).ToObservable(); + return _client.Create(repositoryId, commentId, reaction).ToObservable(); } /// @@ -110,7 +110,7 @@ namespace Octokit.Reactive /// The comment id /// The reaction id /// - public IObservable Delete(string owner, string name, int commentId, int reactionId) + public IObservable Delete(string owner, string name, long commentId, long reactionId) { Ensure.ArgumentNotNullOrEmptyString(owner, nameof(owner)); Ensure.ArgumentNotNullOrEmptyString(name, nameof(name)); @@ -127,7 +127,7 @@ namespace Octokit.Reactive /// The comment id /// The reaction id /// - public IObservable Delete(long repositoryId, int commentId, int reactionId) + public IObservable Delete(long repositoryId, long commentId, long reactionId) { Ensure.ArgumentNotNull(reactionId, nameof(reactionId)); diff --git a/Octokit.Reactive/Clients/ObservablePullRequestReviewCommentsClient.cs b/Octokit.Reactive/Clients/ObservablePullRequestReviewCommentsClient.cs index 3c36d157..ccc5c855 100644 --- a/Octokit.Reactive/Clients/ObservablePullRequestReviewCommentsClient.cs +++ b/Octokit.Reactive/Clients/ObservablePullRequestReviewCommentsClient.cs @@ -202,13 +202,13 @@ namespace Octokit.Reactive /// http://developer.github.com/v3/pulls/comments/#get-a-single-comment /// The owner of the repository /// The name of the repository - /// The pull request review comment number - public IObservable GetComment(string owner, string name, int number) + /// The pull request review comment id + public IObservable GetComment(string owner, string name, long commentId) { Ensure.ArgumentNotNullOrEmptyString(owner, nameof(owner)); Ensure.ArgumentNotNullOrEmptyString(name, nameof(name)); - return _client.GetComment(owner, name, number).ToObservable(); + return _client.GetComment(owner, name, commentId).ToObservable(); } /// @@ -216,10 +216,10 @@ namespace Octokit.Reactive /// /// http://developer.github.com/v3/pulls/comments/#get-a-single-comment /// The Id of the repository - /// The pull request review comment number - public IObservable GetComment(long repositoryId, int number) + /// The pull request review comment id + public IObservable GetComment(long repositoryId, long commentId) { - return _client.GetComment(repositoryId, number).ToObservable(); + return _client.GetComment(repositoryId, commentId).ToObservable(); } /// @@ -290,15 +290,15 @@ namespace Octokit.Reactive /// http://developer.github.com/v3/pulls/comments/#edit-a-comment /// The owner of the repository /// The name of the repository - /// The pull request review comment number + /// The pull request review comment id /// The edited comment - public IObservable Edit(string owner, string name, int number, PullRequestReviewCommentEdit comment) + public IObservable Edit(string owner, string name, long commentId, PullRequestReviewCommentEdit comment) { Ensure.ArgumentNotNullOrEmptyString(owner, nameof(owner)); Ensure.ArgumentNotNullOrEmptyString(name, nameof(name)); Ensure.ArgumentNotNull(comment, nameof(comment)); - return _client.Edit(owner, name, number, comment).ToObservable(); + return _client.Edit(owner, name, commentId, comment).ToObservable(); } /// @@ -306,13 +306,13 @@ namespace Octokit.Reactive /// /// http://developer.github.com/v3/pulls/comments/#edit-a-comment /// The Id of the repository - /// The pull request review comment number + /// The pull request review comment id /// The edited comment - public IObservable Edit(long repositoryId, int number, PullRequestReviewCommentEdit comment) + public IObservable Edit(long repositoryId, long commentId, PullRequestReviewCommentEdit comment) { Ensure.ArgumentNotNull(comment, nameof(comment)); - return _client.Edit(repositoryId, number, comment).ToObservable(); + return _client.Edit(repositoryId, commentId, comment).ToObservable(); } /// @@ -321,13 +321,13 @@ namespace Octokit.Reactive /// http://developer.github.com/v3/pulls/comments/#delete-a-comment /// The owner of the repository /// The name of the repository - /// The pull request review comment number - public IObservable Delete(string owner, string name, int number) + /// The pull request review comment id + public IObservable Delete(string owner, string name, long commentId) { Ensure.ArgumentNotNullOrEmptyString(owner, nameof(owner)); Ensure.ArgumentNotNullOrEmptyString(name, nameof(name)); - return _client.Delete(owner, name, number).ToObservable(); + return _client.Delete(owner, name, commentId).ToObservable(); } /// @@ -335,10 +335,10 @@ namespace Octokit.Reactive /// /// http://developer.github.com/v3/pulls/comments/#delete-a-comment /// The Id of the repository - /// The pull request review comment number - public IObservable Delete(long repositoryId, int number) + /// The pull request review comment id + public IObservable Delete(long repositoryId, long commentId) { - return _client.Delete(repositoryId, number).ToObservable(); + return _client.Delete(repositoryId, commentId).ToObservable(); } } } diff --git a/Octokit.Reactive/Clients/ObservableRepositoryCommentsClient.cs b/Octokit.Reactive/Clients/ObservableRepositoryCommentsClient.cs index 7e97fb51..aa18bd90 100644 --- a/Octokit.Reactive/Clients/ObservableRepositoryCommentsClient.cs +++ b/Octokit.Reactive/Clients/ObservableRepositoryCommentsClient.cs @@ -29,25 +29,25 @@ namespace Octokit.Reactive /// /// The owner of the repository /// The name of the repository - /// The comment id + /// The comment id /// http://developer.github.com/v3/repos/comments/#get-a-single-commit-comment - public IObservable Get(string owner, string name, int number) + public IObservable Get(string owner, string name, long commentId) { Ensure.ArgumentNotNullOrEmptyString(owner, nameof(owner)); Ensure.ArgumentNotNullOrEmptyString(name, nameof(name)); - return _client.Get(owner, name, number).ToObservable(); + return _client.Get(owner, name, commentId).ToObservable(); } /// /// Gets a single Repository Comment by number. /// /// The Id of the repository - /// The comment id + /// The comment id /// http://developer.github.com/v3/repos/comments/#get-a-single-commit-comment - public IObservable Get(long repositoryId, int number) + public IObservable Get(long repositoryId, long commentId) { - return _client.Get(repositoryId, number).ToObservable(); + return _client.Get(repositoryId, commentId).ToObservable(); } /// @@ -203,30 +203,30 @@ namespace Octokit.Reactive /// /// The owner of the repository /// The name of the repository - /// The comment number + /// The comment id /// The modified comment /// http://developer.github.com/v3/repos/comments/#update-a-commit-comment - public IObservable Update(string owner, string name, int number, string commentUpdate) + public IObservable Update(string owner, string name, long commentId, string commentUpdate) { Ensure.ArgumentNotNullOrEmptyString(owner, nameof(owner)); Ensure.ArgumentNotNullOrEmptyString(name, nameof(name)); Ensure.ArgumentNotNull(commentUpdate, nameof(commentUpdate)); - return _client.Update(owner, name, number, commentUpdate).ToObservable(); + return _client.Update(owner, name, commentId, commentUpdate).ToObservable(); } /// /// Updates a specified Commit Comment. /// /// The Id of the repository - /// The comment number + /// The comment id /// The modified comment /// http://developer.github.com/v3/repos/comments/#update-a-commit-comment - public IObservable Update(long repositoryId, int number, string commentUpdate) + public IObservable Update(long repositoryId, long commentId, string commentUpdate) { Ensure.ArgumentNotNull(commentUpdate, nameof(commentUpdate)); - return _client.Update(repositoryId, number, commentUpdate).ToObservable(); + return _client.Update(repositoryId, commentId, commentUpdate).ToObservable(); } /// @@ -234,25 +234,25 @@ namespace Octokit.Reactive /// /// The owner of the repository /// The name of the repository - /// The comment id + /// The comment id /// http://developer.github.com/v3/repos/comments/#delete-a-commit-comment - public IObservable Delete(string owner, string name, int number) + public IObservable Delete(string owner, string name, long commentId) { Ensure.ArgumentNotNullOrEmptyString(owner, nameof(owner)); Ensure.ArgumentNotNullOrEmptyString(name, nameof(name)); - return _client.Delete(owner, name, number).ToObservable(); + return _client.Delete(owner, name, commentId).ToObservable(); } /// /// Deletes the specified Commit Comment /// /// The Id of the repository - /// The comment id + /// The comment id /// http://developer.github.com/v3/repos/comments/#delete-a-commit-comment - public IObservable Delete(long repositoryId, int number) + public IObservable Delete(long repositoryId, long commentId) { - return _client.Delete(repositoryId, number).ToObservable(); + return _client.Delete(repositoryId, commentId).ToObservable(); } } } diff --git a/Octokit.Tests.Integration/Clients/IssueCommentsClientTests.cs b/Octokit.Tests.Integration/Clients/IssueCommentsClientTests.cs index b9343e46..6752fc92 100644 --- a/Octokit.Tests.Integration/Clients/IssueCommentsClientTests.cs +++ b/Octokit.Tests.Integration/Clients/IssueCommentsClientTests.cs @@ -219,7 +219,7 @@ public class IssueCommentsClientTests var numberToCreate = 2; using (var context = await _github.CreateRepositoryContextWithAutoInit(Helper.MakeNameWithTimestamp("IssueCommentsReactionTests"))) { - var commentIds = new List(); + var commentIds = new List(); // Create multiple test issues for (int count = 1; count <= numberToCreate; count++) @@ -404,7 +404,7 @@ public class IssueCommentsClientTests var numberToCreate = 2; using (var context = await _github.CreateRepositoryContextWithAutoInit(Helper.MakeNameWithTimestamp("IssueCommentsReactionTests"))) { - var commentIds = new List(); + var commentIds = new List(); // Create a single test issue var issueNumber = await HelperCreateIssue(context.RepositoryOwner, context.RepositoryName); @@ -594,7 +594,7 @@ public class IssueCommentsClientTests return issue.Number; } - async static Task HelperCreateIssueCommentWithReactions(string owner, string repo, int number) + async static Task HelperCreateIssueCommentWithReactions(string owner, string repo, int number) { var github = Helper.GetAuthenticatedClient(); diff --git a/Octokit.Tests.Integration/Clients/PullRequestReviewCommentsClientTests.cs b/Octokit.Tests.Integration/Clients/PullRequestReviewCommentsClientTests.cs index 2b6f55da..31ddd879 100644 --- a/Octokit.Tests.Integration/Clients/PullRequestReviewCommentsClientTests.cs +++ b/Octokit.Tests.Integration/Clients/PullRequestReviewCommentsClientTests.cs @@ -928,7 +928,7 @@ public class PullRequestReviewCommentsClientTests : IDisposable int numberToCreate = 2; using (var context = await _github.CreateRepositoryContextWithAutoInit(Helper.MakeNameWithTimestamp("PullRequestReviewCommentsReactionTests"))) { - var commentIds = new List(); + var commentIds = new List(); // Create a test pull request var pullRequest = await CreatePullRequest(context); @@ -967,7 +967,7 @@ public class PullRequestReviewCommentsClientTests : IDisposable int numberToCreate = 2; using (var context = await _github.CreateRepositoryContextWithAutoInit(Helper.MakeNameWithTimestamp("PullRequestReviewCommentsReactionTests"))) { - var commentIds = new List(); + var commentIds = new List(); // Create multiple test pull requests for (int count = 1; count <= numberToCreate; count++) @@ -1000,7 +1000,7 @@ public class PullRequestReviewCommentsClientTests : IDisposable } } - async Task HelperCreatePullRequestReviewCommentWithReactions(string owner, string repo, PullRequestData pullRequest) + async Task HelperCreatePullRequestReviewCommentWithReactions(string owner, string repo, PullRequestData pullRequest) { var github = Helper.GetAuthenticatedClient(); diff --git a/Octokit.Tests.Integration/Clients/RepositoryCommentsClientTests.cs b/Octokit.Tests.Integration/Clients/RepositoryCommentsClientTests.cs index 0cc715e9..3753f521 100644 --- a/Octokit.Tests.Integration/Clients/RepositoryCommentsClientTests.cs +++ b/Octokit.Tests.Integration/Clients/RepositoryCommentsClientTests.cs @@ -206,7 +206,7 @@ public class RepositoryCommentsClientTests var numberToCreate = 2; using (var context = await _github.CreateRepositoryContextWithAutoInit(Helper.MakeNameWithTimestamp("CommitCommentsReactionTests"))) { - var commentIds = new List(); + var commentIds = new List(); // Create multiple test commits for (int count = 1; count <= numberToCreate; count++) @@ -381,7 +381,7 @@ public class RepositoryCommentsClientTests var numberToCreate = 2; using (var context = await _github.CreateRepositoryContextWithAutoInit(Helper.MakeNameWithTimestamp("CommitCommentsReactionTests"))) { - var commentIds = new List(); + var commentIds = new List(); // Create a single test commit var commit = await HelperCreateCommit(context.RepositoryOwner, context.RepositoryName); @@ -746,7 +746,7 @@ public class RepositoryCommentsClientTests return await client.Git.Commit.Create(owner, repo, newCommit); } - async static Task HelperCreateCommitCommentWithReactions(string owner, string repo, string sha) + async static Task HelperCreateCommitCommentWithReactions(string owner, string repo, string sha) { var github = Helper.GetAuthenticatedClient(); diff --git a/Octokit.sln b/Octokit.sln index 6f2762cc..cf336f08 100644 --- a/Octokit.sln +++ b/Octokit.sln @@ -1,7 +1,7 @@  Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 15 -VisualStudioVersion = 15.0.27130.2010 +# Visual Studio Version 17 +VisualStudioVersion = 17.10.34928.147 MinimumVisualStudioVersion = 10.0.40219.1 Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Octokit", "Octokit\Octokit.csproj", "{104E8324-C2B9-43BE-8040-36B736A64D45}" EndProject @@ -17,7 +17,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Tests", "Tests", "{64FD6CD6 EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Octokit.AsyncPaginationExtension", "Octokit.AsyncPaginationExtension\Octokit.AsyncPaginationExtension.csproj", "{0E8013E0-0CCF-4433-9E01-51AC288824C5}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Octokit.Generators", "Octokit.Generators\Octokit.Generators.csproj", "{6A577AD0-2319-4FFC-8EF2-3CCDD31B0CD9}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Octokit.Generators", "Octokit.Generators\Octokit.Generators.csproj", "{6A577AD0-2319-4FFC-8EF2-3CCDD31B0CD9}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution diff --git a/Octokit/Clients/AuthorizationsClient.cs b/Octokit/Clients/AuthorizationsClient.cs index 03dedf3d..20b2f94a 100644 --- a/Octokit/Clients/AuthorizationsClient.cs +++ b/Octokit/Clients/AuthorizationsClient.cs @@ -66,16 +66,16 @@ namespace Octokit /// This method requires authentication. /// See the API documentation for more information. /// - /// The Id of the to get + /// The Id of the to get /// /// Thrown when the current user does not have permission to make this request. /// /// Thrown when a general API error occurs. /// The specified . [ManualRoute("GET", "/authorizations/{id}")] - public Task Get(int id) + public Task Get(int authorizationId) { - return ApiConnection.Get(ApiUrls.Authorizations(id), null); + return ApiConnection.Get(ApiUrls.Authorizations(authorizationId), null); } @@ -418,7 +418,7 @@ namespace Octokit /// See the API /// documentation for more details. /// - /// Id of the to update + /// Id of the to update /// Describes the changes to make to the authorization /// /// Thrown when the current user does not have permission to make the request. @@ -426,12 +426,12 @@ namespace Octokit /// Thrown when a general API error occurs. /// The updated . [ManualRoute("PATCH", "/authorizations/{id}")] - public Task Update(int id, AuthorizationUpdate authorizationUpdate) + public Task Update(int authorizationId, AuthorizationUpdate authorizationUpdate) { Ensure.ArgumentNotNull(authorizationUpdate, nameof(authorizationUpdate)); return ApiConnection.Patch( - ApiUrls.Authorizations(id), + ApiUrls.Authorizations(authorizationId), authorizationUpdate); } @@ -443,16 +443,16 @@ namespace Octokit /// See the API /// documentation for more details. /// - /// The system-wide Id of the authorization to delete + /// The system-wide Id of the authorization to delete /// /// Thrown when the current user does not have permission to make the request. /// /// Thrown when a general API error occurs. /// A for the request's execution. [ManualRoute("DELETE", "/authorizations/{id}")] - public Task Delete(int id) + public Task Delete(int authorizationId) { - return ApiConnection.Delete(ApiUrls.Authorizations(id)); + return ApiConnection.Delete(ApiUrls.Authorizations(authorizationId)); } /// @@ -463,7 +463,7 @@ namespace Octokit /// See the API /// documentation for more details. /// - /// The system-wide Id of the authorization to delete + /// The system-wide Id of the authorization to delete /// Two factor authorization code /// /// Thrown when the current user does not have permission to make the request. @@ -471,9 +471,9 @@ namespace Octokit /// Thrown when a general API error occurs. /// A for the request's execution. [ManualRoute("DELETE", "/authorizations/{id}")] - public Task Delete(int id, string twoFactorAuthenticationCode) + public Task Delete(int authorizationId, string twoFactorAuthenticationCode) { - return ApiConnection.Delete(ApiUrls.Authorizations(id), twoFactorAuthenticationCode); + return ApiConnection.Delete(ApiUrls.Authorizations(authorizationId), twoFactorAuthenticationCode); } } } diff --git a/Octokit/Clients/CheckSuitesClient.cs b/Octokit/Clients/CheckSuitesClient.cs index f3472b2e..b93d0845 100644 --- a/Octokit/Clients/CheckSuitesClient.cs +++ b/Octokit/Clients/CheckSuitesClient.cs @@ -28,15 +28,15 @@ namespace Octokit /// See the Check Suites API documentation for more information. /// /// The owner of the repository - /// The name of the repository + /// The name of the repository /// The Id of the check suite [ManualRoute("GET", "/repos/{owner}/{repo}/check-suites/{id}")] - public Task Get(string owner, string name, long checkSuiteId) + public Task Get(string owner, string repoName, long checkSuiteId) { Ensure.ArgumentNotNullOrEmptyString(owner, nameof(owner)); - Ensure.ArgumentNotNullOrEmptyString(name, nameof(name)); + Ensure.ArgumentNotNullOrEmptyString(repoName, nameof(repoName)); - return ApiConnection.Get(ApiUrls.CheckSuite(owner, name, checkSuiteId), null); + return ApiConnection.Get(ApiUrls.CheckSuite(owner, repoName, checkSuiteId), null); } /// @@ -60,16 +60,16 @@ namespace Octokit /// See the Check Suites API documentation for more information. /// /// The owner of the repository - /// The name of the repository + /// The name of the repository /// The reference (SHA, branch name or tag name) to list check suites for [ManualRoute("GET", "/repos/{owner}/{repo}/commits/{ref}/check-suites")] - public Task GetAllForReference(string owner, string name, string reference) + public Task GetAllForReference(string owner, string repoName, string reference) { Ensure.ArgumentNotNullOrEmptyString(owner, nameof(owner)); - Ensure.ArgumentNotNullOrEmptyString(name, nameof(name)); + Ensure.ArgumentNotNullOrEmptyString(repoName, nameof(repoName)); Ensure.ArgumentNotNullOrEmptyString(reference, nameof(reference)); - return GetAllForReference(owner, name, reference, new CheckSuiteRequest(), ApiOptions.None); + return GetAllForReference(owner, repoName, reference, new CheckSuiteRequest(), ApiOptions.None); } /// @@ -95,18 +95,18 @@ namespace Octokit /// See the Check Suites API documentation for more information. /// /// The owner of the repository - /// The name of the repository + /// The name of the repository /// The reference (SHA, branch name or tag name) to list check suites for /// Details to filter the request, such as by App Id or Check Name [ManualRoute("GET", "/repos/{owner}/{repo}/commits/{ref}/check-suites")] - public Task GetAllForReference(string owner, string name, string reference, CheckSuiteRequest request) + public Task GetAllForReference(string owner, string repoName, string reference, CheckSuiteRequest request) { Ensure.ArgumentNotNullOrEmptyString(owner, nameof(owner)); - Ensure.ArgumentNotNullOrEmptyString(name, nameof(name)); + Ensure.ArgumentNotNullOrEmptyString(repoName, nameof(repoName)); Ensure.ArgumentNotNullOrEmptyString(reference, nameof(reference)); Ensure.ArgumentNotNull(request, nameof(request)); - return GetAllForReference(owner, name, reference, request, ApiOptions.None); + return GetAllForReference(owner, repoName, reference, request, ApiOptions.None); } /// @@ -134,20 +134,20 @@ namespace Octokit /// See the Check Suites API documentation for more information. /// /// The owner of the repository - /// The name of the repository + /// The name of the repository /// The reference (SHA, branch name or tag name) to list check suites for /// Details to filter the request, such as by App Id or Check Name /// Options to change the API response [ManualRoute("GET", "/repos/{owner}/{repo}/commits/{ref}/check-suites")] - public async Task GetAllForReference(string owner, string name, string reference, CheckSuiteRequest request, ApiOptions options) + public async Task GetAllForReference(string owner, string repoName, string reference, CheckSuiteRequest request, ApiOptions options) { Ensure.ArgumentNotNullOrEmptyString(owner, nameof(owner)); - Ensure.ArgumentNotNullOrEmptyString(name, nameof(name)); + Ensure.ArgumentNotNullOrEmptyString(repoName, nameof(repoName)); Ensure.ArgumentNotNullOrEmptyString(reference, nameof(reference)); Ensure.ArgumentNotNull(request, nameof(request)); Ensure.ArgumentNotNull(options, nameof(options)); - var results = await ApiConnection.GetAll(ApiUrls.CheckSuitesForReference(owner, name, reference), request.ToParametersDictionary(), options).ConfigureAwait(false); + var results = await ApiConnection.GetAll(ApiUrls.CheckSuitesForReference(owner, repoName, reference), request.ToParametersDictionary(), options).ConfigureAwait(false); return new CheckSuitesResponse( results.Count > 0 ? results.Max(x => x.TotalCount) : 0, @@ -185,16 +185,16 @@ namespace Octokit /// See the Check Suites API documentation for more information. /// /// The owner of the repository - /// The name of the repository + /// The name of the repository /// The check suite preferences [ManualRoute("PATCH", "/repos/{owner}/{repo}/check-suites/preferences")] - public Task UpdatePreferences(string owner, string name, CheckSuitePreferences preferences) + public Task UpdatePreferences(string owner, string repoName, CheckSuitePreferences preferences) { Ensure.ArgumentNotNullOrEmptyString(owner, nameof(owner)); - Ensure.ArgumentNotNullOrEmptyString(name, nameof(name)); + Ensure.ArgumentNotNullOrEmptyString(repoName, nameof(repoName)); Ensure.ArgumentNotNull(preferences, nameof(preferences)); - return ApiConnection.Patch(ApiUrls.CheckSuitePreferences(owner, name), preferences); + return ApiConnection.Patch(ApiUrls.CheckSuitePreferences(owner, repoName), preferences); } /// @@ -220,16 +220,16 @@ namespace Octokit /// See the Check Suites API documentation for more information. /// /// The owner of the repository - /// The name of the repository + /// The name of the repository /// Details of the Check Suite to create [ManualRoute("POST", "/repos/{owner}/{repo}/check-suites")] - public Task Create(string owner, string name, NewCheckSuite newCheckSuite) + public Task Create(string owner, string repoName, NewCheckSuite newCheckSuite) { Ensure.ArgumentNotNullOrEmptyString(owner, nameof(owner)); - Ensure.ArgumentNotNullOrEmptyString(name, nameof(name)); + Ensure.ArgumentNotNullOrEmptyString(repoName, nameof(repoName)); Ensure.ArgumentNotNull(newCheckSuite, nameof(newCheckSuite)); - return ApiConnection.Post(ApiUrls.CheckSuites(owner, name), newCheckSuite); + return ApiConnection.Post(ApiUrls.CheckSuites(owner, repoName), newCheckSuite); } /// @@ -255,15 +255,15 @@ namespace Octokit /// See the Check Suites API documentation for more information. /// /// The owner of the repository - /// The name of the repository + /// The name of the repository /// The Id of the check suite [ManualRoute("GET", "/repos/{owner}/{repo}/check-suites/{2}/rerequest")] - public async Task Rerequest(string owner, string name, long checkSuiteId) + public async Task Rerequest(string owner, string repoName, long checkSuiteId) { Ensure.ArgumentNotNullOrEmptyString(owner, nameof(owner)); - Ensure.ArgumentNotNullOrEmptyString(name, nameof(name)); + Ensure.ArgumentNotNullOrEmptyString(repoName, nameof(repoName)); - var httpStatusCode = await Connection.Post(ApiUrls.CheckSuiteRerequest(owner, name, checkSuiteId)).ConfigureAwait(false); + var httpStatusCode = await Connection.Post(ApiUrls.CheckSuiteRerequest(owner, repoName, checkSuiteId)).ConfigureAwait(false); if (httpStatusCode != HttpStatusCode.Created) { diff --git a/Octokit/Clients/CommitCommentReactionsClient.cs b/Octokit/Clients/CommitCommentReactionsClient.cs index 96fe0a79..e82c38b2 100644 --- a/Octokit/Clients/CommitCommentReactionsClient.cs +++ b/Octokit/Clients/CommitCommentReactionsClient.cs @@ -22,17 +22,17 @@ namespace Octokit /// https://developer.github.com/v3/reactions/#create-reaction-for-a-commit-comment /// The owner of the repository /// The name of the repository - /// The comment id + /// The comment id /// The reaction to create /// [ManualRoute("POST", "/repos/{owner}/{repo}/comments/{comment_id}/reactions")] - public Task Create(string owner, string name, int number, NewReaction reaction) + public Task Create(string owner, string name, long commentId, NewReaction reaction) { Ensure.ArgumentNotNullOrEmptyString(owner, nameof(owner)); Ensure.ArgumentNotNullOrEmptyString(name, nameof(name)); Ensure.ArgumentNotNull(reaction, nameof(reaction)); - return ApiConnection.Post(ApiUrls.CommitCommentReactions(owner, name, number), reaction); + return ApiConnection.Post(ApiUrls.CommitCommentReactions(owner, name, commentId), reaction); } /// @@ -40,15 +40,15 @@ namespace Octokit /// /// https://developer.github.com/v3/reactions/#create-reaction-for-a-commit-comment /// The owner of the repository - /// The comment id + /// The comment id /// The reaction to create /// [ManualRoute("POST", "/repositories/{id}/comments/{comment_id}/reactions")] - public Task Create(long repositoryId, int number, NewReaction reaction) + public Task Create(long repositoryId, long commentId, NewReaction reaction) { Ensure.ArgumentNotNull(reaction, nameof(reaction)); - return ApiConnection.Post(ApiUrls.CommitCommentReactions(repositoryId, number), reaction); + return ApiConnection.Post(ApiUrls.CommitCommentReactions(repositoryId, commentId), reaction); } /// @@ -57,12 +57,12 @@ namespace Octokit /// https://developer.github.com/v3/reactions/#list-reactions-for-a-commit-comment /// The owner of the repository /// The name of the repository - /// The comment id + /// The comment id /// [ManualRoute("GET", "/repos/{owner}/{repo}/comments/{comment_id}/reactions")] - public Task> GetAll(string owner, string name, int number) + public Task> GetAll(string owner, string name, long commentId) { - return GetAll(owner, name, number, ApiOptions.None); + return GetAll(owner, name, commentId, ApiOptions.None); } /// @@ -71,17 +71,17 @@ namespace Octokit /// https://developer.github.com/v3/reactions/#list-reactions-for-a-commit-comment /// The owner of the repository /// The name of the repository - /// The comment id + /// The comment id /// Options for changing the API response /// [ManualRoute("GET", "/repos/{owner}/{repo}/comments/{comment_id}/reactions")] - public Task> GetAll(string owner, string name, int number, ApiOptions options) + public Task> GetAll(string owner, string name, long commentId, ApiOptions options) { Ensure.ArgumentNotNullOrEmptyString(owner, nameof(owner)); Ensure.ArgumentNotNullOrEmptyString(name, nameof(name)); Ensure.ArgumentNotNull(options, nameof(options)); - return ApiConnection.GetAll(ApiUrls.CommitCommentReactions(owner, name, number), null, options); + return ApiConnection.GetAll(ApiUrls.CommitCommentReactions(owner, name, commentId), null, options); } /// @@ -89,12 +89,12 @@ namespace Octokit /// /// https://developer.github.com/v3/reactions/#list-reactions-for-a-commit-comment /// The owner of the repository - /// The comment id + /// The comment id /// [ManualRoute("GET", "/repositories/{id}/comments/{comment_id}/reactions")] - public Task> GetAll(long repositoryId, int number) + public Task> GetAll(long repositoryId, long commentId) { - return GetAll(repositoryId, number, ApiOptions.None); + return GetAll(repositoryId, commentId, ApiOptions.None); } /// @@ -102,15 +102,15 @@ namespace Octokit /// /// https://developer.github.com/v3/reactions/#list-reactions-for-a-commit-comment /// The owner of the repository - /// The comment id + /// The comment id /// Options for changing the API response /// [ManualRoute("GET", "/repositories/{id}/comments/{comment_id}/reactions")] - public Task> GetAll(long repositoryId, int number, ApiOptions options) + public Task> GetAll(long repositoryId, long commentId, ApiOptions options) { Ensure.ArgumentNotNull(options, nameof(options)); - return ApiConnection.GetAll(ApiUrls.CommitCommentReactions(repositoryId, number), null, options); + return ApiConnection.GetAll(ApiUrls.CommitCommentReactions(repositoryId, commentId), null, options); } /// @@ -123,7 +123,7 @@ namespace Octokit /// The reaction id /// [ManualRoute("DELETE", "/repos/{owner}/{repo}/comments/{comment_id}/reactions/{reaction_id}")] - public Task Delete(string owner, string name, int commentId, int reactionId) + public Task Delete(string owner, string name, long commentId, long reactionId) { Ensure.ArgumentNotNullOrEmptyString(owner, nameof(owner)); Ensure.ArgumentNotNullOrEmptyString(name, nameof(name)); @@ -140,7 +140,7 @@ namespace Octokit /// The reaction id /// [ManualRoute("DELETE", "/repositories/{id}/comments/{comment_id}/reactions/{reaction_id}")] - public Task Delete(long repositoryId, int commentId, int reactionId) + public Task Delete(long repositoryId, long commentId, long reactionId) { return ApiConnection.Delete(ApiUrls.CommitCommentReaction(repositoryId, commentId, reactionId)); } diff --git a/Octokit/Clients/Enterprise/EnterprisePreReceiveEnvironmentsClient.cs b/Octokit/Clients/Enterprise/EnterprisePreReceiveEnvironmentsClient.cs index 35df6f4a..582d1f82 100644 --- a/Octokit/Clients/Enterprise/EnterprisePreReceiveEnvironmentsClient.cs +++ b/Octokit/Clients/Enterprise/EnterprisePreReceiveEnvironmentsClient.cs @@ -53,13 +53,13 @@ namespace Octokit /// /// See the API documentation for more information. /// - /// The id of the pre-receive environment - /// Thrown when the specified does not exist. + /// The id of the pre-receive environment + /// Thrown when the specified does not exist. /// Thrown when a general API error occurs. [ManualRoute("GET", "/admin/pre-receive-environments/{pre_receive_environment_id}")] - public Task Get(long environmentId) + public Task Get(long preReceiveEnvironmentId) { - var endpoint = ApiUrls.AdminPreReceiveEnvironments(environmentId); + var endpoint = ApiUrls.AdminPreReceiveEnvironments(preReceiveEnvironmentId); return ApiConnection.Get(endpoint, null); } @@ -86,16 +86,16 @@ namespace Octokit /// /// See the API documentation for more information. /// - /// The id of the pre-receive environment + /// The id of the pre-receive environment /// A description of the pre-receive environment to edit - /// Thrown when the specified does not exist. + /// Thrown when the specified does not exist. /// Thrown when a general API error occurs. [ManualRoute("PATCH", "/admin/pre-receive-environments/{pre_receive_environment_id}")] - public Task Edit(long environmentId, UpdatePreReceiveEnvironment updatePreReceiveEnvironment) + public Task Edit(long preReceiveEnvironmentId, UpdatePreReceiveEnvironment updatePreReceiveEnvironment) { Ensure.ArgumentNotNull(updatePreReceiveEnvironment, nameof(updatePreReceiveEnvironment)); - var endpoint = ApiUrls.AdminPreReceiveEnvironments(environmentId); + var endpoint = ApiUrls.AdminPreReceiveEnvironments(preReceiveEnvironmentId); return ApiConnection.Patch(endpoint, updatePreReceiveEnvironment); } @@ -105,13 +105,13 @@ namespace Octokit /// /// See the API documentation for more information. /// - /// The id of the pre-receive environment - /// Thrown when the specified does not exist. + /// The id of the pre-receive environment + /// Thrown when the specified does not exist. /// Thrown when a general API error occurs. [ManualRoute("DELETE", "/admin/pre-receive-environments/{pre_receive_environment_id}")] - public Task Delete(long environmentId) + public Task Delete(long preReceiveEnvironmentId) { - var endpoint = ApiUrls.AdminPreReceiveEnvironments(environmentId); + var endpoint = ApiUrls.AdminPreReceiveEnvironments(preReceiveEnvironmentId); return ApiConnection.Delete(endpoint, new object()); } @@ -121,13 +121,13 @@ namespace Octokit /// /// See the API documentation for more information. /// - /// The id of the pre-receive environment - /// Thrown when the specified does not exist. + /// The id of the pre-receive environment + /// Thrown when the specified does not exist. /// Thrown when a general API error occurs. [ManualRoute("GET", "/admin/pre-receive-environments/{pre_receive_environment_id}/downloads/latest")] - public Task DownloadStatus(long environmentId) + public Task DownloadStatus(long preReceiveEnvironmentId) { - var endpoint = ApiUrls.AdminPreReceiveEnvironmentDownloadStatus(environmentId); + var endpoint = ApiUrls.AdminPreReceiveEnvironmentDownloadStatus(preReceiveEnvironmentId); return ApiConnection.Get(endpoint, null); } @@ -138,13 +138,13 @@ namespace Octokit /// /// See the API documentation for more information. /// - /// The id of the pre-receive environment - /// Thrown when the specified does not exist. + /// The id of the pre-receive environment + /// Thrown when the specified does not exist. /// Thrown when a general API error occurs. [ManualRoute("POST", "/admin/pre-receive-environments/{pre_receive_environment_id}/downloads")] - public Task TriggerDownload(long environmentId) + public Task TriggerDownload(long preReceiveEnvironmentId) { - var endpoint = ApiUrls.AdminPreReceiveEnvironmentDownload(environmentId); + var endpoint = ApiUrls.AdminPreReceiveEnvironmentDownload(preReceiveEnvironmentId); return ApiConnection.Post(endpoint, new object()); } } diff --git a/Octokit/Clients/Enterprise/EnterprisePreReceiveHooksClient.cs b/Octokit/Clients/Enterprise/EnterprisePreReceiveHooksClient.cs index 23749788..3986029d 100644 --- a/Octokit/Clients/Enterprise/EnterprisePreReceiveHooksClient.cs +++ b/Octokit/Clients/Enterprise/EnterprisePreReceiveHooksClient.cs @@ -53,13 +53,13 @@ namespace Octokit /// /// See the API documentation for more information. /// - /// The id of the pre-receive hook - /// Thrown when the specified does not exist. + /// The id of the pre-receive hook + /// Thrown when the specified does not exist. /// Thrown when a general API error occurs. [ManualRoute("GET", "/admin/pre-receive-hooks/{pre_receive_hook_id}")] - public Task Get(long hookId) + public Task Get(long preReceiveHookId) { - var endpoint = ApiUrls.AdminPreReceiveHooks(hookId); + var endpoint = ApiUrls.AdminPreReceiveHooks(preReceiveHookId); return ApiConnection.Get(endpoint, null, AcceptHeaders.StableVersionJson); } @@ -86,16 +86,16 @@ namespace Octokit /// /// See the API documentation for more information. /// - /// The id of the pre-receive hook + /// The id of the pre-receive hook /// A description of the pre-receive hook to edit - /// Thrown when the specified does not exist. + /// Thrown when the specified does not exist. /// Thrown when a general API error occurs. [ManualRoute("PATCH", "/admin/pre-receive-hooks/{pre_receive_hook_id}")] - public Task Edit(long hookId, UpdatePreReceiveHook updatePreReceiveHook) + public Task Edit(long preReceiveHookId, UpdatePreReceiveHook updatePreReceiveHook) { Ensure.ArgumentNotNull(updatePreReceiveHook, nameof(updatePreReceiveHook)); - var endpoint = ApiUrls.AdminPreReceiveHooks(hookId); + var endpoint = ApiUrls.AdminPreReceiveHooks(preReceiveHookId); return ApiConnection.Patch(endpoint, updatePreReceiveHook, AcceptHeaders.StableVersionJson); } @@ -105,13 +105,13 @@ namespace Octokit /// /// See the API documentation for more information. /// - /// The id of the pre-receive hook - /// Thrown when the specified does not exist. + /// The id of the pre-receive hook + /// Thrown when the specified does not exist. /// Thrown when a general API error occurs. [ManualRoute("DELETE", "/admin/pre-receive-hooks/{pre_receive_hook_id}")] - public Task Delete(long hookId) + public Task Delete(long preReceiveHookId) { - var endpoint = ApiUrls.AdminPreReceiveHooks(hookId); + var endpoint = ApiUrls.AdminPreReceiveHooks(preReceiveHookId); return ApiConnection.Delete(endpoint, new object(), AcceptHeaders.StableVersionJson); } } diff --git a/Octokit/Clients/GistCommentsClient.cs b/Octokit/Clients/GistCommentsClient.cs index f645692a..e9c80159 100644 --- a/Octokit/Clients/GistCommentsClient.cs +++ b/Octokit/Clients/GistCommentsClient.cs @@ -27,7 +27,7 @@ namespace Octokit /// The id of the comment /// Task{GistComment}. [ManualRoute("GET", "/gists/{gist_id}/comments/{comment_id}")] - public Task Get(string gistId, int commentId) + public Task Get(string gistId, long commentId) { return ApiConnection.Get(ApiUrls.GistComment(gistId, commentId)); } @@ -86,7 +86,7 @@ namespace Octokit /// The updated body of the comment /// Task{GistComment}. [ManualRoute("PATCH", "/gists/{gist_id}/comments/{comment_id}")] - public Task Update(string gistId, int commentId, string comment) + public Task Update(string gistId, long commentId, string comment) { Ensure.ArgumentNotNullOrEmptyString(comment, nameof(comment)); @@ -101,7 +101,7 @@ namespace Octokit /// The id of the comment /// Task. [ManualRoute("DELETE", "/gists/{gist_id}/comments/{comment_id}")] - public Task Delete(string gistId, int commentId) + public Task Delete(string gistId, long commentId) { return ApiConnection.Delete(ApiUrls.GistComment(gistId, commentId)); } diff --git a/Octokit/Clients/GistsClient.cs b/Octokit/Clients/GistsClient.cs index 229f504c..d0c3ed00 100644 --- a/Octokit/Clients/GistsClient.cs +++ b/Octokit/Clients/GistsClient.cs @@ -30,11 +30,11 @@ namespace Octokit /// /// http://developer.github.com/v3/gists/#get-a-single-gist /// - /// The id of the gist + /// The id of the gist [ManualRoute("GET", "/gists/{gist_id}")] - public Task Get(string id) + public Task Get(string gistId) { - return ApiConnection.Get(ApiUrls.Gist(id)); + return ApiConnection.Get(ApiUrls.Gist(gistId)); } /// @@ -74,11 +74,11 @@ namespace Octokit /// /// http://developer.github.com/v3/gists/#fork-a-gist /// - /// The id of the gist to fork + /// The id of the gist to fork [ManualRoute("POST", "/gists/{gist_id}/forks")] - public Task Fork(string id) + public Task Fork(string gistId) { - return ApiConnection.Post(ApiUrls.ForkGist(id), new object()); + return ApiConnection.Post(ApiUrls.ForkGist(gistId), new object()); } /// @@ -87,13 +87,13 @@ namespace Octokit /// /// http://developer.github.com/v3/gists/#delete-a-gist /// - /// The id of the gist + /// The id of the gist [ManualRoute("DELETE", "/gists/{gist_id}")] - public Task Delete(string id) + public Task Delete(string gistId) { - Ensure.ArgumentNotNullOrEmptyString(id, nameof(id)); + Ensure.ArgumentNotNullOrEmptyString(gistId, nameof(gistId)); - return ApiConnection.Delete(ApiUrls.Gist(id)); + return ApiConnection.Delete(ApiUrls.Gist(gistId)); } /// @@ -344,13 +344,13 @@ namespace Octokit /// /// http://developer.github.com/v3/gists/#list-gists-commits /// - /// The id of the gist + /// The id of the gist [ManualRoute("GET", "/gists/{gist_id}/commits")] - public Task> GetAllCommits(string id) + public Task> GetAllCommits(string gistId) { - Ensure.ArgumentNotNullOrEmptyString(id, nameof(id)); + Ensure.ArgumentNotNullOrEmptyString(gistId, nameof(gistId)); - return GetAllCommits(id, ApiOptions.None); + return GetAllCommits(gistId, ApiOptions.None); } /// @@ -359,15 +359,15 @@ namespace Octokit /// /// http://developer.github.com/v3/gists/#list-gists-commits /// - /// The id of the gist + /// The id of the gist /// Options for changing the API response [ManualRoute("GET", "/gists/{gist_id}/commits")] - public Task> GetAllCommits(string id, ApiOptions options) + public Task> GetAllCommits(string gistId, ApiOptions options) { - Ensure.ArgumentNotNullOrEmptyString(id, nameof(id)); + Ensure.ArgumentNotNullOrEmptyString(gistId, nameof(gistId)); Ensure.ArgumentNotNull(options, nameof(options)); - return ApiConnection.GetAll(ApiUrls.GistCommits(id), options); + return ApiConnection.GetAll(ApiUrls.GistCommits(gistId), options); } /// @@ -376,13 +376,13 @@ namespace Octokit /// /// http://developer.github.com/v3/gists/#list-gists-forks /// - /// The id of the gist + /// The id of the gist [ManualRoute("GET", "/gists/{gist_id}/forks")] - public Task> GetAllForks(string id) + public Task> GetAllForks(string gistId) { - Ensure.ArgumentNotNullOrEmptyString(id, nameof(id)); + Ensure.ArgumentNotNullOrEmptyString(gistId, nameof(gistId)); - return GetAllForks(id, ApiOptions.None); + return GetAllForks(gistId, ApiOptions.None); } /// @@ -391,15 +391,15 @@ namespace Octokit /// /// http://developer.github.com/v3/gists/#list-gists-forks /// - /// The id of the gist + /// The id of the gist /// Options for changing the API response [ManualRoute("GET", "/gists/{gist_id}/forks")] - public Task> GetAllForks(string id, ApiOptions options) + public Task> GetAllForks(string gistId, ApiOptions options) { - Ensure.ArgumentNotNullOrEmptyString(id, nameof(id)); + Ensure.ArgumentNotNullOrEmptyString(gistId, nameof(gistId)); Ensure.ArgumentNotNull(options, nameof(options)); - return ApiConnection.GetAll(ApiUrls.ForkGist(id), options); + return ApiConnection.GetAll(ApiUrls.ForkGist(gistId), options); } /// @@ -408,12 +408,12 @@ namespace Octokit /// /// http://developer.github.com/v3/gists/#delete-a-gist /// - /// The id of the gist + /// The id of the gist /// The update to the gist [ManualRoute("PATCH", "/gists/{gist_id}")] - public Task Edit(string id, GistUpdate gistUpdate) + public Task Edit(string gistId, GistUpdate gistUpdate) { - Ensure.ArgumentNotNullOrEmptyString(id, nameof(id)); + Ensure.ArgumentNotNullOrEmptyString(gistId, nameof(gistId)); Ensure.ArgumentNotNull(gistUpdate, nameof(gistUpdate)); var filesAsJsonObject = new JsonObject(); @@ -428,7 +428,7 @@ namespace Octokit Files = filesAsJsonObject }; - return ApiConnection.Patch(ApiUrls.Gist(id), gist); + return ApiConnection.Patch(ApiUrls.Gist(gistId), gist); } /// @@ -437,13 +437,13 @@ namespace Octokit /// /// http://developer.github.com/v3/gists/#star-a-gist /// - /// The id of the gist + /// The id of the gist [ManualRoute("PUT", "/gists/{gist_id}/star")] - public Task Star(string id) + public Task Star(string gistId) { - Ensure.ArgumentNotNullOrEmptyString(id, nameof(id)); + Ensure.ArgumentNotNullOrEmptyString(gistId, nameof(gistId)); - return ApiConnection.Put(ApiUrls.StarGist(id)); + return ApiConnection.Put(ApiUrls.StarGist(gistId)); } /// @@ -452,13 +452,13 @@ namespace Octokit /// /// http://developer.github.com/v3/gists/#unstar-a-gist /// - /// The id of the gist + /// The id of the gist [ManualRoute("DELETE", "/gists/{gist_id}/star")] - public Task Unstar(string id) + public Task Unstar(string gistId) { - Ensure.ArgumentNotNullOrEmptyString(id, nameof(id)); + Ensure.ArgumentNotNullOrEmptyString(gistId, nameof(gistId)); - return ApiConnection.Delete(ApiUrls.StarGist(id)); + return ApiConnection.Delete(ApiUrls.StarGist(gistId)); } /// @@ -467,15 +467,15 @@ namespace Octokit /// /// http://developer.github.com/v3/gists/#check-if-a-gist-is-starred /// - /// The id of the gist + /// The id of the gist [ManualRoute("GET", "/gists/{gist_id}/star")] - public async Task IsStarred(string id) + public async Task IsStarred(string gistId) { - Ensure.ArgumentNotNullOrEmptyString(id, nameof(id)); + Ensure.ArgumentNotNullOrEmptyString(gistId, nameof(gistId)); try { - var response = await Connection.Get(ApiUrls.StarGist(id), null, null).ConfigureAwait(false); + var response = await Connection.Get(ApiUrls.StarGist(gistId), null, null).ConfigureAwait(false); return response.HttpResponse.IsTrue(); } catch (NotFoundException) diff --git a/Octokit/Clients/ICommitCommentReactionsClient.cs b/Octokit/Clients/ICommitCommentReactionsClient.cs index f473269a..3f84b861 100644 --- a/Octokit/Clients/ICommitCommentReactionsClient.cs +++ b/Octokit/Clients/ICommitCommentReactionsClient.cs @@ -17,20 +17,20 @@ namespace Octokit /// https://developer.github.com/v3/reactions/#create-reaction-for-a-commit-comment /// The owner of the repository /// The name of the repository - /// The comment id + /// The comment id /// The reaction to create /// - Task Create(string owner, string name, int number, NewReaction reaction); + Task Create(string owner, string name, long commentId, NewReaction reaction); /// /// Creates a reaction for a specified Commit Comment /// /// https://developer.github.com/v3/reactions/#create-reaction-for-a-commit-comment /// The owner of the repository - /// The comment id + /// The comment id /// The reaction to create /// - Task Create(long repositoryId, int number, NewReaction reaction); + Task Create(long repositoryId, long commentId, NewReaction reaction); /// /// Get all reactions for a specified Commit Comment @@ -38,9 +38,9 @@ namespace Octokit /// https://developer.github.com/v3/reactions/#list-reactions-for-a-commit-comment /// The owner of the repository /// The name of the repository - /// The comment id + /// The comment id /// - Task> GetAll(string owner, string name, int number); + Task> GetAll(string owner, string name, long commentId); /// /// Get all reactions for a specified Commit Comment @@ -48,29 +48,29 @@ namespace Octokit /// https://developer.github.com/v3/reactions/#list-reactions-for-a-commit-comment /// The owner of the repository /// The name of the repository - /// The comment id + /// The comment id /// Options for changing the API response /// - Task> GetAll(string owner, string name, int number, ApiOptions options); + Task> GetAll(string owner, string name, long commentId, ApiOptions options); /// /// Get all reactions for a specified Commit Comment /// /// https://developer.github.com/v3/reactions/#list-reactions-for-a-commit-comment /// The owner of the repository - /// The comment id + /// The comment id /// - Task> GetAll(long repositoryId, int number); + Task> GetAll(long repositoryId, long commentId); /// /// Get all reactions for a specified Commit Comment /// /// https://developer.github.com/v3/reactions/#list-reactions-for-a-commit-comment /// The owner of the repository - /// The comment id + /// The comment id /// Options for changing the API response /// - Task> GetAll(long repositoryId, int number, ApiOptions options); + Task> GetAll(long repositoryId, long commentId, ApiOptions options); /// /// Deletes a reaction for a specified Commit Comment @@ -81,7 +81,7 @@ namespace Octokit /// The comment id /// The reaction id /// - Task Delete(string owner, string name, int commentId, int reactionId); + Task Delete(string owner, string name, long commentId, long reactionId); /// /// Deletes a reaction for a specified Commit Comment @@ -91,6 +91,6 @@ namespace Octokit /// The comment id /// The reaction id /// - Task Delete(long repositoryId, int commentId, int reactionId); + Task Delete(long repositoryId, long commentId, long reactionId); } } diff --git a/Octokit/Clients/IGistCommentsClient.cs b/Octokit/Clients/IGistCommentsClient.cs index 30867774..4ab9b897 100644 --- a/Octokit/Clients/IGistCommentsClient.cs +++ b/Octokit/Clients/IGistCommentsClient.cs @@ -21,7 +21,7 @@ namespace Octokit /// Task{GistComment}. [SuppressMessage("Microsoft.Naming", "CA1716:IdentifiersShouldNotMatchKeywords", MessageId = "Get", Justification = "Method makes a network request")] - Task Get(string gistId, int commentId); + Task Get(string gistId, long commentId); /// /// Gets all comments for the gist with the specified id. @@ -57,7 +57,7 @@ namespace Octokit /// The id of the comment /// The updated body of the comment /// Task{GistComment}. - Task Update(string gistId, int commentId, string comment); + Task Update(string gistId, long commentId, string comment); /// /// Deletes the comment with the specified gist- and comment id. @@ -66,6 +66,6 @@ namespace Octokit /// The id of the gist /// The id of the comment /// Task. - Task Delete(string gistId, int commentId); + Task Delete(string gistId, long commentId); } } diff --git a/Octokit/Clients/IIssueCommentReactionsClient.cs b/Octokit/Clients/IIssueCommentReactionsClient.cs index ef41ef39..08c2c292 100644 --- a/Octokit/Clients/IIssueCommentReactionsClient.cs +++ b/Octokit/Clients/IIssueCommentReactionsClient.cs @@ -17,18 +17,18 @@ namespace Octokit /// https://developer.github.com/v3/reactions/#create-reaction-for-an-issue-comment /// The owner of the repository /// The name of the repository - /// The comment id + /// The comment id /// The reaction to create - Task Create(string owner, string name, int number, NewReaction reaction); + Task Create(string owner, string name, long commentId, NewReaction reaction); /// /// Creates a reaction for a specified Issue Comment /// /// https://developer.github.com/v3/reactions/#create-reaction-for-an-issue-comment /// The Id of the repository - /// The comment id + /// The comment id /// The reaction to create - Task Create(long repositoryId, int number, NewReaction reaction); + Task Create(long repositoryId, long commentId, NewReaction reaction); /// /// Get all reactions for a specified Issue Comment @@ -36,8 +36,8 @@ namespace Octokit /// https://developer.github.com/v3/reactions/#list-reactions-for-an-issue-comment /// The owner of the repository /// The name of the repository - /// The comment id - Task> GetAll(string owner, string name, int number); + /// The comment id + Task> GetAll(string owner, string name, long commentId); /// /// Get all reactions for a specified Issue Comment @@ -45,26 +45,26 @@ namespace Octokit /// https://developer.github.com/v3/reactions/#list-reactions-for-an-issue-comment /// The owner of the repository /// The name of the repository - /// The comment id + /// The comment id /// Options for changing the API response - Task> GetAll(string owner, string name, int number, ApiOptions options); + Task> GetAll(string owner, string name, long commentId, ApiOptions options); /// /// Get all reactions for a specified Issue Comment /// /// https://developer.github.com/v3/reactions/#list-reactions-for-an-issue-comment /// The Id of the repository - /// The comment id - Task> GetAll(long repositoryId, int number); + /// The comment id + Task> GetAll(long repositoryId, long commentId); /// /// Get all reactions for a specified Issue Comment /// /// https://developer.github.com/v3/reactions/#list-reactions-for-an-issue-comment /// The Id of the repository - /// The comment id + /// The comment id /// Options for changing the API response - Task> GetAll(long repositoryId, int number, ApiOptions options); + Task> GetAll(long repositoryId, long commentId, ApiOptions options); /// /// Deletes a reaction for a specified Commit Comment @@ -75,7 +75,7 @@ namespace Octokit /// The comment id /// The reaction id /// - Task Delete(string owner, string name, int commentId, int reactionId); + Task Delete(string owner, string name, long commentId, long reactionId); /// /// Deletes a reaction for a specified Commit Comment @@ -85,6 +85,6 @@ namespace Octokit /// The comment id /// The reaction id /// - Task Delete(long repositoryId, int commentId, int reactionId); + Task Delete(long repositoryId, long commentId, long reactionId); } } diff --git a/Octokit/Clients/IIssueCommentsClient.cs b/Octokit/Clients/IIssueCommentsClient.cs index bd1a05e9..150dadff 100644 --- a/Octokit/Clients/IIssueCommentsClient.cs +++ b/Octokit/Clients/IIssueCommentsClient.cs @@ -18,20 +18,20 @@ namespace Octokit /// http://developer.github.com/v3/issues/comments/#get-a-single-comment /// The owner of the repository /// The name of the repository - /// The issue comment id + /// The issue comment id [SuppressMessage("Microsoft.Naming", "CA1716:IdentifiersShouldNotMatchKeywords", MessageId = "Get", Justification = "Method makes a network request")] - Task Get(string owner, string name, int id); + Task Get(string owner, string name, long commentId); /// /// Gets a single Issue Comment by id. /// /// http://developer.github.com/v3/issues/comments/#get-a-single-comment /// The Id of the repository - /// The issue comment id + /// The issue comment id [SuppressMessage("Microsoft.Naming", "CA1716:IdentifiersShouldNotMatchKeywords", MessageId = "Get", Justification = "Method makes a network request")] - Task Get(long repositoryId, int id); + Task Get(long repositoryId, long commentId); /// /// Gets Issue Comments for a repository. @@ -202,18 +202,18 @@ namespace Octokit /// http://developer.github.com/v3/issues/comments/#edit-a-comment /// The owner of the repository /// The name of the repository - /// The comment id + /// The comment id /// The modified comment - Task Update(string owner, string name, int id, string commentUpdate); + Task Update(string owner, string name, long commentId, string commentUpdate); /// /// Updates a specified Issue Comment. /// /// http://developer.github.com/v3/issues/comments/#edit-a-comment /// The Id of the repository - /// The comment id + /// The comment id /// The modified comment - Task Update(long repositoryId, int id, string commentUpdate); + Task Update(long repositoryId, long commentId, string commentUpdate); /// /// Deletes the specified Issue Comment @@ -221,15 +221,15 @@ namespace Octokit /// http://developer.github.com/v3/issues/comments/#delete-a-comment /// The owner of the repository /// The name of the repository - /// The comment id - Task Delete(string owner, string name, int id); + /// The comment id + Task Delete(string owner, string name, long commentId); /// /// Deletes the specified Issue Comment /// /// http://developer.github.com/v3/issues/comments/#delete-a-comment /// The Id of the repository - /// The comment id - Task Delete(long repositoryId, int id); + /// The comment id + Task Delete(long repositoryId, long commentId); } } diff --git a/Octokit/Clients/IIssueReactionsClient.cs b/Octokit/Clients/IIssueReactionsClient.cs index 3458454b..a46bdf69 100644 --- a/Octokit/Clients/IIssueReactionsClient.cs +++ b/Octokit/Clients/IIssueReactionsClient.cs @@ -75,7 +75,7 @@ namespace Octokit /// The issue number /// The reaction id /// - Task Delete(string owner, string name, int issueNumber, int reactionId); + Task Delete(string owner, string name, int issueNumber, long reactionId); /// /// Deletes a reaction for a specified Issue @@ -85,6 +85,6 @@ namespace Octokit /// The issue number /// The reaction id /// - Task Delete(long repositoryId, int issueNumber, int reactionId); + Task Delete(long repositoryId, int issueNumber, long reactionId); } } diff --git a/Octokit/Clients/IPullRequestReviewCommentReactionsClient.cs b/Octokit/Clients/IPullRequestReviewCommentReactionsClient.cs index 7e1b4554..1edbe3bf 100644 --- a/Octokit/Clients/IPullRequestReviewCommentReactionsClient.cs +++ b/Octokit/Clients/IPullRequestReviewCommentReactionsClient.cs @@ -17,8 +17,8 @@ namespace Octokit /// https://developer.github.com/v3/reactions/#list-reactions-for-a-pull-request-review-comment /// The owner of the repository /// The name of the repository - /// The comment id - Task> GetAll(string owner, string name, int number); + /// The comment id + Task> GetAll(string owner, string name, long commentId); /// /// Get all reactions for a specified Pull Request Review Comment. @@ -26,26 +26,26 @@ namespace Octokit /// https://developer.github.com/v3/reactions/#list-reactions-for-a-pull-request-review-comment /// The owner of the repository /// The name of the repository - /// The comment id + /// The comment id /// Options for changing the API response - Task> GetAll(string owner, string name, int number, ApiOptions options); + Task> GetAll(string owner, string name, long commentId, ApiOptions options); /// /// 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 - Task> GetAll(long repositoryId, int number); + /// The comment id + Task> GetAll(long repositoryId, long commentId); /// /// 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 + /// The comment id /// Options for changing the API response - Task> GetAll(long repositoryId, int number, ApiOptions options); + Task> GetAll(long repositoryId, long commentId, ApiOptions options); /// /// Creates a reaction for a specified Pull Request Review Comment. @@ -53,18 +53,18 @@ namespace Octokit /// https://developer.github.com/v3/reactions/#create-reaction-for-a-pull-request-review-comment /// The owner of the repository /// The name of the repository - /// The comment id + /// The comment id /// The reaction to create - Task Create(string owner, string name, int number, NewReaction reaction); + Task Create(string owner, string name, long commentId, 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 comment id /// The reaction to create - Task Create(long repositoryId, int number, NewReaction reaction); + Task Create(long repositoryId, long commentId, NewReaction reaction); /// /// Deletes a reaction for a specified Pull Request comment @@ -72,19 +72,19 @@ namespace Octokit /// https://docs.github.com/rest/reactions#delete-a-pull-request-comment-reaction /// The owner of the repository /// The name of the repository - /// The issue id + /// The comment id /// The reaction id /// - Task Delete(string owner, string name, int commentId, int reactionId); + Task Delete(string owner, string name, long commentId, long reactionId); /// /// Deletes a reaction for a specified Pull Request comment /// /// https://docs.github.com/rest/reactions#delete-a-pull-request-comment-reaction /// The owner of the repository - /// The issue id + /// The comment id /// The reaction id /// - Task Delete(long repositoryId, int commentId, int reactionId); + Task Delete(long repositoryId, long commentId, long reactionId); } } diff --git a/Octokit/Clients/IPullRequestReviewCommentsClient.cs b/Octokit/Clients/IPullRequestReviewCommentsClient.cs index 61613705..9689ef6a 100644 --- a/Octokit/Clients/IPullRequestReviewCommentsClient.cs +++ b/Octokit/Clients/IPullRequestReviewCommentsClient.cs @@ -121,16 +121,16 @@ namespace Octokit /// http://developer.github.com/v3/pulls/comments/#get-a-single-comment /// The owner of the repository /// The name of the repository - /// The pull request review comment number - Task GetComment(string owner, string name, int number); + /// The pull request review comment id + Task GetComment(string owner, string name, long commentId); /// /// Gets a single pull request review comment by number. /// /// http://developer.github.com/v3/pulls/comments/#get-a-single-comment /// The Id of the repository - /// The pull request review comment number - Task GetComment(long repositoryId, int number); + /// The pull request review comment id + Task GetComment(long repositoryId, long commentId); /// /// Creates a comment on a pull request review. @@ -176,18 +176,18 @@ namespace Octokit /// http://developer.github.com/v3/pulls/comments/#edit-a-comment /// The owner of the repository /// The name of the repository - /// The pull request review comment number + /// The pull request review comment id /// The edited comment - Task Edit(string owner, string name, int number, PullRequestReviewCommentEdit comment); + Task Edit(string owner, string name, long commentId, PullRequestReviewCommentEdit comment); /// /// Edits a comment on a pull request review. /// /// http://developer.github.com/v3/pulls/comments/#edit-a-comment /// The Id of the repository - /// The pull request review comment number + /// The pull request review comment id /// The edited comment - Task Edit(long repositoryId, int number, PullRequestReviewCommentEdit comment); + Task Edit(long repositoryId, long commentId, PullRequestReviewCommentEdit comment); /// /// Deletes a comment on a pull request review. @@ -195,15 +195,15 @@ namespace Octokit /// http://developer.github.com/v3/pulls/comments/#delete-a-comment /// The owner of the repository /// The name of the repository - /// The pull request review comment number - Task Delete(string owner, string name, int number); + /// The pull request review comment id + Task Delete(string owner, string name, long commentId); /// /// Deletes a comment on a pull request review. /// /// http://developer.github.com/v3/pulls/comments/#delete-a-comment /// The Id of the repository - /// The pull request review comment number - Task Delete(long repositoryId, int number); + /// The pull request review comment id + Task Delete(long repositoryId, long commentId); } } diff --git a/Octokit/Clients/IRepositoryCommentsClient.cs b/Octokit/Clients/IRepositoryCommentsClient.cs index 8b0fea9d..582653d5 100644 --- a/Octokit/Clients/IRepositoryCommentsClient.cs +++ b/Octokit/Clients/IRepositoryCommentsClient.cs @@ -18,20 +18,20 @@ namespace Octokit /// http://developer.github.com/v3/repos/comments/#get-a-single-commit-comment /// The owner of the repository /// The name of the repository - /// The comment id + /// The comment id [SuppressMessage("Microsoft.Naming", "CA1716:IdentifiersShouldNotMatchKeywords", MessageId = "Get", Justification = "Method makes a network request")] - Task Get(string owner, string name, int number); + Task Get(string owner, string name, long commentId); /// /// Gets a single Repository Comment by number. /// /// http://developer.github.com/v3/repos/comments/#get-a-single-commit-comment /// The Id of the repository - /// The comment id + /// The comment id [SuppressMessage("Microsoft.Naming", "CA1716:IdentifiersShouldNotMatchKeywords", MessageId = "Get", Justification = "Method makes a network request")] - Task Get(long repositoryId, int number); + Task Get(long repositoryId, long commentId); /// /// Gets Commit Comments for a repository. @@ -126,18 +126,18 @@ namespace Octokit /// http://developer.github.com/v3/repos/comments/#update-a-commit-comment /// The owner of the repository /// The name of the repository - /// The comment number + /// The comment id /// The modified comment - Task Update(string owner, string name, int number, string commentUpdate); + Task Update(string owner, string name, long commentId, string commentUpdate); /// /// Updates a specified Commit Comment. /// /// http://developer.github.com/v3/repos/comments/#update-a-commit-comment /// The Id of the repository - /// The comment number + /// The comment id /// The modified comment - Task Update(long repositoryId, int number, string commentUpdate); + Task Update(long repositoryId, long commentId, string commentUpdate); /// /// Deletes the specified Commit Comment @@ -145,15 +145,15 @@ namespace Octokit /// http://developer.github.com/v3/repos/comments/#delete-a-commit-comment /// The owner of the repository /// The name of the repository - /// The comment id - Task Delete(string owner, string name, int number); + /// The comment id + Task Delete(string owner, string name, long commentId); /// /// Deletes the specified Commit Comment /// /// http://developer.github.com/v3/repos/comments/#delete-a-commit-comment /// The Id of the repository - /// The comment id - Task Delete(long repositoryId, int number); + /// The comment id + Task Delete(long repositoryId, long commentId); } } diff --git a/Octokit/Clients/IssueCommentReactionsClient.cs b/Octokit/Clients/IssueCommentReactionsClient.cs index 707272bf..eac5773a 100644 --- a/Octokit/Clients/IssueCommentReactionsClient.cs +++ b/Octokit/Clients/IssueCommentReactionsClient.cs @@ -22,16 +22,16 @@ namespace Octokit /// https://developer.github.com/v3/reactions/#create-reactions-for-an-issue-comment /// The owner of the repository /// The name of the repository - /// The comment id + /// The comment id /// The reaction to create [ManualRoute("POST", "/repos/{owner}/{repo}/issues/comments/{number}/reactions")] - public Task Create(string owner, string name, int number, NewReaction reaction) + public Task Create(string owner, string name, long commentId, NewReaction reaction) { Ensure.ArgumentNotNullOrEmptyString(owner, nameof(owner)); Ensure.ArgumentNotNullOrEmptyString(name, nameof(name)); Ensure.ArgumentNotNull(reaction, nameof(reaction)); - return ApiConnection.Post(ApiUrls.IssueCommentReactions(owner, name, number), reaction); + return ApiConnection.Post(ApiUrls.IssueCommentReactions(owner, name, commentId), reaction); } /// @@ -39,14 +39,14 @@ namespace Octokit /// /// https://developer.github.com/v3/reactions/#create-reaction-for-an-issue-comment /// The Id of the repository - /// The comment id + /// The comment id /// The reaction to create [ManualRoute("POST", "/repositories/{0}/issues/comments/{number}/reactions")] - public Task Create(long repositoryId, int number, NewReaction reaction) + public Task Create(long repositoryId, long commentId, NewReaction reaction) { Ensure.ArgumentNotNull(reaction, nameof(reaction)); - return ApiConnection.Post(ApiUrls.IssueCommentReactions(repositoryId, number), reaction); + return ApiConnection.Post(ApiUrls.IssueCommentReactions(repositoryId, commentId), reaction); } /// @@ -55,11 +55,11 @@ namespace Octokit /// https://developer.github.com/v3/reactions/#list-reactions-for-an-issue-comment /// The owner of the repository /// The name of the repository - /// The comment id + /// The comment id [ManualRoute("POST", "/repos/{owner}/{repo}/issues/comments/{number}/reactions")] - public Task> GetAll(string owner, string name, int number) + public Task> GetAll(string owner, string name, long commentId) { - return GetAll(owner, name, number, ApiOptions.None); + return GetAll(owner, name, commentId, ApiOptions.None); } /// @@ -68,16 +68,16 @@ namespace Octokit /// https://developer.github.com/v3/reactions/#list-reactions-for-an-issue-comment /// The owner of the repository /// The name of the repository - /// The comment id + /// The comment id /// Options for changing the API response [ManualRoute("POST", "/repos/{owner}/{repo}/issues/comments/{number}/reactions")] - public Task> GetAll(string owner, string name, int number, ApiOptions options) + public Task> GetAll(string owner, string name, long commentId, ApiOptions options) { Ensure.ArgumentNotNullOrEmptyString(owner, nameof(owner)); Ensure.ArgumentNotNullOrEmptyString(name, nameof(name)); Ensure.ArgumentNotNull(options, nameof(options)); - return ApiConnection.GetAll(ApiUrls.IssueCommentReactions(owner, name, number), null, options); + return ApiConnection.GetAll(ApiUrls.IssueCommentReactions(owner, name, commentId), null, options); } /// @@ -85,11 +85,11 @@ namespace Octokit /// /// https://developer.github.com/v3/reactions/#list-reactions-for-an-issue-comment /// The Id of the repository - /// The comment id + /// The comment id [ManualRoute("GET", "/repositories/{0}/issues/comments/{number}/reactions")] - public Task> GetAll(long repositoryId, int number) + public Task> GetAll(long repositoryId, long commentId) { - return GetAll(repositoryId, number, ApiOptions.None); + return GetAll(repositoryId, commentId, ApiOptions.None); } /// @@ -97,14 +97,14 @@ namespace Octokit /// /// https://developer.github.com/v3/reactions/#list-reactions-for-an-issue-comment /// The Id of the repository - /// The comment id + /// The comment id /// Options for changing the API response [ManualRoute("GET", "/repositories/{0}/issues/comments/{number}/reactions")] - public Task> GetAll(long repositoryId, int number, ApiOptions options) + public Task> GetAll(long repositoryId, long commentId, ApiOptions options) { Ensure.ArgumentNotNull(options, nameof(options)); - return ApiConnection.GetAll(ApiUrls.IssueCommentReactions(repositoryId, number), null, options); + return ApiConnection.GetAll(ApiUrls.IssueCommentReactions(repositoryId, commentId), null, options); } /// @@ -117,7 +117,7 @@ namespace Octokit /// The reaction id /// [ManualRoute("DELETE", "/repos/{owner}/{repo}/issues/comments/{comment_id}/reactions/{reaction_id}")] - public Task Delete(string owner, string name, int commentId, int reactionId) + public Task Delete(string owner, string name, long commentId, long reactionId) { Ensure.ArgumentNotNullOrEmptyString(owner, nameof(owner)); Ensure.ArgumentNotNullOrEmptyString(name, nameof(name)); @@ -134,7 +134,7 @@ namespace Octokit /// The reaction id /// [ManualRoute("DELETE", "/repositories/{id}/issues/comments/{comment_id}/reactions/{reaction_id}")] - public Task Delete(long repositoryId, int commentId, int reactionId) + public Task Delete(long repositoryId, long commentId, long reactionId) { return ApiConnection.Delete(ApiUrls.IssueCommentReaction(repositoryId, commentId, reactionId)); } diff --git a/Octokit/Clients/IssueCommentsClient.cs b/Octokit/Clients/IssueCommentsClient.cs index 39bfa0d9..dcd50baa 100644 --- a/Octokit/Clients/IssueCommentsClient.cs +++ b/Octokit/Clients/IssueCommentsClient.cs @@ -25,14 +25,14 @@ namespace Octokit /// http://developer.github.com/v3/issues/comments/#get-a-single-comment /// The owner of the repository /// The name of the repository - /// The issue comment id + /// The issue comment id [ManualRoute("GET", "/repos/{owner}/{repo}/issues/comments/{comment_id}")] - public Task Get(string owner, string name, int id) + public Task Get(string owner, string name, long commentId) { Ensure.ArgumentNotNullOrEmptyString(owner, nameof(owner)); Ensure.ArgumentNotNullOrEmptyString(name, nameof(name)); - return ApiConnection.Get(ApiUrls.IssueComment(owner, name, id), null); + return ApiConnection.Get(ApiUrls.IssueComment(owner, name, commentId), null); } /// @@ -40,11 +40,11 @@ namespace Octokit /// /// http://developer.github.com/v3/issues/comments/#get-a-single-comment /// The Id of the repository - /// The issue comment id + /// The issue comment id [ManualRoute("GET", "/repositories/{id}/issues/comments/{comment_id}")] - public Task Get(long repositoryId, int id) + public Task Get(long repositoryId, long commentId) { - return ApiConnection.Get(ApiUrls.IssueComment(repositoryId, id), null); + return ApiConnection.Get(ApiUrls.IssueComment(repositoryId, commentId), null); } /// @@ -343,7 +343,7 @@ namespace Octokit /// The comment id /// The modified comment [ManualRoute("PATCH", "/repos/{owner}/{repo}/issues/comments/{id}")] - public Task Update(string owner, string name, int id, string commentUpdate) + public Task Update(string owner, string name, long id, string commentUpdate) { Ensure.ArgumentNotNullOrEmptyString(owner, nameof(owner)); Ensure.ArgumentNotNullOrEmptyString(name, nameof(name)); @@ -360,7 +360,7 @@ namespace Octokit /// The comment id /// The modified comment [ManualRoute("PATCH", "/repositories/{id}/issues/comments/{number}")] - public Task Update(long repositoryId, int id, string commentUpdate) + public Task Update(long repositoryId, long id, string commentUpdate) { Ensure.ArgumentNotNull(commentUpdate, nameof(commentUpdate)); @@ -375,7 +375,7 @@ namespace Octokit /// The name of the repository /// The comment id [ManualRoute("DELETE", "/repos/{owner}/{repo}/issues/comments/{id}")] - public Task Delete(string owner, string name, int id) + public Task Delete(string owner, string name, long id) { Ensure.ArgumentNotNullOrEmptyString(owner, nameof(owner)); Ensure.ArgumentNotNullOrEmptyString(name, nameof(name)); @@ -390,7 +390,7 @@ namespace Octokit /// The Id of the repository /// The comment id [ManualRoute("DELETE", "/repositories/{id}/issues/comments/{number}")] - public Task Delete(long repositoryId, int id) + public Task Delete(long repositoryId, long id) { return ApiConnection.Delete(ApiUrls.IssueComment(repositoryId, id)); } diff --git a/Octokit/Clients/IssueReactionsClient.cs b/Octokit/Clients/IssueReactionsClient.cs index a944d7b0..326f542d 100644 --- a/Octokit/Clients/IssueReactionsClient.cs +++ b/Octokit/Clients/IssueReactionsClient.cs @@ -117,7 +117,7 @@ namespace Octokit /// The reaction id /// [ManualRoute("DELETE", "/repos/{owner}/{repo}/issues/{issue_number}/reactions/{reaction_id}")] - public Task Delete(string owner, string name, int issueNumber, int reactionId) + public Task Delete(string owner, string name, int issueNumber, long reactionId) { Ensure.ArgumentNotNullOrEmptyString(owner, nameof(owner)); Ensure.ArgumentNotNullOrEmptyString(name, nameof(name)); @@ -134,7 +134,7 @@ namespace Octokit /// The reaction id /// [ManualRoute("DELETE", "/repositories/{id}/issues/{issue_number}/reactions/{reaction_id}")] - public Task Delete(long repositoryId, int issueNumber, int reactionId) + public Task Delete(long repositoryId, int issueNumber, long reactionId) { return ApiConnection.Delete(ApiUrls.IssueReaction(repositoryId, issueNumber, reactionId)); } diff --git a/Octokit/Clients/IssuesEventsClient.cs b/Octokit/Clients/IssuesEventsClient.cs index 57f8f1c8..640061f3 100644 --- a/Octokit/Clients/IssuesEventsClient.cs +++ b/Octokit/Clients/IssuesEventsClient.cs @@ -23,14 +23,14 @@ namespace Octokit /// /// The owner of the repository /// The name of the repository - /// The issue number + /// The issue number [ManualRoute("GET", "/repos/{owner}/{repo}/issues/{issue_number}/events")] - public Task> GetAllForIssue(string owner, string name, int number) + public Task> GetAllForIssue(string owner, string name, int issueNumber) { Ensure.ArgumentNotNullOrEmptyString(owner, nameof(owner)); Ensure.ArgumentNotNullOrEmptyString(name, nameof(name)); - return GetAllForIssue(owner, name, number, ApiOptions.None); + return GetAllForIssue(owner, name, issueNumber, ApiOptions.None); } /// @@ -40,11 +40,11 @@ namespace Octokit /// http://developer.github.com/v3/issues/events/#list-events-for-an-issue /// /// The Id of the repository - /// The issue number + /// The issue number [ManualRoute("GET", "/repositories/{id}/issues/{number}/events")] - public Task> GetAllForIssue(long repositoryId, int number) + public Task> GetAllForIssue(long repositoryId, int issueNumber) { - return GetAllForIssue(repositoryId, number, ApiOptions.None); + return GetAllForIssue(repositoryId, issueNumber, ApiOptions.None); } /// @@ -74,14 +74,14 @@ namespace Octokit /// http://developer.github.com/v3/issues/events/#list-events-for-an-issue /// /// The Id of the repository - /// The issue number + /// The issue number /// Options for changing the API response [ManualRoute("GET", "/repositories/{id}/issues/{number}/events")] - public Task> GetAllForIssue(long repositoryId, int number, ApiOptions options) + public Task> GetAllForIssue(long repositoryId, int issueNumber, ApiOptions options) { Ensure.ArgumentNotNull(options, nameof(options)); - return ApiConnection.GetAll(ApiUrls.IssuesEvents(repositoryId, number), null, options); + return ApiConnection.GetAll(ApiUrls.IssuesEvents(repositoryId, issueNumber), null, options); } /// diff --git a/Octokit/Clients/NotificationsClient.cs b/Octokit/Clients/NotificationsClient.cs index d2816b86..5099cc3d 100644 --- a/Octokit/Clients/NotificationsClient.cs +++ b/Octokit/Clients/NotificationsClient.cs @@ -276,48 +276,48 @@ namespace Octokit /// /// Retrives a single by Id. /// - /// The Id of the notification to retrieve. + /// The Id of the notification to retrieve. /// http://developer.github.com/v3/activity/notifications/#view-a-single-thread [ManualRoute("GET", "/notifications/threads/{thread_id}")] - public Task Get(int id) + public Task Get(int threadId) { - return ApiConnection.Get(ApiUrls.Notification(id)); + return ApiConnection.Get(ApiUrls.Notification(threadId)); } /// /// Marks a single notification as read. /// - /// The id of the notification. + /// The id of the notification. /// http://developer.github.com/v3/activity/notifications/#mark-a-thread-as-read [ManualRoute("PATCH", "/notifications/threads/{thread_id}")] - public Task MarkAsRead(int id) + public Task MarkAsRead(int threadId) { - return ApiConnection.Patch(ApiUrls.Notification(id)); + return ApiConnection.Patch(ApiUrls.Notification(threadId)); } /// /// Retrives a for the provided thread id. /// - /// The Id of the thread to retrieve subscription status. + /// The Id of the thread to retrieve subscription status. /// http://developer.github.com/v3/activity/notifications/#get-a-thread-subscription [ManualRoute("GET", "/notifications/threads/{thread_id}/subscription")] - public Task GetThreadSubscription(int id) + public Task GetThreadSubscription(int threadId) { - return ApiConnection.Get(ApiUrls.NotificationSubscription(id)); + return ApiConnection.Get(ApiUrls.NotificationSubscription(threadId)); } /// /// Sets the authenticated user's subscription settings for a given thread. /// - /// The Id of the thread to update. + /// The Id of the thread to update. /// The subscription parameters to set. /// http://developer.github.com/v3/activity/notifications/#set-a-thread-subscription [ManualRoute("PUT", "/notifications/threads/{thread_id}/subscription")] - public Task SetThreadSubscription(int id, NewThreadSubscription threadSubscription) + public Task SetThreadSubscription(int threadId, NewThreadSubscription threadSubscription) { Ensure.ArgumentNotNull(threadSubscription, nameof(threadSubscription)); - return ApiConnection.Put(ApiUrls.NotificationSubscription(id), threadSubscription); + return ApiConnection.Put(ApiUrls.NotificationSubscription(threadId), threadSubscription); } /// diff --git a/Octokit/Clients/ProjectCardsClient.cs b/Octokit/Clients/ProjectCardsClient.cs index 0b3cb81f..201d38ba 100644 --- a/Octokit/Clients/ProjectCardsClient.cs +++ b/Octokit/Clients/ProjectCardsClient.cs @@ -86,11 +86,11 @@ namespace Octokit /// /// See the API documentation for more information. /// - /// The id of the card + /// The id of the card [ManualRoute("GET", "/projects/columns/cards/{card_id}")] - public Task Get(int id) + public Task Get(int cardId) { - return ApiConnection.Get(ApiUrls.ProjectCard(id), null); + return ApiConnection.Get(ApiUrls.ProjectCard(cardId), null); } /// @@ -115,14 +115,14 @@ namespace Octokit /// /// See the API documentation for more information. /// - /// The id of the card + /// The id of the card /// New values to update the card with [ManualRoute("GET", "/projects/columns/cards/{card_id}")] - public Task Update(int id, ProjectCardUpdate projectCardUpdate) + public Task Update(int cardId, ProjectCardUpdate projectCardUpdate) { Ensure.ArgumentNotNull(projectCardUpdate, nameof(projectCardUpdate)); - return ApiConnection.Patch(ApiUrls.ProjectCard(id), projectCardUpdate); + return ApiConnection.Patch(ApiUrls.ProjectCard(cardId), projectCardUpdate); } /// @@ -131,11 +131,11 @@ namespace Octokit /// /// See the API documentation for more information. /// - /// The id of the card + /// The id of the card [ManualRoute("DELETE", "/projects/columns/cards/{card_id}")] - public async Task Delete(int id) + public async Task Delete(int cardId) { - var endpoint = ApiUrls.ProjectCard(id); + var endpoint = ApiUrls.ProjectCard(cardId); try { @@ -154,14 +154,14 @@ namespace Octokit /// /// See the API documentation for more information. /// - /// The id of the card + /// The id of the card /// The position to move the card [ManualRoute("POST", "/projects/columns/cards/{card_id}/moves")] - public async Task Move(int id, ProjectCardMove position) + public async Task Move(int cardId, ProjectCardMove position) { Ensure.ArgumentNotNull(position, nameof(position)); - var endpoint = ApiUrls.ProjectCardMove(id); + var endpoint = ApiUrls.ProjectCardMove(cardId); try { var httpStatusCode = await Connection.Post(endpoint, position, null).ConfigureAwait(false); diff --git a/Octokit/Clients/ProjectColumnsClient.cs b/Octokit/Clients/ProjectColumnsClient.cs index 5dce16f2..c5d87e49 100644 --- a/Octokit/Clients/ProjectColumnsClient.cs +++ b/Octokit/Clients/ProjectColumnsClient.cs @@ -52,11 +52,11 @@ namespace Octokit /// /// See the API documentation for more information. /// - /// The id of the column + /// The id of the column [ManualRoute("GET", "/projects/columns/{column_id}")] - public Task Get(int id) + public Task Get(int columnId) { - return ApiConnection.Get(ApiUrls.ProjectColumn(id), null); + return ApiConnection.Get(ApiUrls.ProjectColumn(columnId), null); } /// @@ -81,14 +81,14 @@ namespace Octokit /// /// See the API documentation for more information. /// - /// The id of the column + /// The id of the column /// New values to update the column with [ManualRoute("PATCH", "/projects/columns/{column_id}")] - public Task Update(int id, ProjectColumnUpdate projectColumnUpdate) + public Task Update(int columnId, ProjectColumnUpdate projectColumnUpdate) { Ensure.ArgumentNotNull(projectColumnUpdate, nameof(projectColumnUpdate)); - return ApiConnection.Patch(ApiUrls.ProjectColumn(id), projectColumnUpdate); + return ApiConnection.Patch(ApiUrls.ProjectColumn(columnId), projectColumnUpdate); } /// @@ -97,11 +97,11 @@ namespace Octokit /// /// See the API documentation for more information. /// - /// The id of the column + /// The id of the column [ManualRoute("DELETE", "/projects/columns/{column_id}")] - public async Task Delete(int id) + public async Task Delete(int columnId) { - var endpoint = ApiUrls.ProjectColumn(id); + var endpoint = ApiUrls.ProjectColumn(columnId); try { var httpStatusCode = await Connection.Delete(endpoint, new object()).ConfigureAwait(false); @@ -119,14 +119,14 @@ namespace Octokit /// /// See the API documentation for more information. /// - /// The id of the column + /// The id of the column /// The position to move the column [ManualRoute("POST", "/projects/columns/{column_id}/moves")] - public async Task Move(int id, ProjectColumnMove position) + public async Task Move(int columnId, ProjectColumnMove position) { Ensure.ArgumentNotNull(position, nameof(position)); - var endpoint = ApiUrls.ProjectColumnMove(id); + var endpoint = ApiUrls.ProjectColumnMove(columnId); try { var httpStatusCode = await Connection.Post(endpoint, position, null).ConfigureAwait(false); diff --git a/Octokit/Clients/ProjectsClient.cs b/Octokit/Clients/ProjectsClient.cs index c7b30ec3..dfe43077 100644 --- a/Octokit/Clients/ProjectsClient.cs +++ b/Octokit/Clients/ProjectsClient.cs @@ -223,11 +223,11 @@ namespace Octokit /// /// See the API documentation for more information. /// - /// The Id of the project + /// The Id of the project [ManualRoute("GET", "/projects/{project_id}")] - public Task Get(int id) + public Task Get(int projectId) { - return ApiConnection.Get(ApiUrls.Project(id), null); + return ApiConnection.Get(ApiUrls.Project(projectId), null); } // NOTE: I think we're missing a Task CreateForRepository(owner, name, newProject) @@ -272,14 +272,14 @@ namespace Octokit /// /// See the API documentation for more information. /// - /// The Id of the project + /// The Id of the project /// The modified project [ManualRoute("PATCH", "/project/{project_id}")] - public Task Update(int id, ProjectUpdate projectUpdate) + public Task Update(int projectId, ProjectUpdate projectUpdate) { Ensure.ArgumentNotNull(projectUpdate, nameof(projectUpdate)); - return ApiConnection.Patch(ApiUrls.Project(id), projectUpdate); + return ApiConnection.Patch(ApiUrls.Project(projectId), projectUpdate); } /// @@ -288,11 +288,11 @@ namespace Octokit /// /// See the API documentation for more information. /// - /// The Id of the project + /// The Id of the project [ManualRoute("DELETE", "/project/{project_id}")] - public async Task Delete(int id) + public async Task Delete(int projectId) { - var endpoint = ApiUrls.Project(id); + var endpoint = ApiUrls.Project(projectId); try { diff --git a/Octokit/Clients/PullRequestReviewCommentReactionsClient.cs b/Octokit/Clients/PullRequestReviewCommentReactionsClient.cs index a050cc7d..2424d593 100644 --- a/Octokit/Clients/PullRequestReviewCommentReactionsClient.cs +++ b/Octokit/Clients/PullRequestReviewCommentReactionsClient.cs @@ -22,11 +22,11 @@ namespace Octokit /// https://developer.github.com/v3/reactions/#list-reactions-for-a-pull-request-review-comment /// The owner of the repository /// The name of the repository - /// The comment id + /// The comment id [ManualRoute("GET", "/repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions")] - public Task> GetAll(string owner, string name, int number) + public Task> GetAll(string owner, string name, long commentId) { - return GetAll(owner, name, number, ApiOptions.None); + return GetAll(owner, name, commentId, ApiOptions.None); } /// @@ -35,16 +35,16 @@ namespace Octokit /// https://developer.github.com/v3/reactions/#list-reactions-for-a-pull-request-review-comment /// The owner of the repository /// The name of the repository - /// The comment id + /// The comment id /// Options for changing the API response [ManualRoute("GET", "/repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions")] - public Task> GetAll(string owner, string name, int number, ApiOptions options) + public Task> GetAll(string owner, string name, long commentId, ApiOptions options) { Ensure.ArgumentNotNullOrEmptyString(owner, nameof(owner)); Ensure.ArgumentNotNullOrEmptyString(name, nameof(name)); Ensure.ArgumentNotNull(options, nameof(options)); - return ApiConnection.GetAll(ApiUrls.PullRequestReviewCommentReactions(owner, name, number), null, options); + return ApiConnection.GetAll(ApiUrls.PullRequestReviewCommentReactions(owner, name, commentId), null, options); } /// @@ -52,11 +52,11 @@ namespace Octokit /// /// https://developer.github.com/v3/reactions/#list-reactions-for-a-pull-request-review-comment /// The Id of the repository - /// The comment id + /// The comment id [ManualRoute("GET", "/repositories/{id}/pulls/comments/{comment_id}/reactions")] - public Task> GetAll(long repositoryId, int number) + public Task> GetAll(long repositoryId, long commentId) { - return GetAll(repositoryId, number, ApiOptions.None); + return GetAll(repositoryId, commentId, ApiOptions.None); } /// @@ -64,14 +64,14 @@ namespace Octokit /// /// https://developer.github.com/v3/reactions/#list-reactions-for-a-pull-request-review-comment /// The Id of the repository - /// The comment id + /// The comment id /// Options for changing the API response [ManualRoute("GET", "/repositories/{id}/pulls/comments/{comment_id}/reactions")] - public Task> GetAll(long repositoryId, int number, ApiOptions options) + public Task> GetAll(long repositoryId, long commentId, ApiOptions options) { Ensure.ArgumentNotNull(options, nameof(options)); - return ApiConnection.GetAll(ApiUrls.PullRequestReviewCommentReactions(repositoryId, number), null, options); + return ApiConnection.GetAll(ApiUrls.PullRequestReviewCommentReactions(repositoryId, commentId), null, options); } /// @@ -80,16 +80,16 @@ namespace Octokit /// https://developer.github.com/v3/reactions/#create-reaction-for-a-pull-request-review-comment /// The owner of the repository /// The name of the repository - /// The comment id + /// The comment id /// The reaction to create [ManualRoute("POST", "/repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions")] - public Task Create(string owner, string name, int number, NewReaction reaction) + public Task Create(string owner, string name, long commentId, NewReaction reaction) { Ensure.ArgumentNotNullOrEmptyString(owner, nameof(owner)); Ensure.ArgumentNotNullOrEmptyString(name, nameof(name)); Ensure.ArgumentNotNull(reaction, nameof(reaction)); - return ApiConnection.Post(ApiUrls.PullRequestReviewCommentReactions(owner, name, number), reaction); + return ApiConnection.Post(ApiUrls.PullRequestReviewCommentReactions(owner, name, commentId), reaction); } /// @@ -97,14 +97,14 @@ namespace Octokit /// /// https://developer.github.com/v3/reactions/#create-reaction-for-a-pull-request-review-comment /// The Id of the repository - /// The comment id + /// The comment id /// The reaction to create [ManualRoute("POST", "/repositories/{id}/pulls/comments/{comment_id}/reactions")] - public Task Create(long repositoryId, int number, NewReaction reaction) + public Task Create(long repositoryId, long commentId, NewReaction reaction) { Ensure.ArgumentNotNull(reaction, nameof(reaction)); - return ApiConnection.Post(ApiUrls.PullRequestReviewCommentReactions(repositoryId, number), reaction); + return ApiConnection.Post(ApiUrls.PullRequestReviewCommentReactions(repositoryId, commentId), reaction); } /// @@ -117,7 +117,7 @@ namespace Octokit /// The reaction id /// [ManualRoute("DELETE", "/repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions/{reaction_id}")] - public Task Delete(string owner, string name, int commentId, int reactionId) + public Task Delete(string owner, string name, long commentId, long reactionId) { Ensure.ArgumentNotNullOrEmptyString(owner, nameof(owner)); Ensure.ArgumentNotNullOrEmptyString(name, nameof(name)); @@ -134,7 +134,7 @@ namespace Octokit /// The reaction id /// [ManualRoute("DELETE", "/repositories/{id}/pulls/comments/{comment_id}/reactions/{reaction_id}")] - public Task Delete(long repositoryId, int commentId, int reactionId) + public Task Delete(long repositoryId, long commentId, long reactionId) { return ApiConnection.Delete(ApiUrls.PullRequestReviewCommentReaction(repositoryId, commentId, reactionId)); } diff --git a/Octokit/Clients/PullRequestReviewCommentsClient.cs b/Octokit/Clients/PullRequestReviewCommentsClient.cs index 658146d0..084e8dbc 100644 --- a/Octokit/Clients/PullRequestReviewCommentsClient.cs +++ b/Octokit/Clients/PullRequestReviewCommentsClient.cs @@ -23,14 +23,14 @@ namespace Octokit /// http://developer.github.com/v3/pulls/comments/#list-comments-on-a-pull-request /// The owner of the repository /// The name of the repository - /// The pull request number + /// The pull request number [ManualRoute("GET", "/repos/{owner}/{repo}/pulls/{pull_number}/comments")] - public Task> GetAll(string owner, string name, int number) + public Task> GetAll(string owner, string name, int pullRequestNumber) { Ensure.ArgumentNotNullOrEmptyString(owner, nameof(owner)); Ensure.ArgumentNotNullOrEmptyString(name, nameof(name)); - return GetAll(owner, name, number, ApiOptions.None); + return GetAll(owner, name, pullRequestNumber, ApiOptions.None); } /// @@ -38,11 +38,11 @@ namespace Octokit /// /// http://developer.github.com/v3/pulls/comments/#list-comments-on-a-pull-request /// The Id of the repository - /// The pull request number + /// The pull request number [ManualRoute("GET", "/repositories/{id}/pulls/{number}/comments")] - public Task> GetAll(long repositoryId, int number) + public Task> GetAll(long repositoryId, int pullRequestNumber) { - return GetAll(repositoryId, number, ApiOptions.None); + return GetAll(repositoryId, pullRequestNumber, ApiOptions.None); } /// @@ -51,16 +51,16 @@ namespace Octokit /// http://developer.github.com/v3/pulls/comments/#list-comments-on-a-pull-request /// The owner of the repository /// The name of the repository - /// The pull request number + /// The pull request number /// Options for changing the API response [ManualRoute("GET", "/repos/{owner}/{repo}/pulls/{pull_number}/comments")] - public Task> GetAll(string owner, string name, int number, ApiOptions options) + public Task> GetAll(string owner, string name, int pullRequestNumber, ApiOptions options) { Ensure.ArgumentNotNullOrEmptyString(owner, nameof(owner)); Ensure.ArgumentNotNullOrEmptyString(name, nameof(name)); Ensure.ArgumentNotNull(options, nameof(options)); - return ApiConnection.GetAll(ApiUrls.PullRequestReviewComments(owner, name, number), null, options); + return ApiConnection.GetAll(ApiUrls.PullRequestReviewComments(owner, name, pullRequestNumber), null, options); } /// @@ -68,14 +68,14 @@ namespace Octokit /// /// http://developer.github.com/v3/pulls/comments/#list-comments-on-a-pull-request /// The Id of the repository - /// The pull request number + /// The pull request number /// Options for changing the API response [ManualRoute("GET", "/repositories/{id}/pulls/{number}/comments")] - public Task> GetAll(long repositoryId, int number, ApiOptions options) + public Task> GetAll(long repositoryId, int pullRequestNumber, ApiOptions options) { Ensure.ArgumentNotNull(options, nameof(options)); - return ApiConnection.GetAll(ApiUrls.PullRequestReviewComments(repositoryId, number), options); + return ApiConnection.GetAll(ApiUrls.PullRequestReviewComments(repositoryId, pullRequestNumber), options); } /// @@ -207,14 +207,14 @@ namespace Octokit /// http://developer.github.com/v3/pulls/comments/#get-a-single-comment /// The owner of the repository /// The name of the repository - /// The pull request review comment number + /// The pull request review comment id [ManualRoute("GET", "/repos/{owner}/{repo}/pulls/comments/{comment_id}")] - public Task GetComment(string owner, string name, int number) + public Task GetComment(string owner, string name, long commentId) { Ensure.ArgumentNotNullOrEmptyString(owner, nameof(owner)); Ensure.ArgumentNotNullOrEmptyString(name, nameof(name)); - return ApiConnection.Get(ApiUrls.PullRequestReviewComment(owner, name, number), new Dictionary()); + return ApiConnection.Get(ApiUrls.PullRequestReviewComment(owner, name, commentId), new Dictionary()); } /// @@ -222,11 +222,11 @@ namespace Octokit /// /// http://developer.github.com/v3/pulls/comments/#get-a-single-comment /// The Id of the repository - /// The pull request review comment number + /// The pull request review comment id [ManualRoute("GET", "/repositories/{id}/pulls/comments/{number}")] - public Task GetComment(long repositoryId, int number) + public Task GetComment(long repositoryId, long commentId) { - return ApiConnection.Get(ApiUrls.PullRequestReviewComment(repositoryId, number)); + return ApiConnection.Get(ApiUrls.PullRequestReviewComment(repositoryId, commentId)); } /// @@ -235,16 +235,16 @@ namespace Octokit /// http://developer.github.com/v3/pulls/comments/#create-a-comment /// The owner of the repository /// The name of the repository - /// The Pull Request number + /// The Pull Request number /// The comment [ManualRoute("POST", "/repos/{owner}/{repo}/pulls/{pull_number}/comments")] - public async Task Create(string owner, string name, int number, PullRequestReviewCommentCreate comment) + public async Task Create(string owner, string name, int pullRequestNumber, PullRequestReviewCommentCreate comment) { Ensure.ArgumentNotNullOrEmptyString(owner, nameof(owner)); Ensure.ArgumentNotNullOrEmptyString(name, nameof(name)); Ensure.ArgumentNotNull(comment, nameof(comment)); - var endpoint = ApiUrls.PullRequestReviewComments(owner, name, number); + var endpoint = ApiUrls.PullRequestReviewComments(owner, name, pullRequestNumber); var response = await ApiConnection.Connection.Post(endpoint, comment, null, null).ConfigureAwait(false); if (response.HttpResponse.StatusCode != HttpStatusCode.Created) @@ -260,14 +260,14 @@ namespace Octokit /// /// http://developer.github.com/v3/pulls/comments/#create-a-comment /// The Id of the repository - /// The Pull Request number + /// The Pull Request number /// The comment [ManualRoute("POST", "/repositories/{id}/pulls/{number}/comments")] - public async Task Create(long repositoryId, int number, PullRequestReviewCommentCreate comment) + public async Task Create(long repositoryId, int pullRequestNumber, PullRequestReviewCommentCreate comment) { Ensure.ArgumentNotNull(comment, nameof(comment)); - var endpoint = ApiUrls.PullRequestReviewComments(repositoryId, number); + var endpoint = ApiUrls.PullRequestReviewComments(repositoryId, pullRequestNumber); var response = await ApiConnection.Connection.Post(endpoint, comment, null, null).ConfigureAwait(false); if (response.HttpResponse.StatusCode != HttpStatusCode.Created) @@ -284,16 +284,16 @@ namespace Octokit /// http://developer.github.com/v3/pulls/comments/#create-a-comment /// The owner of the repository /// The name of the repository - /// The pull request number + /// The pull request number /// The comment [ManualRoute("POST", "/repos/{owner}/{repo}/pulls/{pull_number}/comment")] - public async Task CreateReply(string owner, string name, int number, PullRequestReviewCommentReplyCreate comment) + public async Task CreateReply(string owner, string name, int pullRequestNumber, PullRequestReviewCommentReplyCreate comment) { Ensure.ArgumentNotNullOrEmptyString(owner, nameof(owner)); Ensure.ArgumentNotNullOrEmptyString(name, nameof(name)); Ensure.ArgumentNotNull(comment, nameof(comment)); - var endpoint = ApiUrls.PullRequestReviewComments(owner, name, number); + var endpoint = ApiUrls.PullRequestReviewComments(owner, name, pullRequestNumber); var response = await ApiConnection.Connection.Post(endpoint, comment, null, null).ConfigureAwait(false); if (response.HttpResponse.StatusCode != HttpStatusCode.Created) @@ -309,14 +309,14 @@ namespace Octokit /// /// http://developer.github.com/v3/pulls/comments/#create-a-comment /// The Id of the repository - /// The pull request number + /// The pull request number /// The comment [ManualRoute("POST", "/repositories/{id}/pulls/{number}/comments")] - public async Task CreateReply(long repositoryId, int number, PullRequestReviewCommentReplyCreate comment) + public async Task CreateReply(long repositoryId, int pullRequestNumber, PullRequestReviewCommentReplyCreate comment) { Ensure.ArgumentNotNull(comment, nameof(comment)); - var endpoint = ApiUrls.PullRequestReviewComments(repositoryId, number); + var endpoint = ApiUrls.PullRequestReviewComments(repositoryId, pullRequestNumber); var response = await ApiConnection.Connection.Post(endpoint, comment, null, null).ConfigureAwait(false); if (response.HttpResponse.StatusCode != HttpStatusCode.Created) @@ -333,16 +333,16 @@ namespace Octokit /// http://developer.github.com/v3/pulls/comments/#edit-a-comment /// The owner of the repository /// The name of the repository - /// The pull request review comment number + /// The pull request review comment id /// The edited comment [ManualRoute("PATCH", "/repos/{owner}/{repo}/pulls/comments/{comment_id}")] - public Task Edit(string owner, string name, int number, PullRequestReviewCommentEdit comment) + public Task Edit(string owner, string name, long commentId, PullRequestReviewCommentEdit comment) { Ensure.ArgumentNotNullOrEmptyString(owner, nameof(owner)); Ensure.ArgumentNotNullOrEmptyString(name, nameof(name)); Ensure.ArgumentNotNull(comment, nameof(comment)); - return ApiConnection.Patch(ApiUrls.PullRequestReviewComment(owner, name, number), comment); + return ApiConnection.Patch(ApiUrls.PullRequestReviewComment(owner, name, commentId), comment); } /// @@ -350,14 +350,14 @@ namespace Octokit /// /// http://developer.github.com/v3/pulls/comments/#edit-a-comment /// The Id of the repository - /// The pull request review comment number + /// The pull request review comment id /// The edited comment [ManualRoute("PATCH", "/repositories/{id}/pulls/comments/{number}")] - public Task Edit(long repositoryId, int number, PullRequestReviewCommentEdit comment) + public Task Edit(long repositoryId, long commentId, PullRequestReviewCommentEdit comment) { Ensure.ArgumentNotNull(comment, nameof(comment)); - return ApiConnection.Patch(ApiUrls.PullRequestReviewComment(repositoryId, number), comment); + return ApiConnection.Patch(ApiUrls.PullRequestReviewComment(repositoryId, commentId), comment); } /// @@ -366,14 +366,14 @@ namespace Octokit /// http://developer.github.com/v3/pulls/comments/#delete-a-comment /// The owner of the repository /// The name of the repository - /// The pull request review comment number + /// The pull request review comment id [ManualRoute("DELETE", "/repos/{owner}/{repo}/pulls/comments/{comment_id}")] - public Task Delete(string owner, string name, int number) + public Task Delete(string owner, string name, long commentId) { Ensure.ArgumentNotNullOrEmptyString(owner, nameof(owner)); Ensure.ArgumentNotNullOrEmptyString(name, nameof(name)); - return ApiConnection.Delete(ApiUrls.PullRequestReviewComment(owner, name, number)); + return ApiConnection.Delete(ApiUrls.PullRequestReviewComment(owner, name, commentId)); } /// @@ -381,11 +381,11 @@ namespace Octokit /// /// http://developer.github.com/v3/pulls/comments/#delete-a-comment /// The Id of the repository - /// The pull request review comment number + /// The pull request review comment id [ManualRoute("DELETE", "/repositories/{id}/pulls/comments/{number}")] - public Task Delete(long repositoryId, int number) + public Task Delete(long repositoryId, long commentId) { - return ApiConnection.Delete(ApiUrls.PullRequestReviewComment(repositoryId, number)); + return ApiConnection.Delete(ApiUrls.PullRequestReviewComment(repositoryId, commentId)); } } } diff --git a/Octokit/Clients/PullRequestReviewsClient.cs b/Octokit/Clients/PullRequestReviewsClient.cs index d0a35da7..bd1c6218 100644 --- a/Octokit/Clients/PullRequestReviewsClient.cs +++ b/Octokit/Clients/PullRequestReviewsClient.cs @@ -22,14 +22,14 @@ namespace Octokit /// https://developer.github.com/v3/pulls/reviews/#list-reviews-on-a-pull-request /// The owner of the repository /// The name of the repository - /// The pull request number + /// The pull request number [ManualRoute("GET", "/repos/{owner}/{repo}/pulls/{pull_number}/reviews")] - public Task> GetAll(string owner, string name, int number) + public Task> GetAll(string owner, string name, int pullRequestNumber) { Ensure.ArgumentNotNullOrEmptyString(owner, nameof(owner)); Ensure.ArgumentNotNullOrEmptyString(name, nameof(name)); - return GetAll(owner, name, number, ApiOptions.None); + return GetAll(owner, name, pullRequestNumber, ApiOptions.None); } /// @@ -37,11 +37,11 @@ namespace Octokit /// /// https://developer.github.com/v3/pulls/reviews/#list-reviews-on-a-pull-request /// The Id of the repository - /// The pull request number + /// The pull request number [ManualRoute("GET", "/repositories/{id}/pulls/{number}/reviews")] - public Task> GetAll(long repositoryId, int number) + public Task> GetAll(long repositoryId, int pullRequestNumber) { - return GetAll(repositoryId, number, ApiOptions.None); + return GetAll(repositoryId, pullRequestNumber, ApiOptions.None); } /// @@ -50,16 +50,16 @@ namespace Octokit /// https://developer.github.com/v3/pulls/reviews/#list-reviews-on-a-pull-request /// The owner of the repository /// The name of the repository - /// The pull request number + /// The pull request number /// Options for changing the API response [ManualRoute("GET", "/repos/{owner}/{repo}/pulls/{pull_number}/reviews")] - public Task> GetAll(string owner, string name, int number, ApiOptions options) + public Task> GetAll(string owner, string name, int pullRequestNumber, ApiOptions options) { Ensure.ArgumentNotNullOrEmptyString(owner, nameof(owner)); Ensure.ArgumentNotNullOrEmptyString(name, nameof(name)); Ensure.ArgumentNotNull(options, nameof(options)); - var endpoint = ApiUrls.PullRequestReviews(owner, name, number); + var endpoint = ApiUrls.PullRequestReviews(owner, name, pullRequestNumber); return ApiConnection.GetAll(endpoint, null, options); } @@ -68,14 +68,14 @@ namespace Octokit /// /// https://developer.github.com/v3/pulls/reviews/#list-reviews-on-a-pull-request /// The Id of the repository - /// The pull request number + /// The pull request number /// Options for changing the API response [ManualRoute("GET", "/repositories/{id}/pulls/{number}/reviews")] - public Task> GetAll(long repositoryId, int number, ApiOptions options) + public Task> GetAll(long repositoryId, int pullRequestNumber, ApiOptions options) { Ensure.ArgumentNotNull(options, nameof(options)); - var endpoint = ApiUrls.PullRequestReviews(repositoryId, number); + var endpoint = ApiUrls.PullRequestReviews(repositoryId, pullRequestNumber); return ApiConnection.GetAll(endpoint, options); } @@ -85,15 +85,15 @@ namespace Octokit /// https://developer.github.com/v3/pulls/reviews/#get-a-single-review /// The owner of the repository /// The name of the repository - /// The pull request number + /// The pull request number /// The pull request review number [ManualRoute("GET", "/repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}")] - public Task Get(string owner, string name, int number, long reviewId) + public Task Get(string owner, string name, int pullRequestNumber, long reviewId) { Ensure.ArgumentNotNullOrEmptyString(owner, nameof(owner)); Ensure.ArgumentNotNullOrEmptyString(name, nameof(name)); - var endpoint = ApiUrls.PullRequestReview(owner, name, number, reviewId); + var endpoint = ApiUrls.PullRequestReview(owner, name, pullRequestNumber, reviewId); return ApiConnection.Get(endpoint); } @@ -102,12 +102,12 @@ namespace Octokit /// /// https://developer.github.com/v3/pulls/reviews/#get-a-single-review /// The Id of the repository - /// The pull request number + /// The pull request number /// The pull request review number [ManualRoute("GET", "/repositories/{id}/pulls/{number}/reviews/{review_id}")] - public Task Get(long repositoryId, int number, long reviewId) + public Task Get(long repositoryId, int pullRequestNumber, long reviewId) { - var endpoint = ApiUrls.PullRequestReview(repositoryId, number, reviewId); + var endpoint = ApiUrls.PullRequestReview(repositoryId, pullRequestNumber, reviewId); return ApiConnection.Get(endpoint); } @@ -117,16 +117,16 @@ namespace Octokit /// https://developer.github.com/v3/pulls/reviews/#create-a-pull-request-review /// The owner of the repository /// The name of the repository - /// The Pull Request number + /// The Pull Request number /// The review [ManualRoute("POST", "/repos/{owner}/{repo}/pulls/{pull_number}/reviews")] - public Task Create(string owner, string name, int number, PullRequestReviewCreate review) + public Task Create(string owner, string name, int pullRequestNumber, PullRequestReviewCreate review) { Ensure.ArgumentNotNullOrEmptyString(owner, nameof(owner)); Ensure.ArgumentNotNullOrEmptyString(name, nameof(name)); Ensure.ArgumentNotNull(review, nameof(review)); - var endpoint = ApiUrls.PullRequestReviews(owner, name, number); + var endpoint = ApiUrls.PullRequestReviews(owner, name, pullRequestNumber); return ApiConnection.Post(endpoint, review, null, null); } @@ -135,14 +135,14 @@ namespace Octokit /// /// https://developer.github.com/v3/pulls/reviews/#create-a-pull-request-review /// The Id of the repository - /// The Pull Request number + /// The Pull Request number /// The review [ManualRoute("POST", "/repositories/{id}/pulls/{number}/reviews")] - public Task Create(long repositoryId, int number, PullRequestReviewCreate review) + public Task Create(long repositoryId, int pullRequestNumber, PullRequestReviewCreate review) { Ensure.ArgumentNotNull(review, nameof(review)); - var endpoint = ApiUrls.PullRequestReviews(repositoryId, number); + var endpoint = ApiUrls.PullRequestReviews(repositoryId, pullRequestNumber); return ApiConnection.Post(endpoint, review, null, null); } @@ -152,15 +152,15 @@ namespace Octokit /// https://developer.github.com/v3/pulls/reviews/#delete-a-pending-review /// The owner of the repository /// The name of the repository - /// The pull request number + /// The pull request number /// The pull request review number [ManualRoute("DELETE", "/repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}")] - public Task Delete(string owner, string name, int number, long reviewId) + public Task Delete(string owner, string name, int pullRequestNumber, long reviewId) { Ensure.ArgumentNotNullOrEmptyString(owner, nameof(owner)); Ensure.ArgumentNotNullOrEmptyString(name, nameof(name)); - var endpoint = ApiUrls.PullRequestReview(owner, name, number, reviewId); + var endpoint = ApiUrls.PullRequestReview(owner, name, pullRequestNumber, reviewId); return ApiConnection.Delete(endpoint); } @@ -169,12 +169,12 @@ namespace Octokit /// /// https://developer.github.com/v3/pulls/reviews/#delete-a-pending-review /// The Id of the repository - /// The pull request number + /// The pull request number /// The pull request review number [ManualRoute("DELETE", "/repositories/{id}/pulls/{number}/reviews/{review_id}")] - public Task Delete(long repositoryId, int number, long reviewId) + public Task Delete(long repositoryId, int pullRequestNumber, long reviewId) { - var endpoint = ApiUrls.PullRequestReview(repositoryId, number, reviewId); + var endpoint = ApiUrls.PullRequestReview(repositoryId, pullRequestNumber, reviewId); return ApiConnection.Delete(endpoint); } @@ -184,17 +184,17 @@ namespace Octokit /// https://developer.github.com/v3/pulls/reviews/#dismiss-a-pull-request-review /// The owner of the repository /// The name of the repository - /// The pull request number + /// The pull request number /// The pull request review number /// The message indicating why the review was dismissed [ManualRoute("PUT", "/repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/dismissals")] - public Task Dismiss(string owner, string name, int number, long reviewId, PullRequestReviewDismiss dismissMessage) + public Task Dismiss(string owner, string name, int pullRequestNumber, long reviewId, PullRequestReviewDismiss dismissMessage) { Ensure.ArgumentNotNullOrEmptyString(owner, nameof(owner)); Ensure.ArgumentNotNullOrEmptyString(name, nameof(name)); Ensure.ArgumentNotNull(dismissMessage, nameof(dismissMessage)); - var endpoint = ApiUrls.PullRequestReviewDismissal(owner, name, number, reviewId); + var endpoint = ApiUrls.PullRequestReviewDismissal(owner, name, pullRequestNumber, reviewId); return ApiConnection.Put(endpoint, dismissMessage); } @@ -203,15 +203,15 @@ namespace Octokit /// /// https://developer.github.com/v3/pulls/reviews/#dismiss-a-pull-request-review /// The Id of the repository - /// The pull request number + /// The pull request number /// The pull request review number /// The message indicating why the review was dismissed [ManualRoute("PUT", "/repositories/{id}/pulls/{number}/reviews/{review_id}/dismissals")] - public Task Dismiss(long repositoryId, int number, long reviewId, PullRequestReviewDismiss dismissMessage) + public Task Dismiss(long repositoryId, int pullRequestNumber, long reviewId, PullRequestReviewDismiss dismissMessage) { Ensure.ArgumentNotNull(dismissMessage, nameof(dismissMessage)); - var endpoint = ApiUrls.PullRequestReviewDismissal(repositoryId, number, reviewId); + var endpoint = ApiUrls.PullRequestReviewDismissal(repositoryId, pullRequestNumber, reviewId); return ApiConnection.Put(endpoint, dismissMessage); } @@ -221,17 +221,17 @@ namespace Octokit /// https://developer.github.com/v3/pulls/reviews/#submit-a-pull-request-review /// The owner of the repository /// The name of the repository - /// The pull request number + /// The pull request number /// The pull request review number /// The message and event being submitted for the review [ManualRoute("POST", "/repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/events")] - public Task Submit(string owner, string name, int number, long reviewId, PullRequestReviewSubmit submitMessage) + public Task Submit(string owner, string name, int pullRequestNumber, long reviewId, PullRequestReviewSubmit submitMessage) { Ensure.ArgumentNotNullOrEmptyString(owner, nameof(owner)); Ensure.ArgumentNotNullOrEmptyString(name, nameof(name)); Ensure.ArgumentNotNull(submitMessage, nameof(submitMessage)); - var endpoint = ApiUrls.PullRequestReviewSubmit(owner, name, number, reviewId); + var endpoint = ApiUrls.PullRequestReviewSubmit(owner, name, pullRequestNumber, reviewId); return ApiConnection.Post(endpoint, submitMessage, null, null); } @@ -240,15 +240,15 @@ namespace Octokit /// /// https://developer.github.com/v3/pulls/reviews/#submit-a-pull-request-review /// The Id of the repository - /// The pull request number + /// The pull request number /// The pull request review number /// The message and event being submitted for the review [ManualRoute("POST", "/repositories/{id}/pulls/{number}/reviews/{review_id}/events")] - public Task Submit(long repositoryId, int number, long reviewId, PullRequestReviewSubmit submitMessage) + public Task Submit(long repositoryId, int pullRequestNumber, long reviewId, PullRequestReviewSubmit submitMessage) { Ensure.ArgumentNotNull(submitMessage, nameof(submitMessage)); - var endpoint = ApiUrls.PullRequestReviewSubmit(repositoryId, number, reviewId); + var endpoint = ApiUrls.PullRequestReviewSubmit(repositoryId, pullRequestNumber, reviewId); return ApiConnection.Post(endpoint, submitMessage, null, null); } @@ -258,12 +258,12 @@ namespace Octokit /// https://developer.github.com/v3/pulls/reviews/#get-comments-for-a-single-review /// The owner of the repository /// The name of the repository - /// The pull request number + /// The pull request number /// The pull request review number [ManualRoute("GET", "/repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/comments")] - public Task> GetAllComments(string owner, string name, int number, long reviewId) + public Task> GetAllComments(string owner, string name, int pullRequestNumber, long reviewId) { - return GetAllComments(owner, name, number, reviewId, ApiOptions.None); + return GetAllComments(owner, name, pullRequestNumber, reviewId, ApiOptions.None); } /// @@ -271,12 +271,12 @@ namespace Octokit /// /// https://developer.github.com/v3/pulls/reviews/#get-comments-for-a-single-review /// The Id of the repository - /// The pull request number + /// The pull request number /// The pull request review number [ManualRoute("POST", "/repositories/{id}/pulls/{number}/reviews/{review_id}/comments")] - public Task> GetAllComments(long repositoryId, int number, long reviewId) + public Task> GetAllComments(long repositoryId, int pullRequestNumber, long reviewId) { - return GetAllComments(repositoryId, number, reviewId, ApiOptions.None); + return GetAllComments(repositoryId, pullRequestNumber, reviewId, ApiOptions.None); } /// @@ -285,16 +285,16 @@ namespace Octokit /// https://developer.github.com/v3/pulls/reviews/#get-comments-for-a-single-review /// The owner of the repository /// The name of the repository - /// The pull request number + /// The pull request number /// The pull request review number /// Options for changing the API response [ManualRoute("GET", "/repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/comments")] - public Task> GetAllComments(string owner, string name, int number, long reviewId, ApiOptions options) + public Task> GetAllComments(string owner, string name, int pullRequestNumber, long reviewId, ApiOptions options) { Ensure.ArgumentNotNullOrEmptyString(owner, nameof(owner)); Ensure.ArgumentNotNullOrEmptyString(name, nameof(name)); - var endpoint = ApiUrls.PullRequestReviewComments(owner, name, number, reviewId); + var endpoint = ApiUrls.PullRequestReviewComments(owner, name, pullRequestNumber, reviewId); return ApiConnection.GetAll(endpoint, null, options); } @@ -303,13 +303,13 @@ namespace Octokit /// /// https://developer.github.com/v3/pulls/reviews/#get-comments-for-a-single-review /// The Id of the repository - /// The pull request number + /// The pull request number /// The pull request review number /// Options for changing the API response [ManualRoute("POST", "/repositories/{id}/pulls/{number}/reviews/{review_id}/comments")] - public Task> GetAllComments(long repositoryId, int number, long reviewId, ApiOptions options) + public Task> GetAllComments(long repositoryId, int pullRequestNumber, long reviewId, ApiOptions options) { - var endpoint = ApiUrls.PullRequestReviewComments(repositoryId, number, reviewId); + var endpoint = ApiUrls.PullRequestReviewComments(repositoryId, pullRequestNumber, reviewId); return ApiConnection.GetAll(endpoint, null, options); } diff --git a/Octokit/Clients/ReleasesClient.cs b/Octokit/Clients/ReleasesClient.cs index 0ab33084..e81300ef 100644 --- a/Octokit/Clients/ReleasesClient.cs +++ b/Octokit/Clients/ReleasesClient.cs @@ -138,15 +138,15 @@ namespace Octokit /// /// The repository's owner /// The repository's name - /// The id of the release + /// The id of the release /// Thrown when a general API error occurs. [ManualRoute("GET", "/repos/{owner}/{repo}/releases/{release_id}")] - public Task Get(string owner, string name, int id) + public Task Get(string owner, string name, int releaseId) { Ensure.ArgumentNotNullOrEmptyString(owner, nameof(owner)); Ensure.ArgumentNotNullOrEmptyString(name, nameof(name)); - var endpoint = ApiUrls.Releases(owner, name, id); + var endpoint = ApiUrls.Releases(owner, name, releaseId); return ApiConnection.Get(endpoint); } @@ -178,12 +178,12 @@ namespace Octokit /// See the API documentation for more information. /// /// The Id of the repository - /// The id of the release + /// The id of the release /// Thrown when a general API error occurs. [ManualRoute("GET", "/repositories/{id}/releases/{id}")] - public Task Get(long repositoryId, int id) + public Task Get(long repositoryId, int releaseId) { - var endpoint = ApiUrls.Releases(repositoryId, id); + var endpoint = ApiUrls.Releases(repositoryId, releaseId); return ApiConnection.Get(endpoint); } @@ -286,17 +286,17 @@ namespace Octokit /// /// The repository's owner /// The repository's name - /// The id of the release + /// The id of the release /// A description of the release to edit /// Thrown when a general API error occurs. [ManualRoute("PATCH", "/repos/{owner}/{repo}/releases/{release_id}")] - public Task Edit(string owner, string name, int id, ReleaseUpdate data) + public Task Edit(string owner, string name, int releaseId, ReleaseUpdate data) { Ensure.ArgumentNotNullOrEmptyString(owner, nameof(owner)); Ensure.ArgumentNotNullOrEmptyString(name, nameof(name)); Ensure.ArgumentNotNull(data, nameof(data)); - var endpoint = ApiUrls.Releases(owner, name, id); + var endpoint = ApiUrls.Releases(owner, name, releaseId); return ApiConnection.Patch(endpoint, data); } @@ -307,15 +307,15 @@ namespace Octokit /// See the API documentation for more information. /// /// The Id of the repository - /// The id of the release + /// The id of the release /// A description of the release to edit /// Thrown when a general API error occurs. [ManualRoute("PATCH", "/repositories/{id}/releases/{id}")] - public Task Edit(long repositoryId, int id, ReleaseUpdate data) + public Task Edit(long repositoryId, int releaseId, ReleaseUpdate data) { Ensure.ArgumentNotNull(data, nameof(data)); - var endpoint = ApiUrls.Releases(repositoryId, id); + var endpoint = ApiUrls.Releases(repositoryId, releaseId); return ApiConnection.Patch(endpoint, data); } @@ -327,15 +327,15 @@ namespace Octokit /// /// The repository's owner /// The repository's name - /// The id of the release to delete + /// The id of the release to delete /// Thrown when a general API error occurs. [ManualRoute("DELETE", "/repos/{owner}/{repo}/releases/{release_id}")] - public Task Delete(string owner, string name, int id) + public Task Delete(string owner, string name, int releaseId) { Ensure.ArgumentNotNullOrEmptyString(owner, nameof(owner)); Ensure.ArgumentNotNullOrEmptyString(name, nameof(name)); - var endpoint = ApiUrls.Releases(owner, name, id); + var endpoint = ApiUrls.Releases(owner, name, releaseId); return ApiConnection.Delete(endpoint); } @@ -346,12 +346,12 @@ namespace Octokit /// See the API documentation for more information. /// /// The Id of the repository - /// The id of the release to delete + /// The id of the release to delete /// Thrown when a general API error occurs. [ManualRoute("DELETE", "/repositories/{id}/releases/{id}")] - public Task Delete(long repositoryId, int id) + public Task Delete(long repositoryId, int releaseId) { - var endpoint = ApiUrls.Releases(repositoryId, id); + var endpoint = ApiUrls.Releases(repositoryId, releaseId); return ApiConnection.Delete(endpoint); } @@ -363,15 +363,15 @@ namespace Octokit /// /// The repository's owner /// The repository's name - /// The id of the . + /// The id of the . /// Thrown when a general API error occurs. [ManualRoute("GET", "/repos/{owner}/{repo}/releases/{release_id}/assets")] - public Task> GetAllAssets(string owner, string name, int id) + public Task> GetAllAssets(string owner, string name, int releaseId) { Ensure.ArgumentNotNullOrEmptyString(owner, nameof(owner)); Ensure.ArgumentNotNullOrEmptyString(name, nameof(name)); - return GetAllAssets(owner, name, id, ApiOptions.None); + return GetAllAssets(owner, name, releaseId, ApiOptions.None); } /// @@ -381,12 +381,12 @@ namespace Octokit /// See the API documentation for more information. /// /// The Id of the repository - /// The id of the . + /// The id of the . /// Thrown when a general API error occurs. [ManualRoute("GET", "/repositories/{id}/releases/{id}/assets")] - public Task> GetAllAssets(long repositoryId, int id) + public Task> GetAllAssets(long repositoryId, int releaseId) { - return GetAllAssets(repositoryId, id, ApiOptions.None); + return GetAllAssets(repositoryId, releaseId, ApiOptions.None); } /// @@ -397,17 +397,17 @@ namespace Octokit /// /// The repository's owner /// The repository's name - /// The id of the . + /// The id of the . /// Options for changing the API response /// Thrown when a general API error occurs. [ManualRoute("GET", "/repos/{owner}/{repo}/releases/{release_id}/assets")] - public Task> GetAllAssets(string owner, string name, int id, ApiOptions options) + public Task> GetAllAssets(string owner, string name, int releaseId, ApiOptions options) { Ensure.ArgumentNotNullOrEmptyString(owner, nameof(owner)); Ensure.ArgumentNotNullOrEmptyString(name, nameof(name)); Ensure.ArgumentNotNull(options, nameof(options)); - var endpoint = ApiUrls.ReleaseAssets(owner, name, id); + var endpoint = ApiUrls.ReleaseAssets(owner, name, releaseId); return ApiConnection.GetAll(endpoint, null, AcceptHeaders.StableVersion, options); } @@ -418,15 +418,15 @@ namespace Octokit /// See the API documentation for more information. /// /// The Id of the repository - /// The id of the . + /// The id of the . /// Options for changing the API response /// Thrown when a general API error occurs. [ManualRoute("GET", "/repositories/{id}/releases/{id}/assets")] - public Task> GetAllAssets(long repositoryId, int id, ApiOptions options) + public Task> GetAllAssets(long repositoryId, int releaseId, ApiOptions options) { Ensure.ArgumentNotNull(options, nameof(options)); - var endpoint = ApiUrls.ReleaseAssets(repositoryId, id); + var endpoint = ApiUrls.ReleaseAssets(repositoryId, releaseId); return ApiConnection.GetAll(endpoint, null, AcceptHeaders.StableVersion, options); } @@ -548,14 +548,14 @@ namespace Octokit /// /// The repository's owner /// The repository's name - /// The id of the . + /// The id of the . [ManualRoute("DELETE", "/repos/{owner}/{repo}/releases/assets/{asset_id}")] - public Task DeleteAsset(string owner, string name, int id) + public Task DeleteAsset(string owner, string name, int assetId) { Ensure.ArgumentNotNullOrEmptyString(owner, nameof(owner)); Ensure.ArgumentNotNullOrEmptyString(name, nameof(name)); - var endpoint = ApiUrls.Asset(owner, name, id); + var endpoint = ApiUrls.Asset(owner, name, assetId); return ApiConnection.Delete(endpoint); } @@ -566,11 +566,11 @@ namespace Octokit /// See the API documentation for more information. /// /// The Id of the repository - /// The id of the . + /// The id of the . [ManualRoute("DELETE", "/repositories/{id}/releases/assets/{asset_id}")] - public Task DeleteAsset(long repositoryId, int id) + public Task DeleteAsset(long repositoryId, int assetId) { - var endpoint = ApiUrls.Asset(repositoryId, id); + var endpoint = ApiUrls.Asset(repositoryId, assetId); return ApiConnection.Delete(endpoint); } } diff --git a/Octokit/Clients/RepositoryCommentsClient.cs b/Octokit/Clients/RepositoryCommentsClient.cs index ff28b1a1..db7dcf8c 100644 --- a/Octokit/Clients/RepositoryCommentsClient.cs +++ b/Octokit/Clients/RepositoryCommentsClient.cs @@ -25,27 +25,27 @@ namespace Octokit /// /// The owner of the repository /// The name of the repository - /// The comment id + /// The comment id /// http://developer.github.com/v3/repos/comments/#get-a-single-commit-comment [ManualRoute("GET", "/repos/{owner}/{repo}/comments/{comment_id}")] - public Task Get(string owner, string name, int number) + public Task Get(string owner, string name, long commentId) { Ensure.ArgumentNotNullOrEmptyString(owner, nameof(owner)); Ensure.ArgumentNotNullOrEmptyString(name, nameof(name)); - return ApiConnection.Get(ApiUrls.CommitComment(owner, name, number), null); + return ApiConnection.Get(ApiUrls.CommitComment(owner, name, commentId), null); } /// /// Gets a single Repository Comment by number. /// /// The Id of the repository - /// The comment id + /// The comment id /// http://developer.github.com/v3/repos/comments/#get-a-single-commit-comment [ManualRoute("GET", "/repositories/{id}/comments/{number}")] - public Task Get(long repositoryId, int number) + public Task Get(long repositoryId, long commentId) { - return ApiConnection.Get(ApiUrls.CommitComment(repositoryId, number), null); + return ApiConnection.Get(ApiUrls.CommitComment(repositoryId, commentId), null); } /// @@ -211,32 +211,32 @@ namespace Octokit /// /// The owner of the repository /// The name of the repository - /// The comment number + /// The comment id /// The modified comment /// http://developer.github.com/v3/repos/comments/#update-a-commit-comment [ManualRoute("PATCH", "/repos/{owner}/{repo}/comments/{comment_id}")] - public Task Update(string owner, string name, int number, string commentUpdate) + public Task Update(string owner, string name, long commentId, string commentUpdate) { Ensure.ArgumentNotNullOrEmptyString(owner, nameof(owner)); Ensure.ArgumentNotNullOrEmptyString(name, nameof(name)); Ensure.ArgumentNotNull(commentUpdate, nameof(commentUpdate)); - return ApiConnection.Patch(ApiUrls.CommitComment(owner, name, number), new BodyWrapper(commentUpdate)); + return ApiConnection.Patch(ApiUrls.CommitComment(owner, name, commentId), new BodyWrapper(commentUpdate)); } /// /// Updates a specified Commit Comment. /// /// The Id of the repository - /// The comment number + /// The comment id /// The modified comment /// http://developer.github.com/v3/repos/comments/#update-a-commit-comment [ManualRoute("PATCH", "/repositories/{id}/comments/{number}")] - public Task Update(long repositoryId, int number, string commentUpdate) + public Task Update(long repositoryId, long commentId, string commentUpdate) { Ensure.ArgumentNotNull(commentUpdate, nameof(commentUpdate)); - return ApiConnection.Patch(ApiUrls.CommitComment(repositoryId, number), new BodyWrapper(commentUpdate)); + return ApiConnection.Patch(ApiUrls.CommitComment(repositoryId, commentId), new BodyWrapper(commentUpdate)); } /// @@ -244,27 +244,27 @@ namespace Octokit /// /// The owner of the repository /// The name of the repository - /// The comment id + /// The comment id /// http://developer.github.com/v3/repos/comments/#delete-a-commit-comment [ManualRoute("DELETE", "/repos/{owner}/{repo}/comments/{comment_id}")] - public Task Delete(string owner, string name, int number) + public Task Delete(string owner, string name, long commentId) { Ensure.ArgumentNotNullOrEmptyString(owner, nameof(owner)); Ensure.ArgumentNotNullOrEmptyString(name, nameof(name)); - return ApiConnection.Delete(ApiUrls.CommitComment(owner, name, number)); + return ApiConnection.Delete(ApiUrls.CommitComment(owner, name, commentId)); } /// /// Deletes the specified Commit Comment /// /// The Id of the repository - /// The comment id + /// The comment id /// http://developer.github.com/v3/repos/comments/#delete-a-commit-comment [ManualRoute("DELETE", "/repositories/{id}/comments/{number}")] - public Task Delete(long repositoryId, int number) + public Task Delete(long repositoryId, long commentId) { - return ApiConnection.Delete(ApiUrls.CommitComment(repositoryId, number)); + return ApiConnection.Delete(ApiUrls.CommitComment(repositoryId, commentId)); } } } diff --git a/Octokit/Clients/TeamsClient.cs b/Octokit/Clients/TeamsClient.cs index 1c36920d..9b03866f 100644 --- a/Octokit/Clients/TeamsClient.cs +++ b/Octokit/Clients/TeamsClient.cs @@ -28,12 +28,12 @@ namespace Octokit /// /// https://developer.github.com/v3/orgs/teams/#get-team /// - /// The team identifier. + /// The team identifier. /// The with the given identifier. [ManualRoute("GET", "/teams/{team_id}")] - public Task Get(int id) + public Task Get(int teamSlug) { - var endpoint = ApiUrls.Teams(id); + var endpoint = ApiUrls.Teams(teamSlug); return ApiConnection.Get(endpoint); } @@ -97,14 +97,14 @@ namespace Octokit /// /// Returns all child teams of the given team. /// - /// The team identifier + /// The team identifier /// /// https://developer.github.com/v3/orgs/teams/#list-child-teams /// [ManualRoute("GET", "/teams{id}/teams")] - public Task> GetAllChildTeams(int id) + public Task> GetAllChildTeams(int teamSlug) { - return GetAllChildTeams(id, ApiOptions.None); + return GetAllChildTeams(teamSlug, ApiOptions.None); } /// @@ -113,14 +113,14 @@ namespace Octokit /// /// https://developer.github.com/v3/orgs/teams/#list-child-teams /// - /// The team identifier + /// The team identifier /// Options to change API behaviour. [ManualRoute("GET", "/teams{id}/teams")] - public Task> GetAllChildTeams(int id, ApiOptions options) + public Task> GetAllChildTeams(int teamSlug, ApiOptions options) { Ensure.ArgumentNotNull(options, nameof(options)); - var endpoint = ApiUrls.TeamChildTeams(id); + var endpoint = ApiUrls.TeamChildTeams(teamSlug); return ApiConnection.GetAll(endpoint, options); } @@ -131,11 +131,11 @@ namespace Octokit /// /// https://developer.github.com/v3/orgs/teams/#list-team-members /// - /// The team identifier + /// The team identifier [ManualRoute("GET", "/teams{id}/members")] - public Task> GetAllMembers(int id) + public Task> GetAllMembers(int teamSlug) { - return GetAllMembers(id, ApiOptions.None); + return GetAllMembers(teamSlug, ApiOptions.None); } /// @@ -144,14 +144,14 @@ namespace Octokit /// /// https://developer.github.com/v3/orgs/teams/#list-team-members /// - /// The team identifier + /// The team identifier /// Options to change API behaviour. [ManualRoute("GET", "/teams{id}/members")] - public Task> GetAllMembers(int id, ApiOptions options) + public Task> GetAllMembers(int teamSlug, ApiOptions options) { Ensure.ArgumentNotNull(options, nameof(options)); - var endpoint = ApiUrls.TeamMembers(id); + var endpoint = ApiUrls.TeamMembers(teamSlug); return ApiConnection.GetAll(endpoint, options); } @@ -162,14 +162,14 @@ namespace Octokit /// /// https://developer.github.com/v3/orgs/teams/#list-team-members /// - /// The team identifier + /// The team identifier /// The request filter [ManualRoute("GET", "/teams{id}/members")] - public Task> GetAllMembers(int id, TeamMembersRequest request) + public Task> GetAllMembers(int teamSlug, TeamMembersRequest request) { Ensure.ArgumentNotNull(request, nameof(request)); - return GetAllMembers(id, request, ApiOptions.None); + return GetAllMembers(teamSlug, request, ApiOptions.None); } /// @@ -178,36 +178,36 @@ namespace Octokit /// /// https://developer.github.com/v3/orgs/teams/#list-team-members /// - /// The team identifier + /// The team identifier /// The request filter /// Options to change API behaviour. [ManualRoute("GET", "/teams{id}/members")] - public Task> GetAllMembers(int id, TeamMembersRequest request, ApiOptions options) + public Task> GetAllMembers(int teamSlug, TeamMembersRequest request, ApiOptions options) { Ensure.ArgumentNotNull(request, nameof(request)); Ensure.ArgumentNotNull(options, nameof(options)); - var endpoint = ApiUrls.TeamMembers(id); + var endpoint = ApiUrls.TeamMembers(teamSlug); return ApiConnection.GetAll(endpoint, request.ToParametersDictionary(), options); } /// /// Gets whether the user with the given - /// is a member of the team with the given . + /// is a member of the team with the given . /// A is thrown if the user is not a member. /// /// /// See the API documentation for more information. /// - /// The team to check. + /// The team to check. /// The user to check. [ManualRoute("GET", "/teams/{team_id}/memberships/{username}")] - public Task GetMembershipDetails(int id, string login) + public Task GetMembershipDetails(int teamSlug, string login) { Ensure.ArgumentNotNullOrEmptyString(login, nameof(login)); - var endpoint = ApiUrls.TeamMember(id, login); + var endpoint = ApiUrls.TeamMember(teamSlug, login); return ApiConnection.Get(endpoint); } @@ -260,11 +260,11 @@ namespace Octokit /// Thrown when a general API error occurs. /// Updated [ManualRoute("PATCH", "/teams/{team_id}")] - public Task Update(int id, UpdateTeam team) + public Task Update(int teamSlug, UpdateTeam team) { Ensure.ArgumentNotNull(team, nameof(team)); - var endpoint = ApiUrls.Teams(id); + var endpoint = ApiUrls.Teams(teamSlug); return ApiConnection.Patch(endpoint, team); } @@ -299,13 +299,13 @@ namespace Octokit /// /// See the API documentation /// - /// The unique identifier of the team. + /// The unique identifier of the team. /// Thrown when a general API error occurs. /// [ManualRoute("DELETE", "/teams/{team_id}")] - public Task Delete(int id) + public Task Delete(int teamSlug) { - var endpoint = ApiUrls.Teams(id); + var endpoint = ApiUrls.Teams(teamSlug); return ApiConnection.Delete(endpoint); } @@ -316,16 +316,16 @@ namespace Octokit /// /// See the API documentation for more information. /// - /// The team identifier. + /// The team identifier. /// The user to add to the team. /// Additional parameters for the request [ManualRoute("PUT", "/teams/{team_id}/memberships/{username}")] - public Task AddOrEditMembership(int id, string login, UpdateTeamMembership request) + public Task AddOrEditMembership(int teamSlug, string login, UpdateTeamMembership request) { Ensure.ArgumentNotNullOrEmptyString(login, nameof(login)); Ensure.ArgumentNotNull(request, nameof(request)); - var endpoint = ApiUrls.TeamMember(id, login); + var endpoint = ApiUrls.TeamMember(teamSlug, login); return ApiConnection.Put(endpoint, request); } @@ -336,15 +336,15 @@ namespace Octokit /// /// See the API documentation for more information. /// - /// The team identifier. + /// The team identifier. /// The user to remove from the team. /// if the user was removed from the team; otherwise. [ManualRoute("DELETE", "/teams/{team_id}/memberships/{username}")] - public async Task RemoveMembership(int id, string login) + public async Task RemoveMembership(int teamSlug, string login) { Ensure.ArgumentNotNullOrEmptyString(login, nameof(login)); - var endpoint = ApiUrls.TeamMember(id, login); + var endpoint = ApiUrls.TeamMember(teamSlug, login); try { @@ -361,28 +361,28 @@ namespace Octokit /// /// Returns all team's repositories. /// - /// Team Id. + /// Team Id. /// Thrown when a general API error occurs. /// The team's repositories [ManualRoute("GET", "/teams/{team_id}/repos")] - public Task> GetAllRepositories(int id) + public Task> GetAllRepositories(int teamSlug) { - return GetAllRepositories(id, ApiOptions.None); + return GetAllRepositories(teamSlug, ApiOptions.None); } /// /// Returns all team's repositories. /// - /// Team Id. + /// Team Id. /// Options to change API behaviour. /// Thrown when a general API error occurs. /// The team's repositories [ManualRoute("GET", "/teams/{team_id}/repos")] - public Task> GetAllRepositories(int id, ApiOptions options) + public Task> GetAllRepositories(int teamSlug, ApiOptions options) { Ensure.ArgumentNotNull(options, nameof(options)); - var endpoint = ApiUrls.TeamRepositories(id); + var endpoint = ApiUrls.TeamRepositories(teamSlug); return ApiConnection.GetAll(endpoint, options); } @@ -395,7 +395,7 @@ namespace Octokit /// Thrown when a general API error occurs. /// [ManualRoute("PUT", "/teams/{team_id}/repos/{owner}/{repo}")] - public async Task AddRepository(int id, string organization, string repoName) + public async Task AddRepository(int teamSlug, string organization, string repoName) { Ensure.ArgumentNotNullOrEmptyString(organization, nameof(organization)); Ensure.ArgumentNotNullOrEmptyString(repoName, nameof(repoName)); @@ -412,7 +412,7 @@ namespace Octokit // // Likely will require a breaking change - var endpoint = ApiUrls.TeamRepository(id, organization, repoName); + var endpoint = ApiUrls.TeamRepository(teamSlug, organization, repoName); try { @@ -430,14 +430,14 @@ namespace Octokit /// Deprecation Notice: This endpoint route is deprecated and will be removed from the Teams API. /// We recommend migrating your existing code to use the new "Add or update team repository permissions" endpoint. /// - /// The team identifier. + /// The team identifier. /// Org to associate the repo with. /// Name of the repo. /// The permission to grant the team on this repository. /// Thrown when a general API error occurs. /// [ManualRoute("PUT", "/teams/{team_id}/repos/{owner}/{repo}")] - public async Task AddRepository(int id, string organization, string repoName, RepositoryPermissionRequest permission) + public async Task AddRepository(int teamSlug, string organization, string repoName, RepositoryPermissionRequest permission) { Ensure.ArgumentNotNullOrEmptyString(organization, nameof(organization)); Ensure.ArgumentNotNullOrEmptyString(repoName, nameof(repoName)); @@ -454,7 +454,7 @@ namespace Octokit // // Likely will require a breaking change - var endpoint = ApiUrls.TeamRepository(id, organization, repoName); + var endpoint = ApiUrls.TeamRepository(teamSlug, organization, repoName); try { @@ -475,7 +475,7 @@ namespace Octokit /// Thrown when a general API error occurs. /// [ManualRoute("DELETE", "/teams/{team_id}/repos/{owner}/{repo}")] - public async Task RemoveRepository(int id, string organization, string repoName) + public async Task RemoveRepository(int teamSlug, string organization, string repoName) { Ensure.ArgumentNotNullOrEmptyString(organization, nameof(organization)); Ensure.ArgumentNotNullOrEmptyString(repoName, nameof(repoName)); @@ -492,7 +492,7 @@ namespace Octokit // // Likely will require a breaking change - var endpoint = ApiUrls.TeamRepository(id, organization, repoName); + var endpoint = ApiUrls.TeamRepository(teamSlug, organization, repoName); try { @@ -509,7 +509,7 @@ namespace Octokit /// /// Gets whether or not the given repository is managed by the given team. /// - /// The team identifier + /// The team identifier /// Owner of the org the team is associated with. /// Name of the repo. /// @@ -517,12 +517,12 @@ namespace Octokit /// /// if the repository is managed by the given team; otherwise. [ManualRoute("GET", "/teams/{team_id}/repos/{owner}/{name}")] - public async Task IsRepositoryManagedByTeam(int id, string owner, string repo) + public async Task IsRepositoryManagedByTeam(int teamSlug, string owner, string repo) { Ensure.ArgumentNotNullOrEmptyString(owner, nameof(owner)); Ensure.ArgumentNotNullOrEmptyString(repo, nameof(repo)); - var endpoint = ApiUrls.TeamRepository(id, owner, repo); + var endpoint = ApiUrls.TeamRepository(teamSlug, owner, repo); try { @@ -542,14 +542,14 @@ namespace Octokit /// See the API Documentation /// for more information. /// - /// The team identifier + /// The team identifier /// [ManualRoute("GET", "/teams/{team_id}/invitations")] - public Task> GetAllPendingInvitations(int id) + public Task> GetAllPendingInvitations(int teamSlug) { - Ensure.ArgumentNotNull(id, nameof(id)); + Ensure.ArgumentNotNull(teamSlug, nameof(teamSlug)); - return GetAllPendingInvitations(id, ApiOptions.None); + return GetAllPendingInvitations(teamSlug, ApiOptions.None); } /// @@ -559,13 +559,13 @@ namespace Octokit /// See the API Documentation /// for more information. /// - /// The team identifier + /// The team identifier /// Options to change API behaviour /// [ManualRoute("GET", "/teams/{team_id}/invitations")] - public Task> GetAllPendingInvitations(int id, ApiOptions options) + public Task> GetAllPendingInvitations(int teamSlug, ApiOptions options) { - return ApiConnection.GetAll(ApiUrls.TeamPendingInvitations(id), null, options); + return ApiConnection.GetAll(ApiUrls.TeamPendingInvitations(teamSlug), null, options); } /// diff --git a/Octokit/Clients/UserGpgKeysClient.cs b/Octokit/Clients/UserGpgKeysClient.cs index f2d859e6..4e641541 100644 --- a/Octokit/Clients/UserGpgKeysClient.cs +++ b/Octokit/Clients/UserGpgKeysClient.cs @@ -53,15 +53,15 @@ namespace Octokit /// /// View extended details of the for the specified id. /// - /// The Id of the GPG key + /// The Id of the GPG key /// /// See the API documentation for more information. /// /// The for the specified Id. [ManualRoute("GET", "/user/gpg_keys/{gpg_key_id}")] - public Task Get(int id) + public Task Get(int gpgKeyId) { - return ApiConnection.Get(ApiUrls.GpgKeys(id)); + return ApiConnection.Get(ApiUrls.GpgKeys(gpgKeyId)); } /// @@ -83,15 +83,15 @@ namespace Octokit /// /// Deletes the GPG key for the specified Id. /// - /// The Id of the GPG key to delete. + /// The Id of the GPG key to delete. /// /// See the API documentation for more information. /// /// [ManualRoute("DELETE", "/user/gpg_keys/{gpg_key_id}")] - public Task Delete(int id) + public Task Delete(int gpgKeyId) { - return ApiConnection.Delete(ApiUrls.GpgKeys(id)); + return ApiConnection.Delete(ApiUrls.GpgKeys(gpgKeyId)); } } } diff --git a/Octokit/Clients/UserKeysClient.cs b/Octokit/Clients/UserKeysClient.cs index d9e9b30f..00498670 100644 --- a/Octokit/Clients/UserKeysClient.cs +++ b/Octokit/Clients/UserKeysClient.cs @@ -85,12 +85,12 @@ namespace Octokit /// /// https://developer.github.com/v3/users/keys/#get-a-single-public-key /// - /// The Id of the SSH key + /// The Id of the SSH key /// [ManualRoute("GET", "/user/keys/{key_id}")] - public Task Get(int id) + public Task Get(int keyId) { - return ApiConnection.Get(ApiUrls.Keys(id)); + return ApiConnection.Get(ApiUrls.Keys(keyId)); } /// @@ -115,12 +115,12 @@ namespace Octokit /// /// https://developer.github.com/v3/users/keys/#delete-a-public-key /// - /// The id of the key to delete + /// The id of the key to delete /// [ManualRoute("DELETE", "/user/keys/{key_id}")] - public Task Delete(int id) + public Task Delete(int keyId) { - return ApiConnection.Delete(ApiUrls.Keys(id)); + return ApiConnection.Delete(ApiUrls.Keys(keyId)); } } } diff --git a/Octokit/Helpers/ApiUrls.cs b/Octokit/Helpers/ApiUrls.cs index 7c8ecc27..06849637 100644 --- a/Octokit/Helpers/ApiUrls.cs +++ b/Octokit/Helpers/ApiUrls.cs @@ -232,10 +232,10 @@ namespace Octokit /// /// Returns the to retrieve a given key. /// - /// The Key Id to retrieve - public static Uri Keys(int id) + /// The Key Id to retrieve + public static Uri Keys(int keyId) { - return "user/keys/{0}".FormatUri(id); + return "user/keys/{0}".FormatUri(keyId); } /// @@ -274,11 +274,11 @@ namespace Octokit /// /// The owner of the repository /// The name of the repository - /// The id of the release + /// The id of the release /// - public static Uri Releases(string owner, string name, int id) + public static Uri Releases(string owner, string name, int releaseId) { - return "repos/{0}/{1}/releases/{2}".FormatUri(owner, name, id); + return "repos/{0}/{1}/releases/{2}".FormatUri(owner, name, releaseId); } /// @@ -309,11 +309,11 @@ namespace Octokit /// /// The owner of the repository /// The name of the repository - /// The id of the release + /// The id of the release /// - public static Uri ReleaseAssets(string owner, string name, int id) + public static Uri ReleaseAssets(string owner, string name, int releaseId) { - return "repos/{0}/{1}/releases/{2}/assets".FormatUri(owner, name, id); + return "repos/{0}/{1}/releases/{2}/assets".FormatUri(owner, name, releaseId); } /// @@ -321,11 +321,11 @@ namespace Octokit /// /// The owner of the repository /// The name of the repository - /// The id of the release asset + /// The id of the release asset /// - public static Uri Asset(string owner, string name, int id) + public static Uri Asset(string owner, string name, int releaseAssetId) { - return "repos/{0}/{1}/releases/assets/{2}".FormatUri(owner, name, id); + return "repos/{0}/{1}/releases/assets/{2}".FormatUri(owner, name, releaseAssetId); } /// @@ -352,20 +352,20 @@ namespace Octokit /// /// Returns the for the specified notification. /// - /// The Id of the notification. + /// The Id of the notification. /// - public static Uri Notification(int id) + public static Uri Notification(int notificationId) { - return "notifications/threads/{0}".FormatUri(id); + return "notifications/threads/{0}".FormatUri(notificationId); } /// /// Returns the for the specified notification's subscription status. /// - /// The Id of the notification. - public static Uri NotificationSubscription(int id) + /// The Id of the notification. + public static Uri NotificationSubscription(int notificationId) { - return "notifications/threads/{0}/subscription".FormatUri(id); + return "notifications/threads/{0}/subscription".FormatUri(notificationId); } /// @@ -563,11 +563,11 @@ namespace Octokit /// The owner of the repository /// The name of the repository /// The issue number - /// The reactionid for the issue + /// The reactionid for the issue /// - public static Uri IssueReaction(string owner, string name, int number, int reaction) + public static Uri IssueReaction(string owner, string name, int number, long reactionId) { - return "repos/{0}/{1}/issues/{2}/reactions/{3}".FormatUri(owner, name, number, reaction); + return "repos/{0}/{1}/issues/{2}/reactions/{3}".FormatUri(owner, name, number, reactionId); } /// @@ -575,11 +575,11 @@ namespace Octokit /// /// The Id of the repository /// The issue number - /// The reactionid for the issue + /// The reactionid for the issue /// - public static Uri IssueReaction(long repositoryId, int number, int reaction) + public static Uri IssueReaction(long repositoryId, int number, long reactionId) { - return "repositories/{0}/issues/{1}/reactions/{2}".FormatUri(repositoryId, number, reaction); + return "repositories/{0}/issues/{1}/reactions/{2}".FormatUri(repositoryId, number, reactionId); } /// @@ -633,11 +633,11 @@ namespace Octokit /// /// The owner of the repository /// The name of the repository - /// The comment id + /// The comment id /// - public static Uri IssueComment(string owner, string name, int id) + public static Uri IssueComment(string owner, string name, long commentId) { - return "repos/{0}/{1}/issues/comments/{2}".FormatUri(owner, name, id); + return "repos/{0}/{1}/issues/comments/{2}".FormatUri(owner, name, commentId); } /// @@ -645,22 +645,22 @@ namespace Octokit /// /// The owner of the repository /// The name of the repository - /// The comment number + /// The comment id /// - public static Uri IssueCommentReactions(string owner, string name, int number) + public static Uri IssueCommentReactions(string owner, string name, long commentId) { - return "repos/{0}/{1}/issues/comments/{2}/reactions".FormatUri(owner, name, number); + return "repos/{0}/{1}/issues/comments/{2}/reactions".FormatUri(owner, name, commentId); } /// /// Returns the for the reaction of a specified issue comment. /// /// The owner of the repository - /// The comment number + /// The comment id /// - public static Uri IssueCommentReactions(long repositoryId, int number) + public static Uri IssueCommentReactions(long repositoryId, long commentId) { - return "repositories/{0}/issues/comments/{1}/reactions".FormatUri(repositoryId, number); + return "repositories/{0}/issues/comments/{1}/reactions".FormatUri(repositoryId, commentId); } /// @@ -668,24 +668,24 @@ namespace Octokit /// /// The owner of the repository /// The name of the repository - /// The comment number + /// The comment id /// The reactionid for the comment /// - public static Uri IssueCommentReaction(string owner, string name, int number, int reaction) + public static Uri IssueCommentReaction(string owner, string name, long commentId, long reaction) { - return "repos/{0}/{1}/issues/comments/{2}/reactions/{3}".FormatUri(owner, name, number, reaction); + return "repos/{0}/{1}/issues/comments/{2}/reactions/{3}".FormatUri(owner, name, commentId, reaction); } /// /// Returns the for the reaction of a specified issue comment. /// /// The owner of the repository - /// The comment number + /// The comment id /// The reactionid for the comment /// - public static Uri IssueCommentReaction(long repositoryId, int number, int reaction) + public static Uri IssueCommentReaction(long repositoryId, long commentId, long reaction) { - return "repositories/{0}/issues/comments/{1}/reactions/{2}".FormatUri(repositoryId, number, reaction); + return "repositories/{0}/issues/comments/{1}/reactions/{2}".FormatUri(repositoryId, commentId, reaction); } /// @@ -693,11 +693,11 @@ namespace Octokit /// /// The owner of the repository /// The name of the repository - /// The comment number + /// The comment id /// - public static Uri CommitComment(string owner, string name, int number) + public static Uri CommitComment(string owner, string name, long commentId) { - return "repos/{0}/{1}/comments/{2}".FormatUri(owner, name, number); + return "repos/{0}/{1}/comments/{2}".FormatUri(owner, name, commentId); } /// @@ -728,22 +728,22 @@ namespace Octokit /// /// The owner of the repository /// The name of the repository - /// The comment number + /// The comment id /// - public static Uri CommitCommentReactions(string owner, string name, int number) + public static Uri CommitCommentReactions(string owner, string name, long commentId) { - return "repos/{0}/{1}/comments/{2}/reactions".FormatUri(owner, name, number); + return "repos/{0}/{1}/comments/{2}/reactions".FormatUri(owner, name, commentId); } /// /// Returns the for the reaction of a specified commit comment. /// /// The Id of the repository - /// The comment number + /// The comment id /// - public static Uri CommitCommentReactions(long repositoryId, int number) + public static Uri CommitCommentReactions(long repositoryId, long commentId) { - return "repositories/{0}/comments/{1}/reactions".FormatUri(repositoryId, number); + return "repositories/{0}/comments/{1}/reactions".FormatUri(repositoryId, commentId); } /// @@ -751,24 +751,24 @@ namespace Octokit /// /// The owner of the repository /// The name of the repository - /// The comment number + /// The comment id /// The reaction number /// - public static Uri CommitCommentReaction(string owner, string name, int number, int reaction) + public static Uri CommitCommentReaction(string owner, string name, long commentId, long reaction) { - return "repos/{0}/{1}/comments/{2}/reactions/{3}".FormatUri(owner, name, number, reaction); + return "repos/{0}/{1}/comments/{2}/reactions/{3}".FormatUri(owner, name, commentId, reaction); } /// /// Returns the for the reaction of a specified commit comment. /// /// The Id of the repository - /// The comment number + /// The comment id /// The reaction number /// - public static Uri CommitCommentReaction(long repositoryId, int number, int reaction) + public static Uri CommitCommentReaction(long repositoryId, long commentId, long reaction) { - return "repositories/{0}/comments/{1}/reactions/{2}".FormatUri(repositoryId, number, reaction); + return "repositories/{0}/comments/{1}/reactions/{2}".FormatUri(repositoryId, commentId, reaction); } /// @@ -1029,11 +1029,11 @@ namespace Octokit /// /// The owner of the repository /// The name of the repository - /// The event id + /// The event id /// - public static Uri IssuesEvent(string owner, string name, long id) + public static Uri IssuesEvent(string owner, string name, long eventId) { - return "repos/{0}/{1}/issues/events/{2}".FormatUri(owner, name, id); + return "repos/{0}/{1}/issues/events/{2}".FormatUri(owner, name, eventId); } /// @@ -1375,19 +1375,19 @@ namespace Octokit /// /// Returns the for the specified gist. /// - /// The id of the gist - public static Uri Gist(string id) + /// The id of the gist + public static Uri Gist(string gistId) { - return "gists/{0}".FormatUri(id); + return "gists/{0}".FormatUri(gistId); } /// /// Returns the for the forks for the specified gist. /// - /// The id of the gist - public static Uri ForkGist(string id) + /// The id of the gist + public static Uri ForkGist(string gistId) { - return "gists/{0}/forks".FormatUri(id); + return "gists/{0}/forks".FormatUri(gistId); } /// @@ -1418,10 +1418,10 @@ namespace Octokit /// /// Returns the to star a given gist. /// - /// The id of the gist - public static Uri StarGist(string id) + /// The id of the gist + public static Uri StarGist(string gistId) { - return "gists/{0}/star".FormatUri(id); + return "gists/{0}/star".FormatUri(gistId); } /// @@ -1436,10 +1436,10 @@ namespace Octokit /// /// Returns the for the commits for the specified gist. /// - /// The id of the gist - public static Uri GistCommits(string id) + /// The id of the gist + public static Uri GistCommits(string gistId) { - return "gists/{0}/commits".FormatUri(id); + return "gists/{0}/commits".FormatUri(gistId); } /// @@ -1506,7 +1506,7 @@ namespace Octokit /// /// The id of the gist /// The id of the comment - public static Uri GistComment(string gistId, int commentId) + public static Uri GistComment(string gistId, long commentId) { return "gists/{0}/comments/{1}".FormatUri(gistId, commentId); } @@ -1681,11 +1681,11 @@ namespace Octokit /// /// The owner of the repository /// The name of the repository - /// The comment number + /// The comment id /// The - public static Uri PullRequestReviewComment(string owner, string name, int number) + public static Uri PullRequestReviewComment(string owner, string name, long commentId) { - return "repos/{0}/{1}/pulls/comments/{2}".FormatUri(owner, name, number); + return "repos/{0}/{1}/pulls/comments/{2}".FormatUri(owner, name, commentId); } /// @@ -1793,22 +1793,22 @@ namespace Octokit /// /// The owner of the repository /// The name of the repository - /// The comment number + /// The comment id /// - public static Uri PullRequestReviewCommentReactions(string owner, string name, int number) + public static Uri PullRequestReviewCommentReactions(string owner, string name, long commentId) { - return "repos/{0}/{1}/pulls/comments/{2}/reactions".FormatUri(owner, name, number); + return "repos/{0}/{1}/pulls/comments/{2}/reactions".FormatUri(owner, name, commentId); } /// /// Returns the for the reactions of a specified pull request review comment. /// /// The Id of the repository - /// The comment number + /// The comment id /// - public static Uri PullRequestReviewCommentReactions(long repositoryId, int number) + public static Uri PullRequestReviewCommentReactions(long repositoryId, long commentId) { - return "repositories/{0}/pulls/comments/{1}/reactions".FormatUri(repositoryId, number); + return "repositories/{0}/pulls/comments/{1}/reactions".FormatUri(repositoryId, commentId); } @@ -1817,24 +1817,24 @@ namespace Octokit /// /// The owner of the repository /// The name of the repository - /// The comment number + /// The comment id /// The reactionid for the comment /// - public static Uri PullRequestReviewCommentReaction(string owner, string name, int number, int reaction) + public static Uri PullRequestReviewCommentReaction(string owner, string name, long commentId, long reaction) { - return "repos/{0}/{1}/pulls/comments/{2}/reactions/{3}".FormatUri(owner, name, number, reaction); + return "repos/{0}/{1}/pulls/comments/{2}/reactions/{3}".FormatUri(owner, name, commentId, reaction); } /// /// Returns the for the reaction of a specified pull request review comment. /// /// The Id of the repository - /// The comment number + /// The comment id /// The reactionid for the comment /// - public static Uri PullRequestReviewCommentReaction(long repositoryId, int number, int reaction) + public static Uri PullRequestReviewCommentReaction(long repositoryId, long commentId, long reaction) { - return "repositories/{0}/pulls/comments/{1}/reactions/{2}".FormatUri(repositoryId, number, reaction); + return "repositories/{0}/pulls/comments/{1}/reactions/{2}".FormatUri(repositoryId, commentId, reaction); } /// @@ -1935,22 +1935,22 @@ namespace Octokit /// /// Returns the for child teams /// - /// + /// The id of the parent team /// - public static Uri TeamChildTeams(int id) + public static Uri TeamChildTeams(int parentTeamId) { - return "teams/{0}/teams".FormatUri(id); + return "teams/{0}/teams".FormatUri(parentTeamId); } /// /// Returns the for teams /// use for getting, updating, or deleting a . /// - /// The id of the . + /// The id of the . /// - public static Uri Teams(int id) + public static Uri Teams(int teamId) { - return "teams/{0}".FormatUri(id); + return "teams/{0}".FormatUri(teamId); } /// @@ -1968,40 +1968,40 @@ namespace Octokit /// /// returns the for team member /// - /// The team id + /// The team id /// The user login. - public static Uri TeamMember(int id, string login) + public static Uri TeamMember(int teamId, string login) { - return "teams/{0}/memberships/{1}".FormatUri(id, login); + return "teams/{0}/memberships/{1}".FormatUri(teamId, login); } /// /// returns the for team members list /// - /// The team id - public static Uri TeamMembers(int id) + /// The team id + public static Uri TeamMembers(int teamId) { - return "teams/{0}/members".FormatUri(id); + return "teams/{0}/members".FormatUri(teamId); } /// /// returns the for the repositories /// - /// The team id - public static Uri TeamRepositories(int id) + /// The team id + public static Uri TeamRepositories(int teamId) { - return "teams/{0}/repos".FormatUri(id); + return "teams/{0}/repos".FormatUri(teamId); } /// /// returns the for a team repository /// - /// The team id + /// The team id /// The organization id /// The repository name - public static Uri TeamRepository(int id, string organization, string repoName) + public static Uri TeamRepository(int teamId, string organization, string repoName) { - return "teams/{0}/repos/{1}/{2}".FormatUri(id, organization, repoName); + return "teams/{0}/repos/{1}/{2}".FormatUri(teamId, organization, repoName); } /// @@ -2019,11 +2019,11 @@ namespace Octokit /// /// returns the for the teams pending invitations /// - /// The team id + /// The team id /// - public static Uri TeamPendingInvitations(int id) + public static Uri TeamPendingInvitations(int teamId) { - return "teams/{0}/invitations".FormatUri(id); + return "teams/{0}/invitations".FormatUri(teamId); } /// @@ -2939,9 +2939,9 @@ namespace Octokit return "enterprise/settings/license".FormatUri(); } - public static Uri EnterpriseMigrationById(string org, int id) + public static Uri EnterpriseMigrationById(string org, int migrationId) { - return "orgs/{0}/migrations/{1}".FormatUri(org, id); + return "orgs/{0}/migrations/{1}".FormatUri(org, migrationId); } public static Uri EnterpriseMigrations(string org) @@ -2949,14 +2949,14 @@ namespace Octokit return "orgs/{0}/migrations".FormatUri(org); } - public static Uri EnterpriseMigrationArchive(string org, int id) + public static Uri EnterpriseMigrationArchive(string org, int migrationId) { - return "orgs/{0}/migrations/{1}/archive".FormatUri(org, id); + return "orgs/{0}/migrations/{1}/archive".FormatUri(org, migrationId); } - public static Uri EnterpriseMigrationUnlockRepository(string org, int id, string repo) + public static Uri EnterpriseMigrationUnlockRepository(string org, int migrationId, string repo) { - return "orgs/{0}/migrations/{1}/repos/{2}/lock".FormatUri(org, id, repo); + return "orgs/{0}/migrations/{1}/repos/{2}/lock".FormatUri(org, migrationId, repo); } public static Uri EnterpriseManagementConsoleMaintenance(string managementConsolePassword, Uri baseAddress) @@ -3084,11 +3084,11 @@ namespace Octokit /// Returns the that returns the assets specified by the asset id. /// /// The Id of the repository - /// The id of the release asset + /// The id of the release asset /// The that returns the assets specified by the asset id. - public static Uri Asset(long repositoryId, int id) + public static Uri Asset(long repositoryId, int releaseAssetId) { - return "repositories/{0}/releases/assets/{1}".FormatUri(repositoryId, id); + return "repositories/{0}/releases/assets/{1}".FormatUri(repositoryId, releaseAssetId); } /// @@ -3164,11 +3164,11 @@ namespace Octokit /// Returns the for the specified comment. /// /// The Id of the repository - /// The comment number + /// The comment id /// The for the specified comment. - public static Uri CommitComment(long repositoryId, int number) + public static Uri CommitComment(long repositoryId, long commentId) { - return "repositories/{0}/comments/{1}".FormatUri(repositoryId, number); + return "repositories/{0}/comments/{1}".FormatUri(repositoryId, commentId); } /// @@ -3298,12 +3298,12 @@ namespace Octokit /// /// Returns the that returns the GPG Key for the authenticated user for the specified Id. /// - /// The that returns the GPG Key for the authenticated user for the specified Id. + /// The GPG Key Id. /// [SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "Gpg")] - public static Uri GpgKeys(int id) + public static Uri GpgKeys(int gpgKeyId) { - return "user/gpg_keys/{0}".FormatUri(id); + return "user/gpg_keys/{0}".FormatUri(gpgKeyId); } /// @@ -3321,11 +3321,11 @@ namespace Octokit /// Returns the for the specified comment. /// /// The Id of the repository - /// The comment id + /// The comment id /// The for the specified comment. - public static Uri IssueComment(long repositoryId, int id) + public static Uri IssueComment(long repositoryId, long commentId) { - return "repositories/{0}/issues/comments/{1}".FormatUri(repositoryId, id); + return "repositories/{0}/issues/comments/{1}".FormatUri(repositoryId, commentId); } /// @@ -3397,11 +3397,11 @@ namespace Octokit /// Returns the that returns the issue/pull request event and issue info for the specified event. /// /// The Id of the repository - /// The event id + /// The event id /// The that returns the issue/pull request event and issue info for the specified event. - public static Uri IssuesEvent(long repositoryId, long id) + public static Uri IssuesEvent(long repositoryId, long eventId) { - return "repositories/{0}/issues/events/{1}".FormatUri(repositoryId, id); + return "repositories/{0}/issues/events/{1}".FormatUri(repositoryId, eventId); } /// @@ -3546,11 +3546,11 @@ namespace Octokit /// Returns the for the specified pull request review comment. /// /// The Id of the repository - /// The comment number + /// The comment id /// The that - public static Uri PullRequestReviewComment(long repositoryId, int number) + public static Uri PullRequestReviewComment(long repositoryId, long commentId) { - return "repositories/{0}/pulls/comments/{1}".FormatUri(repositoryId, number); + return "repositories/{0}/pulls/comments/{1}".FormatUri(repositoryId, commentId); } /// @@ -3620,11 +3620,11 @@ namespace Octokit /// Returns the that returns all the assets for the specified release for the specified repository. /// /// The Id of the repository - /// The id of the release + /// The id of the release /// The that returns all the assets for the specified release for the specified repository. - public static Uri ReleaseAssets(long repositoryId, int id) + public static Uri ReleaseAssets(long repositoryId, int releaseId) { - return "repositories/{0}/releases/{1}/assets".FormatUri(repositoryId, id); + return "repositories/{0}/releases/{1}/assets".FormatUri(repositoryId, releaseId); } /// @@ -3651,11 +3651,11 @@ namespace Octokit /// Returns the that returns a single release for the specified repository /// /// The Id of the repository - /// The id of the release + /// The id of the release /// The that returns a single release for the specified repository - public static Uri Releases(long repositoryId, int id) + public static Uri Releases(long repositoryId, int releaseId) { - return "repositories/{0}/releases/{1}".FormatUri(repositoryId, id); + return "repositories/{0}/releases/{1}".FormatUri(repositoryId, releaseId); } /// @@ -4260,21 +4260,21 @@ namespace Octokit /// /// Returns the for a project. /// - /// The id of the project + /// The id of the project /// The for repository projects. - public static Uri Project(int id) + public static Uri Project(int projectId) { - return "projects/{0}".FormatUri(id); + return "projects/{0}".FormatUri(projectId); } /// /// Returns the for project columns. /// - /// The id of the columns + /// The id of the columns /// The for project columns. - public static Uri ProjectColumn(int id) + public static Uri ProjectColumn(int columnId) { - return "projects/columns/{0}".FormatUri(id); + return "projects/columns/{0}".FormatUri(columnId); } /// @@ -4290,21 +4290,21 @@ namespace Octokit /// /// Returns the to move a project column. /// - /// The id of the column to move + /// The id of the column to move /// The to move a project column. - public static Uri ProjectColumnMove(int id) + public static Uri ProjectColumnMove(int columnId) { - return "projects/columns/{0}/moves".FormatUri(id); + return "projects/columns/{0}/moves".FormatUri(columnId); } /// /// Returns the for project cards. /// - /// The id of the card + /// The id of the card /// The for project cards. - public static Uri ProjectCard(int id) + public static Uri ProjectCard(int cardId) { - return "projects/columns/cards/{0}".FormatUri(id); + return "projects/columns/cards/{0}".FormatUri(cardId); } /// @@ -4320,11 +4320,11 @@ namespace Octokit /// /// Returns the to move a project card. /// - /// The id of the card to move + /// The id of the card to move /// The to move a project card. - public static Uri ProjectCardMove(int id) + public static Uri ProjectCardMove(int cardId) { - return "projects/columns/cards/{0}/moves".FormatUri(id); + return "projects/columns/cards/{0}/moves".FormatUri(cardId); } /// @@ -4352,11 +4352,11 @@ namespace Octokit /// Returns the that returns the specified check run. /// /// The Id of the repository - /// The check run Id + /// The check run Id /// The that returns the specified check run. - public static Uri CheckRun(long repositoryId, long id) + public static Uri CheckRun(long repositoryId, long checkRunId) { - return "repositories/{0}/check-runs/{1}".FormatUri(repositoryId, id); + return "repositories/{0}/check-runs/{1}".FormatUri(repositoryId, checkRunId); } /// @@ -4364,11 +4364,11 @@ namespace Octokit /// /// The owner of repo /// The name of repo - /// The check run Id + /// The check run Id /// The that returns the specified check run. - public static Uri CheckRun(string owner, string repo, long id) + public static Uri CheckRun(string owner, string repo, long checkRunId) { - return "repos/{0}/{1}/check-runs/{2}".FormatUri(owner, repo, id); + return "repos/{0}/{1}/check-runs/{2}".FormatUri(owner, repo, checkRunId); } /// @@ -4465,11 +4465,11 @@ namespace Octokit /// Returns the that returns the specified check suite. /// /// The Id of the repository - /// The check run Id + /// The check run Id /// The that returns the specified check suite. - public static Uri CheckSuite(long repositoryId, long id) + public static Uri CheckSuite(long repositoryId, long checkRunId) { - return "repositories/{0}/check-suites/{1}".FormatUri(repositoryId, id); + return "repositories/{0}/check-suites/{1}".FormatUri(repositoryId, checkRunId); } /// @@ -4477,11 +4477,11 @@ namespace Octokit /// /// The owner of repo /// The name of repo - /// The check run Id + /// The check run Id /// The that returns the specified check suite. - public static Uri CheckSuite(string owner, string repo, long id) + public static Uri CheckSuite(string owner, string repo, long checkRunId) { - return "repos/{0}/{1}/check-suites/{2}".FormatUri(owner, repo, id); + return "repos/{0}/{1}/check-suites/{2}".FormatUri(owner, repo, checkRunId); } /// diff --git a/Octokit/Models/Request/PullRequestReviewCommentReplyCreate.cs b/Octokit/Models/Request/PullRequestReviewCommentReplyCreate.cs index d5b843d2..c1480f00 100644 --- a/Octokit/Models/Request/PullRequestReviewCommentReplyCreate.cs +++ b/Octokit/Models/Request/PullRequestReviewCommentReplyCreate.cs @@ -14,7 +14,7 @@ namespace Octokit /// /// The text of the comment /// The comment Id to reply to - public PullRequestReviewCommentReplyCreate(string body, int inReplyTo) + public PullRequestReviewCommentReplyCreate(string body, long inReplyTo) { Ensure.ArgumentNotNullOrEmptyString(body, nameof(body)); @@ -30,7 +30,7 @@ namespace Octokit /// /// The comment Id to reply to. /// - public int InReplyTo { get; private set; } + public long InReplyTo { get; private set; } internal string DebuggerDisplay { diff --git a/Octokit/Models/Response/CommitComment.cs b/Octokit/Models/Response/CommitComment.cs index 07b0d4bc..45507b6b 100644 --- a/Octokit/Models/Response/CommitComment.cs +++ b/Octokit/Models/Response/CommitComment.cs @@ -9,7 +9,7 @@ namespace Octokit { public CommitComment() { } - public CommitComment(int id, string nodeId, string url, string htmlUrl, string body, string path, int position, int? line, string commitId, User user, DateTimeOffset createdAt, DateTimeOffset? updatedAt, ReactionSummary reactions) + public CommitComment(long id, string nodeId, string url, string htmlUrl, string body, string path, int position, int? line, string commitId, User user, DateTimeOffset createdAt, DateTimeOffset? updatedAt, ReactionSummary reactions) { Id = id; NodeId = nodeId; @@ -29,7 +29,7 @@ namespace Octokit /// /// The issue comment Id. /// - public int Id { get; private set; } + public long Id { get; private set; } /// /// GraphQL Node Id diff --git a/Octokit/Models/Response/GistComment.cs b/Octokit/Models/Response/GistComment.cs index f432398d..f6fa39b8 100644 --- a/Octokit/Models/Response/GistComment.cs +++ b/Octokit/Models/Response/GistComment.cs @@ -9,7 +9,7 @@ namespace Octokit { public GistComment() { } - public GistComment(int id, string nodeId, string url, string body, User user, DateTimeOffset createdAt, DateTimeOffset? updatedAt) + public GistComment(long id, string nodeId, string url, string body, User user, DateTimeOffset createdAt, DateTimeOffset? updatedAt) { Id = id; NodeId = nodeId; @@ -23,7 +23,7 @@ namespace Octokit /// /// The gist comment id. /// - public int Id { get; private set; } + public long Id { get; private set; } /// /// GraphQL Node Id diff --git a/Octokit/Models/Response/IssueComment.cs b/Octokit/Models/Response/IssueComment.cs index 0d7d3da7..6ef6e3f8 100644 --- a/Octokit/Models/Response/IssueComment.cs +++ b/Octokit/Models/Response/IssueComment.cs @@ -10,7 +10,7 @@ namespace Octokit { public IssueComment() { } - public IssueComment(int id, string nodeId, string url, string htmlUrl, string body, DateTimeOffset createdAt, DateTimeOffset? updatedAt, User user, ReactionSummary reactions, AuthorAssociation authorAssociation) + public IssueComment(long id, string nodeId, string url, string htmlUrl, string body, DateTimeOffset createdAt, DateTimeOffset? updatedAt, User user, ReactionSummary reactions, AuthorAssociation authorAssociation) { Id = id; NodeId = nodeId; @@ -27,7 +27,7 @@ namespace Octokit /// /// The issue comment Id. /// - public int Id { get; private set; } + public long Id { get; private set; } /// /// GraphQL Node Id diff --git a/Octokit/Models/Response/PullRequestReviewComment.cs b/Octokit/Models/Response/PullRequestReviewComment.cs index a39b917a..ffdb12dd 100644 --- a/Octokit/Models/Response/PullRequestReviewComment.cs +++ b/Octokit/Models/Response/PullRequestReviewComment.cs @@ -10,12 +10,12 @@ namespace Octokit { public PullRequestReviewComment() { } - public PullRequestReviewComment(int id) + public PullRequestReviewComment(long id) { Id = id; } - public PullRequestReviewComment(string url, int id, string nodeId, string diffHunk, string path, int? position, int? originalPosition, string commitId, string originalCommitId, User user, string body, DateTimeOffset createdAt, DateTimeOffset updatedAt, string htmlUrl, string pullRequestUrl, ReactionSummary reactions, int? inReplyToId, int? pullRequestReviewId, AuthorAssociation authorAssociation) + public PullRequestReviewComment(string url, long id, string nodeId, string diffHunk, string path, int? position, int? originalPosition, string commitId, string originalCommitId, User user, string body, DateTimeOffset createdAt, DateTimeOffset updatedAt, string htmlUrl, string pullRequestUrl, ReactionSummary reactions, int? inReplyToId, int? pullRequestReviewId, AuthorAssociation authorAssociation) { PullRequestReviewId = pullRequestReviewId; Url = url; @@ -46,7 +46,7 @@ namespace Octokit /// /// The comment Id. /// - public int Id { get; private set; } + public long Id { get; private set; } /// /// GraphQL Node Id diff --git a/Octokit/Models/Response/Reaction.cs b/Octokit/Models/Response/Reaction.cs index 3b6ba7f4..8a40cd42 100644 --- a/Octokit/Models/Response/Reaction.cs +++ b/Octokit/Models/Response/Reaction.cs @@ -36,7 +36,7 @@ namespace Octokit { public Reaction() { } - public Reaction(int id, string nodeId, User user, ReactionType content) + public Reaction(long id, string nodeId, User user, ReactionType content) { Id = id; NodeId = nodeId; @@ -47,7 +47,7 @@ namespace Octokit /// /// The Id for this reaction. /// - public int Id { get; private set; } + public long Id { get; private set; } /// /// GraphQL Node Id diff --git a/Octokit/Models/Response/TeamRepository.cs b/Octokit/Models/Response/TeamRepository.cs index bab62979..7acb5791 100644 --- a/Octokit/Models/Response/TeamRepository.cs +++ b/Octokit/Models/Response/TeamRepository.cs @@ -357,7 +357,7 @@ namespace Octokit public string IssuesUrl { get; private set; } /// - /// example: http://api.github.com/repos/octocat/Hello-World/keys{/key_id} + /// example: http://api.github.com/repos/octocat/Hello-World/keys{/keyId} /// public string KeysUrl { get; private set; }