StatsCodeFrequency() public static method

Returns the Uri for the code frequency for the given repository
public static StatsCodeFrequency ( long repositoryId ) : Uri
repositoryId long The Id of the repository
return Uri
Esempio n. 1
0
        /// <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>
        public async Task <CodeFrequency> GetCodeFrequency(long repositoryId, CancellationToken cancellationToken)
        {
            var rawFrequencies = await ApiConnection.GetQueuedOperation <long[]>(
                ApiUrls.StatsCodeFrequency(repositoryId), cancellationToken).ConfigureAwait(false);

            return(new CodeFrequency(rawFrequencies));
        }
        public async Task <CodeFrequency> GetCodeFrequency(string owner, string name, CancellationToken cancellationToken)
        {
            Ensure.ArgumentNotNullOrEmptyString(owner, nameof(owner));
            Ensure.ArgumentNotNullOrEmptyString(name, nameof(name));

            var rawFrequencies = await ApiConnection.GetQueuedOperation <long[]>(ApiUrls.StatsCodeFrequency(owner, name), cancellationToken).ConfigureAwait(false);

            return(new CodeFrequency(rawFrequencies));
        }