StatsPunchCard() public static method

Returns the Uri for the punch card for the given repository
public static StatsPunchCard ( long repositoryId ) : Uri
repositoryId long The Id of the repository
return Uri
Esempio n. 1
0
        /// <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>
        public async Task <PunchCard> GetPunchCard(long repositoryId, CancellationToken cancellationToken)
        {
            var punchCardData = await ApiConnection.GetQueuedOperation <int[]>(
                ApiUrls.StatsPunchCard(repositoryId), cancellationToken).ConfigureAwait(false);

            return(new PunchCard(punchCardData));
        }
        public async Task <PunchCard> GetPunchCard(string owner, string name, CancellationToken cancellationToken)
        {
            Ensure.ArgumentNotNullOrEmptyString(owner, nameof(owner));
            Ensure.ArgumentNotNullOrEmptyString(name, nameof(name));

            var punchCardData = await ApiConnection.GetQueuedOperation <int[]>(ApiUrls.StatsPunchCard(owner, name), cancellationToken).ConfigureAwait(false);

            return(new PunchCard(punchCardData));
        }