mirror of
https://github.com/zoriya/octokit.net.git
synced 2025-12-20 06:05:12 +00:00
ported behaviour over to reactive client
This commit is contained in:
@@ -62,6 +62,19 @@ namespace Octokit.Reactive
|
|||||||
Justification = "Makes a network request")]
|
Justification = "Makes a network request")]
|
||||||
IObservable<Repository> GetAllForCurrent();
|
IObservable<Repository> GetAllForCurrent();
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Retrieves every <see cref="Repository"/> that belongs to the current user.
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// The default page size on GitHub.com is 30.
|
||||||
|
/// </remarks>
|
||||||
|
/// <param name="request">Search parameters to filter results on</param>
|
||||||
|
/// <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(RepositoryRequest request);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Retrieves every <see cref="Repository"/> that belongs to the specified user.
|
/// Retrieves every <see cref="Repository"/> that belongs to the specified user.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
@@ -115,6 +115,22 @@ namespace Octokit.Reactive
|
|||||||
return _connection.GetAndFlattenAllPages<Repository>(ApiUrls.Repositories());
|
return _connection.GetAndFlattenAllPages<Repository>(ApiUrls.Repositories());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Retrieves every <see cref="Repository"/> that belongs to the current user.
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// The default page size on GitHub.com is 30.
|
||||||
|
/// </remarks>
|
||||||
|
/// <param name="request">Search parameters to filter results on</param>
|
||||||
|
/// <exception cref="AuthorizationException">Thrown if the client is not authenticated.</exception>
|
||||||
|
/// <returns>A <see cref="IReadOnlyPagedCollection{Repository}"/> of <see cref="Repository"/>.</returns>
|
||||||
|
public IObservable<Repository> GetAllForCurrent(RepositoryRequest request)
|
||||||
|
{
|
||||||
|
Ensure.ArgumentNotNull(request, "request");
|
||||||
|
|
||||||
|
return _connection.GetAndFlattenAllPages<Repository>(ApiUrls.Repositories(), request.ToParametersDictionary());
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Retrieves every <see cref="Repository"/> that belongs to the specified user.
|
/// Retrieves every <see cref="Repository"/> that belongs to the specified user.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
Reference in New Issue
Block a user