using System.Collections.Generic; using System.Threading; using System.Threading.Tasks; namespace Octokit { /// /// A client for GitHub's Repository Statistics API. /// /// /// See the Repository Statistics API documentation for more information. /// public interface IStatisticsClient { /// /// Returns a list of for the given repository /// /// The owner of the repository /// The name of the repository Task> GetContributors(string owner, string name); /// /// Returns a list of for the given repository /// /// The ID of the repository Task> GetContributors(int repositoryId); /// /// Returns a list of for the given repository /// /// The owner of the repository /// The name of the repository /// A token used to cancel this potentially long running request Task> GetContributors(string owner, string name, CancellationToken cancellationToken); /// /// Returns a list of for the given repository /// /// The ID of the repository /// A token used to cancel this potentially long running request Task> GetContributors(int repositoryId, CancellationToken cancellationToken); /// /// Returns the last year of commit activity grouped by week. /// /// The owner of the repository /// The name of the repository Task GetCommitActivity(string owner, string name); /// /// Returns the last year of commit activity grouped by week. /// /// The ID of the repository Task GetCommitActivity(int repositoryId); /// /// Returns the last year of commit activity grouped by week. /// /// The owner of the repository /// The name of the repository /// A token used to cancel this potentially long running request Task GetCommitActivity(string owner, string name, CancellationToken cancellationToken); /// /// Returns the last year of commit activity grouped by week. /// /// The ID of the repository /// A token used to cancel this potentially long running request Task GetCommitActivity(int repositoryId, CancellationToken cancellationToken); /// /// Returns a weekly aggregate of the number of additions and deletions pushed to a repository. /// /// The owner of the repository /// The name of the repository Task GetCodeFrequency(string owner, string name); /// /// Returns a weekly aggregate of the number of additions and deletions pushed to a repository. /// /// The ID of the repository Task GetCodeFrequency(int repositoryId); /// /// Returns a weekly aggregate of the number of additions and deletions pushed to a repository. /// /// The owner of the repository /// The name of the repository /// A token used to cancel this potentially long running request Task GetCodeFrequency(string owner, string name, CancellationToken cancellationToken); /// /// Returns a weekly aggregate of the number of additions and deletions pushed to a repository. /// /// The ID of the repository /// A token used to cancel this potentially long running request Task GetCodeFrequency(int repositoryId, CancellationToken cancellationToken); /// /// Returns the total commit counts for the owner and total commit counts in total. /// /// The owner of the repository /// The name of the repository Task GetParticipation(string owner, string name); /// /// Returns the total commit counts for the owner and total commit counts in total. /// /// The ID of the repository Task GetParticipation(int repositoryId); /// /// Returns the total commit counts for the owner and total commit counts in total. /// /// The owner of the repository /// The name of the repository /// A token used to cancel this potentially long running request Task GetParticipation(string owner, string name, CancellationToken cancellationToken); /// /// Returns the total commit counts for the owner and total commit counts in total. /// /// The ID of the repository /// A token used to cancel this potentially long running request Task GetParticipation(int repositoryId, CancellationToken cancellationToken); /// /// Returns a list of the number of commits per hour in each day /// /// The owner of the repository /// The name of the repository Task GetPunchCard(string owner, string name); /// /// Returns a list of the number of commits per hour in each day /// /// The ID of the repository Task GetPunchCard(int repositoryId); /// /// Returns a list of the number of commits per hour in each day /// /// The owner of the repository /// The name of the repository /// A token used to cancel this potentially long running request Task GetPunchCard(string owner, string name, CancellationToken cancellationToken); /// /// Returns a list of the number of commits per hour in each day /// /// The ID of the repository /// A token used to cancel this potentially long running request Task GetPunchCard(int repositoryId, CancellationToken cancellationToken); } }