Files
octokit.net/Octokit/Clients/IPullRequestReviewCommentsClient.cs
Nick Floyd 6bb0408582 [FIX]: reworks all number parameter names to represent what they actually are. Refactors some types to be the appropriate types based on OpenAPI and docs. (#2948)
* reworks all number parameter names to represent what they actually are. Refactors some types to be the appropriate types based on OpenAPI and docs.

* updates interfaces and implementations for id naming

* updates reactive to match sync SDKs
2024-07-02 15:31:59 -05:00

210 lines
12 KiB
C#

using System.Collections.Generic;
using System.Threading.Tasks;
namespace Octokit
{
/// <summary>
/// A client for GitHub's Pull Request Review Comments API.
/// </summary>
/// <remarks>
/// See the <a href="https://developer.github.com/v3/pulls/comments/">Review Comments API documentation</a> for more information.
/// </remarks>
public interface IPullRequestReviewCommentsClient
{
/// <summary>
/// Gets review comments for a specified pull request.
/// </summary>
/// <remarks>http://developer.github.com/v3/pulls/comments/#list-comments-on-a-pull-request</remarks>
/// <param name="owner">The owner of the repository</param>
/// <param name="name">The name of the repository</param>
/// <param name="pullRequestNumber">The pull request number</param>
Task<IReadOnlyList<PullRequestReviewComment>> GetAll(string owner, string name, int pullRequestNumber);
/// <summary>
/// Gets review comments for a specified pull request.
/// </summary>
/// <remarks>http://developer.github.com/v3/pulls/comments/#list-comments-on-a-pull-request</remarks>
/// <param name="repositoryId">The Id of the repository</param>
/// <param name="pullRequestNumber">The pull request number</param>
Task<IReadOnlyList<PullRequestReviewComment>> GetAll(long repositoryId, int pullRequestNumber);
/// <summary>
/// Gets review comments for a specified pull request.
/// </summary>
/// <remarks>http://developer.github.com/v3/pulls/comments/#list-comments-on-a-pull-request</remarks>
/// <param name="owner">The owner of the repository</param>
/// <param name="name">The name of the repository</param>
/// <param name="pullRequestNumber">The pull request number</param>
/// <param name="options">Options for changing the API response</param>
Task<IReadOnlyList<PullRequestReviewComment>> GetAll(string owner, string name, int pullRequestNumber, ApiOptions options);
/// <summary>
/// Gets review comments for a specified pull request.
/// </summary>
/// <remarks>http://developer.github.com/v3/pulls/comments/#list-comments-on-a-pull-request</remarks>
/// <param name="repositoryId">The Id of the repository</param>
/// <param name="pullRequestNumber">The pull request number</param>
/// <param name="options">Options for changing the API response</param>
Task<IReadOnlyList<PullRequestReviewComment>> GetAll(long repositoryId, int pullRequestNumber, ApiOptions options);
/// <summary>
/// Gets a list of the pull request review comments in a specified repository.
/// </summary>
/// <remarks>http://developer.github.com/v3/pulls/comments/#list-comments-in-a-repository</remarks>
/// <param name="owner">The owner of the repository</param>
/// <param name="name">The name of the repository</param>
Task<IReadOnlyList<PullRequestReviewComment>> GetAllForRepository(string owner, string name);
/// <summary>
/// Gets a list of the pull request review comments in a specified repository.
/// </summary>
/// <remarks>http://developer.github.com/v3/pulls/comments/#list-comments-in-a-repository</remarks>
/// <param name="repositoryId">The Id of the repository</param>
Task<IReadOnlyList<PullRequestReviewComment>> GetAllForRepository(long repositoryId);
/// <summary>
/// Gets a list of the pull request review comments in a specified repository.
/// </summary>
/// <remarks>http://developer.github.com/v3/pulls/comments/#list-comments-in-a-repository</remarks>
/// <param name="owner">The owner of the repository</param>
/// <param name="name">The name of the repository</param>
/// <param name="options">Options for changing the API response</param>
Task<IReadOnlyList<PullRequestReviewComment>> GetAllForRepository(string owner, string name, ApiOptions options);
/// <summary>
/// Gets a list of the pull request review comments in a specified repository.
/// </summary>
/// <remarks>http://developer.github.com/v3/pulls/comments/#list-comments-in-a-repository</remarks>
/// <param name="repositoryId">The Id of the repository</param>
/// <param name="options">Options for changing the API response</param>
Task<IReadOnlyList<PullRequestReviewComment>> GetAllForRepository(long repositoryId, ApiOptions options);
/// <summary>
/// Gets a list of the pull request review comments in a specified repository.
/// </summary>
/// <remarks>http://developer.github.com/v3/pulls/comments/#list-comments-in-a-repository</remarks>
/// <param name="owner">The owner of the repository</param>
/// <param name="name">The name of the repository</param>
/// <param name="request">The sorting <see cref="PullRequestReviewCommentRequest">parameters</see></param>
Task<IReadOnlyList<PullRequestReviewComment>> GetAllForRepository(string owner, string name, PullRequestReviewCommentRequest request);
/// <summary>
/// Gets a list of the pull request review comments in a specified repository.
/// </summary>
/// <remarks>http://developer.github.com/v3/pulls/comments/#list-comments-in-a-repository</remarks>
/// <param name="repositoryId">The Id of the repository</param>
/// <param name="request">The sorting <see cref="PullRequestReviewCommentRequest">parameters</see></param>
Task<IReadOnlyList<PullRequestReviewComment>> GetAllForRepository(long repositoryId, PullRequestReviewCommentRequest request);
/// <summary>
/// Gets a list of the pull request review comments in a specified repository.
/// </summary>
/// <remarks>http://developer.github.com/v3/pulls/comments/#list-comments-in-a-repository</remarks>
/// <param name="owner">The owner of the repository</param>
/// <param name="name">The name of the repository</param>
/// <param name="request">The sorting <see cref="PullRequestReviewCommentRequest">parameters</see></param>
/// <param name="options">Options for changing the API response</param>
Task<IReadOnlyList<PullRequestReviewComment>> GetAllForRepository(string owner, string name, PullRequestReviewCommentRequest request, ApiOptions options);
/// <summary>
/// Gets a list of the pull request review comments in a specified repository.
/// </summary>
/// <remarks>http://developer.github.com/v3/pulls/comments/#list-comments-in-a-repository</remarks>
/// <param name="repositoryId">The Id of the repository</param>
/// <param name="request">The sorting <see cref="PullRequestReviewCommentRequest">parameters</see></param>
/// <param name="options">Options for changing the API response</param>
Task<IReadOnlyList<PullRequestReviewComment>> GetAllForRepository(long repositoryId, PullRequestReviewCommentRequest request, ApiOptions options);
/// <summary>
/// Gets a single pull request review comment by number.
/// </summary>
/// <remarks>http://developer.github.com/v3/pulls/comments/#get-a-single-comment</remarks>
/// <param name="owner">The owner of the repository</param>
/// <param name="name">The name of the repository</param>
/// <param name="commentId">The pull request review comment id</param>
Task<PullRequestReviewComment> GetComment(string owner, string name, long commentId);
/// <summary>
/// Gets a single pull request review comment by number.
/// </summary>
/// <remarks>http://developer.github.com/v3/pulls/comments/#get-a-single-comment</remarks>
/// <param name="repositoryId">The Id of the repository</param>
/// <param name="commentId">The pull request review comment id</param>
Task<PullRequestReviewComment> GetComment(long repositoryId, long commentId);
/// <summary>
/// Creates a comment on a pull request review.
/// </summary>
/// <remarks>http://developer.github.com/v3/pulls/comments/#create-a-comment</remarks>
/// <param name="owner">The owner of the repository</param>
/// <param name="name">The name of the repository</param>
/// <param name="pullRequestNumber">The pull request number</param>
/// <param name="comment">The comment</param>
Task<PullRequestReviewComment> Create(string owner, string name, int pullRequestNumber, PullRequestReviewCommentCreate comment);
/// <summary>
/// Creates a comment on a pull request review.
/// </summary>
/// <remarks>http://developer.github.com/v3/pulls/comments/#create-a-comment</remarks>
/// <param name="repositoryId">The Id of the repository</param>
/// <param name="pullRequestNumber">The pull request number</param>
/// <param name="comment">The comment</param>
Task<PullRequestReviewComment> Create(long repositoryId, int pullRequestNumber, PullRequestReviewCommentCreate comment);
/// <summary>
/// Creates a comment on a pull request review as a reply to another comment.
/// </summary>
/// <remarks>http://developer.github.com/v3/pulls/comments/#create-a-comment</remarks>
/// <param name="owner">The owner of the repository</param>
/// <param name="name">The name of the repository</param>
/// <param name="pullRequestNumber">The pull request number</param>
/// <param name="comment">The comment</param>
Task<PullRequestReviewComment> CreateReply(string owner, string name, int pullRequestNumber, PullRequestReviewCommentReplyCreate comment);
/// <summary>
/// Creates a comment on a pull request review as a reply to another comment.
/// </summary>
/// <remarks>http://developer.github.com/v3/pulls/comments/#create-a-comment</remarks>
/// <param name="repositoryId">The Id of the repository</param>
/// <param name="pullRequestNumber">The pull request number</param>
/// <param name="comment">The comment</param>
Task<PullRequestReviewComment> CreateReply(long repositoryId, int pullRequestNumber, PullRequestReviewCommentReplyCreate comment);
/// <summary>
/// Edits a comment on a pull request review.
/// </summary>
/// <remarks>http://developer.github.com/v3/pulls/comments/#edit-a-comment</remarks>
/// <param name="owner">The owner of the repository</param>
/// <param name="name">The name of the repository</param>
/// <param name="commentId">The pull request review comment id</param>
/// <param name="comment">The edited comment</param>
Task<PullRequestReviewComment> Edit(string owner, string name, long commentId, PullRequestReviewCommentEdit comment);
/// <summary>
/// Edits a comment on a pull request review.
/// </summary>
/// <remarks>http://developer.github.com/v3/pulls/comments/#edit-a-comment</remarks>
/// <param name="repositoryId">The Id of the repository</param>
/// <param name="commentId">The pull request review comment id</param>
/// <param name="comment">The edited comment</param>
Task<PullRequestReviewComment> Edit(long repositoryId, long commentId, PullRequestReviewCommentEdit comment);
/// <summary>
/// Deletes a comment on a pull request review.
/// </summary>
/// <remarks>http://developer.github.com/v3/pulls/comments/#delete-a-comment</remarks>
/// <param name="owner">The owner of the repository</param>
/// <param name="name">The name of the repository</param>
/// <param name="commentId">The pull request review comment id</param>
Task Delete(string owner, string name, long commentId);
/// <summary>
/// Deletes a comment on a pull request review.
/// </summary>
/// <remarks>http://developer.github.com/v3/pulls/comments/#delete-a-comment</remarks>
/// <param name="repositoryId">The Id of the repository</param>
/// <param name="commentId">The pull request review comment id</param>
Task Delete(long repositoryId, long commentId);
}
}