Add actual "GetAllForRepository" Activity Feed (#1288)

This commit is contained in:
Tim Miller
2016-05-04 21:57:31 -04:00
committed by Brendan Forster
parent 7bb751c594
commit 7b372253ca
8 changed files with 283 additions and 6 deletions
@@ -74,6 +74,42 @@ namespace Octokit.Reactive
Ensure.ArgumentNotNullOrEmptyString(name, "name");
Ensure.ArgumentNotNull(options, "options");
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="owner">The owner of the repository</param>
/// <param name="name">The name of the repository</param>
/// <returns>All the <see cref="Activity"/>s for the particular repository.</returns>
public IObservable<Activity> GetAllIssuesForRepository(string owner, string name)
{
Ensure.ArgumentNotNullOrEmptyString(owner, "owner");
Ensure.ArgumentNotNullOrEmptyString(name, "name");
return GetAllIssuesForRepository(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="owner">The owner of the repository</param>
/// <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.</returns>
public IObservable<Activity> GetAllIssuesForRepository(string owner, string name, ApiOptions options)
{
Ensure.ArgumentNotNullOrEmptyString(owner, "owner");
Ensure.ArgumentNotNullOrEmptyString(name, "name");
Ensure.ArgumentNotNull(options, "options");
return _connection.GetAndFlattenAllPages<Activity>(ApiUrls.IssuesEvents(owner, name), options);
}