New overloaded method IObservable<Authorization> GetAll(ApiOptions options) has been added

on IObservableAuthorizationsClient and implemented on ObservableAuthorizationsClient.
This commit is contained in:
aedampir@gmail.com
2016-03-17 15:34:36 +07:00
parent 8f548254f1
commit 5b166ebc42
2 changed files with 30 additions and 1 deletions
@@ -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>