Files
octokit.net/Octokit.Reactive/Clients/IObservableOrganizationMembersClient.cs
2013-11-07 10:05:35 -08:00

103 lines
4.3 KiB
C#

using System;
using System.Reactive;
namespace Octokit.Reactive
{
public interface IObservableOrganizationMembersClient
{
/// <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>
/// <returns></returns>
IObservable<User> GetAll(string org);
/// <summary>
/// List all users who have publicized their membership of the organization.
/// </summary>
/// <remarks>http://developer.github.com/v3/orgs/members/#public-members-list</remarks>
/// <param name="org">The login for the organization.</param>
/// <returns></returns>
IObservable<User> GetPublic(string org);
/// <summary>
/// Check if a user is, publicly or privately, a member of the organization.
/// </summary>
/// <remarks>
/// See the <a href="http://developer.github.com/v3/orgs/members/#check-membership">API documentation</a>
/// for more information.
/// </remarks>
/// <param name="org">The login for the organization.</param>
/// <param name="user">The login for the user.</param>
/// <returns></returns>
IObservable<bool> CheckMember(string org, string user);
/// <summary>
/// Check is a user is publicly a member of the organization.
/// </summary>
/// <remarks>
/// See the <a href="http://developer.github.com/v3/orgs/members/#check-public-membership">API documentation</a>
/// for more information.
/// </remarks>
/// <param name="org">The login for the organization.</param>
/// <param name="user">The login for the user.</param>
/// <returns></returns>
IObservable<bool> CheckMemberPublic(string org, string user);
/// <summary>
/// Removes a user from the organization, this will also remove them from all teams
/// within the organization and they will no longer have any access to the organization's
/// repositories.
/// </summary>
/// <remarks>
/// See the <a href="http://developer.github.com/v3/orgs/members/#remove-a-member">API documentation</a>
/// for more information.
/// </remarks>
/// <param name="org">The login for the organization.</param>
/// <param name="user">The login for the user.</param>
/// <returns></returns>
IObservable<Unit> Delete(string org, string user);
/// <summary>
/// Make the authenticated user's organization membership public.
/// </summary>
/// <remarks>
/// This method requires authentication.
/// See the <a href="http://developer.github.com/v3/orgs/members/#publicize-a-users-membership">API documentation</a>
/// for more information.
/// </remarks>
/// <param name="org">The login for the organization.</param>
/// <param name="user">The login for the user.</param>
/// <returns></returns>
IObservable<bool> Publicize(string org, string user);
/// <summary>
/// Make the authenticated user's organization membership private.
/// </summary>
/// <remarks>
/// This method requries authentication.
/// See the <a href="http://developer.github.com/v3/orgs/members/#conceal-a-users-membership">API documentation</a>
/// for more information.
/// </remarks>
/// <param name="org">The login for the organization.</param>
/// <param name="user">The login for the user.</param>
/// <returns></returns>
IObservable<Unit> Conceal(string org, string user);
}
}