From 7a01f22ee9ba539e0c9ca5133400358df3f45453 Mon Sep 17 00:00:00 2001 From: "aedampir@gmail.com" Date: Tue, 15 Mar 2016 18:58:10 +0700 Subject: [PATCH] New overloaded method IObservable GetAll(ApiOptions options) has been added and implemented on IObservableUserEmailsClient/ObservableUserEmailsClient. --- .../Clients/IObservableUserEmailsClient.cs | 11 +++++++++++ .../Clients/ObservableUserEmailsClient.cs | 17 ++++++++++++++++- 2 files changed, 27 insertions(+), 1 deletion(-) diff --git a/Octokit.Reactive/Clients/IObservableUserEmailsClient.cs b/Octokit.Reactive/Clients/IObservableUserEmailsClient.cs index 5198ef1a..dd1c99c1 100644 --- a/Octokit.Reactive/Clients/IObservableUserEmailsClient.cs +++ b/Octokit.Reactive/Clients/IObservableUserEmailsClient.cs @@ -22,6 +22,17 @@ namespace Octokit.Reactive [SuppressMessage("Microsoft.Design", "CA1024:UsePropertiesWhereAppropriate")] IObservable GetAll(); + /// + /// Gets all email addresses for the authenticated user. + /// + /// + /// http://developer.github.com/v3/users/emails/#list-email-addresses-for-a-user + /// + /// Options for changing the API response + /// The es for the authenticated user. + [SuppressMessage("Microsoft.Design", "CA1024:UsePropertiesWhereAppropriate")] + IObservable GetAll(ApiOptions options); + /// /// Adds email addresses for the authenticated user. /// diff --git a/Octokit.Reactive/Clients/ObservableUserEmailsClient.cs b/Octokit.Reactive/Clients/ObservableUserEmailsClient.cs index 2a2d1071..96076c30 100644 --- a/Octokit.Reactive/Clients/ObservableUserEmailsClient.cs +++ b/Octokit.Reactive/Clients/ObservableUserEmailsClient.cs @@ -34,7 +34,22 @@ namespace Octokit.Reactive /// The es for the authenticated user. public IObservable GetAll() { - return _connection.GetAndFlattenAllPages(ApiUrls.Emails()); + return GetAll(ApiOptions.None); + } + + /// + /// Gets all email addresses for the authenticated user. + /// + /// + /// http://developer.github.com/v3/users/emails/#list-email-addresses-for-a-user + /// + /// Options for changing the API response + /// The es for the authenticated user. + public IObservable GetAll(ApiOptions options) + { + Ensure.ArgumentNotNull(options, "options"); + + return _connection.GetAndFlattenAllPages(ApiUrls.Emails(), options); } ///