mirror of
https://github.com/zoriya/octokit.net.git
synced 2026-06-03 19:11:30 +00:00
New overloaded method IObservable<Authorization> GetAll(ApiOptions options) has been added
on IObservableAuthorizationsClient and implemented on ObservableAuthorizationsClient.
This commit is contained in:
@@ -18,6 +18,19 @@ namespace Octokit.Reactive
|
||||
Justification = "It's an API call, so it's not a property.")]
|
||||
IObservable<Authorization> GetAll();
|
||||
|
||||
/// <summary>
|
||||
/// Get all <see cref="Authorization"/>s for the authenticated user. This method requires basic auth.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// See <a href="http://developer.github.com/v3/oauth/#list-your-authorizations">API documentation</a> for more
|
||||
/// details.
|
||||
/// </remarks>
|
||||
/// <param name="options">Options for changing the API response</param>
|
||||
/// <returns>An <see cref="Authorization"/></returns>
|
||||
[SuppressMessage("Microsoft.Design", "CA1024:UsePropertiesWhereAppropriate",
|
||||
Justification = "It's an API call, so it's not a property.")]
|
||||
IObservable<Authorization> GetAll(ApiOptions options);
|
||||
|
||||
/// <summary>
|
||||
/// Get a specific <see cref="Authorization"/> for the authenticated user. This method requires basic auth.
|
||||
/// </summary>
|
||||
|
||||
@@ -28,7 +28,23 @@ namespace Octokit.Reactive
|
||||
/// <returns>An <see cref="Authorization"/></returns>
|
||||
public IObservable<Authorization> GetAll()
|
||||
{
|
||||
return _connection.GetAndFlattenAllPages<Authorization>(ApiUrls.Authorizations());
|
||||
return GetAll(ApiOptions.None);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get all <see cref="Authorization"/>s for the authenticated user. This method requires basic auth.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// See <a href="http://developer.github.com/v3/oauth/#list-your-authorizations">API documentation</a> for more
|
||||
/// details.
|
||||
/// </remarks>
|
||||
/// <param name="options">Options for changing the API response</param>
|
||||
/// <returns>An <see cref="Authorization"/></returns>
|
||||
public IObservable<Authorization> GetAll(ApiOptions options)
|
||||
{
|
||||
Ensure.ArgumentNotNull(options, "options");
|
||||
|
||||
return _connection.GetAndFlattenAllPages<Authorization>(ApiUrls.Authorizations(), options);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
Reference in New Issue
Block a user