mirror of
https://github.com/zoriya/octokit.net.git
synced 2025-12-20 22:25:12 +00:00
added new overloads
This commit is contained in:
@@ -17,6 +17,7 @@ namespace Octokit.Reactive
|
||||
public ObservableStatisticsClient(IGitHubClient client)
|
||||
{
|
||||
Ensure.ArgumentNotNull(client, "client");
|
||||
|
||||
_client = client;
|
||||
}
|
||||
|
||||
@@ -34,6 +35,16 @@ namespace Octokit.Reactive
|
||||
return _client.Repository.Statistics.GetContributors(owner, name).ToObservable();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns a list of <see cref="Contributor"/> for the given repository
|
||||
/// </summary>
|
||||
/// <param name="repositoryId">The ID of the repository</param>
|
||||
/// <returns>A list of <see cref="Contributor"/></returns>
|
||||
public IObservable<IEnumerable<Contributor>> GetContributors(int repositoryId)
|
||||
{
|
||||
return _client.Repository.Statistics.GetContributors(repositoryId).ToObservable();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns the last year of commit activity grouped by week.
|
||||
/// </summary>
|
||||
@@ -48,6 +59,16 @@ namespace Octokit.Reactive
|
||||
return _client.Repository.Statistics.GetCommitActivity(owner, name).ToObservable();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns the last year of commit activity grouped by week.
|
||||
/// </summary>
|
||||
/// <param name="repositoryId">The ID of the repository</param>
|
||||
/// <returns>The last year of <see cref="CommitActivity"/></returns>
|
||||
public IObservable<CommitActivity> GetCommitActivity(int repositoryId)
|
||||
{
|
||||
return _client.Repository.Statistics.GetCommitActivity(repositoryId).ToObservable();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns a weekly aggregate of the number of additions and deletions pushed to a repository.
|
||||
/// </summary>
|
||||
@@ -62,6 +83,16 @@ namespace Octokit.Reactive
|
||||
return _client.Repository.Statistics.GetCodeFrequency(owner, name).ToObservable();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns a weekly aggregate of the number of additions and deletions pushed to a repository.
|
||||
/// </summary>
|
||||
/// <param name="repositoryId">The ID of the repository</param>
|
||||
/// <returns>Returns a weekly aggregate of the number additions and deletion</returns>
|
||||
public IObservable<CodeFrequency> GetCodeFrequency(int repositoryId)
|
||||
{
|
||||
return _client.Repository.Statistics.GetCodeFrequency(repositoryId).ToObservable();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns the total commit counts for the owner and total commit counts in total.
|
||||
/// </summary>
|
||||
@@ -76,6 +107,16 @@ namespace Octokit.Reactive
|
||||
return _client.Repository.Statistics.GetParticipation(owner, name).ToObservable();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns the total commit counts for the owner and total commit counts in total.
|
||||
/// </summary>
|
||||
/// <param name="repositoryId">The ID of the repository</param>
|
||||
/// <returns>Returns <see cref="Participation"/>from oldest week to now</returns>
|
||||
public IObservable<Participation> GetParticipation(int repositoryId)
|
||||
{
|
||||
return _client.Repository.Statistics.GetParticipation(repositoryId).ToObservable();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns a list of the number of commits per hour in each day
|
||||
/// </summary>
|
||||
@@ -89,5 +130,15 @@ namespace Octokit.Reactive
|
||||
|
||||
return _client.Repository.Statistics.GetPunchCard(owner, name).ToObservable();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns a list of the number of commits per hour in each day
|
||||
/// </summary>
|
||||
/// <param name="repositoryId">The ID of the repository</param>
|
||||
/// <returns>Returns commit counts per hour in each day</returns>
|
||||
public IObservable<PunchCard> GetPunchCard(int repositoryId)
|
||||
{
|
||||
return _client.Repository.Statistics.GetPunchCard(repositoryId).ToObservable();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user