diff --git a/README.md b/README.md index 1fc4d1e..4a0e4e8 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ Convert API lets you effortlessly convert file formats and types. This Python package provides a native API client for [Cloudmersive Document Conversion](https://www.cloudmersive.com/convert-api) - API version: v1 -- Package version: 3.1.1 +- Package version: 3.1.2 - Build package: io.swagger.codegen.languages.PythonClientCodegen ## Requirements. @@ -254,6 +254,7 @@ Class | Method | HTTP request | Description *EditHtmlApi* | [**edit_html_html_append_image_inline**](docs/EditHtmlApi.md#edit_html_html_append_image_inline) | **POST** /convert/edit/html/append/image/inline | Append a Base64 Inline Image to an HTML Document *EditHtmlApi* | [**edit_html_html_append_paragraph**](docs/EditHtmlApi.md#edit_html_html_append_paragraph) | **POST** /convert/edit/html/append/paragraph | Append a Paragraph to an HTML Document *EditHtmlApi* | [**edit_html_html_create_blank_document**](docs/EditHtmlApi.md#edit_html_html_create_blank_document) | **POST** /convert/edit/html/create/blank | Create a Blank HTML Document +*EditHtmlApi* | [**edit_html_html_get_links**](docs/EditHtmlApi.md#edit_html_html_get_links) | **POST** /convert/edit/html/extract/links | Extract resolved link URLs from HTML File *EditPdfApi* | [**edit_pdf_add_annotations**](docs/EditPdfApi.md#edit_pdf_add_annotations) | **POST** /convert/edit/pdf/annotations/add-item | Add one or more PDF annotations, comments in the PDF document *EditPdfApi* | [**edit_pdf_convert_to_pdf_a**](docs/EditPdfApi.md#edit_pdf_convert_to_pdf_a) | **POST** /convert/edit/pdf/optimize/pdf-a | Convert a PDF file to PDF/A *EditPdfApi* | [**edit_pdf_decrypt**](docs/EditPdfApi.md#edit_pdf_decrypt) | **POST** /convert/edit/pdf/decrypt | Decrypt and password-protect a PDF @@ -291,6 +292,8 @@ Class | Method | HTTP request | Description *EditTextApi* | [**edit_text_trim_whitespace**](docs/EditTextApi.md#edit_text_trim_whitespace) | **POST** /convert/edit/text/remove/whitespace/trim | Trim leading and trailing whitespace from text string *MergeDocumentApi* | [**merge_document_docx**](docs/MergeDocumentApi.md#merge_document_docx) | **POST** /convert/merge/docx | Merge Two Word DOCX Together *MergeDocumentApi* | [**merge_document_docx_multi**](docs/MergeDocumentApi.md#merge_document_docx_multi) | **POST** /convert/merge/docx/multi | Merge Multple Word DOCX Together +*MergeDocumentApi* | [**merge_document_html**](docs/MergeDocumentApi.md#merge_document_html) | **POST** /convert/merge/html | Merge Two HTML (HTM) Files Together +*MergeDocumentApi* | [**merge_document_html_multi**](docs/MergeDocumentApi.md#merge_document_html_multi) | **POST** /convert/merge/html/multi | Merge Multple HTML (HTM) Files Together *MergeDocumentApi* | [**merge_document_pdf**](docs/MergeDocumentApi.md#merge_document_pdf) | **POST** /convert/merge/pdf | Merge Two PDF Files Together *MergeDocumentApi* | [**merge_document_pdf_multi**](docs/MergeDocumentApi.md#merge_document_pdf_multi) | **POST** /convert/merge/pdf/multi | Merge Multple PDF Files Together *MergeDocumentApi* | [**merge_document_png**](docs/MergeDocumentApi.md#merge_document_png) | **POST** /convert/merge/png/vertical | Merge Two PNG Files Together @@ -315,6 +318,7 @@ Class | Method | HTTP request | Description *ValidateDocumentApi* | [**validate_document_eml_validation**](docs/ValidateDocumentApi.md#validate_document_eml_validation) | **POST** /convert/validate/eml | Validate if an EML file is executable *ValidateDocumentApi* | [**validate_document_executable_validation**](docs/ValidateDocumentApi.md#validate_document_executable_validation) | **POST** /convert/validate/executable | Validate if a file is executable *ValidateDocumentApi* | [**validate_document_g_zip_validation**](docs/ValidateDocumentApi.md#validate_document_g_zip_validation) | **POST** /convert/validate/gzip | Validate a GZip Archive file (gzip or gz) +*ValidateDocumentApi* | [**validate_document_html_ssrf_validation**](docs/ValidateDocumentApi.md#validate_document_html_ssrf_validation) | **POST** /convert/validate/html/ssrf-threat-check | Validate an HTML file and checks for SSRF threats *ValidateDocumentApi* | [**validate_document_html_validation**](docs/ValidateDocumentApi.md#validate_document_html_validation) | **POST** /convert/validate/html | Validate an HTML file *ValidateDocumentApi* | [**validate_document_image_validation**](docs/ValidateDocumentApi.md#validate_document_image_validation) | **POST** /convert/validate/image | Validate an Image File *ValidateDocumentApi* | [**validate_document_jpg_validation**](docs/ValidateDocumentApi.md#validate_document_jpg_validation) | **POST** /convert/validate/jpg | Validate a JPG File @@ -470,10 +474,14 @@ Class | Method | HTTP request | Description - [GetXlsxStylesResponse](docs/GetXlsxStylesResponse.md) - [GetXlsxWorksheetsRequest](docs/GetXlsxWorksheetsRequest.md) - [GetXlsxWorksheetsResponse](docs/GetXlsxWorksheetsResponse.md) + - [HtmlGetLinksResponse](docs/HtmlGetLinksResponse.md) + - [HtmlHyperlink](docs/HtmlHyperlink.md) - [HtmlMdResult](docs/HtmlMdResult.md) + - [HtmlSsrfThreatCheckResult](docs/HtmlSsrfThreatCheckResult.md) - [HtmlTemplateApplicationRequest](docs/HtmlTemplateApplicationRequest.md) - [HtmlTemplateApplicationResponse](docs/HtmlTemplateApplicationResponse.md) - [HtmlTemplateOperation](docs/HtmlTemplateOperation.md) + - [HtmlThreatLink](docs/HtmlThreatLink.md) - [HtmlToOfficeRequest](docs/HtmlToOfficeRequest.md) - [HtmlToPdfRequest](docs/HtmlToPdfRequest.md) - [HtmlToPngRequest](docs/HtmlToPngRequest.md) diff --git a/cloudmersive_convert_api_client/__init__.py b/cloudmersive_convert_api_client/__init__.py index a6e637a..109b43e 100644 --- a/cloudmersive_convert_api_client/__init__.py +++ b/cloudmersive_convert_api_client/__init__.py @@ -167,10 +167,14 @@ from cloudmersive_convert_api_client.models.get_xlsx_styles_response import GetXlsxStylesResponse from cloudmersive_convert_api_client.models.get_xlsx_worksheets_request import GetXlsxWorksheetsRequest from cloudmersive_convert_api_client.models.get_xlsx_worksheets_response import GetXlsxWorksheetsResponse +from cloudmersive_convert_api_client.models.html_get_links_response import HtmlGetLinksResponse +from cloudmersive_convert_api_client.models.html_hyperlink import HtmlHyperlink from cloudmersive_convert_api_client.models.html_md_result import HtmlMdResult +from cloudmersive_convert_api_client.models.html_ssrf_threat_check_result import HtmlSsrfThreatCheckResult from cloudmersive_convert_api_client.models.html_template_application_request import HtmlTemplateApplicationRequest from cloudmersive_convert_api_client.models.html_template_application_response import HtmlTemplateApplicationResponse from cloudmersive_convert_api_client.models.html_template_operation import HtmlTemplateOperation +from cloudmersive_convert_api_client.models.html_threat_link import HtmlThreatLink from cloudmersive_convert_api_client.models.html_to_office_request import HtmlToOfficeRequest from cloudmersive_convert_api_client.models.html_to_pdf_request import HtmlToPdfRequest from cloudmersive_convert_api_client.models.html_to_png_request import HtmlToPngRequest diff --git a/cloudmersive_convert_api_client/api/edit_html_api.py b/cloudmersive_convert_api_client/api/edit_html_api.py index efda8cf..c257efa 100644 --- a/cloudmersive_convert_api_client/api/edit_html_api.py +++ b/cloudmersive_convert_api_client/api/edit_html_api.py @@ -579,3 +579,102 @@ def edit_html_html_create_blank_document_with_http_info(self, **kwargs): # noqa _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) + + def edit_html_html_get_links(self, **kwargs): # noqa: E501 + """Extract resolved link URLs from HTML File # noqa: E501 + + Extracts the resolved link URLs, fully-qualified if possible, from an input HTML file. # 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_html_html_get_links(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param file input_file: Optional: Input file to perform the operation on. + :param str input_file_url: Optional: URL of a file to operate on as input. + :param str base_url: Optional: Base URL of the page, such as https://mydomain.com + :return: HtmlGetLinksResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.edit_html_html_get_links_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.edit_html_html_get_links_with_http_info(**kwargs) # noqa: E501 + return data + + def edit_html_html_get_links_with_http_info(self, **kwargs): # noqa: E501 + """Extract resolved link URLs from HTML File # noqa: E501 + + Extracts the resolved link URLs, fully-qualified if possible, from an input HTML file. # 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_html_html_get_links_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param file input_file: Optional: Input file to perform the operation on. + :param str input_file_url: Optional: URL of a file to operate on as input. + :param str base_url: Optional: Base URL of the page, such as https://mydomain.com + :return: HtmlGetLinksResponse + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['input_file', 'input_file_url', 'base_url'] # 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_html_html_get_links" % key + ) + params[key] = val + del params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + if 'input_file_url' in params: + header_params['inputFileUrl'] = params['input_file_url'] # noqa: E501 + if 'base_url' in params: + header_params['baseUrl'] = params['base_url'] # noqa: E501 + + form_params = [] + local_var_files = {} + if 'input_file' in params: + local_var_files['inputFile'] = params['input_file'] # noqa: E501 + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json', 'text/json', 'application/xml', 'text/xml']) # noqa: E501 + + # Authentication setting + auth_settings = ['Apikey'] # noqa: E501 + + return self.api_client.call_api( + '/convert/edit/html/extract/links', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='HtmlGetLinksResponse', # 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) diff --git a/cloudmersive_convert_api_client/api/merge_document_api.py b/cloudmersive_convert_api_client/api/merge_document_api.py index 5d41a2c..6f81249 100644 --- a/cloudmersive_convert_api_client/api/merge_document_api.py +++ b/cloudmersive_convert_api_client/api/merge_document_api.py @@ -279,6 +279,252 @@ def merge_document_docx_multi_with_http_info(self, input_file1, input_file2, **k _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) + def merge_document_html(self, input_file1, input_file2, **kwargs): # noqa: E501 + """Merge Two HTML (HTM) Files Together # noqa: E501 + + Combine two HTML (.HTM) files into a single text document, preserving the order of the input documents in the combined document by stacking them vertically. The title will be taken from the first document. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.merge_document_html(input_file1, input_file2, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param file input_file1: First input file to perform the operation on. (required) + :param file input_file2: Second input file to perform the operation on (more than 2 can be supplied). (required) + :return: object + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.merge_document_html_with_http_info(input_file1, input_file2, **kwargs) # noqa: E501 + else: + (data) = self.merge_document_html_with_http_info(input_file1, input_file2, **kwargs) # noqa: E501 + return data + + def merge_document_html_with_http_info(self, input_file1, input_file2, **kwargs): # noqa: E501 + """Merge Two HTML (HTM) Files Together # noqa: E501 + + Combine two HTML (.HTM) files into a single text document, preserving the order of the input documents in the combined document by stacking them vertically. The title will be taken from the first document. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.merge_document_html_with_http_info(input_file1, input_file2, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param file input_file1: First input file to perform the operation on. (required) + :param file input_file2: Second input file to perform the operation on (more than 2 can be supplied). (required) + :return: object + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['input_file1', 'input_file2'] # 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 merge_document_html" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'input_file1' is set + if ('input_file1' not in params or + params['input_file1'] is None): + raise ValueError("Missing the required parameter `input_file1` when calling `merge_document_html`") # noqa: E501 + # verify the required parameter 'input_file2' is set + if ('input_file2' not in params or + params['input_file2'] is None): + raise ValueError("Missing the required parameter `input_file2` when calling `merge_document_html`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + if 'input_file1' in params: + local_var_files['inputFile1'] = params['input_file1'] # noqa: E501 + if 'input_file2' in params: + local_var_files['inputFile2'] = params['input_file2'] # noqa: E501 + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/octet-stream']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['multipart/form-data']) # noqa: E501 + + # Authentication setting + auth_settings = ['Apikey'] # noqa: E501 + + return self.api_client.call_api( + '/convert/merge/html', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='object', # 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 merge_document_html_multi(self, input_file1, input_file2, **kwargs): # noqa: E501 + """Merge Multple HTML (HTM) Files Together # noqa: E501 + + Combine multiple HTML (.HTM) files into a single text document, preserving the order of the input documents in the combined document by stacking them vertically. The title will be taken from the first document. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.merge_document_html_multi(input_file1, input_file2, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param file input_file1: First input file to perform the operation on. (required) + :param file input_file2: Second input file to perform the operation on. (required) + :param file input_file3: Third input file to perform the operation on. + :param file input_file4: Fourth input file to perform the operation on. + :param file input_file5: Fifth input file to perform the operation on. + :param file input_file6: Sixth input file to perform the operation on. + :param file input_file7: Seventh input file to perform the operation on. + :param file input_file8: Eighth input file to perform the operation on. + :param file input_file9: Ninth input file to perform the operation on. + :param file input_file10: Tenth input file to perform the operation on. + :return: str + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.merge_document_html_multi_with_http_info(input_file1, input_file2, **kwargs) # noqa: E501 + else: + (data) = self.merge_document_html_multi_with_http_info(input_file1, input_file2, **kwargs) # noqa: E501 + return data + + def merge_document_html_multi_with_http_info(self, input_file1, input_file2, **kwargs): # noqa: E501 + """Merge Multple HTML (HTM) Files Together # noqa: E501 + + Combine multiple HTML (.HTM) files into a single text document, preserving the order of the input documents in the combined document by stacking them vertically. The title will be taken from the first document. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.merge_document_html_multi_with_http_info(input_file1, input_file2, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param file input_file1: First input file to perform the operation on. (required) + :param file input_file2: Second input file to perform the operation on. (required) + :param file input_file3: Third input file to perform the operation on. + :param file input_file4: Fourth input file to perform the operation on. + :param file input_file5: Fifth input file to perform the operation on. + :param file input_file6: Sixth input file to perform the operation on. + :param file input_file7: Seventh input file to perform the operation on. + :param file input_file8: Eighth input file to perform the operation on. + :param file input_file9: Ninth input file to perform the operation on. + :param file input_file10: Tenth input file to perform the operation on. + :return: str + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['input_file1', 'input_file2', 'input_file3', 'input_file4', 'input_file5', 'input_file6', 'input_file7', 'input_file8', 'input_file9', 'input_file10'] # 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 merge_document_html_multi" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'input_file1' is set + if ('input_file1' not in params or + params['input_file1'] is None): + raise ValueError("Missing the required parameter `input_file1` when calling `merge_document_html_multi`") # noqa: E501 + # verify the required parameter 'input_file2' is set + if ('input_file2' not in params or + params['input_file2'] is None): + raise ValueError("Missing the required parameter `input_file2` when calling `merge_document_html_multi`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + if 'input_file1' in params: + local_var_files['inputFile1'] = params['input_file1'] # noqa: E501 + if 'input_file2' in params: + local_var_files['inputFile2'] = params['input_file2'] # noqa: E501 + if 'input_file3' in params: + local_var_files['inputFile3'] = params['input_file3'] # noqa: E501 + if 'input_file4' in params: + local_var_files['inputFile4'] = params['input_file4'] # noqa: E501 + if 'input_file5' in params: + local_var_files['inputFile5'] = params['input_file5'] # noqa: E501 + if 'input_file6' in params: + local_var_files['inputFile6'] = params['input_file6'] # noqa: E501 + if 'input_file7' in params: + local_var_files['inputFile7'] = params['input_file7'] # noqa: E501 + if 'input_file8' in params: + local_var_files['inputFile8'] = params['input_file8'] # noqa: E501 + if 'input_file9' in params: + local_var_files['inputFile9'] = params['input_file9'] # noqa: E501 + if 'input_file10' in params: + local_var_files['inputFile10'] = params['input_file10'] # noqa: E501 + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/octet-stream']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['multipart/form-data']) # noqa: E501 + + # Authentication setting + auth_settings = ['Apikey'] # noqa: E501 + + return self.api_client.call_api( + '/convert/merge/html/multi', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='str', # 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 merge_document_pdf(self, input_file1, input_file2, **kwargs): # noqa: E501 """Merge Two PDF Files Together # noqa: E501 diff --git a/cloudmersive_convert_api_client/api/validate_document_api.py b/cloudmersive_convert_api_client/api/validate_document_api.py index 975c407..8d9fa65 100644 --- a/cloudmersive_convert_api_client/api/validate_document_api.py +++ b/cloudmersive_convert_api_client/api/validate_document_api.py @@ -627,6 +627,105 @@ def validate_document_g_zip_validation_with_http_info(self, input_file, **kwargs _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) + def validate_document_html_ssrf_validation(self, input_file, **kwargs): # noqa: E501 + """Validate an HTML file and checks for SSRF threats # noqa: E501 + + Validate an HTML document file and checks for SSRF (Server-side Request Forgery) threats in the file; if the document is not valid, identifies the errors in the document # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.validate_document_html_ssrf_validation(input_file, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param file input_file: Input file to perform the operation on. (required) + :return: HtmlSsrfThreatCheckResult + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.validate_document_html_ssrf_validation_with_http_info(input_file, **kwargs) # noqa: E501 + else: + (data) = self.validate_document_html_ssrf_validation_with_http_info(input_file, **kwargs) # noqa: E501 + return data + + def validate_document_html_ssrf_validation_with_http_info(self, input_file, **kwargs): # noqa: E501 + """Validate an HTML file and checks for SSRF threats # noqa: E501 + + Validate an HTML document file and checks for SSRF (Server-side Request Forgery) threats in the file; if the document is not valid, identifies the errors in the document # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.validate_document_html_ssrf_validation_with_http_info(input_file, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param file input_file: Input file to perform the operation on. (required) + :return: HtmlSsrfThreatCheckResult + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['input_file'] # 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 validate_document_html_ssrf_validation" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'input_file' is set + if ('input_file' not in params or + params['input_file'] is None): + raise ValueError("Missing the required parameter `input_file` when calling `validate_document_html_ssrf_validation`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + if 'input_file' in params: + local_var_files['inputFile'] = params['input_file'] # noqa: E501 + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json', 'text/json', 'application/xml', 'text/xml']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['multipart/form-data']) # noqa: E501 + + # Authentication setting + auth_settings = ['Apikey'] # noqa: E501 + + return self.api_client.call_api( + '/convert/validate/html/ssrf-threat-check', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='HtmlSsrfThreatCheckResult', # 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 validate_document_html_validation(self, input_file, **kwargs): # noqa: E501 """Validate an HTML file # noqa: E501 diff --git a/cloudmersive_convert_api_client/api_client.py b/cloudmersive_convert_api_client/api_client.py index a5bfe49..2a87ae9 100644 --- a/cloudmersive_convert_api_client/api_client.py +++ b/cloudmersive_convert_api_client/api_client.py @@ -74,7 +74,7 @@ def __init__(self, configuration=None, header_name=None, header_value=None, self.default_headers[header_name] = header_value self.cookie = cookie # Set default User-Agent. - self.user_agent = 'Swagger-Codegen/3.1.1/python' + self.user_agent = 'Swagger-Codegen/3.1.2/python' def __del__(self): if self._pool is not None: diff --git a/cloudmersive_convert_api_client/configuration.py b/cloudmersive_convert_api_client/configuration.py index cbb56e6..92e3018 100644 --- a/cloudmersive_convert_api_client/configuration.py +++ b/cloudmersive_convert_api_client/configuration.py @@ -248,5 +248,5 @@ def to_debug_report(self): "OS: {env}\n"\ "Python Version: {pyversion}\n"\ "Version of the API: v1\n"\ - "SDK Package Version: 3.1.1".\ + "SDK Package Version: 3.1.2".\ format(env=sys.platform, pyversion=sys.version) diff --git a/cloudmersive_convert_api_client/models/__init__.py b/cloudmersive_convert_api_client/models/__init__.py index cfc2b8e..7c84dcd 100644 --- a/cloudmersive_convert_api_client/models/__init__.py +++ b/cloudmersive_convert_api_client/models/__init__.py @@ -145,10 +145,14 @@ from cloudmersive_convert_api_client.models.get_xlsx_styles_response import GetXlsxStylesResponse from cloudmersive_convert_api_client.models.get_xlsx_worksheets_request import GetXlsxWorksheetsRequest from cloudmersive_convert_api_client.models.get_xlsx_worksheets_response import GetXlsxWorksheetsResponse +from cloudmersive_convert_api_client.models.html_get_links_response import HtmlGetLinksResponse +from cloudmersive_convert_api_client.models.html_hyperlink import HtmlHyperlink from cloudmersive_convert_api_client.models.html_md_result import HtmlMdResult +from cloudmersive_convert_api_client.models.html_ssrf_threat_check_result import HtmlSsrfThreatCheckResult from cloudmersive_convert_api_client.models.html_template_application_request import HtmlTemplateApplicationRequest from cloudmersive_convert_api_client.models.html_template_application_response import HtmlTemplateApplicationResponse from cloudmersive_convert_api_client.models.html_template_operation import HtmlTemplateOperation +from cloudmersive_convert_api_client.models.html_threat_link import HtmlThreatLink from cloudmersive_convert_api_client.models.html_to_office_request import HtmlToOfficeRequest from cloudmersive_convert_api_client.models.html_to_pdf_request import HtmlToPdfRequest from cloudmersive_convert_api_client.models.html_to_png_request import HtmlToPngRequest diff --git a/cloudmersive_convert_api_client/models/html_get_links_response.py b/cloudmersive_convert_api_client/models/html_get_links_response.py new file mode 100644 index 0000000..d60b1d9 --- /dev/null +++ b/cloudmersive_convert_api_client/models/html_get_links_response.py @@ -0,0 +1,145 @@ +# coding: utf-8 + +""" + convertapi + + Convert API lets you effortlessly convert file formats and types. # noqa: E501 + + OpenAPI spec version: v1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + + +class HtmlGetLinksResponse(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'successful': 'bool', + 'links': 'list[HtmlHyperlink]' + } + + attribute_map = { + 'successful': 'Successful', + 'links': 'Links' + } + + def __init__(self, successful=None, links=None): # noqa: E501 + """HtmlGetLinksResponse - a model defined in Swagger""" # noqa: E501 + + self._successful = None + self._links = None + self.discriminator = None + + if successful is not None: + self.successful = successful + if links is not None: + self.links = links + + @property + def successful(self): + """Gets the successful of this HtmlGetLinksResponse. # noqa: E501 + + True if the operation was successful, false otherwise # noqa: E501 + + :return: The successful of this HtmlGetLinksResponse. # noqa: E501 + :rtype: bool + """ + return self._successful + + @successful.setter + def successful(self, successful): + """Sets the successful of this HtmlGetLinksResponse. + + True if the operation was successful, false otherwise # noqa: E501 + + :param successful: The successful of this HtmlGetLinksResponse. # noqa: E501 + :type: bool + """ + + self._successful = successful + + @property + def links(self): + """Gets the links of this HtmlGetLinksResponse. # noqa: E501 + + All hyperlinks in the HTML document # noqa: E501 + + :return: The links of this HtmlGetLinksResponse. # noqa: E501 + :rtype: list[HtmlHyperlink] + """ + return self._links + + @links.setter + def links(self, links): + """Sets the links of this HtmlGetLinksResponse. + + All hyperlinks in the HTML document # noqa: E501 + + :param links: The links of this HtmlGetLinksResponse. # noqa: E501 + :type: list[HtmlHyperlink] + """ + + self._links = links + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(HtmlGetLinksResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, HtmlGetLinksResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/cloudmersive_convert_api_client/models/html_hyperlink.py b/cloudmersive_convert_api_client/models/html_hyperlink.py new file mode 100644 index 0000000..34650af --- /dev/null +++ b/cloudmersive_convert_api_client/models/html_hyperlink.py @@ -0,0 +1,145 @@ +# coding: utf-8 + +""" + convertapi + + Convert API lets you effortlessly convert file formats and types. # noqa: E501 + + OpenAPI spec version: v1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + + +class HtmlHyperlink(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'anchortext': 'str', + 'url': 'str' + } + + attribute_map = { + 'anchortext': 'Anchortext', + 'url': 'Url' + } + + def __init__(self, anchortext=None, url=None): # noqa: E501 + """HtmlHyperlink - a model defined in Swagger""" # noqa: E501 + + self._anchortext = None + self._url = None + self.discriminator = None + + if anchortext is not None: + self.anchortext = anchortext + if url is not None: + self.url = url + + @property + def anchortext(self): + """Gets the anchortext of this HtmlHyperlink. # noqa: E501 + + Anchor text of the hyperlink, e.g. Click Here # noqa: E501 + + :return: The anchortext of this HtmlHyperlink. # noqa: E501 + :rtype: str + """ + return self._anchortext + + @anchortext.setter + def anchortext(self, anchortext): + """Sets the anchortext of this HtmlHyperlink. + + Anchor text of the hyperlink, e.g. Click Here # noqa: E501 + + :param anchortext: The anchortext of this HtmlHyperlink. # noqa: E501 + :type: str + """ + + self._anchortext = anchortext + + @property + def url(self): + """Gets the url of this HtmlHyperlink. # noqa: E501 + + URL of the hyperlink; fully-qualified if possible, otherwise relative # noqa: E501 + + :return: The url of this HtmlHyperlink. # noqa: E501 + :rtype: str + """ + return self._url + + @url.setter + def url(self, url): + """Sets the url of this HtmlHyperlink. + + URL of the hyperlink; fully-qualified if possible, otherwise relative # noqa: E501 + + :param url: The url of this HtmlHyperlink. # noqa: E501 + :type: str + """ + + self._url = url + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(HtmlHyperlink, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, HtmlHyperlink): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/cloudmersive_convert_api_client/models/html_ssrf_threat_check_result.py b/cloudmersive_convert_api_client/models/html_ssrf_threat_check_result.py new file mode 100644 index 0000000..78f5fa0 --- /dev/null +++ b/cloudmersive_convert_api_client/models/html_ssrf_threat_check_result.py @@ -0,0 +1,173 @@ +# coding: utf-8 + +""" + convertapi + + Convert API lets you effortlessly convert file formats and types. # noqa: E501 + + OpenAPI spec version: v1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + + +class HtmlSsrfThreatCheckResult(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'is_valid': 'bool', + 'is_threat': 'bool', + 'threat_links': 'list[HtmlThreatLink]' + } + + attribute_map = { + 'is_valid': 'IsValid', + 'is_threat': 'IsThreat', + 'threat_links': 'ThreatLinks' + } + + def __init__(self, is_valid=None, is_threat=None, threat_links=None): # noqa: E501 + """HtmlSsrfThreatCheckResult - a model defined in Swagger""" # noqa: E501 + + self._is_valid = None + self._is_threat = None + self._threat_links = None + self.discriminator = None + + if is_valid is not None: + self.is_valid = is_valid + if is_threat is not None: + self.is_threat = is_threat + if threat_links is not None: + self.threat_links = threat_links + + @property + def is_valid(self): + """Gets the is_valid of this HtmlSsrfThreatCheckResult. # noqa: E501 + + True if the document is valid and has no errors, false otherwise # noqa: E501 + + :return: The is_valid of this HtmlSsrfThreatCheckResult. # noqa: E501 + :rtype: bool + """ + return self._is_valid + + @is_valid.setter + def is_valid(self, is_valid): + """Sets the is_valid of this HtmlSsrfThreatCheckResult. + + True if the document is valid and has no errors, false otherwise # noqa: E501 + + :param is_valid: The is_valid of this HtmlSsrfThreatCheckResult. # noqa: E501 + :type: bool + """ + + self._is_valid = is_valid + + @property + def is_threat(self): + """Gets the is_threat of this HtmlSsrfThreatCheckResult. # noqa: E501 + + True if the document contains an SSRF threat, false otherwise # noqa: E501 + + :return: The is_threat of this HtmlSsrfThreatCheckResult. # noqa: E501 + :rtype: bool + """ + return self._is_threat + + @is_threat.setter + def is_threat(self, is_threat): + """Sets the is_threat of this HtmlSsrfThreatCheckResult. + + True if the document contains an SSRF threat, false otherwise # noqa: E501 + + :param is_threat: The is_threat of this HtmlSsrfThreatCheckResult. # noqa: E501 + :type: bool + """ + + self._is_threat = is_threat + + @property + def threat_links(self): + """Gets the threat_links of this HtmlSsrfThreatCheckResult. # noqa: E501 + + Links found in the input HTML that contains threats # noqa: E501 + + :return: The threat_links of this HtmlSsrfThreatCheckResult. # noqa: E501 + :rtype: list[HtmlThreatLink] + """ + return self._threat_links + + @threat_links.setter + def threat_links(self, threat_links): + """Sets the threat_links of this HtmlSsrfThreatCheckResult. + + Links found in the input HTML that contains threats # noqa: E501 + + :param threat_links: The threat_links of this HtmlSsrfThreatCheckResult. # noqa: E501 + :type: list[HtmlThreatLink] + """ + + self._threat_links = threat_links + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(HtmlSsrfThreatCheckResult, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, HtmlSsrfThreatCheckResult): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/cloudmersive_convert_api_client/models/html_threat_link.py b/cloudmersive_convert_api_client/models/html_threat_link.py new file mode 100644 index 0000000..03f60ad --- /dev/null +++ b/cloudmersive_convert_api_client/models/html_threat_link.py @@ -0,0 +1,145 @@ +# coding: utf-8 + +""" + convertapi + + Convert API lets you effortlessly convert file formats and types. # noqa: E501 + + OpenAPI spec version: v1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + + +class HtmlThreatLink(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'link_url': 'str', + 'threat_level': 'str' + } + + attribute_map = { + 'link_url': 'LinkUrl', + 'threat_level': 'ThreatLevel' + } + + def __init__(self, link_url=None, threat_level=None): # noqa: E501 + """HtmlThreatLink - a model defined in Swagger""" # noqa: E501 + + self._link_url = None + self._threat_level = None + self.discriminator = None + + if link_url is not None: + self.link_url = link_url + if threat_level is not None: + self.threat_level = threat_level + + @property + def link_url(self): + """Gets the link_url of this HtmlThreatLink. # noqa: E501 + + URL of the link # noqa: E501 + + :return: The link_url of this HtmlThreatLink. # noqa: E501 + :rtype: str + """ + return self._link_url + + @link_url.setter + def link_url(self, link_url): + """Sets the link_url of this HtmlThreatLink. + + URL of the link # noqa: E501 + + :param link_url: The link_url of this HtmlThreatLink. # noqa: E501 + :type: str + """ + + self._link_url = link_url + + @property + def threat_level(self): + """Gets the threat_level of this HtmlThreatLink. # noqa: E501 + + Threat assessment level; possible values are None, Low, Medium and High # noqa: E501 + + :return: The threat_level of this HtmlThreatLink. # noqa: E501 + :rtype: str + """ + return self._threat_level + + @threat_level.setter + def threat_level(self, threat_level): + """Sets the threat_level of this HtmlThreatLink. + + Threat assessment level; possible values are None, Low, Medium and High # noqa: E501 + + :param threat_level: The threat_level of this HtmlThreatLink. # noqa: E501 + :type: str + """ + + self._threat_level = threat_level + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(HtmlThreatLink, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, HtmlThreatLink): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/docs/EditHtmlApi.md b/docs/EditHtmlApi.md index 1dc421f..2881106 100644 --- a/docs/EditHtmlApi.md +++ b/docs/EditHtmlApi.md @@ -9,6 +9,7 @@ Method | HTTP request | Description [**edit_html_html_append_image_inline**](EditHtmlApi.md#edit_html_html_append_image_inline) | **POST** /convert/edit/html/append/image/inline | Append a Base64 Inline Image to an HTML Document [**edit_html_html_append_paragraph**](EditHtmlApi.md#edit_html_html_append_paragraph) | **POST** /convert/edit/html/append/paragraph | Append a Paragraph to an HTML Document [**edit_html_html_create_blank_document**](EditHtmlApi.md#edit_html_html_create_blank_document) | **POST** /convert/edit/html/create/blank | Create a Blank HTML Document +[**edit_html_html_get_links**](EditHtmlApi.md#edit_html_html_get_links) | **POST** /convert/edit/html/extract/links | Extract resolved link URLs from HTML File # **edit_html_html_append_heading** @@ -319,3 +320,61 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +# **edit_html_html_get_links** +> HtmlGetLinksResponse edit_html_html_get_links(input_file=input_file, input_file_url=input_file_url, base_url=base_url) + +Extract resolved link URLs from HTML File + +Extracts the resolved link URLs, fully-qualified if possible, from an input HTML file. + +### Example +```python +from __future__ import print_function +import time +import cloudmersive_convert_api_client +from cloudmersive_convert_api_client.rest import ApiException +from pprint import pprint + +# Configure API key authorization: Apikey +configuration = cloudmersive_convert_api_client.Configuration() +configuration.api_key['Apikey'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Apikey'] = 'Bearer' + +# create an instance of the API class +api_instance = cloudmersive_convert_api_client.EditHtmlApi(cloudmersive_convert_api_client.ApiClient(configuration)) +input_file = '/path/to/file.txt' # file | Optional: Input file to perform the operation on. (optional) +input_file_url = 'input_file_url_example' # str | Optional: URL of a file to operate on as input. (optional) +base_url = 'base_url_example' # str | Optional: Base URL of the page, such as https://mydomain.com (optional) + +try: + # Extract resolved link URLs from HTML File + api_response = api_instance.edit_html_html_get_links(input_file=input_file, input_file_url=input_file_url, base_url=base_url) + pprint(api_response) +except ApiException as e: + print("Exception when calling EditHtmlApi->edit_html_html_get_links: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **input_file** | **file**| Optional: Input file to perform the operation on. | [optional] + **input_file_url** | **str**| Optional: URL of a file to operate on as input. | [optional] + **base_url** | **str**| Optional: Base URL of the page, such as https://mydomain.com | [optional] + +### Return type + +[**HtmlGetLinksResponse**](HtmlGetLinksResponse.md) + +### Authorization + +[Apikey](../README.md#Apikey) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json, text/json, application/xml, text/xml + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/docs/HtmlGetLinksResponse.md b/docs/HtmlGetLinksResponse.md new file mode 100644 index 0000000..53603b8 --- /dev/null +++ b/docs/HtmlGetLinksResponse.md @@ -0,0 +1,11 @@ +# HtmlGetLinksResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**successful** | **bool** | True if the operation was successful, false otherwise | [optional] +**links** | [**list[HtmlHyperlink]**](HtmlHyperlink.md) | All hyperlinks in the HTML document | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/HtmlHyperlink.md b/docs/HtmlHyperlink.md new file mode 100644 index 0000000..5d925f7 --- /dev/null +++ b/docs/HtmlHyperlink.md @@ -0,0 +1,11 @@ +# HtmlHyperlink + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**anchortext** | **str** | Anchor text of the hyperlink, e.g. Click Here | [optional] +**url** | **str** | URL of the hyperlink; fully-qualified if possible, otherwise relative | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/HtmlSsrfThreatCheckResult.md b/docs/HtmlSsrfThreatCheckResult.md new file mode 100644 index 0000000..fafd569 --- /dev/null +++ b/docs/HtmlSsrfThreatCheckResult.md @@ -0,0 +1,12 @@ +# HtmlSsrfThreatCheckResult + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**is_valid** | **bool** | True if the document is valid and has no errors, false otherwise | [optional] +**is_threat** | **bool** | True if the document contains an SSRF threat, false otherwise | [optional] +**threat_links** | [**list[HtmlThreatLink]**](HtmlThreatLink.md) | Links found in the input HTML that contains threats | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/HtmlThreatLink.md b/docs/HtmlThreatLink.md new file mode 100644 index 0000000..ec973e2 --- /dev/null +++ b/docs/HtmlThreatLink.md @@ -0,0 +1,11 @@ +# HtmlThreatLink + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**link_url** | **str** | URL of the link | [optional] +**threat_level** | **str** | Threat assessment level; possible values are None, Low, Medium and High | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/MergeDocumentApi.md b/docs/MergeDocumentApi.md index 6906159..29d6dd7 100644 --- a/docs/MergeDocumentApi.md +++ b/docs/MergeDocumentApi.md @@ -6,6 +6,8 @@ Method | HTTP request | Description ------------- | ------------- | ------------- [**merge_document_docx**](MergeDocumentApi.md#merge_document_docx) | **POST** /convert/merge/docx | Merge Two Word DOCX Together [**merge_document_docx_multi**](MergeDocumentApi.md#merge_document_docx_multi) | **POST** /convert/merge/docx/multi | Merge Multple Word DOCX Together +[**merge_document_html**](MergeDocumentApi.md#merge_document_html) | **POST** /convert/merge/html | Merge Two HTML (HTM) Files Together +[**merge_document_html_multi**](MergeDocumentApi.md#merge_document_html_multi) | **POST** /convert/merge/html/multi | Merge Multple HTML (HTM) Files Together [**merge_document_pdf**](MergeDocumentApi.md#merge_document_pdf) | **POST** /convert/merge/pdf | Merge Two PDF Files Together [**merge_document_pdf_multi**](MergeDocumentApi.md#merge_document_pdf_multi) | **POST** /convert/merge/pdf/multi | Merge Multple PDF Files Together [**merge_document_png**](MergeDocumentApi.md#merge_document_png) | **POST** /convert/merge/png/vertical | Merge Two PNG Files Together @@ -146,6 +148,134 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +# **merge_document_html** +> object merge_document_html(input_file1, input_file2) + +Merge Two HTML (HTM) Files Together + +Combine two HTML (.HTM) files into a single text document, preserving the order of the input documents in the combined document by stacking them vertically. The title will be taken from the first document. + +### Example +```python +from __future__ import print_function +import time +import cloudmersive_convert_api_client +from cloudmersive_convert_api_client.rest import ApiException +from pprint import pprint + +# Configure API key authorization: Apikey +configuration = cloudmersive_convert_api_client.Configuration() +configuration.api_key['Apikey'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Apikey'] = 'Bearer' + +# create an instance of the API class +api_instance = cloudmersive_convert_api_client.MergeDocumentApi(cloudmersive_convert_api_client.ApiClient(configuration)) +input_file1 = '/path/to/file.txt' # file | First input file to perform the operation on. +input_file2 = '/path/to/file.txt' # file | Second input file to perform the operation on (more than 2 can be supplied). + +try: + # Merge Two HTML (HTM) Files Together + api_response = api_instance.merge_document_html(input_file1, input_file2) + pprint(api_response) +except ApiException as e: + print("Exception when calling MergeDocumentApi->merge_document_html: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **input_file1** | **file**| First input file to perform the operation on. | + **input_file2** | **file**| Second input file to perform the operation on (more than 2 can be supplied). | + +### Return type + +**object** + +### Authorization + +[Apikey](../README.md#Apikey) + +### HTTP request headers + + - **Content-Type**: multipart/form-data + - **Accept**: application/octet-stream + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **merge_document_html_multi** +> str merge_document_html_multi(input_file1, input_file2, input_file3=input_file3, input_file4=input_file4, input_file5=input_file5, input_file6=input_file6, input_file7=input_file7, input_file8=input_file8, input_file9=input_file9, input_file10=input_file10) + +Merge Multple HTML (HTM) Files Together + +Combine multiple HTML (.HTM) files into a single text document, preserving the order of the input documents in the combined document by stacking them vertically. The title will be taken from the first document. + +### Example +```python +from __future__ import print_function +import time +import cloudmersive_convert_api_client +from cloudmersive_convert_api_client.rest import ApiException +from pprint import pprint + +# Configure API key authorization: Apikey +configuration = cloudmersive_convert_api_client.Configuration() +configuration.api_key['Apikey'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Apikey'] = 'Bearer' + +# create an instance of the API class +api_instance = cloudmersive_convert_api_client.MergeDocumentApi(cloudmersive_convert_api_client.ApiClient(configuration)) +input_file1 = '/path/to/file.txt' # file | First input file to perform the operation on. +input_file2 = '/path/to/file.txt' # file | Second input file to perform the operation on. +input_file3 = '/path/to/file.txt' # file | Third input file to perform the operation on. (optional) +input_file4 = '/path/to/file.txt' # file | Fourth input file to perform the operation on. (optional) +input_file5 = '/path/to/file.txt' # file | Fifth input file to perform the operation on. (optional) +input_file6 = '/path/to/file.txt' # file | Sixth input file to perform the operation on. (optional) +input_file7 = '/path/to/file.txt' # file | Seventh input file to perform the operation on. (optional) +input_file8 = '/path/to/file.txt' # file | Eighth input file to perform the operation on. (optional) +input_file9 = '/path/to/file.txt' # file | Ninth input file to perform the operation on. (optional) +input_file10 = '/path/to/file.txt' # file | Tenth input file to perform the operation on. (optional) + +try: + # Merge Multple HTML (HTM) Files Together + api_response = api_instance.merge_document_html_multi(input_file1, input_file2, input_file3=input_file3, input_file4=input_file4, input_file5=input_file5, input_file6=input_file6, input_file7=input_file7, input_file8=input_file8, input_file9=input_file9, input_file10=input_file10) + pprint(api_response) +except ApiException as e: + print("Exception when calling MergeDocumentApi->merge_document_html_multi: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **input_file1** | **file**| First input file to perform the operation on. | + **input_file2** | **file**| Second input file to perform the operation on. | + **input_file3** | **file**| Third input file to perform the operation on. | [optional] + **input_file4** | **file**| Fourth input file to perform the operation on. | [optional] + **input_file5** | **file**| Fifth input file to perform the operation on. | [optional] + **input_file6** | **file**| Sixth input file to perform the operation on. | [optional] + **input_file7** | **file**| Seventh input file to perform the operation on. | [optional] + **input_file8** | **file**| Eighth input file to perform the operation on. | [optional] + **input_file9** | **file**| Ninth input file to perform the operation on. | [optional] + **input_file10** | **file**| Tenth input file to perform the operation on. | [optional] + +### Return type + +**str** + +### Authorization + +[Apikey](../README.md#Apikey) + +### HTTP request headers + + - **Content-Type**: multipart/form-data + - **Accept**: application/octet-stream + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + # **merge_document_pdf** > str merge_document_pdf(input_file1, input_file2) diff --git a/docs/ValidateDocumentApi.md b/docs/ValidateDocumentApi.md index 6ae59e6..068cde1 100644 --- a/docs/ValidateDocumentApi.md +++ b/docs/ValidateDocumentApi.md @@ -10,6 +10,7 @@ Method | HTTP request | Description [**validate_document_eml_validation**](ValidateDocumentApi.md#validate_document_eml_validation) | **POST** /convert/validate/eml | Validate if an EML file is executable [**validate_document_executable_validation**](ValidateDocumentApi.md#validate_document_executable_validation) | **POST** /convert/validate/executable | Validate if a file is executable [**validate_document_g_zip_validation**](ValidateDocumentApi.md#validate_document_g_zip_validation) | **POST** /convert/validate/gzip | Validate a GZip Archive file (gzip or gz) +[**validate_document_html_ssrf_validation**](ValidateDocumentApi.md#validate_document_html_ssrf_validation) | **POST** /convert/validate/html/ssrf-threat-check | Validate an HTML file and checks for SSRF threats [**validate_document_html_validation**](ValidateDocumentApi.md#validate_document_html_validation) | **POST** /convert/validate/html | Validate an HTML file [**validate_document_image_validation**](ValidateDocumentApi.md#validate_document_image_validation) | **POST** /convert/validate/image | Validate an Image File [**validate_document_jpg_validation**](ValidateDocumentApi.md#validate_document_jpg_validation) | **POST** /convert/validate/jpg | Validate a JPG File @@ -350,6 +351,60 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +# **validate_document_html_ssrf_validation** +> HtmlSsrfThreatCheckResult validate_document_html_ssrf_validation(input_file) + +Validate an HTML file and checks for SSRF threats + +Validate an HTML document file and checks for SSRF (Server-side Request Forgery) threats in the file; if the document is not valid, identifies the errors in the document + +### Example +```python +from __future__ import print_function +import time +import cloudmersive_convert_api_client +from cloudmersive_convert_api_client.rest import ApiException +from pprint import pprint + +# Configure API key authorization: Apikey +configuration = cloudmersive_convert_api_client.Configuration() +configuration.api_key['Apikey'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Apikey'] = 'Bearer' + +# create an instance of the API class +api_instance = cloudmersive_convert_api_client.ValidateDocumentApi(cloudmersive_convert_api_client.ApiClient(configuration)) +input_file = '/path/to/file.txt' # file | Input file to perform the operation on. + +try: + # Validate an HTML file and checks for SSRF threats + api_response = api_instance.validate_document_html_ssrf_validation(input_file) + pprint(api_response) +except ApiException as e: + print("Exception when calling ValidateDocumentApi->validate_document_html_ssrf_validation: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **input_file** | **file**| Input file to perform the operation on. | + +### Return type + +[**HtmlSsrfThreatCheckResult**](HtmlSsrfThreatCheckResult.md) + +### Authorization + +[Apikey](../README.md#Apikey) + +### HTTP request headers + + - **Content-Type**: multipart/form-data + - **Accept**: application/json, text/json, application/xml, text/xml + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + # **validate_document_html_validation** > DocumentValidationResult validate_document_html_validation(input_file) diff --git a/packageconfig.json b/packageconfig.json index 2d8b5d5..c165d75 100644 --- a/packageconfig.json +++ b/packageconfig.json @@ -1,6 +1,6 @@ { "projectName": "cloudmersive_convert_api_client", "packageName": "cloudmersive_convert_api_client", - "packageVersion": "3.1.1", + "packageVersion": "3.1.2", "packageUrl": "https://www.cloudmersive.com/convert-api" } \ No newline at end of file diff --git a/setup.py b/setup.py index 29041d1..d20be3b 100644 --- a/setup.py +++ b/setup.py @@ -14,7 +14,7 @@ from setuptools import setup, find_packages # noqa: H301 NAME = "cloudmersive_convert_api_client" -VERSION = "3.1.1" +VERSION = "3.1.2" # To install the library, run the following # # python setup.py install diff --git a/test/test_html_get_links_response.py b/test/test_html_get_links_response.py new file mode 100644 index 0000000..8ab392f --- /dev/null +++ b/test/test_html_get_links_response.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + convertapi + + Convert API lets you effortlessly convert file formats and types. # noqa: E501 + + OpenAPI spec version: v1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import cloudmersive_convert_api_client +from cloudmersive_convert_api_client.models.html_get_links_response import HtmlGetLinksResponse # noqa: E501 +from cloudmersive_convert_api_client.rest import ApiException + + +class TestHtmlGetLinksResponse(unittest.TestCase): + """HtmlGetLinksResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testHtmlGetLinksResponse(self): + """Test HtmlGetLinksResponse""" + # FIXME: construct object with mandatory attributes with example values + # model = cloudmersive_convert_api_client.models.html_get_links_response.HtmlGetLinksResponse() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_html_hyperlink.py b/test/test_html_hyperlink.py new file mode 100644 index 0000000..f7b7e8a --- /dev/null +++ b/test/test_html_hyperlink.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + convertapi + + Convert API lets you effortlessly convert file formats and types. # noqa: E501 + + OpenAPI spec version: v1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import cloudmersive_convert_api_client +from cloudmersive_convert_api_client.models.html_hyperlink import HtmlHyperlink # noqa: E501 +from cloudmersive_convert_api_client.rest import ApiException + + +class TestHtmlHyperlink(unittest.TestCase): + """HtmlHyperlink unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testHtmlHyperlink(self): + """Test HtmlHyperlink""" + # FIXME: construct object with mandatory attributes with example values + # model = cloudmersive_convert_api_client.models.html_hyperlink.HtmlHyperlink() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_html_ssrf_threat_check_result.py b/test/test_html_ssrf_threat_check_result.py new file mode 100644 index 0000000..444b6c9 --- /dev/null +++ b/test/test_html_ssrf_threat_check_result.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + convertapi + + Convert API lets you effortlessly convert file formats and types. # noqa: E501 + + OpenAPI spec version: v1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import cloudmersive_convert_api_client +from cloudmersive_convert_api_client.models.html_ssrf_threat_check_result import HtmlSsrfThreatCheckResult # noqa: E501 +from cloudmersive_convert_api_client.rest import ApiException + + +class TestHtmlSsrfThreatCheckResult(unittest.TestCase): + """HtmlSsrfThreatCheckResult unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testHtmlSsrfThreatCheckResult(self): + """Test HtmlSsrfThreatCheckResult""" + # FIXME: construct object with mandatory attributes with example values + # model = cloudmersive_convert_api_client.models.html_ssrf_threat_check_result.HtmlSsrfThreatCheckResult() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_html_threat_link.py b/test/test_html_threat_link.py new file mode 100644 index 0000000..6baef2f --- /dev/null +++ b/test/test_html_threat_link.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + convertapi + + Convert API lets you effortlessly convert file formats and types. # noqa: E501 + + OpenAPI spec version: v1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import cloudmersive_convert_api_client +from cloudmersive_convert_api_client.models.html_threat_link import HtmlThreatLink # noqa: E501 +from cloudmersive_convert_api_client.rest import ApiException + + +class TestHtmlThreatLink(unittest.TestCase): + """HtmlThreatLink unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testHtmlThreatLink(self): + """Test HtmlThreatLink""" + # FIXME: construct object with mandatory attributes with example values + # model = cloudmersive_convert_api_client.models.html_threat_link.HtmlThreatLink() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main()