Create IIssuesCommentClient

This commit is contained in:
pltaylor
2013-10-31 12:25:22 -04:00
parent af00ba861e
commit c0411b09a1
2 changed files with 62 additions and 0 deletions
+61
View File
@@ -0,0 +1,61 @@
using System.Diagnostics.CodeAnalysis;
using System.Threading.Tasks;
namespace Octokit
{
public interface IIssuesCommentClient
{
/// <summary>
/// Gets a single Issue Comment by number.
/// </summary>
/// <remarks>http://developer.github.com/v3/issues/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="number">The issue number</param>
/// <returns></returns>
[SuppressMessage("Microsoft.Naming", "CA1716:IdentifiersShouldNotMatchKeywords", MessageId = "Get",
Justification = "Method makes a network request")]
Task<Issue> Get(string owner, string name, int number);
/// <summary>
/// Gets Issue Comments for a repository.
/// </summary>
/// <remarks>http://developer.github.com/v3/issues/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>
/// <returns></returns>
Task<IReadOnlyList<Issue>> GetForRepository(string owner, string name);
/// <summary>
/// Gets Issue Comments for a specified Issue.
/// </summary>
/// <remarks>http://developer.github.com/v3/issues/comments/#list-comments-on-an-issue</remarks>
/// <param name="owner">The owner of the repository</param>
/// <param name="name">The name of the repository</param>
/// <param name="number">The issue number</param>
/// <returns></returns>
Task<IReadOnlyList<Issue>> GetForIssue(string owner, string name, int number);
/// <summary>
/// Creates a new Issue Comment for a specified Issue.
/// </summary>
/// <remarks>http://developer.github.com/v3/issues/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="number">The number of the issue</param>
/// <param name="newComment">The new comment to add to the issue</param>
/// <returns></returns>
Task<Issue> Create(string owner, string name, int number, string newComment);
/// <summary>
/// Updates a specified Issue Comment.
/// </summary>
/// <remarks>http://developer.github.com/v3/issues/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="number">The comment number</param>
/// <param name="commentUpdate">The modified comment</param>
/// <returns></returns>
Task<Issue> Update(string owner, string name, int number, string commentUpdate);
}
}
+1
View File
@@ -56,6 +56,7 @@
<Compile Include="Clients\IIssuesEventsClient.cs" />
<Compile Include="Clients\ICommitStatusClient.cs" />
<Compile Include="Clients\IGitDatabaseClient.cs" />
<Compile Include="Clients\IIssuesCommentClient.cs" />
<Compile Include="Clients\IssuesClient.cs" />
<Compile Include="Clients\ITagsClient.cs" />
<Compile Include="Clients\IssuesEventsClient.cs" />