Add ApiOption overloads to methods on IRepoCollaboratorsClient (#1282)

This commit is contained in:
Alexander Efremov
2016-04-29 11:16:07 +07:00
committed by Brendan Forster
parent 159bc59c27
commit 63a8c1d70a
10 changed files with 501 additions and 13 deletions
@@ -23,14 +23,29 @@ namespace Octokit.Reactive
/// </summary>
/// <param name="owner">The owner of the repository</param>
/// <param name="repo">The name of the repository</param>
/// <returns></returns>
/// <returns>The list of <see cref="User"/>s for the specified repository.</returns>
public IObservable<User> GetAll(string owner, string repo)
{
Ensure.ArgumentNotNull(owner, "owner");
Ensure.ArgumentNotNull(repo, "repo");
Ensure.ArgumentNotNullOrEmptyString(owner, "owner");
Ensure.ArgumentNotNullOrEmptyString(repo, "repo");
var endpoint = ApiUrls.RepoCollaborators(owner, repo);
return _connection.GetAndFlattenAllPages<User>(endpoint);
return GetAll(owner, repo, ApiOptions.None);
}
/// <summary>
/// Gets all the available collaborators on this repo.
/// </summary>
/// <param name="owner">The owner of the repository</param>
/// <param name="repo">The name of the repository</param>
/// <param name="options">Options for changing the API response</param>
/// <returns>The list of <see cref="User"/>s for the specified repository.</returns>
public IObservable<User> GetAll(string owner, string repo, ApiOptions options)
{
Ensure.ArgumentNotNullOrEmptyString(owner, "owner");
Ensure.ArgumentNotNullOrEmptyString(repo, "repo");
Ensure.ArgumentNotNull(options, "options");
return _connection.GetAndFlattenAllPages<User>(ApiUrls.RepoCollaborators(owner, repo), options);
}
/// <summary>