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(int 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(int repositoryId, 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(int 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 id of the repository /// Username of the new collaborator /// Thrown when a general API error occurs. IObservable Add(int repositoryId, string user); /// /// 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(int repositoryId, string user); } }