mirror of
https://github.com/zoriya/octokit.net.git
synced 2026-06-07 20:30:41 +00:00
Pagination support to Reactions Clients (#1948)
* Add pagination to *CommitCommentReactionsClient * Add unit tests for *CommitCommentReactionsClient * Add integration tests for *CommitCommentReactionsClient * Add pagination to *IssueCommentReactionsClient * Add unit tests for *IssueCommentReactionsClient * Add integration tests for *IssueCommentReactionsClient * Add pagination to *IssueReactionsClient * Add unit tests for *IssueReactionsClient * Add integration tests for *IssueReactionsClient * Add pagination to *PullRequestReviewCommentReactionsClient * Add unit tests for *PullRequestReviewCommentReactionsClient * Add integration tests for *PullRequestReviewCommentReactionsClient * Remove rogue using statement and whitespace * Add null check tests for GetAll with repositoryid overload
This commit is contained in:
committed by
Ryan Gribble
parent
33f75ed149
commit
43381c4a53
@@ -66,7 +66,24 @@ namespace Octokit.Reactive
|
||||
Ensure.ArgumentNotNullOrEmptyString(owner, nameof(owner));
|
||||
Ensure.ArgumentNotNullOrEmptyString(name, nameof(name));
|
||||
|
||||
return _connection.GetAndFlattenAllPages<Reaction>(ApiUrls.IssueCommentReactions(owner, name, number), null, AcceptHeaders.ReactionsPreview);
|
||||
return GetAll(owner, name, number, ApiOptions.None);
|
||||
}
|
||||
|
||||
/// <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="owner">The owner of the repository</param>
|
||||
/// <param name="name">The name of the repository</param>
|
||||
/// <param name="number">The comment id</param>
|
||||
/// <param name="options">Options for changing the API response</param>
|
||||
public IObservable<Reaction> GetAll(string owner, string name, int number, ApiOptions options)
|
||||
{
|
||||
Ensure.ArgumentNotNullOrEmptyString(owner, nameof(owner));
|
||||
Ensure.ArgumentNotNullOrEmptyString(name, nameof(name));
|
||||
Ensure.ArgumentNotNull(options, nameof(options));
|
||||
|
||||
return _connection.GetAndFlattenAllPages<Reaction>(ApiUrls.IssueCommentReactions(owner, name, number), null, AcceptHeaders.ReactionsPreview, options);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -77,7 +94,21 @@ namespace Octokit.Reactive
|
||||
/// <param name="number">The comment id</param>
|
||||
public IObservable<Reaction> GetAll(long repositoryId, int number)
|
||||
{
|
||||
return _connection.GetAndFlattenAllPages<Reaction>(ApiUrls.IssueCommentReactions(repositoryId, number), null, AcceptHeaders.ReactionsPreview);
|
||||
return GetAll(repositoryId, number, ApiOptions.None);
|
||||
}
|
||||
|
||||
/// <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>
|
||||
/// <param name="options">Options for changing the API response</param>
|
||||
public IObservable<Reaction> GetAll(long repositoryId, int number, ApiOptions options)
|
||||
{
|
||||
Ensure.ArgumentNotNull(options, nameof(options));
|
||||
|
||||
return _connection.GetAndFlattenAllPages<Reaction>(ApiUrls.IssueCommentReactions(repositoryId, number), null, AcceptHeaders.ReactionsPreview, options);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user