mirror of
https://github.com/zoriya/octokit.net.git
synced 2026-06-03 11:05:56 +00:00
@@ -0,0 +1,92 @@
|
||||
using System;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using System.Reactive;
|
||||
|
||||
namespace Octokit.Reactive
|
||||
{
|
||||
public interface IObservableRepositoriesClient
|
||||
{
|
||||
/// <summary>
|
||||
/// Creates a new repository for the current user.
|
||||
/// </summary>
|
||||
/// <param name="newRepository">A <see cref="NewRepository"/> instance describing the new repository to create</param>
|
||||
/// <returns>An <see cref="IObservable{Repository}"/> instance for the created repository</returns>
|
||||
IObservable<Repository> Create(NewRepository newRepository);
|
||||
|
||||
/// <summary>
|
||||
/// Creates a new repository in the specified organization.
|
||||
/// </summary>
|
||||
/// <param name="organizationLogin">The login of the organization in which to create the repostiory</param>
|
||||
/// <param name="newRepository">A <see cref="NewRepository"/> instance describing the new repository to create</param>
|
||||
/// <returns>An <see cref="IObservable{Repository}"/> instance for the created repository</returns>
|
||||
IObservable<Repository> Create(string organizationLogin, NewRepository newRepository);
|
||||
|
||||
/// <summary>
|
||||
/// Deletes a repository for the specified owner and name.
|
||||
/// </summary>
|
||||
/// <param name="owner">The owner of the repository</param>
|
||||
/// <param name="name">The name of the repository</param>
|
||||
/// <remarks>Deleting a repository requires admin access. If OAuth is used, the `delete_repo` scope is required.</remarks>
|
||||
/// <returns>An <see cref="IObservable{Unit}"/> for the operation</returns>
|
||||
IObservable<Unit> Delete(string owner, string name);
|
||||
|
||||
/// <summary>
|
||||
/// Retrieves the <see cref="Repository"/> for the specified owner and name.
|
||||
/// </summary>
|
||||
/// <param name="owner">The owner of the repository.</param>
|
||||
/// <param name="name">The name of the repository.</param>
|
||||
/// <returns>A <see cref="Repository"/></returns>
|
||||
[SuppressMessage("Microsoft.Naming", "CA1716:IdentifiersShouldNotMatchKeywords", MessageId = "Get")]
|
||||
IObservable<Repository> Get(string owner, string name);
|
||||
|
||||
/// <summary>
|
||||
/// Retrieves every <see cref="Repository"/> that belongs to the current user.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// The default page size on GitHub.com is 30.
|
||||
/// </remarks>
|
||||
/// <exception cref="AuthorizationException">Thrown if the client is not authenticated.</exception>
|
||||
/// <returns>A <see cref="IReadOnlyPagedCollection{Repository}"/> of <see cref="Repository"/>.</returns>
|
||||
[SuppressMessage("Microsoft.Design", "CA1024:UsePropertiesWhereAppropriate",
|
||||
Justification = "Makes a network request")]
|
||||
IObservable<Repository> GetAllForCurrent();
|
||||
|
||||
/// <summary>
|
||||
/// Retrieves every <see cref="Repository"/> that belongs to the specified user.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// The default page size on GitHub.com is 30.
|
||||
/// </remarks>
|
||||
/// <returns>A <see cref="IReadOnlyPagedCollection{Repository}"/> of <see cref="Repository"/>.</returns>
|
||||
[SuppressMessage("Microsoft.Design", "CA1024:UsePropertiesWhereAppropriate",
|
||||
Justification = "Makes a network request")]
|
||||
IObservable<Repository> GetAllForUser(string login);
|
||||
|
||||
/// <summary>
|
||||
/// Retrieves every <see cref="Repository"/> that belongs to the specified organization.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// The default page size on GitHub.com is 30.
|
||||
/// </remarks>
|
||||
/// <returns>A <see cref="IReadOnlyPagedCollection{Repository}"/> of <see cref="Repository"/>.</returns>
|
||||
[SuppressMessage("Microsoft.Design", "CA1024:UsePropertiesWhereAppropriate",
|
||||
Justification = "Makes a network request")]
|
||||
IObservable<Repository> GetAllForOrg(string organization);
|
||||
|
||||
/// <summary>
|
||||
/// Returns the HTML rendered README.
|
||||
/// </summary>
|
||||
/// <param name="owner">The owner of the repository.</param>
|
||||
/// <param name="name">The name of the repository.</param>
|
||||
/// <returns></returns>
|
||||
IObservable<Readme> GetReadme(string owner, string name);
|
||||
|
||||
/// <summary>
|
||||
/// Returns just the HTML portion of the README without the surrounding HTML document.
|
||||
/// </summary>
|
||||
/// <param name="owner">The owner of the repository.</param>
|
||||
/// <param name="name">The name of the repository.</param>
|
||||
/// <returns></returns>
|
||||
IObservable<string> GetReadmeHtml(string owner, string name);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user