mirror of
https://github.com/zoriya/octokit.net.git
synced 2026-06-05 11:40:42 +00:00
Add overloads for ApiOptions in Assignees API.
This commit is contained in:
@@ -21,7 +21,7 @@ namespace Octokit.Tests.Clients
|
||||
|
||||
client.GetAllForRepository("fake", "repo");
|
||||
|
||||
connection.Received().GetAll<User>(Arg.Is<Uri>(u => u.ToString() == "repos/fake/repo/assignees"));
|
||||
connection.Received().GetAll<User>(Arg.Is<Uri>(u => u.ToString() == "repos/fake/repo/assignees"), null, AcceptHeaders.StableVersion, Args.ApiOptions);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
|
||||
@@ -33,6 +33,24 @@ namespace Octokit
|
||||
return ApiConnection.GetAll<User>(ApiUrls.Assignees(owner, name));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets all the available assignees (owner + collaborators) to which issues may be assigned.
|
||||
/// </summary>
|
||||
/// <param name="owner">The owner of the repository</param>
|
||||
/// <param name="name">The name of the repository</param>
|
||||
/// <param name="options">The options to change API's response.</param>
|
||||
/// <returns></returns>
|
||||
public Task<IReadOnlyList<User>> 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<User>(endpoint, null, options);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Checks to see if a user is an assignee for a repository.
|
||||
/// </summary>
|
||||
|
||||
@@ -19,6 +19,15 @@ namespace Octokit
|
||||
/// <returns></returns>
|
||||
Task<IReadOnlyList<User>> GetAllForRepository(string owner, string name);
|
||||
|
||||
/// <summary>
|
||||
/// Gets all the available assignees (owner + collaborators) to which issues may be assigned.
|
||||
/// </summary>
|
||||
/// <param name="owner">The owner of the repository</param>
|
||||
/// <param name="name">The name of the repository</param>
|
||||
/// <param name="options">The options to chagne API's response.</param>
|
||||
/// <returns></returns>
|
||||
Task<IReadOnlyList<User>> GetAllForRepository(string owner, string name, ApiOptions options);
|
||||
|
||||
/// <summary>
|
||||
/// Checks to see if a user is an assignee for a repository.
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user