diff --git a/Octokit/Clients/IUserEmailsClient.cs b/Octokit/Clients/IUserEmailsClient.cs index b653d218..4fb9fb12 100644 --- a/Octokit/Clients/IUserEmailsClient.cs +++ b/Octokit/Clients/IUserEmailsClient.cs @@ -22,6 +22,17 @@ namespace Octokit [SuppressMessage("Microsoft.Design", "CA1024:UsePropertiesWhereAppropriate")] Task> 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")] + Task> GetAll(ApiOptions options); + /// /// Adds email addresses for the authenticated user. /// diff --git a/Octokit/Clients/UserEmailsClient.cs b/Octokit/Clients/UserEmailsClient.cs index d503e853..fc638cd0 100644 --- a/Octokit/Clients/UserEmailsClient.cs +++ b/Octokit/Clients/UserEmailsClient.cs @@ -30,7 +30,21 @@ namespace Octokit /// The es for the authenticated user. public Task> GetAll() { - return ApiConnection.GetAll(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 + /// + /// The es for the authenticated user. + public Task> GetAll(ApiOptions options) + { + Ensure.ArgumentNotNull(options, "options"); + + return ApiConnection.GetAll(ApiUrls.Emails(), options); } ///