def post_project_with_http_info(self, **kwargs): # noqa: E501 """Create project # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.post_project_with_http_info(async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param Project body: :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: tuple(Project, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread. """ local_var_params = locals() all_params = ['body'] all_params.extend([ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout' ]) for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise ApiTypeError("Got an unexpected keyword argument '%s'" " to method post_project" % key) local_var_params[key] = val del local_var_params['kwargs'] collection_formats = {} path_params = {} query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None if 'body' in local_var_params: body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json', 'application/ld+json']) # noqa: E501 # HTTP header `Content-Type` header_params[ 'Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json']) # noqa: E501 # Authentication setting auth_settings = [] # noqa: E501 return self.api_client.call_api( '/projects', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='Project', # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get( '_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats)
def get_head_commit_by_project_with_http_info(self, project_id, **kwargs): # noqa: E501 """Get head commit by project # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_head_commit_by_project_with_http_info(project_id, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param str project_id: ID of the project (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: tuple(Commit, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread. """ local_var_params = locals() all_params = [ 'project_id' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout' ] ) for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method get_head_commit_by_project" % key ) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'project_id' is set if self.api_client.client_side_validation and ('project_id' not in local_var_params or # noqa: E501 local_var_params['project_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `project_id` when calling `get_head_commit_by_project`") # noqa: E501 collection_formats = {} path_params = {} if 'project_id' in local_var_params: path_params['projectId'] = local_var_params['project_id'] # noqa: E501 query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # Authentication setting auth_settings = [] # noqa: E501 return self.api_client.call_api( '/projects/{projectId}/head', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='Commit', # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats)
def get_relationships_by_project_commit_related_element_with_http_info(self, project_id, commit_id, related_element_id, **kwargs): # noqa: E501 """Get relationships by project, commit, and related element # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_relationships_by_project_commit_related_element_with_http_info(project_id, commit_id, related_element_id, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param str project_id: ID of the project (required) :param str commit_id: ID of the commit (required) :param str related_element_id: ID of the related element (required) :param str direction: Filter for relationships that are incoming (in), outgoing (out), or both relative to the related element :param str page_after: Page after :param str page_before: Page before :param int page_size: Page size :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: tuple(list[Relationship], status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread. """ local_var_params = locals() all_params = [ 'project_id', 'commit_id', 'related_element_id', 'direction', 'page_after', 'page_before', 'page_size' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout' ] ) for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method get_relationships_by_project_commit_related_element" % key ) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'project_id' is set if self.api_client.client_side_validation and ('project_id' not in local_var_params or # noqa: E501 local_var_params['project_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `project_id` when calling `get_relationships_by_project_commit_related_element`") # noqa: E501 # verify the required parameter 'commit_id' is set if self.api_client.client_side_validation and ('commit_id' not in local_var_params or # noqa: E501 local_var_params['commit_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `commit_id` when calling `get_relationships_by_project_commit_related_element`") # noqa: E501 # verify the required parameter 'related_element_id' is set if self.api_client.client_side_validation and ('related_element_id' not in local_var_params or # noqa: E501 local_var_params['related_element_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `related_element_id` when calling `get_relationships_by_project_commit_related_element`") # noqa: E501 collection_formats = {} path_params = {} if 'project_id' in local_var_params: path_params['projectId'] = local_var_params['project_id'] # noqa: E501 if 'commit_id' in local_var_params: path_params['commitId'] = local_var_params['commit_id'] # noqa: E501 if 'related_element_id' in local_var_params: path_params['relatedElementId'] = local_var_params['related_element_id'] # noqa: E501 query_params = [] if 'direction' in local_var_params and local_var_params['direction'] is not None: # noqa: E501 query_params.append(('direction', local_var_params['direction'])) # noqa: E501 if 'page_after' in local_var_params and local_var_params['page_after'] is not None: # noqa: E501 query_params.append(('page[after]', local_var_params['page_after'])) # noqa: E501 if 'page_before' in local_var_params and local_var_params['page_before'] is not None: # noqa: E501 query_params.append(('page[before]', local_var_params['page_before'])) # noqa: E501 if 'page_size' in local_var_params and local_var_params['page_size'] is not None: # noqa: E501 query_params.append(('page[size]', local_var_params['page_size'])) # noqa: E501 header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json', 'application/ld+json']) # noqa: E501 # Authentication setting auth_settings = [] # noqa: E501 return self.api_client.call_api( '/projects/{projectId}/commits/{commitId}/elements/{relatedElementId}/relationships', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='list[Relationship]', # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats)