Add GetAll with options overload to IObservableCommitStatusClient + Implementation

This commit is contained in:
Abdelkhalek Oussama Elhamer
2016-03-23 18:59:18 +01:00
parent 452c9c4c29
commit a988ad166a
2 changed files with 36 additions and 0 deletions
@@ -15,6 +15,18 @@ namespace Octokit.Reactive
/// <returns></returns>
IObservable<CommitStatus> GetAll(string owner, string name, string reference);
/// <summary>
/// Retrieves commit statuses for the specified reference. A reference can be a commit SHA, a branch name, or
/// a tag name.
/// </summary>
/// <remarks>Only users with pull access can see this.</remarks>
/// <param name="owner">The owner of the repository</param>
/// <param name="name">The name of the repository</param>
/// <param name="reference">The reference (SHA, branch name, or tag name) to list commits for</param>
/// <param name="options">Options for changing the API response</param>
/// <returns></returns>
IObservable<CommitStatus> GetAll(string owner, string name, string reference, ApiOptions options);
/// <summary>
/// Retrieves a combined view of statuses for the specified reference. A reference can be a commit SHA, a branch name, or
/// a tag name.
@@ -28,9 +28,33 @@ namespace Octokit.Reactive
/// <returns></returns>
public IObservable<CommitStatus> GetAll(string owner, string name, string reference)
{
Ensure.ArgumentNotNullOrEmptyString(owner, "owner");
Ensure.ArgumentNotNullOrEmptyString(name, "name");
Ensure.ArgumentNotNullOrEmptyString(reference, "reference");
return _connection.GetAndFlattenAllPages<CommitStatus>(ApiUrls.CommitStatuses(owner, name, reference));
}
/// <summary>
/// Retrieves commit statuses for the specified reference. A reference can be a commit SHA, a branch name, or
/// a tag name.
/// </summary>
/// <remarks>Only users with pull access can see this.</remarks>
/// <param name="owner">The owner of the repository</param>
/// <param name="name">The name of the repository</param>
/// <param name="reference">The reference (SHA, branch name, or tag name) to list commits for</param>
/// <param name="options">Options for changing the API response</param>
/// <returns></returns>
public IObservable<CommitStatus> GetAll(string owner, string name, string reference, ApiOptions options)
{
Ensure.ArgumentNotNullOrEmptyString(owner, "owner");
Ensure.ArgumentNotNullOrEmptyString(name, "name");
Ensure.ArgumentNotNullOrEmptyString(reference, "reference");
Ensure.ArgumentNotNull(options, "options");
return _connection.GetAndFlattenAllPages<CommitStatus>(ApiUrls.CommitStatuses(owner, name, reference),options);
}
/// <summary>
/// Retrieves a combined view of statuses for the specified reference. A reference can be a commit SHA, a branch name, or
/// a tag name.