mirror of
https://github.com/zoriya/octokit.net.git
synced 2026-06-03 03:01:31 +00:00
Add GetAllPublic to Octokit.Reactive
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user