Add member role filter to Members.GetAll() functions

Add unit tests
Added integration tests for this method (previously there were none)
... but then disabled the integration tests that use the filters, as they require the requester to be an org member (for role filter) or owner (for 2 factor filter)
This commit is contained in:
Ryan Gribble
2016-01-30 15:52:44 +10:00
parent 59df91d962
commit a3d43b636c
8 changed files with 414 additions and 0 deletions
@@ -59,6 +59,53 @@ namespace Octokit.Reactive
[Obsolete("No longer supported, use GetAll(string, OrganizationMembersFilter) instead")]
IObservable<User> GetAll(string org, string filter);
/// <summary>
/// <para>
/// List all users who are members of an organization. A member is a user that
/// belongs to at least 1 team in the organization.
/// </para>
/// <para>
/// If the authenticated user is also an owner of this organization then both
/// concealed and public member will be returned.
/// </para>
/// <para>
/// If the requester is not an owner of the organization the query will be redirected
/// to the public members list.
/// </para>
/// </summary>
/// <remarks>
/// See the <a href="http://developer.github.com/v3/orgs/members/#members-list">API documentation</a>
/// for more information.
/// </remarks>
/// <param name="org">The login for the organization</param>
/// <param name="role">The role filter to use when getting the users, <see cref="OrganizationMembersRole"/></param>
/// <returns></returns>
IObservable<User> GetAll(string org, OrganizationMembersRole role);
/// <summary>
/// <para>
/// List all users who are members of an organization. A member is a user that
/// belongs to at least 1 team in the organization.
/// </para>
/// <para>
/// If the authenticated user is also an owner of this organization then both
/// concealed and public member will be returned.
/// </para>
/// <para>
/// If the requester is not an owner of the organization the query will be redirected
/// to the public members list.
/// </para>
/// </summary>
/// <remarks>
/// See the <a href="http://developer.github.com/v3/orgs/members/#members-list">API documentation</a>
/// for more information.
/// </remarks>
/// <param name="org">The login for the organization</param>
/// <param name="filter">The members filter, <see cref="OrganizationMembersFilter"/> </param>
/// <param name="role">The role filter to use when getting the users, <see cref="OrganizationMembersRole"/></param>
/// <returns></returns>
IObservable<User> GetAll(string org, OrganizationMembersFilter filter, OrganizationMembersRole role);
/// <summary>
/// List all users who have publicized their membership of the organization.
/// </summary>