Add observable methods

This commit is contained in:
Andre Rodrigues
2014-08-07 17:37:26 +01:00
parent 8d7d4a5070
commit df668abcc1
5 changed files with 71 additions and 4 deletions
@@ -49,6 +49,36 @@ namespace Octokit.Reactive
return _connection.GetAndFlattenAllPages<User>(ApiUrls.Members(org));
}
/// <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 filter expression to use</param>
/// <returns></returns>
public IObservable<User> GetAll(string org, string filter)
{
Ensure.ArgumentNotNullOrEmptyString(org, "org");
Ensure.ArgumentNotNullOrEmptyString(filter, "filter");
return _connection.GetAndFlattenAllPages<User>(ApiUrls.Members(org, filter));
}
/// <summary>
/// List all users who have publicized their membership of the organization.
/// </summary>