Files
octokit.net/Octokit.Reactive/Clients/IObservableTeamsClient.cs
2014-02-18 10:51:58 +11:00

43 lines
1.6 KiB
C#

using System;
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);
}
}