Add GetAllPublic to Octokit.Reactive

This commit is contained in:
rms81
2015-02-01 20:37:16 +00:00
parent aa867d5e4f
commit 20dae37e72
2 changed files with 23 additions and 0 deletions
@@ -38,6 +38,17 @@ namespace Octokit.Reactive
/// <returns>A <see cref="Repository"/></returns>
[SuppressMessage("Microsoft.Naming", "CA1716:IdentifiersShouldNotMatchKeywords", MessageId = "Get")]
IObservable<Repository> Get(string owner, string name);
/// <summary>
/// Retrieves every public <see cref="Repository"/>.
/// </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> GetAllPublic();
/// <summary>
/// Retrieves every <see cref="Repository"/> that belongs to the current user.
@@ -90,6 +90,18 @@ namespace Octokit.Reactive
return _client.Get(owner, name).ToObservable();
}
/// <summary>
/// Retrieves every public <see cref="Repository"/>.
/// </summary>
/// <remarks>
/// The default page size on GitHub.com is 30.
/// </remarks>
/// <returns>A <see cref="IReadOnlyPagedCollection{Repository}"/> of <see cref="Repository"/>.</returns>
public IObservable<Repository> GetAllPublic()
{
return _connection.GetAndFlattenAllPages<Repository>(ApiUrls.AllPublicRepositories());
}
/// <summary>
/// Retrieves every <see cref="Repository"/> that belongs to the current user.
/// </summary>