diff --git a/Octokit.Reactive/Clients/IObservableIssuesEventsClient.cs b/Octokit.Reactive/Clients/IObservableIssuesEventsClient.cs index e3317e05..fddcfc4b 100644 --- a/Octokit.Reactive/Clients/IObservableIssuesEventsClient.cs +++ b/Octokit.Reactive/Clients/IObservableIssuesEventsClient.cs @@ -22,6 +22,17 @@ namespace Octokit.Reactive /// The issue number /// A of s representing event information for specified number. IObservable GetAllForIssue(string owner, string name, int number); + + /// + /// Gets all events for the issue. + /// + /// + /// http://developer.github.com/v3/issues/events/#list-events-for-an-issue + /// + /// The ID of the repository + /// The issue number + /// A of s representing event information for specified number. + IObservable GetAllForIssue(int repositoryId, int number); /// /// Gets all events for the issue. @@ -36,6 +47,18 @@ namespace Octokit.Reactive /// A of s representing event information for specified number. IObservable GetAllForIssue(string owner, string name, int number, ApiOptions options); + /// + /// Gets all events for the issue. + /// + /// + /// http://developer.github.com/v3/issues/events/#list-events-for-an-issue + /// + /// The ID of the repository + /// The issue number + /// Options for changing the API response + /// A of s representing event information for specified number. + IObservable GetAllForIssue(int repositoryId, int number, ApiOptions options); + /// /// Gets all events for the repository. /// @@ -47,6 +70,16 @@ namespace Octokit.Reactive /// A of s representing issue events for specified repository. IObservable GetAllForRepository(string owner, string name); + /// + /// Gets all events for the repository. + /// + /// + /// http://developer.github.com/v3/issues/events/#list-events-for-a-repository + /// + /// The ID of the repository + /// A of s representing issue events for specified repository. + IObservable GetAllForRepository(int repositoryId); + /// /// Gets all events for the repository. /// @@ -59,6 +92,17 @@ namespace Octokit.Reactive /// A of s representing issue events for specified repository. IObservable GetAllForRepository(string owner, string name, ApiOptions options); + /// + /// Gets all events for the repository. + /// + /// + /// http://developer.github.com/v3/issues/events/#list-events-for-a-repository + /// + /// The ID of the repository + /// Options for changing the API response + /// A of s representing issue events for specified repository. + IObservable GetAllForRepository(int repositoryId, ApiOptions options); + /// /// Gets a single event /// @@ -72,5 +116,18 @@ namespace Octokit.Reactive [SuppressMessage("Microsoft.Naming", "CA1716:IdentifiersShouldNotMatchKeywords", MessageId = "Get", Justification = "Method makes a network request")] IObservable Get(string owner, string name, int number); + + /// + /// Gets a single event + /// + /// + /// http://developer.github.com/v3/issues/events/#get-a-single-event + /// + /// The ID of the repository + /// The event id + /// A representing issue event for specified number. + [SuppressMessage("Microsoft.Naming", "CA1716:IdentifiersShouldNotMatchKeywords", MessageId = "Get", + Justification = "Method makes a network request")] + IObservable Get(int repositoryId, int number); } } diff --git a/Octokit.Reactive/Clients/ObservableIssuesEventsClient.cs b/Octokit.Reactive/Clients/ObservableIssuesEventsClient.cs index a0d81d14..eec7f975 100644 --- a/Octokit.Reactive/Clients/ObservableIssuesEventsClient.cs +++ b/Octokit.Reactive/Clients/ObservableIssuesEventsClient.cs @@ -41,6 +41,20 @@ namespace Octokit.Reactive return GetAllForIssue(owner, name, number, ApiOptions.None); } + /// + /// Gets all events for the issue. + /// + /// + /// http://developer.github.com/v3/issues/events/#list-events-for-an-issue + /// + /// The ID of the repository + /// The issue number + /// A of s representing event information for specified number. + public IObservable GetAllForIssue(int repositoryId, int number) + { + return GetAllForIssue(repositoryId, number, ApiOptions.None); + } + /// /// Gets all events for the issue. /// @@ -61,6 +75,23 @@ namespace Octokit.Reactive return _connection.GetAndFlattenAllPages(ApiUrls.IssuesEvents(owner, name, number), options); } + /// + /// Gets all events for the issue. + /// + /// + /// http://developer.github.com/v3/issues/events/#list-events-for-an-issue + /// + /// The ID of the repository + /// The issue number + /// Options for changing the API response + /// A of s representing event information for specified number. + public IObservable GetAllForIssue(int repositoryId, int number, ApiOptions options) + { + Ensure.ArgumentNotNull(options, "options"); + + return _connection.GetAndFlattenAllPages(ApiUrls.IssuesEvents(repositoryId, number), options); + } + /// /// Gets all events for the repository. /// @@ -78,6 +109,19 @@ namespace Octokit.Reactive return GetAllForRepository(owner, name, ApiOptions.None); } + /// + /// Gets all events for the repository. + /// + /// + /// http://developer.github.com/v3/issues/events/#list-events-for-a-repository + /// + /// The ID of the repository + /// A of s representing issue events for specified repository. + public IObservable GetAllForRepository(int repositoryId) + { + return GetAllForRepository(repositoryId, ApiOptions.None); + } + /// /// Gets all events for the repository. /// @@ -97,6 +141,22 @@ namespace Octokit.Reactive return _connection.GetAndFlattenAllPages(ApiUrls.IssuesEvents(owner, name), options); } + /// + /// Gets all events for the repository. + /// + /// + /// http://developer.github.com/v3/issues/events/#list-events-for-a-repository + /// + /// The ID of the repository + /// Options for changing the API response + /// A of s representing issue events for specified repository. + public IObservable GetAllForRepository(int repositoryId, ApiOptions options) + { + Ensure.ArgumentNotNull(options, "options"); + + return _connection.GetAndFlattenAllPages(ApiUrls.IssuesEvents(repositoryId), options); + } + /// /// Gets a single event /// @@ -114,5 +174,19 @@ namespace Octokit.Reactive return _client.Get(owner, name, number).ToObservable(); } + + /// + /// Gets a single event + /// + /// + /// http://developer.github.com/v3/issues/events/#get-a-single-event + /// + /// The ID of the repository + /// The event id + /// A representing issue event for specified number. + public IObservable Get(int repositoryId, int number) + { + return _client.Get(repositoryId, number).ToObservable(); + } } } \ No newline at end of file diff --git a/Octokit/Clients/IIssuesEventsClient.cs b/Octokit/Clients/IIssuesEventsClient.cs index 7f410896..f9f0edc9 100644 --- a/Octokit/Clients/IIssuesEventsClient.cs +++ b/Octokit/Clients/IIssuesEventsClient.cs @@ -24,6 +24,17 @@ namespace Octokit /// A of s representing event information for specified number. Task> GetAllForIssue(string owner, string name, int number); + /// + /// Gets all events for the issue. + /// + /// + /// http://developer.github.com/v3/issues/events/#list-events-for-an-issue + /// + /// The ID of the repository + /// The issue number + /// A of s representing event information for specified number. + Task> GetAllForIssue(int repositoryId, int number); + /// /// Gets all events for the issue. /// @@ -37,6 +48,18 @@ namespace Octokit /// A of s representing event information for specified number. Task> GetAllForIssue(string owner, string name, int number, ApiOptions options); + /// + /// Gets all events for the issue. + /// + /// + /// http://developer.github.com/v3/issues/events/#list-events-for-an-issue + /// + /// The ID of the repository + /// The issue number + /// Options for changing the API response + /// A of s representing event information for specified number. + Task> GetAllForIssue(int repositoryId, int number, ApiOptions options); + /// /// Gets all events for the repository. /// @@ -48,6 +71,16 @@ namespace Octokit /// A of s representing issue events for specified repository. Task> GetAllForRepository(string owner, string name); + /// + /// Gets all events for the repository. + /// + /// + /// http://developer.github.com/v3/issues/events/#list-events-for-a-repository + /// + /// The ID of the repository + /// A of s representing issue events for specified repository. + Task> GetAllForRepository(int repositoryId); + /// /// Gets all events for the repository. /// @@ -60,6 +93,17 @@ namespace Octokit /// A of s representing issue events for specified repository. Task> GetAllForRepository(string owner, string name, ApiOptions options); + /// + /// Gets all events for the repository. + /// + /// + /// http://developer.github.com/v3/issues/events/#list-events-for-a-repository + /// + /// The ID of the repository + /// Options for changing the API response + /// A of s representing issue events for specified repository. + Task> GetAllForRepository(int repositoryId, ApiOptions options); + /// /// Gets a single event /// @@ -71,7 +115,20 @@ namespace Octokit /// The event id /// A representing issue event for specified number. [SuppressMessage("Microsoft.Naming", "CA1716:IdentifiersShouldNotMatchKeywords", MessageId = "Get", - Justification = "Method makes a network request")] + Justification = "Method makes a network request")] Task Get(string owner, string name, int number); + + /// + /// Gets a single event + /// + /// + /// http://developer.github.com/v3/issues/events/#get-a-single-event + /// + /// The ID of the repository + /// The event id + /// A representing issue event for specified number. + [SuppressMessage("Microsoft.Naming", "CA1716:IdentifiersShouldNotMatchKeywords", MessageId = "Get", + Justification = "Method makes a network request")] + Task Get(int repositoryId, int number); } } diff --git a/Octokit/Clients/IssuesEventsClient.cs b/Octokit/Clients/IssuesEventsClient.cs index 648bfeac..51056a5a 100644 --- a/Octokit/Clients/IssuesEventsClient.cs +++ b/Octokit/Clients/IssuesEventsClient.cs @@ -35,6 +35,20 @@ namespace Octokit return GetAllForIssue(owner, name, number, ApiOptions.None); } + /// + /// Gets all events for the issue. + /// + /// + /// http://developer.github.com/v3/issues/events/#list-events-for-an-issue + /// + /// The ID of the repository + /// The issue number + /// A of s representing event information for specified number. + public Task> GetAllForIssue(int repositoryId, int number) + { + return GetAllForIssue(repositoryId, number, ApiOptions.None); + } + /// /// Gets all events for the issue. /// @@ -55,6 +69,23 @@ namespace Octokit return ApiConnection.GetAll(ApiUrls.IssuesEvents(owner, name, number), options); } + /// + /// Gets all events for the issue. + /// + /// + /// http://developer.github.com/v3/issues/events/#list-events-for-an-issue + /// + /// The ID of the repository + /// The issue number + /// Options for changing the API response + /// A of s representing event information for specified number. + public Task> GetAllForIssue(int repositoryId, int number, ApiOptions options) + { + Ensure.ArgumentNotNull(options, "options"); + + return ApiConnection.GetAll(ApiUrls.IssuesEvents(repositoryId, number), options); + } + /// /// Gets all events for the repository. /// @@ -72,6 +103,19 @@ namespace Octokit return GetAllForRepository(owner, name, ApiOptions.None); } + /// + /// Gets all events for the repository. + /// + /// + /// http://developer.github.com/v3/issues/events/#list-events-for-a-repository + /// + /// The ID of the repository + /// A of s representing issue events for specified repository. + public Task> GetAllForRepository(int repositoryId) + { + return GetAllForRepository(repositoryId, ApiOptions.None); + } + /// /// Gets all events for the repository. /// @@ -91,6 +135,22 @@ namespace Octokit return ApiConnection.GetAll(ApiUrls.IssuesEvents(owner, name), options); } + /// + /// Gets all events for the repository. + /// + /// + /// http://developer.github.com/v3/issues/events/#list-events-for-a-repository + /// + /// The ID of the repository + /// Options for changing the API response + /// A of s representing issue events for specified repository. + public Task> GetAllForRepository(int repositoryId, ApiOptions options) + { + Ensure.ArgumentNotNull(options, "options"); + + return ApiConnection.GetAll(ApiUrls.IssuesEvents(repositoryId), options); + } + /// /// Gets a single event /// @@ -108,5 +168,19 @@ namespace Octokit return ApiConnection.Get(ApiUrls.IssuesEvent(owner, name, number)); } + + /// + /// Gets a single event + /// + /// + /// http://developer.github.com/v3/issues/events/#get-a-single-event + /// + /// The ID of the repository + /// The event id + /// A representing issue event for specified number. + public Task Get(int repositoryId, int number) + { + return ApiConnection.Get(ApiUrls.IssuesEvent(repositoryId, number)); + } } } \ No newline at end of file