mirror of
https://github.com/zoriya/octokit.net.git
synced 2025-12-05 23:06:10 +00:00
* #2927: comment id model update to long instead of int * #2927: code review fixes (1) * #2927: code review fixes (2) * #2927: comment id model update to long instead of int: unit tests fix * #2927: code review fixes * Fixed most names of parameters --------- Co-authored-by: Victor Vorobyev <victor@myrtle-sa.com> Co-authored-by: Brian C. Arnold <brian.arnold@spiderrock.net>
160 lines
8.4 KiB
C#
160 lines
8.4 KiB
C#
using System.Collections.Generic;
|
|
using System.Diagnostics.CodeAnalysis;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace Octokit
|
|
{
|
|
/// <summary>
|
|
/// A client for GitHub's Repository Comments API.
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// See the <a href="http://developer.github.com/v3/repos/comments/">Repository Comments API documentation</a> for more information.
|
|
/// </remarks>
|
|
public interface IRepositoryCommentsClient
|
|
{
|
|
/// <summary>
|
|
/// Gets a single Repository Comment by number.
|
|
/// </summary>
|
|
/// <remarks>http://developer.github.com/v3/repos/comments/#get-a-single-commit-comment</remarks>
|
|
/// <param name="owner">The owner of the repository</param>
|
|
/// <param name="name">The name of the repository</param>
|
|
/// <param name="commentId">The comment id</param>
|
|
[SuppressMessage("Microsoft.Naming", "CA1716:IdentifiersShouldNotMatchKeywords", MessageId = "Get",
|
|
Justification = "Method makes a network request")]
|
|
Task<CommitComment> Get(string owner, string name, long commentId);
|
|
|
|
/// <summary>
|
|
/// Gets a single Repository Comment by number.
|
|
/// </summary>
|
|
/// <remarks>http://developer.github.com/v3/repos/comments/#get-a-single-commit-comment</remarks>
|
|
/// <param name="repositoryId">The Id of the repository</param>
|
|
/// <param name="commentId">The comment id</param>
|
|
[SuppressMessage("Microsoft.Naming", "CA1716:IdentifiersShouldNotMatchKeywords", MessageId = "Get",
|
|
Justification = "Method makes a network request")]
|
|
Task<CommitComment> Get(long repositoryId, long commentId);
|
|
|
|
/// <summary>
|
|
/// Gets Commit Comments for a repository.
|
|
/// </summary>
|
|
/// <remarks>http://developer.github.com/v3/repos/comments/#list-commit-comments-for-a-repository</remarks>
|
|
/// <param name="owner">The owner of the repository</param>
|
|
/// <param name="name">The name of the repository</param>
|
|
Task<IReadOnlyList<CommitComment>> GetAllForRepository(string owner, string name);
|
|
|
|
/// <summary>
|
|
/// Gets Commit Comments for a repository.
|
|
/// </summary>
|
|
/// <remarks>http://developer.github.com/v3/repos/comments/#list-commit-comments-for-a-repository</remarks>
|
|
/// <param name="repositoryId">The Id of the repository</param>
|
|
Task<IReadOnlyList<CommitComment>> GetAllForRepository(long repositoryId);
|
|
|
|
/// <summary>
|
|
/// Gets Commit Comments for a repository.
|
|
/// </summary>
|
|
/// <remarks>http://developer.github.com/v3/repos/comments/#list-commit-comments-for-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 to change the API response</param>
|
|
Task<IReadOnlyList<CommitComment>> GetAllForRepository(string owner, string name, ApiOptions options);
|
|
|
|
/// <summary>
|
|
/// Gets Commit Comments for a repository.
|
|
/// </summary>
|
|
/// <remarks>http://developer.github.com/v3/repos/comments/#list-commit-comments-for-a-repository</remarks>
|
|
/// <param name="repositoryId">The Id of the repository</param>
|
|
/// <param name="options">Options to change the API response</param>
|
|
Task<IReadOnlyList<CommitComment>> GetAllForRepository(long repositoryId, ApiOptions options);
|
|
|
|
/// <summary>
|
|
/// Gets Commit Comments for a specified Commit.
|
|
/// </summary>
|
|
/// <remarks>http://developer.github.com/v3/repos/comments/#list-comments-for-a-single-commit</remarks>
|
|
/// <param name="owner">The owner of the repository</param>
|
|
/// <param name="name">The name of the repository</param>
|
|
/// <param name="sha">The sha of the commit</param>
|
|
Task<IReadOnlyList<CommitComment>> GetAllForCommit(string owner, string name, string sha);
|
|
|
|
/// <summary>
|
|
/// Gets Commit Comments for a specified Commit.
|
|
/// </summary>
|
|
/// <remarks>http://developer.github.com/v3/repos/comments/#list-comments-for-a-single-commit</remarks>
|
|
/// <param name="repositoryId">The Id of the repository</param>
|
|
/// <param name="sha">The sha of the commit</param>
|
|
Task<IReadOnlyList<CommitComment>> GetAllForCommit(long repositoryId, string sha);
|
|
|
|
/// <summary>
|
|
/// Gets Commit Comments for a specified Commit.
|
|
/// </summary>
|
|
/// <remarks>http://developer.github.com/v3/repos/comments/#list-comments-for-a-single-commit</remarks>
|
|
/// <param name="owner">The owner of the repository</param>
|
|
/// <param name="name">The name of the repository</param>
|
|
/// <param name="sha">The sha of the commit</param>
|
|
/// <param name="options">Options to change the API response</param>
|
|
Task<IReadOnlyList<CommitComment>> GetAllForCommit(string owner, string name, string sha, ApiOptions options);
|
|
|
|
/// <summary>
|
|
/// Gets Commit Comments for a specified Commit.
|
|
/// </summary>
|
|
/// <remarks>http://developer.github.com/v3/repos/comments/#list-comments-for-a-single-commit</remarks>
|
|
/// <param name="repositoryId">The Id of the repository</param>
|
|
/// <param name="sha">The sha of the commit</param>
|
|
/// <param name="options">Options to change the API response</param>
|
|
Task<IReadOnlyList<CommitComment>> GetAllForCommit(long repositoryId, string sha, ApiOptions options);
|
|
|
|
/// <summary>
|
|
/// Creates a new Commit Comment for a specified Commit.
|
|
/// </summary>
|
|
/// <remarks>http://developer.github.com/v3/repos/comments/#create-a-commit-comment</remarks>
|
|
/// <param name="owner">The owner of the repository</param>
|
|
/// <param name="name">The name of the repository</param>
|
|
/// <param name="sha">The sha reference of commit</param>
|
|
/// <param name="newCommitComment">The new comment to add to the commit</param>
|
|
Task<CommitComment> Create(string owner, string name, string sha, NewCommitComment newCommitComment);
|
|
|
|
/// <summary>
|
|
/// Creates a new Commit Comment for a specified Commit.
|
|
/// </summary>
|
|
/// <remarks>http://developer.github.com/v3/repos/comments/#create-a-commit-comment</remarks>
|
|
/// <param name="repositoryId">The Id of the repository</param>
|
|
/// <param name="sha">The sha reference of commit</param>
|
|
/// <param name="newCommitComment">The new comment to add to the commit</param>
|
|
Task<CommitComment> Create(long repositoryId, string sha, NewCommitComment newCommitComment);
|
|
|
|
/// <summary>
|
|
/// Updates a specified Commit Comment.
|
|
/// </summary>
|
|
/// <remarks>http://developer.github.com/v3/repos/comments/#update-a-commit-comment</remarks>
|
|
/// <param name="owner">The owner of the repository</param>
|
|
/// <param name="name">The name of the repository</param>
|
|
/// <param name="commentId">The comment id</param>
|
|
/// <param name="commentUpdate">The modified comment</param>
|
|
Task<CommitComment> Update(string owner, string name, long commentId, string commentUpdate);
|
|
|
|
/// <summary>
|
|
/// Updates a specified Commit Comment.
|
|
/// </summary>
|
|
/// <remarks>http://developer.github.com/v3/repos/comments/#update-a-commit-comment</remarks>
|
|
/// <param name="repositoryId">The Id of the repository</param>
|
|
/// <param name="commentId">The comment id</param>
|
|
/// <param name="commentUpdate">The modified comment</param>
|
|
Task<CommitComment> Update(long repositoryId, long commentId, string commentUpdate);
|
|
|
|
/// <summary>
|
|
/// Deletes the specified Commit Comment
|
|
/// </summary>
|
|
/// <remarks>http://developer.github.com/v3/repos/comments/#delete-a-commit-comment</remarks>
|
|
/// <param name="owner">The owner of the repository</param>
|
|
/// <param name="name">The name of the repository</param>
|
|
/// <param name="commentId">The comment id</param>
|
|
Task Delete(string owner, string name, long commentId);
|
|
|
|
/// <summary>
|
|
/// Deletes the specified Commit Comment
|
|
/// </summary>
|
|
/// <remarks>http://developer.github.com/v3/repos/comments/#delete-a-commit-comment</remarks>
|
|
/// <param name="repositoryId">The Id of the repository</param>
|
|
/// <param name="commentId">The comment id</param>
|
|
Task Delete(long repositoryId, long commentId);
|
|
}
|
|
}
|