Example #1
0
        public async Task <Repository> Create(string projectKey, Repository repository)
        {
            string requestUrl = UrlBuilder.FormatRestApiUrl(MANY_REPOSITORIES, null, projectKey);

            Repository response = await _httpWorker.PostAsync <Repository>(requestUrl, repository).ConfigureAwait(false);

            return(response);
        }
Example #2
0
        /*
         * public async Task<ResponseWrapper<Project>> Get(RequestOptions requestOptions = null)
         * {
         *  string requestUrl = UrlBuilder.FormatRestApiUrl(MANY_GROUPS, requestOptions);
         *
         *  ResponseWrapper<Project> response = await _httpWorker.GetAsync<ResponseWrapper<Project>>(requestUrl).ConfigureAwait(false);
         *
         *  return response;
         * }
         *
         * public async Task<ResponseWrapper<Project>> Get(string filter, RequestOptions requestOptions = null)
         * {
         *  string requestUrl = UrlBuilder.FormatRestApiUrl(MANY_GROUPS + "?filter={0}", requestOptions, filter);
         *
         *  ResponseWrapper<Project> response = await _httpWorker.GetAsync<ResponseWrapper<Project>>(requestUrl).ConfigureAwait(false);
         *
         *  return response;
         * }*/

        public async Task <bool> Create(string name, string displayName, string emailAddress, string password)
        {
            string requestUrl = UrlBuilder.FormatRestApiUrl(CREATE_USER_SILENT, null, name, displayName, emailAddress, password);

            string response = await _httpWorker.PostAsync <string>(requestUrl, null).ConfigureAwait(false);

            return(string.IsNullOrWhiteSpace(response));
        }
Example #3
0
        public async Task <PullRequest> Create(string projectKey, string repositorySlug, PullRequest pullRequest)
        {
            string requestUrl = UrlBuilder.FormatRestApiUrl(PULL_REQUEST, null, projectKey, repositorySlug);

            PullRequest pr = await _httpWorker.PostAsync(requestUrl, pullRequest);

            return(pr);
        }
Example #4
0
        // branch Utils API
        public async Task <Branch> Create(string projectKey, string repositorySlug, Branch branch)
        {
            string requestUrl = UrlBuilder.FormatRestApiUrl(MANAGE_BRANCHES, null, projectKey, repositorySlug);

            Branch response = await _httpWorker.PostAsync(requestUrl, branch).ConfigureAwait(false);

            return(response);
        }
Example #5
0
        public async Task <Project> Create(Project project)
        {
            string requestUrl = UrlBuilder.FormatRestApiUrl(MANY_PROJECTS);

            Project response = await _httpWorker.PostAsync <Project>(requestUrl, project).ConfigureAwait(false);

            return(response);
        }
        public async Task <DefaultReviewerConditionRequest> Create(string projectKey, string repositorySlug, DefaultReviewerConditionRequest condition)
        {
            string requestUrl = UrlBuilder.FormatRestApiUrl(CONDITION, null, projectKey, repositorySlug);

            DefaultReviewerConditionRequest response = await _httpWorker.PostAsync <DefaultReviewerConditionRequest>(requestUrl, condition).ConfigureAwait(false);

            return(response);
        }
Example #7
0
        public async Task <Group> Create(string name)
        {
            string requestUrl = UrlBuilder.FormatRestApiUrl(SINGLE_GROUP, null, name);

            Group response = await _httpWorker.PostAsync <Group>(requestUrl, null).ConfigureAwait(false);

            return(response);
        }
Example #8
0
        public async Task Create(string name, string displayName, string emailAddress, string password)
        {
            string requestUrl = UrlBuilder.FormatRestApiUrl(CREATE_USER_SILENT, null, name, displayName, emailAddress, password);

            await _httpWorker.PostAsync <string>(requestUrl, null).ConfigureAwait(false);
        }