mirror of
https://github.com/zoriya/octokit.net.git
synced 2025-12-20 14:15:12 +00:00
added new overloads
This commit is contained in:
@@ -19,6 +19,13 @@ namespace Octokit.Reactive
|
|||||||
/// <returns>A list of <see cref="Contributor"/></returns>
|
/// <returns>A list of <see cref="Contributor"/></returns>
|
||||||
IObservable<IEnumerable<Contributor>> GetContributors(string owner, string name);
|
IObservable<IEnumerable<Contributor>> GetContributors(string owner, string name);
|
||||||
|
|
||||||
|
/// <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>
|
||||||
|
IObservable<IEnumerable<Contributor>> GetContributors(int repositoryId);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Returns the last year of commit activity grouped by week.
|
/// Returns the last year of commit activity grouped by week.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -27,6 +34,13 @@ namespace Octokit.Reactive
|
|||||||
/// <returns>The last year of <see cref="CommitActivity"/></returns>
|
/// <returns>The last year of <see cref="CommitActivity"/></returns>
|
||||||
IObservable<CommitActivity> GetCommitActivity(string owner, string name);
|
IObservable<CommitActivity> GetCommitActivity(string owner, string name);
|
||||||
|
|
||||||
|
/// <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>
|
||||||
|
IObservable<CommitActivity> GetCommitActivity(int repositoryId);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Returns a weekly aggregate of the number of additions and deletions pushed to a repository.
|
/// Returns a weekly aggregate of the number of additions and deletions pushed to a repository.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -35,6 +49,13 @@ namespace Octokit.Reactive
|
|||||||
/// <returns>Returns a weekly aggregate of the number additions and deletion</returns>
|
/// <returns>Returns a weekly aggregate of the number additions and deletion</returns>
|
||||||
IObservable<CodeFrequency> GetCodeFrequency(string owner, string name);
|
IObservable<CodeFrequency> GetCodeFrequency(string owner, string name);
|
||||||
|
|
||||||
|
/// <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>
|
||||||
|
IObservable<CodeFrequency> GetCodeFrequency(int repositoryId);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Returns the total commit counts for the owner and total commit counts in total.
|
/// Returns the total commit counts for the owner and total commit counts in total.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -43,6 +64,13 @@ namespace Octokit.Reactive
|
|||||||
/// <returns>Returns <see cref="Participation"/>from oldest week to now</returns>
|
/// <returns>Returns <see cref="Participation"/>from oldest week to now</returns>
|
||||||
IObservable<Participation> GetParticipation(string owner, string name);
|
IObservable<Participation> GetParticipation(string owner, string name);
|
||||||
|
|
||||||
|
/// <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>
|
||||||
|
IObservable<Participation> GetParticipation(int repositoryId);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Returns a list of the number of commits per hour in each day
|
/// Returns a list of the number of commits per hour in each day
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -50,5 +78,12 @@ namespace Octokit.Reactive
|
|||||||
/// <param name="name">The name of the repository</param>
|
/// <param name="name">The name of the repository</param>
|
||||||
/// <returns>Returns commit counts per hour in each day</returns>
|
/// <returns>Returns commit counts per hour in each day</returns>
|
||||||
IObservable<PunchCard> GetPunchCard(string owner, string name);
|
IObservable<PunchCard> GetPunchCard(string owner, string name);
|
||||||
|
|
||||||
|
/// <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>
|
||||||
|
IObservable<PunchCard> GetPunchCard(int repositoryId);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -17,6 +17,7 @@ namespace Octokit.Reactive
|
|||||||
public ObservableStatisticsClient(IGitHubClient client)
|
public ObservableStatisticsClient(IGitHubClient client)
|
||||||
{
|
{
|
||||||
Ensure.ArgumentNotNull(client, "client");
|
Ensure.ArgumentNotNull(client, "client");
|
||||||
|
|
||||||
_client = client;
|
_client = client;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -34,6 +35,16 @@ namespace Octokit.Reactive
|
|||||||
return _client.Repository.Statistics.GetContributors(owner, name).ToObservable();
|
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>
|
/// <summary>
|
||||||
/// Returns the last year of commit activity grouped by week.
|
/// Returns the last year of commit activity grouped by week.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -48,6 +59,16 @@ namespace Octokit.Reactive
|
|||||||
return _client.Repository.Statistics.GetCommitActivity(owner, name).ToObservable();
|
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>
|
/// <summary>
|
||||||
/// Returns a weekly aggregate of the number of additions and deletions pushed to a repository.
|
/// Returns a weekly aggregate of the number of additions and deletions pushed to a repository.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -62,6 +83,16 @@ namespace Octokit.Reactive
|
|||||||
return _client.Repository.Statistics.GetCodeFrequency(owner, name).ToObservable();
|
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>
|
/// <summary>
|
||||||
/// Returns the total commit counts for the owner and total commit counts in total.
|
/// Returns the total commit counts for the owner and total commit counts in total.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -76,6 +107,16 @@ namespace Octokit.Reactive
|
|||||||
return _client.Repository.Statistics.GetParticipation(owner, name).ToObservable();
|
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>
|
/// <summary>
|
||||||
/// Returns a list of the number of commits per hour in each day
|
/// Returns a list of the number of commits per hour in each day
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -89,5 +130,15 @@ namespace Octokit.Reactive
|
|||||||
|
|
||||||
return _client.Repository.Statistics.GetPunchCard(owner, name).ToObservable();
|
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();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -20,6 +20,13 @@ namespace Octokit
|
|||||||
/// <returns>A list of <see cref="Contributor"/></returns>
|
/// <returns>A list of <see cref="Contributor"/></returns>
|
||||||
Task<IReadOnlyList<Contributor>> GetContributors(string owner, string name);
|
Task<IReadOnlyList<Contributor>> GetContributors(string owner, string name);
|
||||||
|
|
||||||
|
/// <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>
|
||||||
|
Task<IReadOnlyList<Contributor>> GetContributors(int repositoryId);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Returns a list of <see cref="Contributor"/> for the given repository
|
/// Returns a list of <see cref="Contributor"/> for the given repository
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -29,6 +36,14 @@ namespace Octokit
|
|||||||
/// <returns>A list of <see cref="Contributor"/></returns>
|
/// <returns>A list of <see cref="Contributor"/></returns>
|
||||||
Task<IReadOnlyList<Contributor>> GetContributors(string owner, string name, CancellationToken cancellationToken);
|
Task<IReadOnlyList<Contributor>> GetContributors(string owner, string name, CancellationToken cancellationToken);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Returns a list of <see cref="Contributor"/> for the given repository
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="repositoryId">The ID of the repository</param>
|
||||||
|
/// <param name="cancellationToken">A token used to cancel this potentially long running request</param>
|
||||||
|
/// <returns>A list of <see cref="Contributor"/></returns>
|
||||||
|
Task<IReadOnlyList<Contributor>> GetContributors(int repositoryId, CancellationToken cancellationToken);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Returns the last year of commit activity grouped by week.
|
/// Returns the last year of commit activity grouped by week.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -37,6 +52,13 @@ namespace Octokit
|
|||||||
/// <returns>The last year of <see cref="CommitActivity"/></returns>
|
/// <returns>The last year of <see cref="CommitActivity"/></returns>
|
||||||
Task<CommitActivity> GetCommitActivity(string owner, string name);
|
Task<CommitActivity> GetCommitActivity(string owner, string name);
|
||||||
|
|
||||||
|
/// <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>
|
||||||
|
Task<CommitActivity> GetCommitActivity(int repositoryId);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Returns the last year of commit activity grouped by week.
|
/// Returns the last year of commit activity grouped by week.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -46,6 +68,14 @@ namespace Octokit
|
|||||||
/// <returns>The last year of <see cref="CommitActivity"/></returns>
|
/// <returns>The last year of <see cref="CommitActivity"/></returns>
|
||||||
Task<CommitActivity> GetCommitActivity(string owner, string name, CancellationToken cancellationToken);
|
Task<CommitActivity> GetCommitActivity(string owner, string name, CancellationToken cancellationToken);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Returns the last year of commit activity grouped by week.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="repositoryId">The ID of the repository</param>
|
||||||
|
/// <param name="cancellationToken">A token used to cancel this potentially long running request</param>
|
||||||
|
/// <returns>The last year of <see cref="CommitActivity"/></returns>
|
||||||
|
Task<CommitActivity> GetCommitActivity(int repositoryId, CancellationToken cancellationToken);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Returns a weekly aggregate of the number of additions and deletions pushed to a repository.
|
/// Returns a weekly aggregate of the number of additions and deletions pushed to a repository.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -54,6 +84,13 @@ namespace Octokit
|
|||||||
/// <returns>Returns a weekly aggregate of the number additions and deletion</returns>
|
/// <returns>Returns a weekly aggregate of the number additions and deletion</returns>
|
||||||
Task<CodeFrequency> GetCodeFrequency(string owner, string name);
|
Task<CodeFrequency> GetCodeFrequency(string owner, string name);
|
||||||
|
|
||||||
|
/// <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>
|
||||||
|
Task<CodeFrequency> GetCodeFrequency(int repositoryId);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Returns a weekly aggregate of the number of additions and deletions pushed to a repository.
|
/// Returns a weekly aggregate of the number of additions and deletions pushed to a repository.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -63,6 +100,14 @@ namespace Octokit
|
|||||||
/// <returns>Returns a weekly aggregate of the number additions and deletion</returns>
|
/// <returns>Returns a weekly aggregate of the number additions and deletion</returns>
|
||||||
Task<CodeFrequency> GetCodeFrequency(string owner, string name, CancellationToken cancellationToken);
|
Task<CodeFrequency> GetCodeFrequency(string owner, string name, CancellationToken cancellationToken);
|
||||||
|
|
||||||
|
/// <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>
|
||||||
|
/// <param name="cancellationToken">A token used to cancel this potentially long running request</param>
|
||||||
|
/// <returns>Returns a weekly aggregate of the number additions and deletion</returns>
|
||||||
|
Task<CodeFrequency> GetCodeFrequency(int repositoryId, CancellationToken cancellationToken);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Returns the total commit counts for the owner and total commit counts in total.
|
/// Returns the total commit counts for the owner and total commit counts in total.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -71,6 +116,13 @@ namespace Octokit
|
|||||||
/// <returns>Returns <see cref="Participation"/>from oldest week to now</returns>
|
/// <returns>Returns <see cref="Participation"/>from oldest week to now</returns>
|
||||||
Task<Participation> GetParticipation(string owner, string name);
|
Task<Participation> GetParticipation(string owner, string name);
|
||||||
|
|
||||||
|
/// <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>
|
||||||
|
Task<Participation> GetParticipation(int repositoryId);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Returns the total commit counts for the owner and total commit counts in total.
|
/// Returns the total commit counts for the owner and total commit counts in total.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -80,6 +132,14 @@ namespace Octokit
|
|||||||
/// <returns>Returns <see cref="Participation"/>from oldest week to now</returns>
|
/// <returns>Returns <see cref="Participation"/>from oldest week to now</returns>
|
||||||
Task<Participation> GetParticipation(string owner, string name, CancellationToken cancellationToken);
|
Task<Participation> GetParticipation(string owner, string name, CancellationToken cancellationToken);
|
||||||
|
|
||||||
|
/// <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>
|
||||||
|
/// <param name="cancellationToken">A token used to cancel this potentially long running request</param>
|
||||||
|
/// <returns>Returns <see cref="Participation"/>from oldest week to now</returns>
|
||||||
|
Task<Participation> GetParticipation(int repositoryId, CancellationToken cancellationToken);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Returns a list of the number of commits per hour in each day
|
/// Returns a list of the number of commits per hour in each day
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -88,6 +148,13 @@ namespace Octokit
|
|||||||
/// <returns>Returns commit counts per hour in each day</returns>
|
/// <returns>Returns commit counts per hour in each day</returns>
|
||||||
Task<PunchCard> GetPunchCard(string owner, string name);
|
Task<PunchCard> GetPunchCard(string owner, string name);
|
||||||
|
|
||||||
|
/// <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>
|
||||||
|
Task<PunchCard> GetPunchCard(int repositoryId);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Returns a list of the number of commits per hour in each day
|
/// Returns a list of the number of commits per hour in each day
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -96,5 +163,13 @@ namespace Octokit
|
|||||||
/// <param name="cancellationToken">A token used to cancel this potentially long running request</param>
|
/// <param name="cancellationToken">A token used to cancel this potentially long running request</param>
|
||||||
/// <returns>Returns commit counts per hour in each day</returns>
|
/// <returns>Returns commit counts per hour in each day</returns>
|
||||||
Task<PunchCard> GetPunchCard(string owner, string name, CancellationToken cancellationToken);
|
Task<PunchCard> GetPunchCard(string owner, string name, CancellationToken cancellationToken);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Returns a list of the number of commits per hour in each day
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="repositoryId">The ID of the repository</param>
|
||||||
|
/// <param name="cancellationToken">A token used to cancel this potentially long running request</param>
|
||||||
|
/// <returns>Returns commit counts per hour in each day</returns>
|
||||||
|
Task<PunchCard> GetPunchCard(int repositoryId, CancellationToken cancellationToken);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -29,9 +29,22 @@ namespace Octokit
|
|||||||
/// <returns>A list of <see cref="Contributor"/></returns>
|
/// <returns>A list of <see cref="Contributor"/></returns>
|
||||||
public Task<IReadOnlyList<Contributor>> GetContributors(string owner, string name)
|
public Task<IReadOnlyList<Contributor>> GetContributors(string owner, string name)
|
||||||
{
|
{
|
||||||
|
Ensure.ArgumentNotNullOrEmptyString(owner, "owner");
|
||||||
|
Ensure.ArgumentNotNullOrEmptyString(name, "name");
|
||||||
|
|
||||||
return GetContributors(owner, name, CancellationToken.None);
|
return GetContributors(owner, name, CancellationToken.None);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <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 Task<IReadOnlyList<Contributor>> GetContributors(int repositoryId)
|
||||||
|
{
|
||||||
|
return GetContributors(repositoryId, CancellationToken.None);
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Returns a list of <see cref="Contributor"/> for the given repository
|
/// Returns a list of <see cref="Contributor"/> for the given repository
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -47,6 +60,17 @@ namespace Octokit
|
|||||||
return ApiConnection.GetQueuedOperation<Contributor>(ApiUrls.StatsContributors(owner, name), cancellationToken);
|
return ApiConnection.GetQueuedOperation<Contributor>(ApiUrls.StatsContributors(owner, name), cancellationToken);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Returns a list of <see cref="Contributor"/> for the given repository
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="repositoryId">The ID of the repository</param>
|
||||||
|
/// <param name="cancellationToken">A token used to cancel this potentially long running request</param>
|
||||||
|
/// <returns>A list of <see cref="Contributor"/></returns>
|
||||||
|
public Task<IReadOnlyList<Contributor>> GetContributors(int repositoryId, CancellationToken cancellationToken)
|
||||||
|
{
|
||||||
|
return ApiConnection.GetQueuedOperation<Contributor>(ApiUrls.StatsContributors(repositoryId), cancellationToken);
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Returns the last year of commit activity grouped by week.
|
/// Returns the last year of commit activity grouped by week.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -55,9 +79,22 @@ namespace Octokit
|
|||||||
/// <returns>The last year of <see cref="CommitActivity"/></returns>
|
/// <returns>The last year of <see cref="CommitActivity"/></returns>
|
||||||
public Task<CommitActivity> GetCommitActivity(string owner, string name)
|
public Task<CommitActivity> GetCommitActivity(string owner, string name)
|
||||||
{
|
{
|
||||||
|
Ensure.ArgumentNotNullOrEmptyString(owner, "owner");
|
||||||
|
Ensure.ArgumentNotNullOrEmptyString(name, "name");
|
||||||
|
|
||||||
return GetCommitActivity(owner, name, CancellationToken.None);
|
return GetCommitActivity(owner, name, CancellationToken.None);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <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 Task<CommitActivity> GetCommitActivity(int repositoryId)
|
||||||
|
{
|
||||||
|
return GetCommitActivity(repositoryId, CancellationToken.None);
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Returns the last year of commit activity grouped by week.
|
/// Returns the last year of commit activity grouped by week.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -75,6 +112,19 @@ namespace Octokit
|
|||||||
return new CommitActivity(activity);
|
return new CommitActivity(activity);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Returns the last year of commit activity grouped by week.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="repositoryId">The ID of the repository</param>
|
||||||
|
/// <param name="cancellationToken">A token used to cancel this potentially long running request</param>
|
||||||
|
/// <returns>The last year of <see cref="CommitActivity"/></returns>
|
||||||
|
public async Task<CommitActivity> GetCommitActivity(int repositoryId, CancellationToken cancellationToken)
|
||||||
|
{
|
||||||
|
var activity = await ApiConnection.GetQueuedOperation<WeeklyCommitActivity>(
|
||||||
|
ApiUrls.StatsCommitActivity(repositoryId), cancellationToken).ConfigureAwait(false);
|
||||||
|
return new CommitActivity(activity);
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Returns a weekly aggregate of the number of additions and deletions pushed to a repository.
|
/// Returns a weekly aggregate of the number of additions and deletions pushed to a repository.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -83,9 +133,22 @@ namespace Octokit
|
|||||||
/// <returns>Returns a weekly aggregate of the number additions and deletion</returns>
|
/// <returns>Returns a weekly aggregate of the number additions and deletion</returns>
|
||||||
public Task<CodeFrequency> GetCodeFrequency(string owner, string name)
|
public Task<CodeFrequency> GetCodeFrequency(string owner, string name)
|
||||||
{
|
{
|
||||||
|
Ensure.ArgumentNotNullOrEmptyString(owner, "owner");
|
||||||
|
Ensure.ArgumentNotNullOrEmptyString(name, "name");
|
||||||
|
|
||||||
return GetCodeFrequency(owner, name, CancellationToken.None);
|
return GetCodeFrequency(owner, name, CancellationToken.None);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <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 Task<CodeFrequency> GetCodeFrequency(int repositoryId)
|
||||||
|
{
|
||||||
|
return GetCodeFrequency(repositoryId, CancellationToken.None);
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Returns a weekly aggregate of the number of additions and deletions pushed to a repository.
|
/// Returns a weekly aggregate of the number of additions and deletions pushed to a repository.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -103,6 +166,19 @@ namespace Octokit
|
|||||||
return new CodeFrequency(rawFrequencies);
|
return new CodeFrequency(rawFrequencies);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <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>
|
||||||
|
/// <param name="cancellationToken">A token used to cancel this potentially long running request</param>
|
||||||
|
/// <returns>Returns a weekly aggregate of the number additions and deletion</returns>
|
||||||
|
public async Task<CodeFrequency> GetCodeFrequency(int repositoryId, CancellationToken cancellationToken)
|
||||||
|
{
|
||||||
|
var rawFrequencies = await ApiConnection.GetQueuedOperation<long[]>(
|
||||||
|
ApiUrls.StatsCodeFrequency(repositoryId), cancellationToken).ConfigureAwait(false);
|
||||||
|
return new CodeFrequency(rawFrequencies);
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Returns the total commit counts for the owner and total commit counts in total.
|
/// Returns the total commit counts for the owner and total commit counts in total.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -111,9 +187,22 @@ namespace Octokit
|
|||||||
/// <returns>Returns <see cref="Participation"/>from oldest week to now</returns>
|
/// <returns>Returns <see cref="Participation"/>from oldest week to now</returns>
|
||||||
public Task<Participation> GetParticipation(string owner, string name)
|
public Task<Participation> GetParticipation(string owner, string name)
|
||||||
{
|
{
|
||||||
|
Ensure.ArgumentNotNullOrEmptyString(owner, "owner");
|
||||||
|
Ensure.ArgumentNotNullOrEmptyString(name, "name");
|
||||||
|
|
||||||
return GetParticipation(owner, name, CancellationToken.None);
|
return GetParticipation(owner, name, CancellationToken.None);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <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 Task<Participation> GetParticipation(int repositoryId)
|
||||||
|
{
|
||||||
|
return GetParticipation(repositoryId, CancellationToken.None);
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Returns the total commit counts for the owner and total commit counts in total.
|
/// Returns the total commit counts for the owner and total commit counts in total.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -131,6 +220,19 @@ namespace Octokit
|
|||||||
return result.FirstOrDefault();
|
return result.FirstOrDefault();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <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>
|
||||||
|
/// <param name="cancellationToken">A token used to cancel this potentially long running request</param>
|
||||||
|
/// <returns>Returns <see cref="Participation"/>from oldest week to now</returns>
|
||||||
|
public async Task<Participation> GetParticipation(int repositoryId, CancellationToken cancellationToken)
|
||||||
|
{
|
||||||
|
var result = await ApiConnection.GetQueuedOperation<Participation>(
|
||||||
|
ApiUrls.StatsParticipation(repositoryId), cancellationToken).ConfigureAwait(false);
|
||||||
|
return result.FirstOrDefault();
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Returns a list of the number of commits per hour in each day
|
/// Returns a list of the number of commits per hour in each day
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -139,9 +241,22 @@ namespace Octokit
|
|||||||
/// <returns>Returns commit counts per hour in each day</returns>
|
/// <returns>Returns commit counts per hour in each day</returns>
|
||||||
public Task<PunchCard> GetPunchCard(string owner, string name)
|
public Task<PunchCard> GetPunchCard(string owner, string name)
|
||||||
{
|
{
|
||||||
|
Ensure.ArgumentNotNullOrEmptyString(owner, "owner");
|
||||||
|
Ensure.ArgumentNotNullOrEmptyString(name, "name");
|
||||||
|
|
||||||
return GetPunchCard(owner, name, CancellationToken.None);
|
return GetPunchCard(owner, name, CancellationToken.None);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <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 Task<PunchCard> GetPunchCard(int repositoryId)
|
||||||
|
{
|
||||||
|
return GetPunchCard(repositoryId, CancellationToken.None);
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Returns a list of the number of commits per hour in each day
|
/// Returns a list of the number of commits per hour in each day
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -158,5 +273,18 @@ namespace Octokit
|
|||||||
ApiUrls.StatsPunchCard(owner, name), cancellationToken).ConfigureAwait(false);
|
ApiUrls.StatsPunchCard(owner, name), cancellationToken).ConfigureAwait(false);
|
||||||
return new PunchCard(punchCardData);
|
return new PunchCard(punchCardData);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Returns a list of the number of commits per hour in each day
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="repositoryId">The ID of the repository</param>
|
||||||
|
/// <param name="cancellationToken">A token used to cancel this potentially long running request</param>
|
||||||
|
/// <returns>Returns commit counts per hour in each day</returns>
|
||||||
|
public async Task<PunchCard> GetPunchCard(int repositoryId, CancellationToken cancellationToken)
|
||||||
|
{
|
||||||
|
var punchCardData = await ApiConnection.GetQueuedOperation<int[]>(
|
||||||
|
ApiUrls.StatsPunchCard(repositoryId), cancellationToken).ConfigureAwait(false);
|
||||||
|
return new PunchCard(punchCardData);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user