diff --git a/Octokit.Reactive/Clients/IObservableRepositoriesClient.cs b/Octokit.Reactive/Clients/IObservableRepositoriesClient.cs index 952dd82a..6a587541 100644 --- a/Octokit.Reactive/Clients/IObservableRepositoriesClient.cs +++ b/Octokit.Reactive/Clients/IObservableRepositoriesClient.cs @@ -526,19 +526,19 @@ namespace Octokit.Reactive /// /// The owner of the repository /// The name of the repository - /// The name of the branch + /// The name of the branch /// New values to update the branch with /// The updated - IObservable EditBranch(string owner, string name, string branch, BranchUpdate update); + IObservable EditBranch(string owner, string name, string branchName, BranchUpdate update); /// /// Edit the specified branch with the values given in /// /// The ID of the repository - /// The name of the branch + /// The name of the branch /// New values to update the branch with /// The updated - IObservable EditBranch(int repositoryId, string branch, BranchUpdate update); + IObservable EditBranch(int repositoryId, string branchName, BranchUpdate update); /// /// A client for GitHub's Repo Collaborators. diff --git a/Octokit.Reactive/Clients/ObservableRepositoriesClient.cs b/Octokit.Reactive/Clients/ObservableRepositoriesClient.cs index be070242..5a1b398f 100644 --- a/Octokit.Reactive/Clients/ObservableRepositoriesClient.cs +++ b/Octokit.Reactive/Clients/ObservableRepositoriesClient.cs @@ -462,7 +462,7 @@ namespace Octokit.Reactive Ensure.ArgumentNotNullOrEmptyString(name, "name"); Ensure.ArgumentNotNull(options, "options"); - return GetAllContributors(owner, name, false, ApiOptions.None); + return GetAllContributors(owner, name, false, options); } /// @@ -478,7 +478,7 @@ namespace Octokit.Reactive { Ensure.ArgumentNotNull(options, "options"); - return GetAllContributors(repositoryId, false, ApiOptions.None); + return GetAllContributors(repositoryId, false, options); } /// @@ -496,7 +496,7 @@ namespace Octokit.Reactive Ensure.ArgumentNotNullOrEmptyString(owner, "owner"); Ensure.ArgumentNotNullOrEmptyString(name, "name"); - return GetAllContributors(owner, name, false, ApiOptions.None); + return GetAllContributors(owner, name, includeAnonymous, ApiOptions.None); } /// @@ -510,9 +510,20 @@ namespace Octokit.Reactive /// All contributors of the repository. public IObservable GetAllContributors(int repositoryId, bool includeAnonymous) { - return GetAllContributors(repositoryId, false, ApiOptions.None); + return GetAllContributors(repositoryId, includeAnonymous, ApiOptions.None); } + /// + /// Gets all contributors for the specified repository. With the option to include anonymous contributors. + /// + /// + /// See the API documentation for more details + /// + /// The owner of the repository + /// The name of the repository + /// True if anonymous contributors should be included in result; Otherwise false + /// Options for changing the API response + /// All contributors of the repository. public IObservable GetAllContributors(string owner, string name, bool includeAnonymous, ApiOptions options) { Ensure.ArgumentNotNullOrEmptyString(owner, "owner"); @@ -524,7 +535,7 @@ namespace Octokit.Reactive if (includeAnonymous) parameters.Add("anon", "1"); - return _connection.GetAndFlattenAllPages(endpoint, parameters); + return _connection.GetAndFlattenAllPages(endpoint, parameters, options); } /// @@ -546,7 +557,7 @@ namespace Octokit.Reactive if (includeAnonymous) parameters.Add("anon", "1"); - return _connection.GetAndFlattenAllPages(endpoint, parameters); + return _connection.GetAndFlattenAllPages(endpoint, parameters, options); } /// @@ -727,6 +738,10 @@ namespace Octokit.Reactive /// The specified public IObservable GetBranch(string owner, string name, string branchName) { + Ensure.ArgumentNotNullOrEmptyString(owner, "owner"); + Ensure.ArgumentNotNullOrEmptyString(name, "name"); + Ensure.ArgumentNotNullOrEmptyString(branchName, "branchName"); + return _client.GetBranch(owner, name, branchName).ToObservable(); } @@ -741,6 +756,8 @@ namespace Octokit.Reactive /// The specified public IObservable GetBranch(int repositoryId, string branchName) { + Ensure.ArgumentNotNullOrEmptyString(branchName, "branchName"); + return _client.GetBranch(repositoryId, branchName).ToObservable(); } @@ -753,6 +770,10 @@ namespace Octokit.Reactive /// The updated public IObservable Edit(string owner, string name, RepositoryUpdate update) { + Ensure.ArgumentNotNullOrEmptyString(owner, "owner"); + Ensure.ArgumentNotNullOrEmptyString(name, "name"); + Ensure.ArgumentNotNull(update, "update"); + return _client.Edit(owner, name, update).ToObservable(); } @@ -764,6 +785,8 @@ namespace Octokit.Reactive /// The updated public IObservable Edit(int repositoryId, RepositoryUpdate update) { + Ensure.ArgumentNotNull(update, "update"); + return _client.Edit(repositoryId, update).ToObservable(); } @@ -772,24 +795,32 @@ namespace Octokit.Reactive /// /// The owner of the repository /// The name of the repository - /// The name of the branch + /// The name of the branch /// New values to update the branch with /// The updated - public IObservable EditBranch(string owner, string name, string branch, BranchUpdate update) + public IObservable EditBranch(string owner, string name, string branchName, BranchUpdate update) { - return _client.EditBranch(owner, name, branch, update).ToObservable(); + Ensure.ArgumentNotNullOrEmptyString(owner, "owner"); + Ensure.ArgumentNotNullOrEmptyString(name, "name"); + Ensure.ArgumentNotNullOrEmptyString(branchName, "branchName"); + Ensure.ArgumentNotNull(update, "update"); + + return _client.EditBranch(owner, name, branchName, update).ToObservable(); } /// /// Edit the specified branch with the values given in /// /// The ID of the repository - /// The name of the branch + /// The name of the branch /// New values to update the branch with /// The updated - public IObservable EditBranch(int repositoryId, string branch, BranchUpdate update) + public IObservable EditBranch(int repositoryId, string branchName, BranchUpdate update) { - return _client.EditBranch(repositoryId, branch, update).ToObservable(); + Ensure.ArgumentNotNullOrEmptyString(branchName, "branchName"); + Ensure.ArgumentNotNull(update, "update"); + + return _client.EditBranch(repositoryId, branchName, update).ToObservable(); } ///