using System;
using System.Reactive;
namespace Octokit.Reactive
{
///
/// A client for GitHub's Collaborators on a Repository.
///
///
/// See the Collaborators API documentation for more details.
///
public interface IObservableRepoCollaboratorsClient
{
///
/// Gets all the collaborators on a repository.
///
///
/// See the API documentation for more information.
///
/// The owner of the repository
/// The name of the repository
/// Thrown when a general API error occurs.
IObservable GetAll(string owner, string name);
///
/// Gets all the collaborators on a repository.
///
///
/// See the API documentation for more information.
///
/// The id of the repository
/// Thrown when a general API error occurs.
IObservable GetAll(long repositoryId);
///
/// Gets all the collaborators on a repository.
///
///
/// See the API documentation for more information.
///
/// The owner of the repository
/// The name of the repository
/// Options for changing the API response
/// Thrown when a general API error occurs.
IObservable GetAll(string owner, string name, ApiOptions options);
///
/// Gets all the collaborators on a repository.
///
///
/// See the API documentation for more information.
///
/// The id of the repository
/// Options for changing the API response
/// Thrown when a general API error occurs.
IObservable GetAll(long repositoryId, ApiOptions options);
///
/// Gets all the collaborators on a repository.
///
///
/// See the API documentation for more information.
///
/// The owner of the repository
/// The name of the repository
/// Used to request and filter a list of repository collaborators
/// Thrown when a general API error occurs.
IObservable GetAll(string owner, string name, RepositoryCollaboratorListRequest request);
///
/// Gets all the collaborators on a repository.
///
///
/// See the API documentation for more information.
///
/// The id of the repository
/// Used to request and filter a list of repository collaborators
/// Thrown when a general API error occurs.
IObservable GetAll(long repositoryId, RepositoryCollaboratorListRequest request);
///
/// Gets all the collaborators on a repository.
///
///
/// See the API documentation for more information.
///
/// The owner of the repository
/// The name of the repository
/// Used to request and filter a list of repository collaborators
/// Options for changing the API response
/// Thrown when a general API error occurs.
IObservable GetAll(string owner, string name, RepositoryCollaboratorListRequest request, ApiOptions options);
///
/// Gets all the collaborators on a repository.
///
///
/// See the API documentation for more information.
///
/// The id of the repository
/// Used to request and filter a list of repository collaborators
/// Options for changing the API response
/// Thrown when a general API error occurs.
IObservable GetAll(long repositoryId, RepositoryCollaboratorListRequest request, ApiOptions options);
///
/// Checks if a user is a collaborator on a repository.
///
///
/// See the API documentation for more information.
///
/// The owner of the repository
/// The name of the repository
/// Username of the prospective collaborator
/// Thrown when a general API error occurs.
IObservable IsCollaborator(string owner, string name, string user);
///
/// Checks if a user is a collaborator on a repository.
///
///
/// See the API documentation for more information.
///
/// The id of the repository
/// Username of the prospective collaborator
/// Thrown when a general API error occurs.
IObservable IsCollaborator(long repositoryId, string user);
///
/// Review a user's permission level in a repository
///
///
/// See the API documentation for more information.
///
/// The owner of the repository
/// The name of the repository
/// Username of the collaborator to check permission for
/// Thrown when a general API error occurs.
IObservable ReviewPermission(string owner, string name, string user);
///
/// Review a user's permission level in a repository
///
///
/// See the API documentation for more information.
///
/// The id of the repository
/// Username of the collaborator to check permission for
/// Thrown when a general API error occurs.
IObservable ReviewPermission(long repositoryId, string user);
///
/// Adds a new collaborator to the repository.
///
///
/// See the API documentation for more information.
///
/// The owner of the repository
/// The name of the repository
/// Username of the new collaborator
/// Thrown when a general API error occurs.
IObservable Add(string owner, string name, string user);
///
/// Adds a new collaborator to the repository.
///
///
/// See the API documentation for more information.
///
/// The owner of the repository
/// The name of the repository
/// Username of the new collaborator
/// The permission to set. Only valid on organization-owned repositories.
/// Thrown when a general API error occurs.
IObservable Add(string owner, string name, string user, CollaboratorRequest permission);
///
/// Adds a new collaborator to the repository.
///
///
/// See the API documentation for more information.
///
/// The id of the repository
/// Username of the new collaborator
/// Thrown when a general API error occurs.
IObservable Add(long repositoryId, string user);
///
/// Adds a new collaborator to the repository.
///
///
/// See the API documentation for more information.
///
/// The id of the repository
/// Username of the new collaborator
/// The permission to set. Only valid on organization-owned repositories.
/// Thrown when a general API error occurs.
IObservable Add(long repositoryId, string user, CollaboratorRequest permission);
///
/// Invites a user as a collaborator to a repository.
///
///
/// See the API documentation for more information.
///
/// The owner of the repository
/// The name of the repository
/// The username of the prospective collaborator
IObservable Invite(string owner, string name, string user);
///
/// Invites a user as a collaborator to a repository.
///
///
/// See the API documentation for more information.
///
/// The owner of the repository
/// The name of the repository
/// The username of the prospective collaborator
/// The permission to set. Only valid on organization-owned repositories.
IObservable Invite(string owner, string name, string user, CollaboratorRequest permission);
///
/// Adds a new collaborator to the repository.
///
///
/// See the API documentation for more information.
///
/// The id of the repository
/// Username of the new collaborator
/// Thrown when a general API error occurs.
IObservable Invite(long repositoryId, string user);
///
/// Invites a user as a collaborator to a repository.
///
///
/// See the API documentation for more information.
///
/// The id of the repository
/// Username of the new collaborator
/// The permission to set. Only valid on organization-owned repositories.
/// Thrown when a general API error occurs.
IObservable Invite(long repositoryId, string user, CollaboratorRequest permission);
///
/// Deletes a collaborator from the repository.
///
///
/// See the API documentation for more information.
///
/// The owner of the repository
/// The name of the repository
/// Username of the removed collaborator
/// Thrown when a general API error occurs.
IObservable Delete(string owner, string name, string user);
///
/// Deletes a collaborator from the repository.
///
///
/// See the API documentation for more information.
///
/// The id of the repository
/// Username of the removed collaborator
/// Thrown when a general API error occurs.
IObservable Delete(long repositoryId, string user);
}
}