From 2ea66970a7cc664d68a47e9a73f15030f66ef26e Mon Sep 17 00:00:00 2001 From: Henrik Andersson Date: Tue, 5 Nov 2013 20:37:44 +1000 Subject: [PATCH] Stub out the Organization Members API Client --- Octokit/Clients/IOrganizationMembers.cs | 101 ++++++++++++++ Octokit/Clients/OrganizationMembersClient.cs | 131 +++++++++++++++++++ Octokit/Octokit.csproj | 1 + 3 files changed, 233 insertions(+) create mode 100644 Octokit/Clients/IOrganizationMembers.cs create mode 100644 Octokit/Clients/OrganizationMembersClient.cs diff --git a/Octokit/Clients/IOrganizationMembers.cs b/Octokit/Clients/IOrganizationMembers.cs new file mode 100644 index 00000000..45d3e205 --- /dev/null +++ b/Octokit/Clients/IOrganizationMembers.cs @@ -0,0 +1,101 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Octokit.Clients +{ + public interface IOrganizationMembers + { + /// + /// List all users who are members of an organization. A member is a user that + /// belongs to at least 1 team in the organization. + /// + /// If the authenticated user is also an owner of this organization then both + /// concealed and public member will be returned. + /// + /// If the requester is not an owner of the organization the query will be redirected + /// to the public members list. + /// + /// + /// See the API documentation + /// for more information. + /// + /// + /// + Task> GetAll(string org); + + /// + /// List all users who have publicized their membership of the organization. + /// + /// http://developer.github.com/v3/orgs/members/#public-members-list + /// + /// + Task> GetPublic(string org); + + /// + /// Check if a user is, publicly or privately, a member of the organization. + /// + /// + /// See the API documentation + /// for more information. + /// + /// + /// + /// + Task CheckMember(string org, string user); + + /// + /// Check is a user is publicly a member of the organization. + /// + /// + /// See the API documentation + /// for more information. + /// + /// + /// + /// + Task CheckMemberPublic(string org, string user); + + /// + /// 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. + /// + /// + /// See the API documentation + /// for more information. + /// + /// + /// + /// + Task Delete(string org, string user); + + /// + /// Make the authenticated user's organization membership public. + /// + /// + /// This method requires authentication. + /// See the + /// for more information. + /// + /// + /// + /// + Task Publicize(string org, string user); + + /// + /// Make the authenticated user's organization membership private. + /// + /// + /// This method requries authentication. + /// See the API documentation + /// for more information. + /// + /// + /// + /// + Task Conceal(string org, string user); + } +} diff --git a/Octokit/Clients/OrganizationMembersClient.cs b/Octokit/Clients/OrganizationMembersClient.cs new file mode 100644 index 00000000..b558ee7d --- /dev/null +++ b/Octokit/Clients/OrganizationMembersClient.cs @@ -0,0 +1,131 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Octokit.Clients +{ + public class OrganizationMembersClient : ApiClient, IOrganizationMembers + { + /// + /// Initializes a new Organization Members API client. + /// + /// An API connection. + public OrganizationMembersClient(IApiConnection apiConnection) : base(apiConnection) + { + + } + + /// + /// List all users who are members of an organization. A member is a user that + /// belongs to at least 1 team in the organization. + /// + /// If the authenticated user is also an owner of this organization then both + /// concealed and public member will be returned. + /// + /// If the requester is not an owner of the organization the query will be redirected + /// to the public members list. + /// + /// + /// See the API documentation + /// for more information. + /// + /// + /// + public Task> GetAll(string org) + { + throw new NotImplementedException(); + } + + /// + /// List all users who have publicized their membership of the organization. + /// + /// http://developer.github.com/v3/orgs/members/#public-members-list + /// + /// + public Task> GetPublic(string org) + { + throw new NotImplementedException(); + } + + /// + /// Check if a user is, publicly or privately, a member of the organization. + /// + /// + /// See the API documentation + /// for more information. + /// + /// + /// + /// + public Task CheckMember(string org, string user) + { + throw new NotImplementedException(); + } + + /// + /// Check is a user is publicly a member of the organization. + /// + /// + /// See the API documentation + /// for more information. + /// + /// + /// + /// + public Task CheckMemberPublic(string org, string user) + { + throw new NotImplementedException(); + } + + /// + /// 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. + /// + /// + /// See the API documentation + /// for more information. + /// + /// + /// + /// + public Task Delete(string org, string user) + { + throw new NotImplementedException(); + } + + /// + /// Make the authenticated user's organization membership public. + /// + /// + /// This method requires authentication. + /// See the + /// for more information. + /// + /// + /// + /// + public Task Publicize(string org, string user) + { + throw new NotImplementedException(); + } + + /// + /// Make the authenticated user's organization membership private. + /// + /// + /// This method requries authentication. + /// See the API documentation + /// for more information. + /// + /// + /// + /// + public Task Conceal(string org, string user) + { + throw new NotImplementedException(); + } + } +} diff --git a/Octokit/Octokit.csproj b/Octokit/Octokit.csproj index a018bb25..7ed41822 100644 --- a/Octokit/Octokit.csproj +++ b/Octokit/Octokit.csproj @@ -59,6 +59,7 @@ +