Create IObservableIssueCommentsClient

This commit is contained in:
pltaylor
2013-11-04 08:42:28 -05:00
parent 9d72a61de2
commit d751a59f45
2 changed files with 64 additions and 0 deletions

View File

@@ -0,0 +1,63 @@

using System;
using System.Diagnostics.CodeAnalysis;
namespace Octokit.Reactive.Clients
{
public interface IObservableIssueCommentsClient
{
/// <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")]
IObservable<IssueComment> 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>
IObservable<IReadOnlyList<IssueComment>> 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>
IObservable<IReadOnlyList<IssueComment>> 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>
IObservable<IssueComment> 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>
IObservable<IssueComment> Update(string owner, string name, int number, string commentUpdate);
}
}

View File

@@ -80,6 +80,7 @@
<Compile Include="Clients\IObservableMilestonesClient.cs" /> <Compile Include="Clients\IObservableMilestonesClient.cs" />
<Compile Include="Clients\ObservableIssuesClient.cs" /> <Compile Include="Clients\ObservableIssuesClient.cs" />
<Compile Include="Clients\ObservableMilestonesClient.cs" /> <Compile Include="Clients\ObservableMilestonesClient.cs" />
<Compile Include="Clients\IObservableIssueCommentsClient.cs" />
<Compile Include="Clients\ObservableAssigneesClient.cs" /> <Compile Include="Clients\ObservableAssigneesClient.cs" />
<Compile Include="Clients\IObservableCommitStatusClient.cs" /> <Compile Include="Clients\IObservableCommitStatusClient.cs" />
<Compile Include="Clients\ObservableCommitStatusClient.cs" /> <Compile Include="Clients\ObservableCommitStatusClient.cs" />