mirror of
https://github.com/zoriya/octokit.net.git
synced 2026-06-02 10:55:53 +00:00
IObservableOrgaizationTeamsClient -> IObservableTeamsClient
This commit is contained in:
@@ -1,43 +0,0 @@
|
||||
using System;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using System.Reactive;
|
||||
|
||||
namespace Octokit.Reactive
|
||||
{
|
||||
/// <summary>
|
||||
/// A client for GitHub's Org Teams API.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// See the <a href="http://developer.github.com/v3/orgs/teams/">Orgs API documentation</a> for more information.
|
||||
/// </remarks>
|
||||
public interface IObservableOrganizationTeamsClient
|
||||
{
|
||||
/// <summary>
|
||||
/// Returns all <see cref="Team" />s for the current org.
|
||||
/// </summary>
|
||||
/// <exception cref="ApiException">Thrown when a general API error occurs.</exception>
|
||||
/// <returns>A list of the orgs's teams <see cref="Team"/>s.</returns>
|
||||
IObservable<Team> GetAllTeams(string org);
|
||||
|
||||
/// <summary>
|
||||
/// Returns newly created <see cref="Team" /> for the current org.
|
||||
/// </summary>
|
||||
/// <exception cref="ApiException">Thrown when a general API error occurs.</exception>
|
||||
/// <returns>Newly created <see cref="Team"/></returns>
|
||||
IObservable<Team> CreateTeam(string org, NewTeam team);
|
||||
|
||||
/// <summary>
|
||||
/// Returns updated <see cref="Team" /> for the current org.
|
||||
/// </summary>
|
||||
/// <exception cref="ApiException">Thrown when a general API error occurs.</exception>
|
||||
/// <returns>Updated <see cref="Team"/></returns>
|
||||
IObservable<Team> UpdateTeam(int id, UpdateTeam team);
|
||||
|
||||
/// <summary>
|
||||
/// Delete a team - must have owner permissions to this
|
||||
/// </summary>
|
||||
/// <exception cref="ApiException">Thrown when a general API error occurs.</exception>
|
||||
/// <returns></returns>
|
||||
IObservable<Unit> DeleteTeam(int id);
|
||||
}
|
||||
}
|
||||
@@ -13,7 +13,7 @@ namespace Octokit.Reactive
|
||||
/// <summary>
|
||||
/// Returns a client to manage teams for an organization.
|
||||
/// </summary>
|
||||
IObservableOrganizationTeamsClient Team { get; }
|
||||
IObservableTeamsClient Team { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Returns the specified organization.
|
||||
|
||||
@@ -1,12 +1,42 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Reactive;
|
||||
|
||||
namespace Octokit.Reactive
|
||||
{
|
||||
/// <summary>
|
||||
/// A client for GitHub's Org Teams API.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// See the <a href="http://developer.github.com/v3/orgs/teams/">Orgs API documentation</a> for more information.
|
||||
/// </remarks>
|
||||
public interface IObservableTeamsClient
|
||||
{
|
||||
/// <summary>
|
||||
/// Returns all <see cref="Team" />s for the current org.
|
||||
/// </summary>
|
||||
/// <exception cref="ApiException">Thrown when a general API error occurs.</exception>
|
||||
/// <returns>A list of the orgs's teams <see cref="Team"/>s.</returns>
|
||||
IObservable<Team> GetAllTeams(string org);
|
||||
|
||||
/// <summary>
|
||||
/// Returns newly created <see cref="Team" /> for the current org.
|
||||
/// </summary>
|
||||
/// <exception cref="ApiException">Thrown when a general API error occurs.</exception>
|
||||
/// <returns>Newly created <see cref="Team"/></returns>
|
||||
IObservable<Team> CreateTeam(string org, NewTeam team);
|
||||
|
||||
/// <summary>
|
||||
/// Returns updated <see cref="Team" /> for the current org.
|
||||
/// </summary>
|
||||
/// <exception cref="ApiException">Thrown when a general API error occurs.</exception>
|
||||
/// <returns>Updated <see cref="Team"/></returns>
|
||||
IObservable<Team> UpdateTeam(int id, UpdateTeam team);
|
||||
|
||||
/// <summary>
|
||||
/// Delete a team - must have owner permissions to this
|
||||
/// </summary>
|
||||
/// <exception cref="ApiException">Thrown when a general API error occurs.</exception>
|
||||
/// <returns></returns>
|
||||
IObservable<Unit> DeleteTeam(int id);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -18,7 +18,7 @@ namespace Octokit.Reactive
|
||||
Ensure.ArgumentNotNull(client, "client");
|
||||
|
||||
Member = new ObservableOrganizationMembersClient(client);
|
||||
Team = new ObservableOrganizationTeamsClient(client);
|
||||
Team = new ObservableTeamsClient(client);
|
||||
|
||||
_client = client.Organization;
|
||||
_connection = client.Connection;
|
||||
@@ -32,7 +32,7 @@ namespace Octokit.Reactive
|
||||
/// <summary>
|
||||
/// Returns a client to manage teams for an organization.
|
||||
/// </summary>
|
||||
public IObservableOrganizationTeamsClient Team { get; private set; }
|
||||
public IObservableTeamsClient Team { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// Returns the specified organization.
|
||||
|
||||
+2
-2
@@ -5,7 +5,7 @@ using Octokit.Reactive.Internal;
|
||||
|
||||
namespace Octokit.Reactive
|
||||
{
|
||||
public class ObservableOrganizationTeamsClient : IObservableOrganizationTeamsClient
|
||||
public class ObservableTeamsClient : IObservableTeamsClient
|
||||
{
|
||||
readonly IConnection _connection;
|
||||
readonly ITeamsClient _client;
|
||||
@@ -14,7 +14,7 @@ namespace Octokit.Reactive
|
||||
/// Initializes a new Organization Teams API client.
|
||||
/// </summary>
|
||||
/// <param name="client">An <see cref="IGitHubClient" /> used to make the requests</param>
|
||||
public ObservableOrganizationTeamsClient(IGitHubClient client)
|
||||
public ObservableTeamsClient(IGitHubClient client)
|
||||
{
|
||||
Ensure.ArgumentNotNull(client, "client");
|
||||
_connection = client.Connection;
|
||||
@@ -75,7 +75,6 @@
|
||||
<Compile Include="Clients\ObservableDeploymentStatusClient.cs" />
|
||||
<Compile Include="Clients\IObservableUserEmailsClient.cs" />
|
||||
<Compile Include="Clients\IObservableIssuesLabelsClient.cs" />
|
||||
<Compile Include="Clients\IObservableTeamsClient.cs" />
|
||||
<Compile Include="Clients\IObservableWatchedClient.cs" />
|
||||
<Compile Include="Clients\IObservableFollowersClient.cs" />
|
||||
<Compile Include="Clients\ObservableSearchClient.cs" />
|
||||
@@ -89,8 +88,8 @@
|
||||
<Compile Include="Clients\ObservableReferencesClient.cs" />
|
||||
<Compile Include="Clients\ObservableRepoCollaboratorsClient.cs" />
|
||||
<Compile Include="Clients\IObservableRepoCollaboratorsClient.cs" />
|
||||
<Compile Include="Clients\ObservableOrganizationTeamsClient.cs" />
|
||||
<Compile Include="Clients\IObservableOrganizationTeamsClient.cs" />
|
||||
<Compile Include="Clients\ObservableTeamsClient.cs" />
|
||||
<Compile Include="Clients\IObservableTeamsClient.cs" />
|
||||
<Compile Include="Clients\IObservableCommitsClient.cs" />
|
||||
<Compile Include="Clients\IObservableStarredClient.cs" />
|
||||
<Compile Include="Clients\ObservableCommitsClient.cs" />
|
||||
|
||||
Reference in New Issue
Block a user