Files
octokit.net/Octokit.Reactive/IObservableRepositoriesClient.cs
2013-10-02 16:17:36 -07:00

60 lines
2.8 KiB
C#

using System;
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
namespace Octokit.Reactive
{
public interface IObservableRepositoriesClient
{
/// <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<IReadOnlyCollection<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<IReadOnlyCollection<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<IReadOnlyCollection<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); }
}