ported behaviour over to reactive client

This commit is contained in:
Brendan Forster
2015-03-06 09:30:14 +09:30
parent f2a51b63f4
commit 96f58e341d
2 changed files with 30 additions and 1 deletions

View File

@@ -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>

View File

@@ -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>