Пример #1
0
        /// <summary>
        /// List comments associated with this resource.
        /// </summary>
        /// <param name="parameters">Parameters for the query.</param>
        public List <TComment> ListComments(ListParameters parameters)
        {
            _ = parameters ?? throw new ArgumentNullException(nameof(parameters));

            return(_sharpBucketV2.GetPaginatedValues <TComment>(
                       _baseUrl, parameters.Max, parameters.ToDictionary()));
        }
Пример #2
0
 /// <summary>
 /// List issues on the repository.
 /// </summary>
 /// <param name="parameters">Parameters for the query.</param>
 public List <Issue> ListIssues(ListParameters parameters)
 {
     if (parameters == null)
     {
         throw new ArgumentNullException(nameof(parameters));
     }
     return(GetPaginatedValues <Issue>(_baseUrl, parameters.Max, parameters.ToDictionary()));
 }
        internal List <TreeEntry> ListTreeEntries(string srcResourcePath, string subDirPath = null, ListParameters listParameters = null)
        {
            var overrideUrl = UrlHelper.ConcatPathSegments(_baseUrl, srcResourcePath, subDirPath);

            return(listParameters == null
                ? GetPaginatedValues <TreeEntry>(overrideUrl)
                : GetPaginatedValues <TreeEntry>(overrideUrl, listParameters.Max, listParameters.ToDictionary()));
        }
        /// <summary>
        /// List of repositories associated with an account. If the caller is properly authenticated and authorized,
        /// this method returns a collection containing public and private repositories.
        /// Otherwise, this method returns a collection of the public repositories.
        /// </summary>
        /// <param name="accountName">The account whose repositories you wish to get.</param>
        /// <param name="parameters">Parameters for the query.</param>
        /// <returns></returns>
        public List <Repository> ListRepositories(string accountName, ListParameters parameters)
        {
            if (parameters == null)
            {
                throw new ArgumentNullException(nameof(parameters));
            }

            var overrideUrl = $"{_baseUrl}{accountName.GuidOrValue()}/";

            return(GetPaginatedValues <Repository>(overrideUrl, parameters.Max, parameters.ToDictionary()));
        }
        internal List <Tag> ListTags(string accountName, string slug, ListParameters parameters)
        {
            var overrideUrl = GetRepositoryUrl(accountName, slug, "refs/tags/");

            return(GetPaginatedValues <Tag>(overrideUrl, parameters.Max, parameters.ToDictionary()));
        }
        internal List <PullRequest> ListPullRequests(string accountName, string slug, ListParameters parameters)
        {
            var overrideUrl = GetRepositoryUrl(accountName, slug, "pullrequests/");

            return(GetPaginatedValues <PullRequest>(overrideUrl, parameters.Max, parameters.ToDictionary()));
        }
Пример #7
0
        public List <Project> ListProjects(ListParameters parameters)
        {
            _ = parameters ?? throw new ArgumentNullException(nameof(parameters));
            var overrideUrl = _baseUrl + "projects/";

            return(_sharpBucketV2.GetPaginatedValues <Project>(overrideUrl, parameters.Max, parameters.ToDictionary()));
        }