lentiq.api.code_blocks_public_api_controller_api module
# coding: utf-8 """ """ from __future__ import absolute_import import re # noqa: F401 # python 2 and python 3 compatibility library import six from lentiq.api_client import ApiClient class CodeBlocksPublicApiControllerApi(object): """ Ref: """ def __init__(self, api_client=None): if api_client is None: api_client = ApiClient() self.api_client = api_client def create_datalake_code_block(self, body, authorization, datalake_id, **kwargs): # noqa: E501 """Creates a code block with datalake visibility from a container image or from a Jupyter notebook. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.create_datalake_code_block(body, authorization, datalake_id, async_req=True) >>> result = thread.get() :param async_req bool :param CodeBlock body: codeBlock (required) :param str authorization: Authorization (required) :param int datalake_id: datalakeId (required) :return: CodeBlock If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.create_datalake_code_block_with_http_info(body, authorization, datalake_id, **kwargs) # noqa: E501 else: (data) = self.create_datalake_code_block_with_http_info(body, authorization, datalake_id, **kwargs) # noqa: E501 return data def create_datalake_code_block_with_http_info(self, body, authorization, datalake_id, **kwargs): # noqa: E501 """Creates a code block with datalake visibility from a container image or from a Jupyter notebook. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.create_datalake_code_block_with_http_info(body, authorization, datalake_id, async_req=True) >>> result = thread.get() :param async_req bool :param CodeBlock body: codeBlock (required) :param str authorization: Authorization (required) :param int datalake_id: datalakeId (required) :return: CodeBlock If the method is called asynchronously, returns the request thread. """ all_params = ['body', 'authorization', 'datalake_id'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method create_datalake_code_block" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'body' is set if ('body' not in params or params['body'] is None): raise ValueError("Missing the required parameter `body` when calling `create_datalake_code_block`") # noqa: E501 # verify the required parameter 'authorization' is set if ('authorization' not in params or params['authorization'] is None): raise ValueError("Missing the required parameter `authorization` when calling `create_datalake_code_block`") # noqa: E501 # verify the required parameter 'datalake_id' is set if ('datalake_id' not in params or params['datalake_id'] is None): raise ValueError("Missing the required parameter `datalake_id` when calling `create_datalake_code_block`") # noqa: E501 collection_formats = {} path_params = {} if 'datalake_id' in params: path_params['datalakeId'] = params['datalake_id'] # noqa: E501 query_params = [] header_params = {} if 'authorization' in params: header_params['Authorization'] = params['authorization'] # noqa: E501 form_params = [] local_var_files = {} body_params = None if 'body' in params: body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # 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( '/api/v1/codeblocks/create/datalakeId/{datalakeId}', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='CodeBlock', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def create_datapool_code_block(self, body, authorization, datalake_id, datapool_name, **kwargs): # noqa: E501 """Creates a code block with datapool visibility from a container image or from a Jupyter notebook. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.create_datapool_code_block(body, authorization, datalake_id, datapool_name, async_req=True) >>> result = thread.get() :param async_req bool :param CodeBlock body: codeBlock (required) :param str authorization: Authorization (required) :param int datalake_id: datalakeId (required) :param str datapool_name: datapoolName (required) :return: CodeBlock If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.create_datapool_code_block_with_http_info(body, authorization, datalake_id, datapool_name, **kwargs) # noqa: E501 else: (data) = self.create_datapool_code_block_with_http_info(body, authorization, datalake_id, datapool_name, **kwargs) # noqa: E501 return data def create_datapool_code_block_with_http_info(self, body, authorization, datalake_id, datapool_name, **kwargs): # noqa: E501 """Creates a code block with datapool visibility from a container image or from a Jupyter notebook. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.create_datapool_code_block_with_http_info(body, authorization, datalake_id, datapool_name, async_req=True) >>> result = thread.get() :param async_req bool :param CodeBlock body: codeBlock (required) :param str authorization: Authorization (required) :param int datalake_id: datalakeId (required) :param str datapool_name: datapoolName (required) :return: CodeBlock If the method is called asynchronously, returns the request thread. """ all_params = ['body', 'authorization', 'datalake_id', 'datapool_name'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method create_datapool_code_block" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'body' is set if ('body' not in params or params['body'] is None): raise ValueError("Missing the required parameter `body` when calling `create_datapool_code_block`") # noqa: E501 # verify the required parameter 'authorization' is set if ('authorization' not in params or params['authorization'] is None): raise ValueError("Missing the required parameter `authorization` when calling `create_datapool_code_block`") # noqa: E501 # verify the required parameter 'datalake_id' is set if ('datalake_id' not in params or params['datalake_id'] is None): raise ValueError("Missing the required parameter `datalake_id` when calling `create_datapool_code_block`") # noqa: E501 # verify the required parameter 'datapool_name' is set if ('datapool_name' not in params or params['datapool_name'] is None): raise ValueError("Missing the required parameter `datapool_name` when calling `create_datapool_code_block`") # noqa: E501 collection_formats = {} path_params = {} if 'datalake_id' in params: path_params['datalakeId'] = params['datalake_id'] # noqa: E501 if 'datapool_name' in params: path_params['datapoolName'] = params['datapool_name'] # noqa: E501 query_params = [] header_params = {} if 'authorization' in params: header_params['Authorization'] = params['authorization'] # noqa: E501 form_params = [] local_var_files = {} body_params = None if 'body' in params: body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # 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( '/api/v1/codeblocks/create/datalakeId/{datalakeId}/datapoolName/{datapoolName}', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='CodeBlock', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def create_project_code_block(self, body, authorization, datalake_id, datapool_name, project_name, **kwargs): # noqa: E501 """Creates a code block with project visibility from a container image or from a Jupyter notebook. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.create_project_code_block(body, authorization, datalake_id, datapool_name, project_name, async_req=True) >>> result = thread.get() :param async_req bool :param CodeBlock body: codeBlock (required) :param str authorization: Authorization (required) :param int datalake_id: datalakeId (required) :param str datapool_name: datapoolName (required) :param str project_name: projectName (required) :return: CodeBlock If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.create_project_code_block_with_http_info(body, authorization, datalake_id, datapool_name, project_name, **kwargs) # noqa: E501 else: (data) = self.create_project_code_block_with_http_info(body, authorization, datalake_id, datapool_name, project_name, **kwargs) # noqa: E501 return data def create_project_code_block_with_http_info(self, body, authorization, datalake_id, datapool_name, project_name, **kwargs): # noqa: E501 """Creates a code block with project visibility from a container image or from a Jupyter notebook. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.create_project_code_block_with_http_info(body, authorization, datalake_id, datapool_name, project_name, async_req=True) >>> result = thread.get() :param async_req bool :param CodeBlock body: codeBlock (required) :param str authorization: Authorization (required) :param int datalake_id: datalakeId (required) :param str datapool_name: datapoolName (required) :param str project_name: projectName (required) :return: CodeBlock If the method is called asynchronously, returns the request thread. """ all_params = ['body', 'authorization', 'datalake_id', 'datapool_name', 'project_name'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method create_project_code_block" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'body' is set if ('body' not in params or params['body'] is None): raise ValueError("Missing the required parameter `body` when calling `create_project_code_block`") # noqa: E501 # verify the required parameter 'authorization' is set if ('authorization' not in params or params['authorization'] is None): raise ValueError("Missing the required parameter `authorization` when calling `create_project_code_block`") # noqa: E501 # verify the required parameter 'datalake_id' is set if ('datalake_id' not in params or params['datalake_id'] is None): raise ValueError("Missing the required parameter `datalake_id` when calling `create_project_code_block`") # noqa: E501 # verify the required parameter 'datapool_name' is set if ('datapool_name' not in params or params['datapool_name'] is None): raise ValueError("Missing the required parameter `datapool_name` when calling `create_project_code_block`") # noqa: E501 # verify the required parameter 'project_name' is set if ('project_name' not in params or params['project_name'] is None): raise ValueError("Missing the required parameter `project_name` when calling `create_project_code_block`") # noqa: E501 collection_formats = {} path_params = {} if 'datalake_id' in params: path_params['datalakeId'] = params['datalake_id'] # noqa: E501 if 'datapool_name' in params: path_params['datapoolName'] = params['datapool_name'] # noqa: E501 if 'project_name' in params: path_params['projectName'] = params['project_name'] # noqa: E501 query_params = [] header_params = {} if 'authorization' in params: header_params['Authorization'] = params['authorization'] # noqa: E501 form_params = [] local_var_files = {} body_params = None if 'body' in params: body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # 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( '/api/v1/codeblocks/create/datalakeId/{datalakeId}/datapoolName/{datapoolName}/projectName/{projectName}', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='CodeBlock', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def delete_code_block(self, body, authorization, **kwargs): # noqa: E501 """Deletes a non-public code block. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.delete_code_block(body, authorization, async_req=True) >>> result = thread.get() :param async_req bool :param InformationForm body: informationForm (required) :param str authorization: Authorization (required) :return: CodeBlock If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.delete_code_block_with_http_info(body, authorization, **kwargs) # noqa: E501 else: (data) = self.delete_code_block_with_http_info(body, authorization, **kwargs) # noqa: E501 return data def delete_code_block_with_http_info(self, body, authorization, **kwargs): # noqa: E501 """Deletes a non-public code block. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.delete_code_block_with_http_info(body, authorization, async_req=True) >>> result = thread.get() :param async_req bool :param InformationForm body: informationForm (required) :param str authorization: Authorization (required) :return: CodeBlock If the method is called asynchronously, returns the request thread. """ all_params = ['body', 'authorization'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method delete_code_block" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'body' is set if ('body' not in params or params['body'] is None): raise ValueError("Missing the required parameter `body` when calling `delete_code_block`") # noqa: E501 # verify the required parameter 'authorization' is set if ('authorization' not in params or params['authorization'] is None): raise ValueError("Missing the required parameter `authorization` when calling `delete_code_block`") # noqa: E501 collection_formats = {} path_params = {} query_params = [] header_params = {} if 'authorization' in params: header_params['Authorization'] = params['authorization'] # noqa: E501 form_params = [] local_var_files = {} body_params = None if 'body' in params: body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['*/*']) # noqa: E501 # Authentication setting auth_settings = [] # noqa: E501 return self.api_client.call_api( '/api/v1/codeblocks/delete', 'DELETE', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='CodeBlock', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def edit_code_block_metadata(self, body, authorization, **kwargs): # noqa: E501 """Edits the metadata of a non-public code block. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.edit_code_block_metadata(body, authorization, async_req=True) >>> result = thread.get() :param async_req bool :param EditMetadataForm body: editMetadataForm (required) :param str authorization: Authorization (required) :return: CodeBlock If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.edit_code_block_metadata_with_http_info(body, authorization, **kwargs) # noqa: E501 else: (data) = self.edit_code_block_metadata_with_http_info(body, authorization, **kwargs) # noqa: E501 return data def edit_code_block_metadata_with_http_info(self, body, authorization, **kwargs): # noqa: E501 """Edits the metadata of a non-public code block. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.edit_code_block_metadata_with_http_info(body, authorization, async_req=True) >>> result = thread.get() :param async_req bool :param EditMetadataForm body: editMetadataForm (required) :param str authorization: Authorization (required) :return: CodeBlock If the method is called asynchronously, returns the request thread. """ all_params = ['body', 'authorization'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method edit_code_block_metadata" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'body' is set if ('body' not in params or params['body'] is None): raise ValueError("Missing the required parameter `body` when calling `edit_code_block_metadata`") # noqa: E501 # verify the required parameter 'authorization' is set if ('authorization' not in params or params['authorization'] is None): raise ValueError("Missing the required parameter `authorization` when calling `edit_code_block_metadata`") # noqa: E501 collection_formats = {} path_params = {} query_params = [] header_params = {} if 'authorization' in params: header_params['Authorization'] = params['authorization'] # noqa: E501 form_params = [] local_var_files = {} body_params = None if 'body' in params: body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # 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( '/api/v1/codeblocks/editMetadata', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='CodeBlock', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def info_code_block(self, body, authorization, **kwargs): # noqa: E501 """Returns information regarding a code block. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.info_code_block(body, authorization, async_req=True) >>> result = thread.get() :param async_req bool :param InformationForm body: informationForm (required) :param str authorization: Authorization (required) :return: CodeBlock If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.info_code_block_with_http_info(body, authorization, **kwargs) # noqa: E501 else: (data) = self.info_code_block_with_http_info(body, authorization, **kwargs) # noqa: E501 return data def info_code_block_with_http_info(self, body, authorization, **kwargs): # noqa: E501 """Returns information regarding a code block. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.info_code_block_with_http_info(body, authorization, async_req=True) >>> result = thread.get() :param async_req bool :param InformationForm body: informationForm (required) :param str authorization: Authorization (required) :return: CodeBlock If the method is called asynchronously, returns the request thread. """ all_params = ['body', 'authorization'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method info_code_block" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'body' is set if ('body' not in params or params['body'] is None): raise ValueError("Missing the required parameter `body` when calling `info_code_block`") # noqa: E501 # verify the required parameter 'authorization' is set if ('authorization' not in params or params['authorization'] is None): raise ValueError("Missing the required parameter `authorization` when calling `info_code_block`") # noqa: E501 collection_formats = {} path_params = {} query_params = [] header_params = {} if 'authorization' in params: header_params['Authorization'] = params['authorization'] # noqa: E501 form_params = [] local_var_files = {} body_params = None if 'body' in params: body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # 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( '/api/v1/codeblocks/info', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='CodeBlock', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def list_code_blocks(self, authorization, labels, **kwargs): # noqa: E501 """Lists all code blocks. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.list_code_blocks(authorization, labels, async_req=True) >>> result = thread.get() :param async_req bool :param str authorization: Authorization (required) :param list[str] labels: labels (required) :return: dict(str, CodeBlock) If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.list_code_blocks_with_http_info(authorization, labels, **kwargs) # noqa: E501 else: (data) = self.list_code_blocks_with_http_info(authorization, labels, **kwargs) # noqa: E501 return data def list_code_blocks_with_http_info(self, authorization, labels, **kwargs): # noqa: E501 """Lists all code blocks. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.list_code_blocks_with_http_info(authorization, labels, async_req=True) >>> result = thread.get() :param async_req bool :param str authorization: Authorization (required) :param list[str] labels: labels (required) :return: dict(str, CodeBlock) If the method is called asynchronously, returns the request thread. """ all_params = ['authorization', 'labels'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method list_code_blocks" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'authorization' is set if ('authorization' not in params or params['authorization'] is None): raise ValueError("Missing the required parameter `authorization` when calling `list_code_blocks`") # noqa: E501 # verify the required parameter 'labels' is set if ('labels' not in params or params['labels'] is None): raise ValueError("Missing the required parameter `labels` when calling `list_code_blocks`") # noqa: E501 collection_formats = {} path_params = {} query_params = [] if 'labels' in params: query_params.append(('labels', params['labels'])) # noqa: E501 collection_formats['labels'] = 'multi' # noqa: E501 header_params = {} if 'authorization' in params: header_params['Authorization'] = params['authorization'] # noqa: E501 form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # noqa: E501 # Authentication setting auth_settings = [] # noqa: E501 return self.api_client.call_api( '/api/v1/codeblocks/list', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='dict(str, CodeBlock)', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def list_filtered_code_blocks(self, authorization, labels, **kwargs): # noqa: E501 """Lists all code blocks, filtered by publish and subscription status. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.list_filtered_code_blocks(authorization, labels, async_req=True) >>> result = thread.get() :param async_req bool :param str authorization: Authorization (required) :param list[str] labels: labels (required) :return: AllFilteredCodeBlocks If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.list_filtered_code_blocks_with_http_info(authorization, labels, **kwargs) # noqa: E501 else: (data) = self.list_filtered_code_blocks_with_http_info(authorization, labels, **kwargs) # noqa: E501 return data def list_filtered_code_blocks_with_http_info(self, authorization, labels, **kwargs): # noqa: E501 """Lists all code blocks, filtered by publish and subscription status. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.list_filtered_code_blocks_with_http_info(authorization, labels, async_req=True) >>> result = thread.get() :param async_req bool :param str authorization: Authorization (required) :param list[str] labels: labels (required) :return: AllFilteredCodeBlocks If the method is called asynchronously, returns the request thread. """ all_params = ['authorization', 'labels'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method list_filtered_code_blocks" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'authorization' is set if ('authorization' not in params or params['authorization'] is None): raise ValueError("Missing the required parameter `authorization` when calling `list_filtered_code_blocks`") # noqa: E501 # verify the required parameter 'labels' is set if ('labels' not in params or params['labels'] is None): raise ValueError("Missing the required parameter `labels` when calling `list_filtered_code_blocks`") # noqa: E501 collection_formats = {} path_params = {} query_params = [] if 'labels' in params: query_params.append(('labels', params['labels'])) # noqa: E501 collection_formats['labels'] = 'multi' # noqa: E501 header_params = {} if 'authorization' in params: header_params['Authorization'] = params['authorization'] # noqa: E501 form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # noqa: E501 # Authentication setting auth_settings = [] # noqa: E501 return self.api_client.call_api( '/api/v1/codeblocks/listFiltered', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='AllFilteredCodeBlocks', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def subscribe_to_code_block(self, body, authorization, **kwargs): # noqa: E501 """Subscribes the user to a code block. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.subscribe_to_code_block(body, authorization, async_req=True) >>> result = thread.get() :param async_req bool :param InformationForm body: informationForm (required) :param str authorization: Authorization (required) :return: CodeBlock If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.subscribe_to_code_block_with_http_info(body, authorization, **kwargs) # noqa: E501 else: (data) = self.subscribe_to_code_block_with_http_info(body, authorization, **kwargs) # noqa: E501 return data def subscribe_to_code_block_with_http_info(self, body, authorization, **kwargs): # noqa: E501 """Subscribes the user to a code block. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.subscribe_to_code_block_with_http_info(body, authorization, async_req=True) >>> result = thread.get() :param async_req bool :param InformationForm body: informationForm (required) :param str authorization: Authorization (required) :return: CodeBlock If the method is called asynchronously, returns the request thread. """ all_params = ['body', 'authorization'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method subscribe_to_code_block" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'body' is set if ('body' not in params or params['body'] is None): raise ValueError("Missing the required parameter `body` when calling `subscribe_to_code_block`") # noqa: E501 # verify the required parameter 'authorization' is set if ('authorization' not in params or params['authorization'] is None): raise ValueError("Missing the required parameter `authorization` when calling `subscribe_to_code_block`") # noqa: E501 collection_formats = {} path_params = {} query_params = [] header_params = {} if 'authorization' in params: header_params['Authorization'] = params['authorization'] # noqa: E501 form_params = [] local_var_files = {} body_params = None if 'body' in params: body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # 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( '/api/v1/codeblocks/subscribe', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='CodeBlock', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def unsubscribe_from_code_block(self, body, authorization, **kwargs): # noqa: E501 """Unsubscribes the user from a code block. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.unsubscribe_from_code_block(body, authorization, async_req=True) >>> result = thread.get() :param async_req bool :param InformationForm body: informationForm (required) :param str authorization: Authorization (required) :return: CodeBlock If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.unsubscribe_from_code_block_with_http_info(body, authorization, **kwargs) # noqa: E501 else: (data) = self.unsubscribe_from_code_block_with_http_info(body, authorization, **kwargs) # noqa: E501 return data def unsubscribe_from_code_block_with_http_info(self, body, authorization, **kwargs): # noqa: E501 """Unsubscribes the user from a code block. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.unsubscribe_from_code_block_with_http_info(body, authorization, async_req=True) >>> result = thread.get() :param async_req bool :param InformationForm body: informationForm (required) :param str authorization: Authorization (required) :return: CodeBlock If the method is called asynchronously, returns the request thread. """ all_params = ['body', 'authorization'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method unsubscribe_from_code_block" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'body' is set if ('body' not in params or params['body'] is None): raise ValueError("Missing the required parameter `body` when calling `unsubscribe_from_code_block`") # noqa: E501 # verify the required parameter 'authorization' is set if ('authorization' not in params or params['authorization'] is None): raise ValueError("Missing the required parameter `authorization` when calling `unsubscribe_from_code_block`") # noqa: E501 collection_formats = {} path_params = {} query_params = [] header_params = {} if 'authorization' in params: header_params['Authorization'] = params['authorization'] # noqa: E501 form_params = [] local_var_files = {} body_params = None if 'body' in params: body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # 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( '/api/v1/codeblocks/unsubscribe', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='CodeBlock', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats)
Classes
class CodeBlocksPublicApiControllerApi
Ref:
class CodeBlocksPublicApiControllerApi(object): """ Ref: """ def __init__(self, api_client=None): if api_client is None: api_client = ApiClient() self.api_client = api_client def create_datalake_code_block(self, body, authorization, datalake_id, **kwargs): # noqa: E501 """Creates a code block with datalake visibility from a container image or from a Jupyter notebook. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.create_datalake_code_block(body, authorization, datalake_id, async_req=True) >>> result = thread.get() :param async_req bool :param CodeBlock body: codeBlock (required) :param str authorization: Authorization (required) :param int datalake_id: datalakeId (required) :return: CodeBlock If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.create_datalake_code_block_with_http_info(body, authorization, datalake_id, **kwargs) # noqa: E501 else: (data) = self.create_datalake_code_block_with_http_info(body, authorization, datalake_id, **kwargs) # noqa: E501 return data def create_datalake_code_block_with_http_info(self, body, authorization, datalake_id, **kwargs): # noqa: E501 """Creates a code block with datalake visibility from a container image or from a Jupyter notebook. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.create_datalake_code_block_with_http_info(body, authorization, datalake_id, async_req=True) >>> result = thread.get() :param async_req bool :param CodeBlock body: codeBlock (required) :param str authorization: Authorization (required) :param int datalake_id: datalakeId (required) :return: CodeBlock If the method is called asynchronously, returns the request thread. """ all_params = ['body', 'authorization', 'datalake_id'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method create_datalake_code_block" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'body' is set if ('body' not in params or params['body'] is None): raise ValueError("Missing the required parameter `body` when calling `create_datalake_code_block`") # noqa: E501 # verify the required parameter 'authorization' is set if ('authorization' not in params or params['authorization'] is None): raise ValueError("Missing the required parameter `authorization` when calling `create_datalake_code_block`") # noqa: E501 # verify the required parameter 'datalake_id' is set if ('datalake_id' not in params or params['datalake_id'] is None): raise ValueError("Missing the required parameter `datalake_id` when calling `create_datalake_code_block`") # noqa: E501 collection_formats = {} path_params = {} if 'datalake_id' in params: path_params['datalakeId'] = params['datalake_id'] # noqa: E501 query_params = [] header_params = {} if 'authorization' in params: header_params['Authorization'] = params['authorization'] # noqa: E501 form_params = [] local_var_files = {} body_params = None if 'body' in params: body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # 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( '/api/v1/codeblocks/create/datalakeId/{datalakeId}', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='CodeBlock', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def create_datapool_code_block(self, body, authorization, datalake_id, datapool_name, **kwargs): # noqa: E501 """Creates a code block with datapool visibility from a container image or from a Jupyter notebook. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.create_datapool_code_block(body, authorization, datalake_id, datapool_name, async_req=True) >>> result = thread.get() :param async_req bool :param CodeBlock body: codeBlock (required) :param str authorization: Authorization (required) :param int datalake_id: datalakeId (required) :param str datapool_name: datapoolName (required) :return: CodeBlock If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.create_datapool_code_block_with_http_info(body, authorization, datalake_id, datapool_name, **kwargs) # noqa: E501 else: (data) = self.create_datapool_code_block_with_http_info(body, authorization, datalake_id, datapool_name, **kwargs) # noqa: E501 return data def create_datapool_code_block_with_http_info(self, body, authorization, datalake_id, datapool_name, **kwargs): # noqa: E501 """Creates a code block with datapool visibility from a container image or from a Jupyter notebook. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.create_datapool_code_block_with_http_info(body, authorization, datalake_id, datapool_name, async_req=True) >>> result = thread.get() :param async_req bool :param CodeBlock body: codeBlock (required) :param str authorization: Authorization (required) :param int datalake_id: datalakeId (required) :param str datapool_name: datapoolName (required) :return: CodeBlock If the method is called asynchronously, returns the request thread. """ all_params = ['body', 'authorization', 'datalake_id', 'datapool_name'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method create_datapool_code_block" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'body' is set if ('body' not in params or params['body'] is None): raise ValueError("Missing the required parameter `body` when calling `create_datapool_code_block`") # noqa: E501 # verify the required parameter 'authorization' is set if ('authorization' not in params or params['authorization'] is None): raise ValueError("Missing the required parameter `authorization` when calling `create_datapool_code_block`") # noqa: E501 # verify the required parameter 'datalake_id' is set if ('datalake_id' not in params or params['datalake_id'] is None): raise ValueError("Missing the required parameter `datalake_id` when calling `create_datapool_code_block`") # noqa: E501 # verify the required parameter 'datapool_name' is set if ('datapool_name' not in params or params['datapool_name'] is None): raise ValueError("Missing the required parameter `datapool_name` when calling `create_datapool_code_block`") # noqa: E501 collection_formats = {} path_params = {} if 'datalake_id' in params: path_params['datalakeId'] = params['datalake_id'] # noqa: E501 if 'datapool_name' in params: path_params['datapoolName'] = params['datapool_name'] # noqa: E501 query_params = [] header_params = {} if 'authorization' in params: header_params['Authorization'] = params['authorization'] # noqa: E501 form_params = [] local_var_files = {} body_params = None if 'body' in params: body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # 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( '/api/v1/codeblocks/create/datalakeId/{datalakeId}/datapoolName/{datapoolName}', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='CodeBlock', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def create_project_code_block(self, body, authorization, datalake_id, datapool_name, project_name, **kwargs): # noqa: E501 """Creates a code block with project visibility from a container image or from a Jupyter notebook. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.create_project_code_block(body, authorization, datalake_id, datapool_name, project_name, async_req=True) >>> result = thread.get() :param async_req bool :param CodeBlock body: codeBlock (required) :param str authorization: Authorization (required) :param int datalake_id: datalakeId (required) :param str datapool_name: datapoolName (required) :param str project_name: projectName (required) :return: CodeBlock If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.create_project_code_block_with_http_info(body, authorization, datalake_id, datapool_name, project_name, **kwargs) # noqa: E501 else: (data) = self.create_project_code_block_with_http_info(body, authorization, datalake_id, datapool_name, project_name, **kwargs) # noqa: E501 return data def create_project_code_block_with_http_info(self, body, authorization, datalake_id, datapool_name, project_name, **kwargs): # noqa: E501 """Creates a code block with project visibility from a container image or from a Jupyter notebook. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.create_project_code_block_with_http_info(body, authorization, datalake_id, datapool_name, project_name, async_req=True) >>> result = thread.get() :param async_req bool :param CodeBlock body: codeBlock (required) :param str authorization: Authorization (required) :param int datalake_id: datalakeId (required) :param str datapool_name: datapoolName (required) :param str project_name: projectName (required) :return: CodeBlock If the method is called asynchronously, returns the request thread. """ all_params = ['body', 'authorization', 'datalake_id', 'datapool_name', 'project_name'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method create_project_code_block" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'body' is set if ('body' not in params or params['body'] is None): raise ValueError("Missing the required parameter `body` when calling `create_project_code_block`") # noqa: E501 # verify the required parameter 'authorization' is set if ('authorization' not in params or params['authorization'] is None): raise ValueError("Missing the required parameter `authorization` when calling `create_project_code_block`") # noqa: E501 # verify the required parameter 'datalake_id' is set if ('datalake_id' not in params or params['datalake_id'] is None): raise ValueError("Missing the required parameter `datalake_id` when calling `create_project_code_block`") # noqa: E501 # verify the required parameter 'datapool_name' is set if ('datapool_name' not in params or params['datapool_name'] is None): raise ValueError("Missing the required parameter `datapool_name` when calling `create_project_code_block`") # noqa: E501 # verify the required parameter 'project_name' is set if ('project_name' not in params or params['project_name'] is None): raise ValueError("Missing the required parameter `project_name` when calling `create_project_code_block`") # noqa: E501 collection_formats = {} path_params = {} if 'datalake_id' in params: path_params['datalakeId'] = params['datalake_id'] # noqa: E501 if 'datapool_name' in params: path_params['datapoolName'] = params['datapool_name'] # noqa: E501 if 'project_name' in params: path_params['projectName'] = params['project_name'] # noqa: E501 query_params = [] header_params = {} if 'authorization' in params: header_params['Authorization'] = params['authorization'] # noqa: E501 form_params = [] local_var_files = {} body_params = None if 'body' in params: body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # 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( '/api/v1/codeblocks/create/datalakeId/{datalakeId}/datapoolName/{datapoolName}/projectName/{projectName}', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='CodeBlock', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def delete_code_block(self, body, authorization, **kwargs): # noqa: E501 """Deletes a non-public code block. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.delete_code_block(body, authorization, async_req=True) >>> result = thread.get() :param async_req bool :param InformationForm body: informationForm (required) :param str authorization: Authorization (required) :return: CodeBlock If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.delete_code_block_with_http_info(body, authorization, **kwargs) # noqa: E501 else: (data) = self.delete_code_block_with_http_info(body, authorization, **kwargs) # noqa: E501 return data def delete_code_block_with_http_info(self, body, authorization, **kwargs): # noqa: E501 """Deletes a non-public code block. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.delete_code_block_with_http_info(body, authorization, async_req=True) >>> result = thread.get() :param async_req bool :param InformationForm body: informationForm (required) :param str authorization: Authorization (required) :return: CodeBlock If the method is called asynchronously, returns the request thread. """ all_params = ['body', 'authorization'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method delete_code_block" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'body' is set if ('body' not in params or params['body'] is None): raise ValueError("Missing the required parameter `body` when calling `delete_code_block`") # noqa: E501 # verify the required parameter 'authorization' is set if ('authorization' not in params or params['authorization'] is None): raise ValueError("Missing the required parameter `authorization` when calling `delete_code_block`") # noqa: E501 collection_formats = {} path_params = {} query_params = [] header_params = {} if 'authorization' in params: header_params['Authorization'] = params['authorization'] # noqa: E501 form_params = [] local_var_files = {} body_params = None if 'body' in params: body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['*/*']) # noqa: E501 # Authentication setting auth_settings = [] # noqa: E501 return self.api_client.call_api( '/api/v1/codeblocks/delete', 'DELETE', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='CodeBlock', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def edit_code_block_metadata(self, body, authorization, **kwargs): # noqa: E501 """Edits the metadata of a non-public code block. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.edit_code_block_metadata(body, authorization, async_req=True) >>> result = thread.get() :param async_req bool :param EditMetadataForm body: editMetadataForm (required) :param str authorization: Authorization (required) :return: CodeBlock If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.edit_code_block_metadata_with_http_info(body, authorization, **kwargs) # noqa: E501 else: (data) = self.edit_code_block_metadata_with_http_info(body, authorization, **kwargs) # noqa: E501 return data def edit_code_block_metadata_with_http_info(self, body, authorization, **kwargs): # noqa: E501 """Edits the metadata of a non-public code block. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.edit_code_block_metadata_with_http_info(body, authorization, async_req=True) >>> result = thread.get() :param async_req bool :param EditMetadataForm body: editMetadataForm (required) :param str authorization: Authorization (required) :return: CodeBlock If the method is called asynchronously, returns the request thread. """ all_params = ['body', 'authorization'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method edit_code_block_metadata" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'body' is set if ('body' not in params or params['body'] is None): raise ValueError("Missing the required parameter `body` when calling `edit_code_block_metadata`") # noqa: E501 # verify the required parameter 'authorization' is set if ('authorization' not in params or params['authorization'] is None): raise ValueError("Missing the required parameter `authorization` when calling `edit_code_block_metadata`") # noqa: E501 collection_formats = {} path_params = {} query_params = [] header_params = {} if 'authorization' in params: header_params['Authorization'] = params['authorization'] # noqa: E501 form_params = [] local_var_files = {} body_params = None if 'body' in params: body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # 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( '/api/v1/codeblocks/editMetadata', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='CodeBlock', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def info_code_block(self, body, authorization, **kwargs): # noqa: E501 """Returns information regarding a code block. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.info_code_block(body, authorization, async_req=True) >>> result = thread.get() :param async_req bool :param InformationForm body: informationForm (required) :param str authorization: Authorization (required) :return: CodeBlock If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.info_code_block_with_http_info(body, authorization, **kwargs) # noqa: E501 else: (data) = self.info_code_block_with_http_info(body, authorization, **kwargs) # noqa: E501 return data def info_code_block_with_http_info(self, body, authorization, **kwargs): # noqa: E501 """Returns information regarding a code block. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.info_code_block_with_http_info(body, authorization, async_req=True) >>> result = thread.get() :param async_req bool :param InformationForm body: informationForm (required) :param str authorization: Authorization (required) :return: CodeBlock If the method is called asynchronously, returns the request thread. """ all_params = ['body', 'authorization'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method info_code_block" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'body' is set if ('body' not in params or params['body'] is None): raise ValueError("Missing the required parameter `body` when calling `info_code_block`") # noqa: E501 # verify the required parameter 'authorization' is set if ('authorization' not in params or params['authorization'] is None): raise ValueError("Missing the required parameter `authorization` when calling `info_code_block`") # noqa: E501 collection_formats = {} path_params = {} query_params = [] header_params = {} if 'authorization' in params: header_params['Authorization'] = params['authorization'] # noqa: E501 form_params = [] local_var_files = {} body_params = None if 'body' in params: body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # 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( '/api/v1/codeblocks/info', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='CodeBlock', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def list_code_blocks(self, authorization, labels, **kwargs): # noqa: E501 """Lists all code blocks. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.list_code_blocks(authorization, labels, async_req=True) >>> result = thread.get() :param async_req bool :param str authorization: Authorization (required) :param list[str] labels: labels (required) :return: dict(str, CodeBlock) If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.list_code_blocks_with_http_info(authorization, labels, **kwargs) # noqa: E501 else: (data) = self.list_code_blocks_with_http_info(authorization, labels, **kwargs) # noqa: E501 return data def list_code_blocks_with_http_info(self, authorization, labels, **kwargs): # noqa: E501 """Lists all code blocks. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.list_code_blocks_with_http_info(authorization, labels, async_req=True) >>> result = thread.get() :param async_req bool :param str authorization: Authorization (required) :param list[str] labels: labels (required) :return: dict(str, CodeBlock) If the method is called asynchronously, returns the request thread. """ all_params = ['authorization', 'labels'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method list_code_blocks" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'authorization' is set if ('authorization' not in params or params['authorization'] is None): raise ValueError("Missing the required parameter `authorization` when calling `list_code_blocks`") # noqa: E501 # verify the required parameter 'labels' is set if ('labels' not in params or params['labels'] is None): raise ValueError("Missing the required parameter `labels` when calling `list_code_blocks`") # noqa: E501 collection_formats = {} path_params = {} query_params = [] if 'labels' in params: query_params.append(('labels', params['labels'])) # noqa: E501 collection_formats['labels'] = 'multi' # noqa: E501 header_params = {} if 'authorization' in params: header_params['Authorization'] = params['authorization'] # noqa: E501 form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # noqa: E501 # Authentication setting auth_settings = [] # noqa: E501 return self.api_client.call_api( '/api/v1/codeblocks/list', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='dict(str, CodeBlock)', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def list_filtered_code_blocks(self, authorization, labels, **kwargs): # noqa: E501 """Lists all code blocks, filtered by publish and subscription status. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.list_filtered_code_blocks(authorization, labels, async_req=True) >>> result = thread.get() :param async_req bool :param str authorization: Authorization (required) :param list[str] labels: labels (required) :return: AllFilteredCodeBlocks If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.list_filtered_code_blocks_with_http_info(authorization, labels, **kwargs) # noqa: E501 else: (data) = self.list_filtered_code_blocks_with_http_info(authorization, labels, **kwargs) # noqa: E501 return data def list_filtered_code_blocks_with_http_info(self, authorization, labels, **kwargs): # noqa: E501 """Lists all code blocks, filtered by publish and subscription status. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.list_filtered_code_blocks_with_http_info(authorization, labels, async_req=True) >>> result = thread.get() :param async_req bool :param str authorization: Authorization (required) :param list[str] labels: labels (required) :return: AllFilteredCodeBlocks If the method is called asynchronously, returns the request thread. """ all_params = ['authorization', 'labels'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method list_filtered_code_blocks" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'authorization' is set if ('authorization' not in params or params['authorization'] is None): raise ValueError("Missing the required parameter `authorization` when calling `list_filtered_code_blocks`") # noqa: E501 # verify the required parameter 'labels' is set if ('labels' not in params or params['labels'] is None): raise ValueError("Missing the required parameter `labels` when calling `list_filtered_code_blocks`") # noqa: E501 collection_formats = {} path_params = {} query_params = [] if 'labels' in params: query_params.append(('labels', params['labels'])) # noqa: E501 collection_formats['labels'] = 'multi' # noqa: E501 header_params = {} if 'authorization' in params: header_params['Authorization'] = params['authorization'] # noqa: E501 form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # noqa: E501 # Authentication setting auth_settings = [] # noqa: E501 return self.api_client.call_api( '/api/v1/codeblocks/listFiltered', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='AllFilteredCodeBlocks', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def subscribe_to_code_block(self, body, authorization, **kwargs): # noqa: E501 """Subscribes the user to a code block. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.subscribe_to_code_block(body, authorization, async_req=True) >>> result = thread.get() :param async_req bool :param InformationForm body: informationForm (required) :param str authorization: Authorization (required) :return: CodeBlock If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.subscribe_to_code_block_with_http_info(body, authorization, **kwargs) # noqa: E501 else: (data) = self.subscribe_to_code_block_with_http_info(body, authorization, **kwargs) # noqa: E501 return data def subscribe_to_code_block_with_http_info(self, body, authorization, **kwargs): # noqa: E501 """Subscribes the user to a code block. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.subscribe_to_code_block_with_http_info(body, authorization, async_req=True) >>> result = thread.get() :param async_req bool :param InformationForm body: informationForm (required) :param str authorization: Authorization (required) :return: CodeBlock If the method is called asynchronously, returns the request thread. """ all_params = ['body', 'authorization'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method subscribe_to_code_block" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'body' is set if ('body' not in params or params['body'] is None): raise ValueError("Missing the required parameter `body` when calling `subscribe_to_code_block`") # noqa: E501 # verify the required parameter 'authorization' is set if ('authorization' not in params or params['authorization'] is None): raise ValueError("Missing the required parameter `authorization` when calling `subscribe_to_code_block`") # noqa: E501 collection_formats = {} path_params = {} query_params = [] header_params = {} if 'authorization' in params: header_params['Authorization'] = params['authorization'] # noqa: E501 form_params = [] local_var_files = {} body_params = None if 'body' in params: body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # 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( '/api/v1/codeblocks/subscribe', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='CodeBlock', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) def unsubscribe_from_code_block(self, body, authorization, **kwargs): # noqa: E501 """Unsubscribes the user from a code block. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.unsubscribe_from_code_block(body, authorization, async_req=True) >>> result = thread.get() :param async_req bool :param InformationForm body: informationForm (required) :param str authorization: Authorization (required) :return: CodeBlock If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.unsubscribe_from_code_block_with_http_info(body, authorization, **kwargs) # noqa: E501 else: (data) = self.unsubscribe_from_code_block_with_http_info(body, authorization, **kwargs) # noqa: E501 return data def unsubscribe_from_code_block_with_http_info(self, body, authorization, **kwargs): # noqa: E501 """Unsubscribes the user from a code block. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.unsubscribe_from_code_block_with_http_info(body, authorization, async_req=True) >>> result = thread.get() :param async_req bool :param InformationForm body: informationForm (required) :param str authorization: Authorization (required) :return: CodeBlock If the method is called asynchronously, returns the request thread. """ all_params = ['body', 'authorization'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method unsubscribe_from_code_block" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'body' is set if ('body' not in params or params['body'] is None): raise ValueError("Missing the required parameter `body` when calling `unsubscribe_from_code_block`") # noqa: E501 # verify the required parameter 'authorization' is set if ('authorization' not in params or params['authorization'] is None): raise ValueError("Missing the required parameter `authorization` when calling `unsubscribe_from_code_block`") # noqa: E501 collection_formats = {} path_params = {} query_params = [] header_params = {} if 'authorization' in params: header_params['Authorization'] = params['authorization'] # noqa: E501 form_params = [] local_var_files = {} body_params = None if 'body' in params: body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # 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( '/api/v1/codeblocks/unsubscribe', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='CodeBlock', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats)
Ancestors (in MRO)
- CodeBlocksPublicApiControllerApi
- builtins.object
Static methods
def __init__(
self, api_client=None)
Initialize self. See help(type(self)) for accurate signature.
def __init__(self, api_client=None): if api_client is None: api_client = ApiClient() self.api_client = api_client
def create_datalake_code_block(
self, body, authorization, datalake_id, **kwargs)
Creates a code block with datalake visibility from a container image or from a Jupyter notebook. # noqa: E501
This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True
thread = api.create_datalake_code_block(body, authorization, datalake_id, async_req=True) result = thread.get()
:param async_req bool :param CodeBlock body: codeBlock (required) :param str authorization: Authorization (required) :param int datalake_id: datalakeId (required) :return: CodeBlock If the method is called asynchronously, returns the request thread.
def create_datalake_code_block(self, body, authorization, datalake_id, **kwargs): # noqa: E501 """Creates a code block with datalake visibility from a container image or from a Jupyter notebook. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.create_datalake_code_block(body, authorization, datalake_id, async_req=True) >>> result = thread.get() :param async_req bool :param CodeBlock body: codeBlock (required) :param str authorization: Authorization (required) :param int datalake_id: datalakeId (required) :return: CodeBlock If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.create_datalake_code_block_with_http_info(body, authorization, datalake_id, **kwargs) # noqa: E501 else: (data) = self.create_datalake_code_block_with_http_info(body, authorization, datalake_id, **kwargs) # noqa: E501 return data
def create_datalake_code_block_with_http_info(
self, body, authorization, datalake_id, **kwargs)
Creates a code block with datalake visibility from a container image or from a Jupyter notebook. # noqa: E501
This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True
thread = api.create_datalake_code_block_with_http_info(body, authorization, datalake_id, async_req=True) result = thread.get()
:param async_req bool :param CodeBlock body: codeBlock (required) :param str authorization: Authorization (required) :param int datalake_id: datalakeId (required) :return: CodeBlock If the method is called asynchronously, returns the request thread.
def create_datalake_code_block_with_http_info(self, body, authorization, datalake_id, **kwargs): # noqa: E501 """Creates a code block with datalake visibility from a container image or from a Jupyter notebook. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.create_datalake_code_block_with_http_info(body, authorization, datalake_id, async_req=True) >>> result = thread.get() :param async_req bool :param CodeBlock body: codeBlock (required) :param str authorization: Authorization (required) :param int datalake_id: datalakeId (required) :return: CodeBlock If the method is called asynchronously, returns the request thread. """ all_params = ['body', 'authorization', 'datalake_id'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method create_datalake_code_block" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'body' is set if ('body' not in params or params['body'] is None): raise ValueError("Missing the required parameter `body` when calling `create_datalake_code_block`") # noqa: E501 # verify the required parameter 'authorization' is set if ('authorization' not in params or params['authorization'] is None): raise ValueError("Missing the required parameter `authorization` when calling `create_datalake_code_block`") # noqa: E501 # verify the required parameter 'datalake_id' is set if ('datalake_id' not in params or params['datalake_id'] is None): raise ValueError("Missing the required parameter `datalake_id` when calling `create_datalake_code_block`") # noqa: E501 collection_formats = {} path_params = {} if 'datalake_id' in params: path_params['datalakeId'] = params['datalake_id'] # noqa: E501 query_params = [] header_params = {} if 'authorization' in params: header_params['Authorization'] = params['authorization'] # noqa: E501 form_params = [] local_var_files = {} body_params = None if 'body' in params: body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # 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( '/api/v1/codeblocks/create/datalakeId/{datalakeId}', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='CodeBlock', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats)
def create_datapool_code_block(
self, body, authorization, datalake_id, datapool_name, **kwargs)
Creates a code block with datapool visibility from a container image or from a Jupyter notebook. # noqa: E501
This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True
thread = api.create_datapool_code_block(body, authorization, datalake_id, datapool_name, async_req=True) result = thread.get()
:param async_req bool :param CodeBlock body: codeBlock (required) :param str authorization: Authorization (required) :param int datalake_id: datalakeId (required) :param str datapool_name: datapoolName (required) :return: CodeBlock If the method is called asynchronously, returns the request thread.
def create_datapool_code_block(self, body, authorization, datalake_id, datapool_name, **kwargs): # noqa: E501 """Creates a code block with datapool visibility from a container image or from a Jupyter notebook. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.create_datapool_code_block(body, authorization, datalake_id, datapool_name, async_req=True) >>> result = thread.get() :param async_req bool :param CodeBlock body: codeBlock (required) :param str authorization: Authorization (required) :param int datalake_id: datalakeId (required) :param str datapool_name: datapoolName (required) :return: CodeBlock If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.create_datapool_code_block_with_http_info(body, authorization, datalake_id, datapool_name, **kwargs) # noqa: E501 else: (data) = self.create_datapool_code_block_with_http_info(body, authorization, datalake_id, datapool_name, **kwargs) # noqa: E501 return data
def create_datapool_code_block_with_http_info(
self, body, authorization, datalake_id, datapool_name, **kwargs)
Creates a code block with datapool visibility from a container image or from a Jupyter notebook. # noqa: E501
This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True
thread = api.create_datapool_code_block_with_http_info(body, authorization, datalake_id, datapool_name, async_req=True) result = thread.get()
:param async_req bool :param CodeBlock body: codeBlock (required) :param str authorization: Authorization (required) :param int datalake_id: datalakeId (required) :param str datapool_name: datapoolName (required) :return: CodeBlock If the method is called asynchronously, returns the request thread.
def create_datapool_code_block_with_http_info(self, body, authorization, datalake_id, datapool_name, **kwargs): # noqa: E501 """Creates a code block with datapool visibility from a container image or from a Jupyter notebook. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.create_datapool_code_block_with_http_info(body, authorization, datalake_id, datapool_name, async_req=True) >>> result = thread.get() :param async_req bool :param CodeBlock body: codeBlock (required) :param str authorization: Authorization (required) :param int datalake_id: datalakeId (required) :param str datapool_name: datapoolName (required) :return: CodeBlock If the method is called asynchronously, returns the request thread. """ all_params = ['body', 'authorization', 'datalake_id', 'datapool_name'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method create_datapool_code_block" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'body' is set if ('body' not in params or params['body'] is None): raise ValueError("Missing the required parameter `body` when calling `create_datapool_code_block`") # noqa: E501 # verify the required parameter 'authorization' is set if ('authorization' not in params or params['authorization'] is None): raise ValueError("Missing the required parameter `authorization` when calling `create_datapool_code_block`") # noqa: E501 # verify the required parameter 'datalake_id' is set if ('datalake_id' not in params or params['datalake_id'] is None): raise ValueError("Missing the required parameter `datalake_id` when calling `create_datapool_code_block`") # noqa: E501 # verify the required parameter 'datapool_name' is set if ('datapool_name' not in params or params['datapool_name'] is None): raise ValueError("Missing the required parameter `datapool_name` when calling `create_datapool_code_block`") # noqa: E501 collection_formats = {} path_params = {} if 'datalake_id' in params: path_params['datalakeId'] = params['datalake_id'] # noqa: E501 if 'datapool_name' in params: path_params['datapoolName'] = params['datapool_name'] # noqa: E501 query_params = [] header_params = {} if 'authorization' in params: header_params['Authorization'] = params['authorization'] # noqa: E501 form_params = [] local_var_files = {} body_params = None if 'body' in params: body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # 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( '/api/v1/codeblocks/create/datalakeId/{datalakeId}/datapoolName/{datapoolName}', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='CodeBlock', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats)
def create_project_code_block(
self, body, authorization, datalake_id, datapool_name, project_name, **kwargs)
Creates a code block with project visibility from a container image or from a Jupyter notebook. # noqa: E501
This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True
thread = api.create_project_code_block(body, authorization, datalake_id, datapool_name, project_name, async_req=True) result = thread.get()
:param async_req bool :param CodeBlock body: codeBlock (required) :param str authorization: Authorization (required) :param int datalake_id: datalakeId (required) :param str datapool_name: datapoolName (required) :param str project_name: projectName (required) :return: CodeBlock If the method is called asynchronously, returns the request thread.
def create_project_code_block(self, body, authorization, datalake_id, datapool_name, project_name, **kwargs): # noqa: E501 """Creates a code block with project visibility from a container image or from a Jupyter notebook. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.create_project_code_block(body, authorization, datalake_id, datapool_name, project_name, async_req=True) >>> result = thread.get() :param async_req bool :param CodeBlock body: codeBlock (required) :param str authorization: Authorization (required) :param int datalake_id: datalakeId (required) :param str datapool_name: datapoolName (required) :param str project_name: projectName (required) :return: CodeBlock If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.create_project_code_block_with_http_info(body, authorization, datalake_id, datapool_name, project_name, **kwargs) # noqa: E501 else: (data) = self.create_project_code_block_with_http_info(body, authorization, datalake_id, datapool_name, project_name, **kwargs) # noqa: E501 return data
def create_project_code_block_with_http_info(
self, body, authorization, datalake_id, datapool_name, project_name, **kwargs)
Creates a code block with project visibility from a container image or from a Jupyter notebook. # noqa: E501
This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True
thread = api.create_project_code_block_with_http_info(body, authorization, datalake_id, datapool_name, project_name, async_req=True) result = thread.get()
:param async_req bool :param CodeBlock body: codeBlock (required) :param str authorization: Authorization (required) :param int datalake_id: datalakeId (required) :param str datapool_name: datapoolName (required) :param str project_name: projectName (required) :return: CodeBlock If the method is called asynchronously, returns the request thread.
def create_project_code_block_with_http_info(self, body, authorization, datalake_id, datapool_name, project_name, **kwargs): # noqa: E501 """Creates a code block with project visibility from a container image or from a Jupyter notebook. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.create_project_code_block_with_http_info(body, authorization, datalake_id, datapool_name, project_name, async_req=True) >>> result = thread.get() :param async_req bool :param CodeBlock body: codeBlock (required) :param str authorization: Authorization (required) :param int datalake_id: datalakeId (required) :param str datapool_name: datapoolName (required) :param str project_name: projectName (required) :return: CodeBlock If the method is called asynchronously, returns the request thread. """ all_params = ['body', 'authorization', 'datalake_id', 'datapool_name', 'project_name'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method create_project_code_block" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'body' is set if ('body' not in params or params['body'] is None): raise ValueError("Missing the required parameter `body` when calling `create_project_code_block`") # noqa: E501 # verify the required parameter 'authorization' is set if ('authorization' not in params or params['authorization'] is None): raise ValueError("Missing the required parameter `authorization` when calling `create_project_code_block`") # noqa: E501 # verify the required parameter 'datalake_id' is set if ('datalake_id' not in params or params['datalake_id'] is None): raise ValueError("Missing the required parameter `datalake_id` when calling `create_project_code_block`") # noqa: E501 # verify the required parameter 'datapool_name' is set if ('datapool_name' not in params or params['datapool_name'] is None): raise ValueError("Missing the required parameter `datapool_name` when calling `create_project_code_block`") # noqa: E501 # verify the required parameter 'project_name' is set if ('project_name' not in params or params['project_name'] is None): raise ValueError("Missing the required parameter `project_name` when calling `create_project_code_block`") # noqa: E501 collection_formats = {} path_params = {} if 'datalake_id' in params: path_params['datalakeId'] = params['datalake_id'] # noqa: E501 if 'datapool_name' in params: path_params['datapoolName'] = params['datapool_name'] # noqa: E501 if 'project_name' in params: path_params['projectName'] = params['project_name'] # noqa: E501 query_params = [] header_params = {} if 'authorization' in params: header_params['Authorization'] = params['authorization'] # noqa: E501 form_params = [] local_var_files = {} body_params = None if 'body' in params: body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # 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( '/api/v1/codeblocks/create/datalakeId/{datalakeId}/datapoolName/{datapoolName}/projectName/{projectName}', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='CodeBlock', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats)
def delete_code_block(
self, body, authorization, **kwargs)
Deletes a non-public code block. # noqa: E501
This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True
thread = api.delete_code_block(body, authorization, async_req=True) result = thread.get()
:param async_req bool :param InformationForm body: informationForm (required) :param str authorization: Authorization (required) :return: CodeBlock If the method is called asynchronously, returns the request thread.
def delete_code_block(self, body, authorization, **kwargs): # noqa: E501 """Deletes a non-public code block. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.delete_code_block(body, authorization, async_req=True) >>> result = thread.get() :param async_req bool :param InformationForm body: informationForm (required) :param str authorization: Authorization (required) :return: CodeBlock If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.delete_code_block_with_http_info(body, authorization, **kwargs) # noqa: E501 else: (data) = self.delete_code_block_with_http_info(body, authorization, **kwargs) # noqa: E501 return data
def delete_code_block_with_http_info(
self, body, authorization, **kwargs)
Deletes a non-public code block. # noqa: E501
This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True
thread = api.delete_code_block_with_http_info(body, authorization, async_req=True) result = thread.get()
:param async_req bool :param InformationForm body: informationForm (required) :param str authorization: Authorization (required) :return: CodeBlock If the method is called asynchronously, returns the request thread.
def delete_code_block_with_http_info(self, body, authorization, **kwargs): # noqa: E501 """Deletes a non-public code block. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.delete_code_block_with_http_info(body, authorization, async_req=True) >>> result = thread.get() :param async_req bool :param InformationForm body: informationForm (required) :param str authorization: Authorization (required) :return: CodeBlock If the method is called asynchronously, returns the request thread. """ all_params = ['body', 'authorization'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method delete_code_block" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'body' is set if ('body' not in params or params['body'] is None): raise ValueError("Missing the required parameter `body` when calling `delete_code_block`") # noqa: E501 # verify the required parameter 'authorization' is set if ('authorization' not in params or params['authorization'] is None): raise ValueError("Missing the required parameter `authorization` when calling `delete_code_block`") # noqa: E501 collection_formats = {} path_params = {} query_params = [] header_params = {} if 'authorization' in params: header_params['Authorization'] = params['authorization'] # noqa: E501 form_params = [] local_var_files = {} body_params = None if 'body' in params: body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['*/*']) # noqa: E501 # Authentication setting auth_settings = [] # noqa: E501 return self.api_client.call_api( '/api/v1/codeblocks/delete', 'DELETE', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='CodeBlock', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats)
def edit_code_block_metadata(
self, body, authorization, **kwargs)
Edits the metadata of a non-public code block. # noqa: E501
This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True
thread = api.edit_code_block_metadata(body, authorization, async_req=True) result = thread.get()
:param async_req bool :param EditMetadataForm body: editMetadataForm (required) :param str authorization: Authorization (required) :return: CodeBlock If the method is called asynchronously, returns the request thread.
def edit_code_block_metadata(self, body, authorization, **kwargs): # noqa: E501 """Edits the metadata of a non-public code block. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.edit_code_block_metadata(body, authorization, async_req=True) >>> result = thread.get() :param async_req bool :param EditMetadataForm body: editMetadataForm (required) :param str authorization: Authorization (required) :return: CodeBlock If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.edit_code_block_metadata_with_http_info(body, authorization, **kwargs) # noqa: E501 else: (data) = self.edit_code_block_metadata_with_http_info(body, authorization, **kwargs) # noqa: E501 return data
def edit_code_block_metadata_with_http_info(
self, body, authorization, **kwargs)
Edits the metadata of a non-public code block. # noqa: E501
This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True
thread = api.edit_code_block_metadata_with_http_info(body, authorization, async_req=True) result = thread.get()
:param async_req bool :param EditMetadataForm body: editMetadataForm (required) :param str authorization: Authorization (required) :return: CodeBlock If the method is called asynchronously, returns the request thread.
def edit_code_block_metadata_with_http_info(self, body, authorization, **kwargs): # noqa: E501 """Edits the metadata of a non-public code block. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.edit_code_block_metadata_with_http_info(body, authorization, async_req=True) >>> result = thread.get() :param async_req bool :param EditMetadataForm body: editMetadataForm (required) :param str authorization: Authorization (required) :return: CodeBlock If the method is called asynchronously, returns the request thread. """ all_params = ['body', 'authorization'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method edit_code_block_metadata" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'body' is set if ('body' not in params or params['body'] is None): raise ValueError("Missing the required parameter `body` when calling `edit_code_block_metadata`") # noqa: E501 # verify the required parameter 'authorization' is set if ('authorization' not in params or params['authorization'] is None): raise ValueError("Missing the required parameter `authorization` when calling `edit_code_block_metadata`") # noqa: E501 collection_formats = {} path_params = {} query_params = [] header_params = {} if 'authorization' in params: header_params['Authorization'] = params['authorization'] # noqa: E501 form_params = [] local_var_files = {} body_params = None if 'body' in params: body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # 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( '/api/v1/codeblocks/editMetadata', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='CodeBlock', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats)
def info_code_block(
self, body, authorization, **kwargs)
Returns information regarding a code block. # noqa: E501
This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True
thread = api.info_code_block(body, authorization, async_req=True) result = thread.get()
:param async_req bool :param InformationForm body: informationForm (required) :param str authorization: Authorization (required) :return: CodeBlock If the method is called asynchronously, returns the request thread.
def info_code_block(self, body, authorization, **kwargs): # noqa: E501 """Returns information regarding a code block. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.info_code_block(body, authorization, async_req=True) >>> result = thread.get() :param async_req bool :param InformationForm body: informationForm (required) :param str authorization: Authorization (required) :return: CodeBlock If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.info_code_block_with_http_info(body, authorization, **kwargs) # noqa: E501 else: (data) = self.info_code_block_with_http_info(body, authorization, **kwargs) # noqa: E501 return data
def info_code_block_with_http_info(
self, body, authorization, **kwargs)
Returns information regarding a code block. # noqa: E501
This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True
thread = api.info_code_block_with_http_info(body, authorization, async_req=True) result = thread.get()
:param async_req bool :param InformationForm body: informationForm (required) :param str authorization: Authorization (required) :return: CodeBlock If the method is called asynchronously, returns the request thread.
def info_code_block_with_http_info(self, body, authorization, **kwargs): # noqa: E501 """Returns information regarding a code block. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.info_code_block_with_http_info(body, authorization, async_req=True) >>> result = thread.get() :param async_req bool :param InformationForm body: informationForm (required) :param str authorization: Authorization (required) :return: CodeBlock If the method is called asynchronously, returns the request thread. """ all_params = ['body', 'authorization'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method info_code_block" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'body' is set if ('body' not in params or params['body'] is None): raise ValueError("Missing the required parameter `body` when calling `info_code_block`") # noqa: E501 # verify the required parameter 'authorization' is set if ('authorization' not in params or params['authorization'] is None): raise ValueError("Missing the required parameter `authorization` when calling `info_code_block`") # noqa: E501 collection_formats = {} path_params = {} query_params = [] header_params = {} if 'authorization' in params: header_params['Authorization'] = params['authorization'] # noqa: E501 form_params = [] local_var_files = {} body_params = None if 'body' in params: body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # 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( '/api/v1/codeblocks/info', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='CodeBlock', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats)
def list_code_blocks(
self, authorization, labels, **kwargs)
Lists all code blocks. # noqa: E501
This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True
thread = api.list_code_blocks(authorization, labels, async_req=True) result = thread.get()
:param async_req bool :param str authorization: Authorization (required) :param list[str] labels: labels (required) :return: dict(str, CodeBlock) If the method is called asynchronously, returns the request thread.
def list_code_blocks(self, authorization, labels, **kwargs): # noqa: E501 """Lists all code blocks. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.list_code_blocks(authorization, labels, async_req=True) >>> result = thread.get() :param async_req bool :param str authorization: Authorization (required) :param list[str] labels: labels (required) :return: dict(str, CodeBlock) If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.list_code_blocks_with_http_info(authorization, labels, **kwargs) # noqa: E501 else: (data) = self.list_code_blocks_with_http_info(authorization, labels, **kwargs) # noqa: E501 return data
def list_code_blocks_with_http_info(
self, authorization, labels, **kwargs)
Lists all code blocks. # noqa: E501
This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True
thread = api.list_code_blocks_with_http_info(authorization, labels, async_req=True) result = thread.get()
:param async_req bool :param str authorization: Authorization (required) :param list[str] labels: labels (required) :return: dict(str, CodeBlock) If the method is called asynchronously, returns the request thread.
def list_code_blocks_with_http_info(self, authorization, labels, **kwargs): # noqa: E501 """Lists all code blocks. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.list_code_blocks_with_http_info(authorization, labels, async_req=True) >>> result = thread.get() :param async_req bool :param str authorization: Authorization (required) :param list[str] labels: labels (required) :return: dict(str, CodeBlock) If the method is called asynchronously, returns the request thread. """ all_params = ['authorization', 'labels'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method list_code_blocks" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'authorization' is set if ('authorization' not in params or params['authorization'] is None): raise ValueError("Missing the required parameter `authorization` when calling `list_code_blocks`") # noqa: E501 # verify the required parameter 'labels' is set if ('labels' not in params or params['labels'] is None): raise ValueError("Missing the required parameter `labels` when calling `list_code_blocks`") # noqa: E501 collection_formats = {} path_params = {} query_params = [] if 'labels' in params: query_params.append(('labels', params['labels'])) # noqa: E501 collection_formats['labels'] = 'multi' # noqa: E501 header_params = {} if 'authorization' in params: header_params['Authorization'] = params['authorization'] # noqa: E501 form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # noqa: E501 # Authentication setting auth_settings = [] # noqa: E501 return self.api_client.call_api( '/api/v1/codeblocks/list', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='dict(str, CodeBlock)', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats)
def list_filtered_code_blocks(
self, authorization, labels, **kwargs)
Lists all code blocks, filtered by publish and subscription status. # noqa: E501
This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True
thread = api.list_filtered_code_blocks(authorization, labels, async_req=True) result = thread.get()
:param async_req bool :param str authorization: Authorization (required) :param list[str] labels: labels (required) :return: AllFilteredCodeBlocks If the method is called asynchronously, returns the request thread.
def list_filtered_code_blocks(self, authorization, labels, **kwargs): # noqa: E501 """Lists all code blocks, filtered by publish and subscription status. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.list_filtered_code_blocks(authorization, labels, async_req=True) >>> result = thread.get() :param async_req bool :param str authorization: Authorization (required) :param list[str] labels: labels (required) :return: AllFilteredCodeBlocks If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.list_filtered_code_blocks_with_http_info(authorization, labels, **kwargs) # noqa: E501 else: (data) = self.list_filtered_code_blocks_with_http_info(authorization, labels, **kwargs) # noqa: E501 return data
def list_filtered_code_blocks_with_http_info(
self, authorization, labels, **kwargs)
Lists all code blocks, filtered by publish and subscription status. # noqa: E501
This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True
thread = api.list_filtered_code_blocks_with_http_info(authorization, labels, async_req=True) result = thread.get()
:param async_req bool :param str authorization: Authorization (required) :param list[str] labels: labels (required) :return: AllFilteredCodeBlocks If the method is called asynchronously, returns the request thread.
def list_filtered_code_blocks_with_http_info(self, authorization, labels, **kwargs): # noqa: E501 """Lists all code blocks, filtered by publish and subscription status. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.list_filtered_code_blocks_with_http_info(authorization, labels, async_req=True) >>> result = thread.get() :param async_req bool :param str authorization: Authorization (required) :param list[str] labels: labels (required) :return: AllFilteredCodeBlocks If the method is called asynchronously, returns the request thread. """ all_params = ['authorization', 'labels'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method list_filtered_code_blocks" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'authorization' is set if ('authorization' not in params or params['authorization'] is None): raise ValueError("Missing the required parameter `authorization` when calling `list_filtered_code_blocks`") # noqa: E501 # verify the required parameter 'labels' is set if ('labels' not in params or params['labels'] is None): raise ValueError("Missing the required parameter `labels` when calling `list_filtered_code_blocks`") # noqa: E501 collection_formats = {} path_params = {} query_params = [] if 'labels' in params: query_params.append(('labels', params['labels'])) # noqa: E501 collection_formats['labels'] = 'multi' # noqa: E501 header_params = {} if 'authorization' in params: header_params['Authorization'] = params['authorization'] # noqa: E501 form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # noqa: E501 # Authentication setting auth_settings = [] # noqa: E501 return self.api_client.call_api( '/api/v1/codeblocks/listFiltered', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='AllFilteredCodeBlocks', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats)
def subscribe_to_code_block(
self, body, authorization, **kwargs)
Subscribes the user to a code block. # noqa: E501
This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True
thread = api.subscribe_to_code_block(body, authorization, async_req=True) result = thread.get()
:param async_req bool :param InformationForm body: informationForm (required) :param str authorization: Authorization (required) :return: CodeBlock If the method is called asynchronously, returns the request thread.
def subscribe_to_code_block(self, body, authorization, **kwargs): # noqa: E501 """Subscribes the user to a code block. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.subscribe_to_code_block(body, authorization, async_req=True) >>> result = thread.get() :param async_req bool :param InformationForm body: informationForm (required) :param str authorization: Authorization (required) :return: CodeBlock If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.subscribe_to_code_block_with_http_info(body, authorization, **kwargs) # noqa: E501 else: (data) = self.subscribe_to_code_block_with_http_info(body, authorization, **kwargs) # noqa: E501 return data
def subscribe_to_code_block_with_http_info(
self, body, authorization, **kwargs)
Subscribes the user to a code block. # noqa: E501
This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True
thread = api.subscribe_to_code_block_with_http_info(body, authorization, async_req=True) result = thread.get()
:param async_req bool :param InformationForm body: informationForm (required) :param str authorization: Authorization (required) :return: CodeBlock If the method is called asynchronously, returns the request thread.
def subscribe_to_code_block_with_http_info(self, body, authorization, **kwargs): # noqa: E501 """Subscribes the user to a code block. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.subscribe_to_code_block_with_http_info(body, authorization, async_req=True) >>> result = thread.get() :param async_req bool :param InformationForm body: informationForm (required) :param str authorization: Authorization (required) :return: CodeBlock If the method is called asynchronously, returns the request thread. """ all_params = ['body', 'authorization'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method subscribe_to_code_block" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'body' is set if ('body' not in params or params['body'] is None): raise ValueError("Missing the required parameter `body` when calling `subscribe_to_code_block`") # noqa: E501 # verify the required parameter 'authorization' is set if ('authorization' not in params or params['authorization'] is None): raise ValueError("Missing the required parameter `authorization` when calling `subscribe_to_code_block`") # noqa: E501 collection_formats = {} path_params = {} query_params = [] header_params = {} if 'authorization' in params: header_params['Authorization'] = params['authorization'] # noqa: E501 form_params = [] local_var_files = {} body_params = None if 'body' in params: body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # 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( '/api/v1/codeblocks/subscribe', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='CodeBlock', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats)
def unsubscribe_from_code_block(
self, body, authorization, **kwargs)
Unsubscribes the user from a code block. # noqa: E501
This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True
thread = api.unsubscribe_from_code_block(body, authorization, async_req=True) result = thread.get()
:param async_req bool :param InformationForm body: informationForm (required) :param str authorization: Authorization (required) :return: CodeBlock If the method is called asynchronously, returns the request thread.
def unsubscribe_from_code_block(self, body, authorization, **kwargs): # noqa: E501 """Unsubscribes the user from a code block. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.unsubscribe_from_code_block(body, authorization, async_req=True) >>> result = thread.get() :param async_req bool :param InformationForm body: informationForm (required) :param str authorization: Authorization (required) :return: CodeBlock If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.unsubscribe_from_code_block_with_http_info(body, authorization, **kwargs) # noqa: E501 else: (data) = self.unsubscribe_from_code_block_with_http_info(body, authorization, **kwargs) # noqa: E501 return data
def unsubscribe_from_code_block_with_http_info(
self, body, authorization, **kwargs)
Unsubscribes the user from a code block. # noqa: E501
This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True
thread = api.unsubscribe_from_code_block_with_http_info(body, authorization, async_req=True) result = thread.get()
:param async_req bool :param InformationForm body: informationForm (required) :param str authorization: Authorization (required) :return: CodeBlock If the method is called asynchronously, returns the request thread.
def unsubscribe_from_code_block_with_http_info(self, body, authorization, **kwargs): # noqa: E501 """Unsubscribes the user from a code block. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.unsubscribe_from_code_block_with_http_info(body, authorization, async_req=True) >>> result = thread.get() :param async_req bool :param InformationForm body: informationForm (required) :param str authorization: Authorization (required) :return: CodeBlock If the method is called asynchronously, returns the request thread. """ all_params = ['body', 'authorization'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method unsubscribe_from_code_block" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'body' is set if ('body' not in params or params['body'] is None): raise ValueError("Missing the required parameter `body` when calling `unsubscribe_from_code_block`") # noqa: E501 # verify the required parameter 'authorization' is set if ('authorization' not in params or params['authorization'] is None): raise ValueError("Missing the required parameter `authorization` when calling `unsubscribe_from_code_block`") # noqa: E501 collection_formats = {} path_params = {} query_params = [] header_params = {} if 'authorization' in params: header_params['Authorization'] = params['authorization'] # noqa: E501 form_params = [] local_var_files = {} body_params = None if 'body' in params: body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['*/*']) # 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( '/api/v1/codeblocks/unsubscribe', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='CodeBlock', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats)
Instance variables
var api_client