mirror of
https://github.com/zoriya/octokit.net.git
synced 2026-06-05 03:30:34 +00:00
Implement pagination on Organization Outside Collaborators Client GetAll() method (#1650)
* Reimplement ApiOptions overloads * Unskip pagination tests and set page sizes correctly
This commit is contained in:
@@ -36,7 +36,26 @@ namespace Octokit
|
||||
{
|
||||
Ensure.ArgumentNotNullOrEmptyString(org, nameof(org));
|
||||
|
||||
return ApiConnection.GetAll<User>(ApiUrls.OutsideCollaborators(org), null, AcceptHeaders.OrganizationMembershipPreview);
|
||||
return GetAll(org, ApiOptions.None);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// List all users who are outside collaborators of an organization. An outside collaborator is a user that
|
||||
/// is not a member of the organization.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// See the <a href="https://developer.github.com/v3/orgs/outside_collaborators/#list-outside-collaborators">API documentation</a>
|
||||
/// for more information.
|
||||
/// </remarks>
|
||||
/// <param name="org">The login for the organization</param>
|
||||
/// <param name="options">Options for changing the API response</param>
|
||||
/// <returns>The users</returns>
|
||||
public Task<IReadOnlyList<User>> GetAll(string org, ApiOptions options)
|
||||
{
|
||||
Ensure.ArgumentNotNullOrEmptyString(org, nameof(org));
|
||||
Ensure.ArgumentNotNull(options, nameof(options));
|
||||
|
||||
return ApiConnection.GetAll<User>(ApiUrls.OutsideCollaborators(org), null, AcceptHeaders.OrganizationMembershipPreview, options);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -54,7 +73,27 @@ namespace Octokit
|
||||
{
|
||||
Ensure.ArgumentNotNullOrEmptyString(org, nameof(org));
|
||||
|
||||
return ApiConnection.GetAll<User>(ApiUrls.OutsideCollaborators(org, filter), null, AcceptHeaders.OrganizationMembershipPreview);
|
||||
return GetAll(org, filter, ApiOptions.None);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// List all users who are outside collaborators of an organization. An outside collaborator is a user that
|
||||
/// is not a member of the organization.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// See the <a href="https://developer.github.com/v3/orgs/outside_collaborators/#list-outside-collaborators">API documentation</a>
|
||||
/// for more information.
|
||||
/// </remarks>
|
||||
/// <param name="org">The login for the organization</param>
|
||||
/// <param name="filter">The filter to use when getting the users, <see cref="OrganizationMembersFilter"/></param>
|
||||
/// <param name="options">Options for changing the API response</param>
|
||||
/// <returns>The users</returns>
|
||||
public Task<IReadOnlyList<User>> GetAll(string org, OrganizationMembersFilter filter, ApiOptions options)
|
||||
{
|
||||
Ensure.ArgumentNotNullOrEmptyString(org, nameof(org));
|
||||
Ensure.ArgumentNotNull(options, nameof(options));
|
||||
|
||||
return ApiConnection.GetAll<User>(ApiUrls.OutsideCollaborators(org, filter), null, AcceptHeaders.OrganizationMembershipPreview, options);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
Reference in New Issue
Block a user