added new overloads

This commit is contained in:
aedampir@gmail.com
2016-06-15 16:18:38 +07:00
parent 7a8d1456fb
commit 0e3d077537
4 changed files with 92 additions and 0 deletions
@@ -41,6 +41,21 @@ namespace Octokit.Reactive
return _client.Create(owner, name, number, reaction).ToObservable();
}
/// <summary>
/// Creates a reaction for a specified Issue Comment
/// </summary>
/// <remarks>https://developer.github.com/v3/reactions/#create-reaction-for-an-issue-comment</remarks>
/// <param name="repositoryId">The ID of the repository</param>
/// <param name="number">The comment id</param>
/// <param name="reaction">The reaction to create </param>
/// <returns>A <see cref="IObservable{Reaction}"/> of < see cref="Reaction"/> representing created reaction for specified comment id.</returns>
public IObservable<Reaction> Create(int repositoryId, int number, NewReaction reaction)
{
Ensure.ArgumentNotNull(reaction, "reaction");
return _client.Create(repositoryId, number, reaction).ToObservable();
}
/// <summary>
/// List reactions for a specified Issue Comment
/// </summary>
@@ -56,5 +71,17 @@ namespace Octokit.Reactive
return _connection.GetAndFlattenAllPages<Reaction>(ApiUrls.IssueCommentReactions(owner, name, number), null, AcceptHeaders.ReactionsPreview);
}
/// <summary>
/// List reactions for a specified Issue Comment
/// </summary>
/// <remarks>https://developer.github.com/v3/reactions/#list-reactions-for-an-issue-comment</remarks>
/// <param name="repositoryId">The ID of the repository</param>
/// <param name="number">The comment id</param>
/// <returns>A <see cref="IObservable{Reaction}"/> of <see cref="Reaction"/>s representing reactions for specified comment id.</returns>
public IObservable<Reaction> GetAll(int repositoryId, int number)
{
return _connection.GetAndFlattenAllPages<Reaction>(ApiUrls.IssueCommentReactions(repositoryId, number), null, AcceptHeaders.ReactionsPreview);
}
}
}