using System; using System.Diagnostics.CodeAnalysis; using System.Reactive; namespace Octokit.Reactive { public interface IObservableRepositoriesClient { /// /// Creates a new repository for the current user. /// /// A instance describing the new repository to create /// An instance for the created repository IObservable Create(NewRepository newRepository); /// /// Creates a new repository in the specified organization. /// /// The login of the organization in which to create the repostiory /// A instance describing the new repository to create /// An instance for the created repository IObservable Create(string organizationLogin, NewRepository newRepository); /// /// Deletes a repository for the specified owner and name. /// /// The owner of the repository /// The name of the repository /// Deleting a repository requires admin access. If OAuth is used, the `delete_repo` scope is required. /// An for the operation IObservable Delete(string owner, string name); /// /// Retrieves the for the specified owner and name. /// /// The owner of the repository /// The name of the repository /// A [SuppressMessage("Microsoft.Naming", "CA1716:IdentifiersShouldNotMatchKeywords", MessageId = "Get")] IObservable Get(string owner, string name); /// /// Retrieves every that belongs to the current user. /// /// /// The default page size on GitHub.com is 30. /// /// Thrown if the client is not authenticated. /// A of . [SuppressMessage("Microsoft.Design", "CA1024:UsePropertiesWhereAppropriate", Justification = "Makes a network request")] IObservable GetAllForCurrent(); /// /// Retrieves every that belongs to the specified user. /// /// /// The default page size on GitHub.com is 30. /// /// A of . [SuppressMessage("Microsoft.Design", "CA1024:UsePropertiesWhereAppropriate", Justification = "Makes a network request")] IObservable GetAllForUser(string login); /// /// Retrieves every that belongs to the specified organization. /// /// /// The default page size on GitHub.com is 30. /// /// A of . [SuppressMessage("Microsoft.Design", "CA1024:UsePropertiesWhereAppropriate", Justification = "Makes a network request")] IObservable GetAllForOrg(string organization); /// /// Returns the HTML rendered README. /// /// The owner of the repository /// The name of the repository /// IObservable GetReadme(string owner, string name); /// /// Returns just the HTML portion of the README without the surrounding HTML document. /// /// The owner of the repository /// The name of the repository /// IObservable GetReadmeHtml(string owner, string name); /// /// A client for GitHub's Commit Status API. /// /// /// See the Commit Status API documentation for more /// details. Also check out the blog post /// that announced this feature. /// IObservableCommitStatusClient CommitStatus { get; } /// /// Gets all the branches for the specified repository. /// /// /// See the API documentation for more details /// /// The owner of the repository /// The name of the repository /// Thrown when a general API error occurs. /// All es of the repository IObservable GetAllBranches(string owner, string name); /// /// Gets all contributors for the specified repository. Does not include anonymous contributors. /// /// /// See the API documentation for more details /// /// The owner of the repository /// The name of the repository /// All contributors of the repository. IObservable GetAllContributors(string owner, string name); /// /// Gets all contributors for the specified repository. With the option to include anonymous contributors. /// /// /// See the API documentation for more details /// /// The owner of the repository /// The name of the repository /// True if anonymous contributors should be included in result; Otherwise false /// All contributors of the repository. IObservable GetAllContributors(string owner, string name, bool includeAnonymous); /// /// Gets all languages for the specified repository. /// /// /// See the API documentation for more details /// /// The owner of the repository /// The name of the repository /// All languages used in the repository and the number of bytes of each language. IObservable GetAllLanguages(string owner, string name); /// /// Gets all teams for the specified repository. /// /// /// See the API documentation for more details /// /// The owner of the repository /// The name of the repository /// All s associated with the repository IObservable GetAllTeams(string owner, string name); /// /// Gets all tags for the specified repository. /// /// /// See the API documentation for more details /// /// The owner of the repository /// The name of the repository /// All of the repositorys tags. IObservable GetAllTags(string owner, string name); /// /// Gets the specified branch. /// /// /// See the API documentation for more details /// /// The owner of the repository /// The name of the repository /// The name of the branch /// The specified IObservable GetBranch(string owner, string repositoryName, string branchName); /// /// Updates the specified repository with the values given in /// /// The owner of the repository /// The name of the repository /// New values to update the repository with /// The updated IObservable Edit(string owner, string name, RepositoryUpdate update); } }