mirror of
https://github.com/zoriya/octokit.net.git
synced 2026-05-14 12:04:52 +00:00
128 lines
6.4 KiB
C#
128 lines
6.4 KiB
C#
using System;
|
|
using System.Reactive;
|
|
|
|
namespace Octokit.Reactive
|
|
{
|
|
/// <summary>
|
|
/// A client for GitHub's Collaborators on a Repository.
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// See the <a href="http://developer.github.com/v3/repos/collaborators/">Collaborators API documentation</a> for more details.
|
|
/// </remarks>
|
|
public interface IObservableRepoCollaboratorsClient
|
|
{
|
|
/// <summary>
|
|
/// Gets all the collaborators on a repository.
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// See the <a href="http://developer.github.com/v3/repos/collaborators/#list">API documentation</a> for more information.
|
|
/// </remarks>
|
|
/// <param name="owner">The owner of the repository</param>
|
|
/// <param name="name">The name of the repository</param>
|
|
/// <exception cref="ApiException">Thrown when a general API error occurs.</exception>
|
|
IObservable<User> GetAll(string owner, string name);
|
|
|
|
/// <summary>
|
|
/// Gets all the collaborators on a repository.
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// See the <a href="http://developer.github.com/v3/repos/collaborators/#list">API documentation</a> for more information.
|
|
/// </remarks>
|
|
/// <param name="repositoryId">The id of the repository</param>
|
|
/// <exception cref="ApiException">Thrown when a general API error occurs.</exception>
|
|
IObservable<User> GetAll(int repositoryId);
|
|
|
|
/// <summary>
|
|
/// Gets all the collaborators on a repository.
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// See the <a href="http://developer.github.com/v3/repos/collaborators/#list">API documentation</a> for more information.
|
|
/// </remarks>
|
|
/// <param name="owner">The owner of the repository</param>
|
|
/// <param name="name">The name of the repository</param>
|
|
/// <param name="options">Options for changing the API response</param>
|
|
/// <exception cref="ApiException">Thrown when a general API error occurs.</exception>
|
|
IObservable<User> GetAll(string owner, string name, ApiOptions options);
|
|
|
|
/// <summary>
|
|
/// Gets all the collaborators on a repository.
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// See the <a href="http://developer.github.com/v3/repos/collaborators/#list">API documentation</a> for more information.
|
|
/// </remarks>
|
|
/// <param name="repositoryId">The id of the repository</param>
|
|
/// <param name="options">Options for changing the API response</param>
|
|
/// <exception cref="ApiException">Thrown when a general API error occurs.</exception>
|
|
IObservable<User> GetAll(int repositoryId, ApiOptions options);
|
|
|
|
/// <summary>
|
|
/// Checks if a user is a collaborator on a repository.
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// See the <a href="http://developer.github.com/v3/repos/collaborators/#list">API documentation</a> for more information.
|
|
/// </remarks>
|
|
/// <param name="owner">The owner of the repository</param>
|
|
/// <param name="name">The name of the repository</param>
|
|
/// <param name="user">Username of the prospective collaborator</param>
|
|
/// <exception cref="ApiException">Thrown when a general API error occurs.</exception>
|
|
IObservable<bool> IsCollaborator(string owner, string name, string user);
|
|
|
|
/// <summary>
|
|
/// Checks if a user is a collaborator on a repository.
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// See the <a href="http://developer.github.com/v3/repos/collaborators/#get">API documentation</a> for more information.
|
|
/// </remarks>
|
|
/// <param name="repositoryId">The id of the repository</param>
|
|
/// <param name="user">Username of the prospective collaborator</param>
|
|
/// <exception cref="ApiException">Thrown when a general API error occurs.</exception>
|
|
IObservable<bool> IsCollaborator(int repositoryId, string user);
|
|
|
|
/// <summary>
|
|
/// Adds a new collaborator to the repository.
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// See the <a href="http://developer.github.com/v3/repos/collaborators/#list">API documentation</a> for more information.
|
|
/// </remarks>
|
|
/// <param name="owner">The owner of the repository</param>
|
|
/// <param name="name">The name of the repository</param>
|
|
/// <param name="user">Username of the new collaborator</param>
|
|
/// <exception cref="ApiException">Thrown when a general API error occurs.</exception>
|
|
IObservable<Unit> Add(string owner, string name, string user);
|
|
|
|
/// <summary>
|
|
/// Adds a new collaborator to the repository.
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// See the <a href="http://developer.github.com/v3/repos/collaborators/#add-collaborator">API documentation</a> for more information.
|
|
/// </remarks>
|
|
/// <param name="repositoryId">The id of the repository</param>
|
|
/// <param name="user">Username of the new collaborator</param>
|
|
/// <exception cref="ApiException">Thrown when a general API error occurs.</exception>
|
|
IObservable<Unit> Add(int repositoryId, string user);
|
|
|
|
/// <summary>
|
|
/// Deletes a collaborator from the repository.
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// See the <a href="http://developer.github.com/v3/repos/collaborators/#list">API documentation</a> for more information.
|
|
/// </remarks>
|
|
/// <param name="owner">The owner of the repository</param>
|
|
/// <param name="name">The name of the repository</param>
|
|
/// <param name="user">Username of the removed collaborator</param>
|
|
/// <exception cref="ApiException">Thrown when a general API error occurs.</exception>
|
|
IObservable<Unit> Delete(string owner, string name, string user);
|
|
|
|
/// <summary>
|
|
/// Deletes a collaborator from the repository.
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// See the <a href="http://developer.github.com/v3/repos/collaborators/#remove-collaborator">API documentation</a> for more information.
|
|
/// </remarks>
|
|
/// <param name="repositoryId">The id of the repository</param>
|
|
/// <param name="user">Username of the removed collaborator</param>
|
|
/// <exception cref="ApiException">Thrown when a general API error occurs.</exception>
|
|
IObservable<Unit> Delete(int repositoryId, string user);
|
|
}
|
|
}
|