Files
octokit.net/Octokit.Reactive/Clients/IObservableRepositoryCommentsClient.cs
Victor 6c43183837 fix: comment id model update to long instead of int
* #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>
2024-06-10 08:12:08 -05:00

160 lines
8.4 KiB
C#

using System;
using System.Diagnostics.CodeAnalysis;
using System.Reactive;
namespace Octokit.Reactive
{
/// <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 IObservableRepositoryCommentsClient
{
/// <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")]
IObservable<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")]
IObservable<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>
IObservable<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>
IObservable<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>
IObservable<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>
IObservable<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>
IObservable<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>
IObservable<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>
IObservable<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>
IObservable<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>
IObservable<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>
IObservable<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>
IObservable<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>
IObservable<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>
IObservable<Unit> 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>
IObservable<Unit> Delete(long repositoryId, long commentId);
}
}