added new overloads

modified XML docs
This commit is contained in:
Alexander Efremov
2016-06-13 19:37:47 +07:00
parent 02c677d832
commit 8ee07dd355
4 changed files with 215 additions and 4 deletions
@@ -2,6 +2,12 @@
namespace Octokit.Reactive
{
/// <summary>
/// A client for GitHub's Activity Events API.
/// </summary>
/// <remarks>
/// See the <a href="http://developer.github.com/v3/activity/events/">Activity Events API documentation</a> for more information
/// </remarks>
public interface IObservableEventsClient
{
/// <summary>
@@ -35,6 +41,16 @@ namespace Octokit.Reactive
/// <returns>All the <see cref="Activity"/>s for the particular repository.</returns>
IObservable<Activity> GetAllForRepository(string owner, string name);
/// <summary>
/// Gets all the events for a given repository
/// </summary>
/// <remarks>
/// http://developer.github.com/v3/activity/events/#list-issue-events-for-a-repository
/// </remarks>
/// <param name="repositoryId">The ID of the repository</param>
/// <returns>All the <see cref="Activity"/>s for the particular repository.</returns>
IObservable<Activity> GetAllForRepository(int repositoryId);
/// <summary>
/// Gets all the events for a given repository
/// </summary>
@@ -47,6 +63,17 @@ namespace Octokit.Reactive
/// <returns>All the <see cref="Activity"/>s for the particular repository.</returns>
IObservable<Activity> GetAllForRepository(string owner, string name, ApiOptions options);
/// <summary>
/// Gets all the events for a given repository
/// </summary>
/// <remarks>
/// http://developer.github.com/v3/activity/events/#list-issue-events-for-a-repository
/// </remarks>
/// <param name="repositoryId">The ID of the repository</param>
/// <param name="options">Options for changing the API response</param>
/// <returns>All the <see cref="Activity"/>s for the particular repository.</returns>
IObservable<Activity> GetAllForRepository(int repositoryId, ApiOptions options);
/// <summary>
/// Gets all the issue events for a given repository
/// </summary>
@@ -58,6 +85,16 @@ namespace Octokit.Reactive
/// <returns>All the <see cref="Activity"/>s for the particular repository.</returns>
IObservable<Activity> GetAllIssuesForRepository(string owner, string name);
/// <summary>
/// Gets all the issue events for a given repository
/// </summary>
/// <remarks>
/// http://developer.github.com/v3/activity/events/#list-issue-events-for-a-repository
/// </remarks>
/// <param name="repositoryId">The ID of the repository</param>
/// <returns>All the <see cref="Activity"/>s for the particular repository.</returns>
IObservable<Activity> GetAllIssuesForRepository(int repositoryId);
/// <summary>
/// Gets all the issue events for a given repository
/// </summary>
@@ -70,6 +107,17 @@ namespace Octokit.Reactive
/// <returns>All the <see cref="Activity"/>s for the particular repository.</returns>
IObservable<Activity> GetAllIssuesForRepository(string owner, string name, ApiOptions options);
/// <summary>
/// Gets all the issue events for a given repository
/// </summary>
/// <remarks>
/// http://developer.github.com/v3/activity/events/#list-issue-events-for-a-repository
/// </remarks>
/// <param name="repositoryId">The ID of the repository</param>
/// <param name="options">Options for changing the API response</param>
/// <returns>All the <see cref="Activity"/>s for the particular repository.</returns>
IObservable<Activity> GetAllIssuesForRepository(int repositoryId, ApiOptions options);
/// <summary>
/// Gets all the events for a given repository network
/// </summary>
@@ -3,6 +3,12 @@ using Octokit.Reactive.Internal;
namespace Octokit.Reactive
{
/// <summary>
/// A client for GitHub's Activity Events API.
/// </summary>
/// <remarks>
/// See the <a href="http://developer.github.com/v3/activity/events/">Activity Events API documentation</a> for more information
/// </remarks>
public class ObservableEventsClient : IObservableEventsClient
{
readonly IConnection _connection;
@@ -58,6 +64,19 @@ namespace Octokit.Reactive
return GetAllForRepository(owner, name, ApiOptions.None);
}
/// <summary>
/// Gets all the events for a given repository
/// </summary>
/// <remarks>
/// http://developer.github.com/v3/activity/events/#list-issue-events-for-a-repository
/// </remarks>
/// <param name="repositoryId">The ID of the repository</param>
/// <returns>All the <see cref="Activity"/>s for the particular repository.</returns>
public IObservable<Activity> GetAllForRepository(int repositoryId)
{
return GetAllForRepository(repositoryId, ApiOptions.None);
}
/// <summary>
/// Gets all the events for a given repository
/// </summary>
@@ -77,6 +96,22 @@ namespace Octokit.Reactive
return _connection.GetAndFlattenAllPages<Activity>(ApiUrls.Events(owner, name), options);
}
/// <summary>
/// Gets all the events for a given repository
/// </summary>
/// <remarks>
/// http://developer.github.com/v3/activity/events/#list-issue-events-for-a-repository
/// </remarks>
/// <param name="repositoryId">The ID of the repository</param>
/// <param name="options">Options for changing the API response</param>
/// <returns>All the <see cref="Activity"/>s for the particular repository.</returns>
public IObservable<Activity> GetAllForRepository(int repositoryId, ApiOptions options)
{
Ensure.ArgumentNotNull(options, "options");
return _connection.GetAndFlattenAllPages<Activity>(ApiUrls.Events(repositoryId), options);
}
/// <summary>
/// Gets all the events for a given repository
/// </summary>
@@ -94,6 +129,19 @@ namespace Octokit.Reactive
return GetAllIssuesForRepository(owner, name, ApiOptions.None);
}
/// <summary>
/// Gets all the issue events for a given repository
/// </summary>
/// <remarks>
/// http://developer.github.com/v3/activity/events/#list-issue-events-for-a-repository
/// </remarks>
/// <param name="repositoryId">The ID of the repository</param>
/// <returns>All the <see cref="Activity"/>s for the particular repository.</returns>
public IObservable<Activity> GetAllIssuesForRepository(int repositoryId)
{
return GetAllIssuesForRepository(repositoryId, ApiOptions.None);
}
/// <summary>
/// Gets all the events for a given repository
/// </summary>
@@ -113,6 +161,22 @@ namespace Octokit.Reactive
return _connection.GetAndFlattenAllPages<Activity>(ApiUrls.IssuesEvents(owner, name), options);
}
/// <summary>
/// Gets all the issue events for a given repository
/// </summary>
/// <remarks>
/// http://developer.github.com/v3/activity/events/#list-issue-events-for-a-repository
/// </remarks>
/// <param name="repositoryId">The ID of the repository</param>
/// <param name="options">Options for changing the API response</param>
/// <returns>All the <see cref="Activity"/>s for the particular repository.</returns>
public IObservable<Activity> GetAllIssuesForRepository(int repositoryId, ApiOptions options)
{
Ensure.ArgumentNotNull(options, "options");
return _connection.GetAndFlattenAllPages<Activity>(ApiUrls.IssuesEvents(repositoryId), options);
}
/// <summary>
/// Gets all the events for a given repository network
/// </summary>
+59 -2
View File
@@ -61,7 +61,20 @@ namespace Octokit
Ensure.ArgumentNotNullOrEmptyString(owner, "owner");
Ensure.ArgumentNotNullOrEmptyString(name, "name");
return GetAllForRepository(owner,name,ApiOptions.None);
return GetAllForRepository(owner, name, ApiOptions.None);
}
/// <summary>
/// Gets all the events for a given repository
/// </summary>
/// <remarks>
/// http://developer.github.com/v3/activity/events/#list-issue-events-for-a-repository
/// </remarks>
/// <param name="repositoryId">The ID of the repository</param>
/// <returns>All the <see cref="Activity"/>s for the particular repository.</returns>
public Task<IReadOnlyList<Activity>> GetAllForRepository(int repositoryId)
{
return GetAllForRepository(repositoryId, ApiOptions.None);
}
/// <summary>
@@ -83,6 +96,21 @@ namespace Octokit
return ApiConnection.GetAll<Activity>(ApiUrls.Events(owner, name), options);
}
/// <summary>
/// Gets all the events for a given repository
/// </summary>
/// <remarks>
/// http://developer.github.com/v3/activity/events/#list-issue-events-for-a-repository
/// </remarks>
/// <param name="repositoryId">The ID of the repository</param>
/// <param name="options">Options for changing the API response</param>
/// <returns>All the <see cref="Activity"/>s for the particular repository.</returns>
public Task<IReadOnlyList<Activity>> GetAllForRepository(int repositoryId, ApiOptions options)
{
Ensure.ArgumentNotNull(options, "options");
return ApiConnection.GetAll<Activity>(ApiUrls.Events(repositoryId), options);
}
/// <summary>
/// Gets all the event issues for a given repository
@@ -101,6 +129,19 @@ namespace Octokit
return GetAllIssuesForRepository(owner, name, ApiOptions.None);
}
/// <summary>
/// Gets all the issue events for a given repository
/// </summary>
/// <remarks>
/// http://developer.github.com/v3/activity/events/#list-issue-events-for-a-repository
/// </remarks>
/// <param name="repositoryId">The ID of the repository</param>
/// <returns>All the <see cref="Activity"/>s for the particular repository.</returns>
public Task<IReadOnlyList<Activity>> GetAllIssuesForRepository(int repositoryId)
{
return GetAllIssuesForRepository(repositoryId, ApiOptions.None);
}
/// <summary>
/// Gets all the event issues for a given repository
/// </summary>
@@ -120,6 +161,22 @@ namespace Octokit
return ApiConnection.GetAll<Activity>(ApiUrls.IssuesEvents(owner, name), options);
}
/// <summary>
/// Gets all the issue events for a given repository
/// </summary>
/// <remarks>
/// http://developer.github.com/v3/activity/events/#list-issue-events-for-a-repository
/// </remarks>
/// <param name="repositoryId">The ID of the repository</param>
/// <param name="options">Options for changing the API response</param>
/// <returns>All the <see cref="Activity"/>s for the particular repository.</returns>
public Task<IReadOnlyList<Activity>> GetAllIssuesForRepository(int repositoryId, ApiOptions options)
{
Ensure.ArgumentNotNull(options, "options");
return ApiConnection.GetAll<Activity>(ApiUrls.IssuesEvents(repositoryId), options);
}
/// <summary>
/// Gets all the events for a given repository network
/// </summary>
@@ -134,7 +191,7 @@ namespace Octokit
Ensure.ArgumentNotNullOrEmptyString(owner, "owner");
Ensure.ArgumentNotNullOrEmptyString(name, "name");
return GetAllForRepositoryNetwork(owner,name,ApiOptions.None);
return GetAllForRepositoryNetwork(owner, name, ApiOptions.None);
}
/// <summary>
+44 -2
View File
@@ -42,6 +42,16 @@ namespace Octokit
/// <returns>All the <see cref="Activity"/>s for the particular repository.</returns>
Task<IReadOnlyList<Activity>> GetAllForRepository(string owner, string name);
/// <summary>
/// Gets all the events for a given repository
/// </summary>
/// <remarks>
/// http://developer.github.com/v3/activity/events/#list-issue-events-for-a-repository
/// </remarks>
/// <param name="repositoryId">The ID of the repository</param>
/// <returns>All the <see cref="Activity"/>s for the particular repository.</returns>
Task<IReadOnlyList<Activity>> GetAllForRepository(int repositoryId);
/// <summary>
/// Gets all the events for a given repository
/// </summary>
@@ -54,6 +64,17 @@ namespace Octokit
/// <returns>All the <see cref="Activity"/>s for the particular repository.</returns>
Task<IReadOnlyList<Activity>> GetAllForRepository(string owner, string name, ApiOptions options);
/// <summary>
/// Gets all the events for a given repository
/// </summary>
/// <remarks>
/// http://developer.github.com/v3/activity/events/#list-issue-events-for-a-repository
/// </remarks>
/// <param name="repositoryId">The ID of the repository</param>
/// <param name="options">Options for changing the API response</param>
/// <returns>All the <see cref="Activity"/>s for the particular repository.</returns>
Task<IReadOnlyList<Activity>> GetAllForRepository(int repositoryId, ApiOptions options);
/// <summary>
/// Gets all the issue events for a given repository
/// </summary>
@@ -65,6 +86,16 @@ namespace Octokit
/// <returns>All the <see cref="Activity"/>s for the particular repository.</returns>
Task<IReadOnlyList<Activity>> GetAllIssuesForRepository(string owner, string name);
/// <summary>
/// Gets all the issue events for a given repository
/// </summary>
/// <remarks>
/// http://developer.github.com/v3/activity/events/#list-issue-events-for-a-repository
/// </remarks>
/// <param name="repositoryId">The ID of the repository</param>
/// <returns>All the <see cref="Activity"/>s for the particular repository.</returns>
Task<IReadOnlyList<Activity>> GetAllIssuesForRepository(int repositoryId);
/// <summary>
/// Gets all the issue events for a given repository
/// </summary>
@@ -77,6 +108,17 @@ namespace Octokit
/// <returns>All the <see cref="Activity"/>s for the particular repository.</returns>
Task<IReadOnlyList<Activity>> GetAllIssuesForRepository(string owner, string name, ApiOptions options);
/// <summary>
/// Gets all the issue events for a given repository
/// </summary>
/// <remarks>
/// http://developer.github.com/v3/activity/events/#list-issue-events-for-a-repository
/// </remarks>
/// <param name="repositoryId">The ID of the repository</param>
/// <param name="options">Options for changing the API response</param>
/// <returns>All the <see cref="Activity"/>s for the particular repository.</returns>
Task<IReadOnlyList<Activity>> GetAllIssuesForRepository(int repositoryId, ApiOptions options);
/// <summary>
/// Gets all the events for a given repository network
/// </summary>
@@ -98,8 +140,8 @@ namespace Octokit
/// <param name="name">The name of the repository</param>
/// <param name="options">Options for changing the API response</param>
/// <returns>All the <see cref="Activity"/>s for the particular repository network.</returns>
Task<IReadOnlyList<Activity>> GetAllForRepositoryNetwork(string owner, string name,ApiOptions options);
Task<IReadOnlyList<Activity>> GetAllForRepositoryNetwork(string owner, string name, ApiOptions options);
/// <summary>
/// Gets all the events for a given organization
/// </summary>