/Octokit.Reactive/Clients/IObservableOrganizationMembersClient.cs

https://gitlab.com/Hexexpeck/GitHub-API-.NET · C# · 277 lines · 23 code · 15 blank · 239 comment · 0 complexity · a4b564c91ef841c6599ed8786735b532 MD5 · raw file

  1. using System;
  2. using System.Reactive;
  3. namespace Octokit.Reactive
  4. {
  5. public interface IObservableOrganizationMembersClient
  6. {
  7. /// <summary>
  8. /// <para>
  9. /// List all users who are members of an organization. A member is a user that
  10. /// belongs to at least 1 team in the organization.
  11. /// </para>
  12. /// <para>
  13. /// If the authenticated user is also an owner of this organization then both
  14. /// concealed and public member will be returned.
  15. /// </para>
  16. /// <para>
  17. /// If the requester is not an owner of the organization the query will be redirected
  18. /// to the public members list.
  19. /// </para>
  20. /// </summary>
  21. /// <remarks>
  22. /// See the <a href="http://developer.github.com/v3/orgs/members/#members-list">API documentation</a>
  23. /// for more information.
  24. /// </remarks>
  25. /// <param name="org">The login for the organization</param>
  26. /// <returns></returns>
  27. IObservable<User> GetAll(string org);
  28. /// <summary>
  29. /// <para>
  30. /// List all users who are members of an organization. A member is a user that
  31. /// belongs to at least 1 team in the organization.
  32. /// </para>
  33. /// <para>
  34. /// If the authenticated user is also an owner of this organization then both
  35. /// concealed and public member will be returned.
  36. /// </para>
  37. /// <para>
  38. /// If the requester is not an owner of the organization the query will be redirected
  39. /// to the public members list.
  40. /// </para>
  41. /// </summary>
  42. /// <remarks>
  43. /// See the <a href="http://developer.github.com/v3/orgs/members/#members-list">API documentation</a>
  44. /// for more information.
  45. /// </remarks>
  46. /// <param name="org">The login for the organization</param>
  47. /// <param name="options">Options for changing the API response</param>
  48. /// <returns></returns>
  49. IObservable<User> GetAll(string org, ApiOptions options);
  50. /// <summary>
  51. /// <para>
  52. /// List all users who are members of an organization. A member is a user that
  53. /// belongs to at least 1 team in the organization.
  54. /// </para>
  55. /// <para>
  56. /// If the authenticated user is also an owner of this organization then both
  57. /// concealed and public member will be returned.
  58. /// </para>
  59. /// <para>
  60. /// If the requester is not an owner of the organization the query will be redirected
  61. /// to the public members list.
  62. /// </para>
  63. /// </summary>
  64. /// <remarks>
  65. /// See the <a href="http://developer.github.com/v3/orgs/members/#members-list">API documentation</a>
  66. /// for more information.
  67. /// </remarks>
  68. /// <param name="org">The login for the organization</param>
  69. /// <param name="filter">The members filter, <see cref="OrganizationMembersFilter"/> </param>
  70. /// <returns></returns>
  71. IObservable<User> GetAll(string org, OrganizationMembersFilter filter);
  72. /// <summary>
  73. /// <para>
  74. /// List all users who are members of an organization. A member is a user that
  75. /// belongs to at least 1 team in the organization.
  76. /// </para>
  77. /// <para>
  78. /// If the authenticated user is also an owner of this organization then both
  79. /// concealed and public member will be returned.
  80. /// </para>
  81. /// <para>
  82. /// If the requester is not an owner of the organization the query will be redirected
  83. /// to the public members list.
  84. /// </para>
  85. /// </summary>
  86. /// <remarks>
  87. /// See the <a href="http://developer.github.com/v3/orgs/members/#members-list">API documentation</a>
  88. /// for more information.
  89. /// </remarks>
  90. /// <param name="org">The login for the organization</param>
  91. /// <param name="filter">The members filter, <see cref="OrganizationMembersFilter"/> </param>
  92. /// <param name="options">Options for changing the API response</param>
  93. /// <returns></returns>
  94. IObservable<User> GetAll(string org, OrganizationMembersFilter filter, ApiOptions options);
  95. /// <summary>
  96. /// <para>
  97. /// List all users who are members of an organization. A member is a user that
  98. /// belongs to at least 1 team in the organization.
  99. /// </para>
  100. /// <para>
  101. /// If the authenticated user is also an owner of this organization then both
  102. /// concealed and public member will be returned.
  103. /// </para>
  104. /// <para>
  105. /// If the requester is not an owner of the organization the query will be redirected
  106. /// to the public members list.
  107. /// </para>
  108. /// </summary>
  109. /// <remarks>
  110. /// See the <a href="http://developer.github.com/v3/orgs/members/#members-list">API documentation</a>
  111. /// for more information.
  112. /// </remarks>
  113. /// <param name="org">The login for the organization</param>
  114. /// <param name="role">The role filter to use when getting the users, <see cref="OrganizationMembersRole"/></param>
  115. /// <returns></returns>
  116. IObservable<User> GetAll(string org, OrganizationMembersRole role);
  117. /// <summary>
  118. /// <para>
  119. /// List all users who are members of an organization. A member is a user that
  120. /// belongs to at least 1 team in the organization.
  121. /// </para>
  122. /// <para>
  123. /// If the authenticated user is also an owner of this organization then both
  124. /// concealed and public member will be returned.
  125. /// </para>
  126. /// <para>
  127. /// If the requester is not an owner of the organization the query will be redirected
  128. /// to the public members list.
  129. /// </para>
  130. /// </summary>
  131. /// <remarks>
  132. /// See the <a href="http://developer.github.com/v3/orgs/members/#members-list">API documentation</a>
  133. /// for more information.
  134. /// </remarks>
  135. /// <param name="org">The login for the organization</param>
  136. /// <param name="role">The role filter to use when getting the users, <see cref="OrganizationMembersRole"/></param>
  137. /// <param name="options">Options for changing the API response</param>
  138. /// <returns></returns>
  139. IObservable<User> GetAll(string org, OrganizationMembersRole role, ApiOptions options);
  140. /// <summary>
  141. /// <para>
  142. /// List all users who are members of an organization. A member is a user that
  143. /// belongs to at least 1 team in the organization.
  144. /// </para>
  145. /// <para>
  146. /// If the authenticated user is also an owner of this organization then both
  147. /// concealed and public member will be returned.
  148. /// </para>
  149. /// <para>
  150. /// If the requester is not an owner of the organization the query will be redirected
  151. /// to the public members list.
  152. /// </para>
  153. /// </summary>
  154. /// <remarks>
  155. /// See the <a href="http://developer.github.com/v3/orgs/members/#members-list">API documentation</a>
  156. /// for more information.
  157. /// </remarks>
  158. /// <param name="org">The login for the organization</param>
  159. /// <param name="filter">The members filter, <see cref="OrganizationMembersFilter"/> </param>
  160. /// <param name="role">The role filter to use when getting the users, <see cref="OrganizationMembersRole"/></param>
  161. /// <returns></returns>
  162. IObservable<User> GetAll(string org, OrganizationMembersFilter filter, OrganizationMembersRole role);
  163. /// <summary>
  164. /// <para>
  165. /// List all users who are members of an organization. A member is a user that
  166. /// belongs to at least 1 team in the organization.
  167. /// </para>
  168. /// <para>
  169. /// If the authenticated user is also an owner of this organization then both
  170. /// concealed and public member will be returned.
  171. /// </para>
  172. /// <para>
  173. /// If the requester is not an owner of the organization the query will be redirected
  174. /// to the public members list.
  175. /// </para>
  176. /// </summary>
  177. /// <remarks>
  178. /// See the <a href="http://developer.github.com/v3/orgs/members/#members-list">API documentation</a>
  179. /// for more information.
  180. /// </remarks>
  181. /// <param name="org">The login for the organization</param>
  182. /// <param name="filter">The members filter, <see cref="OrganizationMembersFilter"/> </param>
  183. /// <param name="role">The role filter to use when getting the users, <see cref="OrganizationMembersRole"/></param>
  184. /// <param name="options">Options for changing the API response</param>
  185. /// <returns></returns>
  186. IObservable<User> GetAll(string org, OrganizationMembersFilter filter, OrganizationMembersRole role, ApiOptions options);
  187. /// <summary>
  188. /// List all users who have publicized their membership of the organization.
  189. /// </summary>
  190. /// <remarks>http://developer.github.com/v3/orgs/members/#public-members-list</remarks>
  191. /// <param name="org">The login for the organization</param>
  192. /// <returns></returns>
  193. IObservable<User> GetAllPublic(string org);
  194. /// <summary>
  195. /// List all users who have publicized their membership of the organization.
  196. /// </summary>
  197. /// <remarks>http://developer.github.com/v3/orgs/members/#public-members-list</remarks>
  198. /// <param name="org">The login for the organization</param>
  199. /// <param name="options">Options for changing the API response</param>
  200. /// <returns></returns>
  201. IObservable<User> GetAllPublic(string org, ApiOptions options);
  202. /// <summary>
  203. /// Check if a user is, publicly or privately, a member of the organization.
  204. /// </summary>
  205. /// <remarks>
  206. /// See the <a href="http://developer.github.com/v3/orgs/members/#check-membership">API documentation</a>
  207. /// for more information.
  208. /// </remarks>
  209. /// <param name="org">The login for the organization</param>
  210. /// <param name="user">The login for the user</param>
  211. /// <returns></returns>
  212. IObservable<bool> CheckMember(string org, string user);
  213. /// <summary>
  214. /// Check is a user is publicly a member of the organization.
  215. /// </summary>
  216. /// <remarks>
  217. /// See the <a href="http://developer.github.com/v3/orgs/members/#check-public-membership">API documentation</a>
  218. /// for more information.
  219. /// </remarks>
  220. /// <param name="org">The login for the organization</param>
  221. /// <param name="user">The login for the user</param>
  222. /// <returns></returns>
  223. IObservable<bool> CheckMemberPublic(string org, string user);
  224. /// <summary>
  225. /// Removes a user from the organization, this will also remove them from all teams
  226. /// within the organization and they will no longer have any access to the organization's
  227. /// repositories.
  228. /// </summary>
  229. /// <remarks>
  230. /// See the <a href="http://developer.github.com/v3/orgs/members/#remove-a-member">API documentation</a>
  231. /// for more information.
  232. /// </remarks>
  233. /// <param name="org">The login for the organization</param>
  234. /// <param name="user">The login for the user</param>
  235. /// <returns></returns>
  236. IObservable<Unit> Delete(string org, string user);
  237. /// <summary>
  238. /// Make the authenticated user's organization membership public.
  239. /// </summary>
  240. /// <remarks>
  241. /// This method requires authentication.
  242. /// See the <a href="http://developer.github.com/v3/orgs/members/#publicize-a-users-membership">API documentation</a>
  243. /// for more information.
  244. /// </remarks>
  245. /// <param name="org">The login for the organization</param>
  246. /// <param name="user">The login for the user</param>
  247. /// <returns></returns>
  248. IObservable<bool> Publicize(string org, string user);
  249. /// <summary>
  250. /// Make the authenticated user's organization membership private.
  251. /// </summary>
  252. /// <remarks>
  253. /// This method requries authentication.
  254. /// See the <a href="http://developer.github.com/v3/orgs/members/#conceal-a-users-membership">API documentation</a>
  255. /// for more information.
  256. /// </remarks>
  257. /// <param name="org">The login for the organization</param>
  258. /// <param name="user">The login for the user</param>
  259. /// <returns></returns>
  260. IObservable<Unit> Conceal(string org, string user);
  261. }
  262. }