コード例 #1
0
        /// <summary>
        /// Gets the commit information associated with a repository. By default, this call returns all the commits
        /// across all branches, bookmarks, and tags. The newest commit is first.
        /// </summary>
        /// <param name="accountName">The team or individual account owning the repo.</param>
        /// <param name="repoSlug">The repo identifier.</param>
        /// <param name="page">The page.</param>
        public BitBucketCommitsResponse GetCommits(string accountName, string repoSlug, int page = 0)
        {
            HttpStatusCode status;

            // Get the raw data from the API
            string contents = Raw.GetCommits(accountName, repoSlug, page, out status);

            // Validate the response
            if (status != HttpStatusCode.OK)
            {
                throw new BitBucketHttpException(status);
            }

            // Parse the JSON
            return(BitBucketCommitsResponse.ParseJson(contents));
        }
コード例 #2
0
 /// <summary>
 /// Gets the commit information associated with a repository. By default, this call returns all the commits
 /// across all branches, bookmarks, and tags. The newest commit is first.
 /// </summary>
 /// <param name="accountName">The team or individual account owning the repo.</param>
 /// <param name="repoSlug">The repo identifier.</param>
 /// <param name="options">The options for the call to the API.</param>
 public BitBucketCommitsResponse GetCommits(string accountName, string repoSlug, BitBucketCommitsOptions options)
 {
     return(BitBucketCommitsResponse.ParseResponse(Raw.GetCommits(accountName, repoSlug, options)));
 }
コード例 #3
0
 /// <summary>
 /// Gets the commit information associated with a repository. By default, this call returns all the commits
 /// across all branches, bookmarks, and tags. The newest commit is first.
 /// </summary>
 /// <param name="accountName">The team or individual account owning the repo.</param>
 /// <param name="repoSlug">The repo identifier.</param>
 /// <param name="page">The page.</param>
 public BitBucketCommitsResponse GetCommits(string accountName, string repoSlug, int page = 0)
 {
     return(BitBucketCommitsResponse.ParseResponse(Raw.GetCommits(accountName, repoSlug, page)));
 }