diff --git a/Octokit.Tests/Clients/AssigneesClientTests.cs b/Octokit.Tests/Clients/AssigneesClientTests.cs index 12615271..e067c688 100644 --- a/Octokit.Tests/Clients/AssigneesClientTests.cs +++ b/Octokit.Tests/Clients/AssigneesClientTests.cs @@ -21,7 +21,7 @@ namespace Octokit.Tests.Clients client.GetAllForRepository("fake", "repo"); - connection.Received().GetAll(Arg.Is(u => u.ToString() == "repos/fake/repo/assignees")); + connection.Received().GetAll(Arg.Is(u => u.ToString() == "repos/fake/repo/assignees"), null, AcceptHeaders.StableVersion, Args.ApiOptions); } [Fact] diff --git a/Octokit/Clients/AssigneesClient.cs b/Octokit/Clients/AssigneesClient.cs index f66b5dc1..16036c08 100644 --- a/Octokit/Clients/AssigneesClient.cs +++ b/Octokit/Clients/AssigneesClient.cs @@ -33,6 +33,24 @@ namespace Octokit return ApiConnection.GetAll(ApiUrls.Assignees(owner, name)); } + /// + /// Gets all the available assignees (owner + collaborators) to which issues may be assigned. + /// + /// The owner of the repository + /// The name of the repository + /// The options to change API's response. + /// + public Task> GetAllForRepository(string owner, string name, ApiOptions options) + { + Ensure.ArgumentNotNullOrEmptyString(owner, "owner"); + Ensure.ArgumentNotNullOrEmptyString(name, "name"); + Ensure.ArgumentNotNull(options, "options"); + + var endpoint = ApiUrls.Assignees(owner, name); + + return ApiConnection.GetAll(endpoint, null, options); + } + /// /// Checks to see if a user is an assignee for a repository. /// diff --git a/Octokit/Clients/IAssigneesClient.cs b/Octokit/Clients/IAssigneesClient.cs index 2a1e0cdf..f3bc5b79 100644 --- a/Octokit/Clients/IAssigneesClient.cs +++ b/Octokit/Clients/IAssigneesClient.cs @@ -19,6 +19,15 @@ namespace Octokit /// Task> GetAllForRepository(string owner, string name); + /// + /// Gets all the available assignees (owner + collaborators) to which issues may be assigned. + /// + /// The owner of the repository + /// The name of the repository + /// The options to chagne API's response. + /// + Task> GetAllForRepository(string owner, string name, ApiOptions options); + /// /// Checks to see if a user is an assignee for a repository. ///