using System.Collections.Generic; using System.Threading; using System.Threading.Tasks; namespace Octokit { /// /// A client for GitHub's Repository Statistics API. /// Note that the GitHub API uses caching on these endpoints, /// see a word about caching for more details. /// /// /// 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(long 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(long 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(long 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(long 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(long 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(long 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(long 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(long 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(long 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(long repositoryId, CancellationToken cancellationToken); } }