Class: CloudmersiveCdrApiClient::FileSanitizationApi
- Inherits:
-
Object
- Object
- CloudmersiveCdrApiClient::FileSanitizationApi
- Defined in:
- lib/cloudmersive-cdr-api-client/api/file_sanitization_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#file(opts = {}) ⇒ String
Content Disarm and Reconstruction on a File Processes the input file via CDR to produce a secured output file.
-
#file_advanced(opts = {}) ⇒ String
Advanced Content Disarm and Reconstruction on a File Processes the input file via CDR to produce a secured output file with advanced scan options and response headers containing scan metadata.
-
#file_advanced_with_http_info(opts = {}) ⇒ Array<(String, Fixnum, Hash)>
Advanced Content Disarm and Reconstruction on a File Processes the input file via CDR to produce a secured output file with advanced scan options and response headers containing scan metadata.
-
#file_to_pdf(opts = {}) ⇒ String
Content Disarm and Reconstruction on a File with PDFA Output Processes the input file via CDR to produce a secured PDF/A output file.
-
#file_to_pdf_advanced(opts = {}) ⇒ String
Advanced Content Disarm and Reconstruction on a File with PDFA Output Processes the input file via CDR to produce a secured PDF/A output file with advanced scan options and response headers containing scan metadata.
-
#file_to_pdf_advanced_with_http_info(opts = {}) ⇒ Array<(String, Fixnum, Hash)>
Advanced Content Disarm and Reconstruction on a File with PDFA Output Processes the input file via CDR to produce a secured PDF/A output file with advanced scan options and response headers containing scan metadata.
-
#file_to_pdf_with_http_info(opts = {}) ⇒ Array<(String, Fixnum, Hash)>
Content Disarm and Reconstruction on a File with PDFA Output Processes the input file via CDR to produce a secured PDF/A output file.
-
#file_with_http_info(opts = {}) ⇒ Array<(String, Fixnum, Hash)>
Content Disarm and Reconstruction on a File Processes the input file via CDR to produce a secured output file.
-
#initialize(api_client = ApiClient.default) ⇒ FileSanitizationApi
constructor
A new instance of FileSanitizationApi.
Constructor Details
#initialize(api_client = ApiClient.default) ⇒ FileSanitizationApi
Returns a new instance of FileSanitizationApi.
19 20 21 |
# File 'lib/cloudmersive-cdr-api-client/api/file_sanitization_api.rb', line 19 def initialize(api_client = ApiClient.default) @api_client = api_client end |
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
17 18 19 |
# File 'lib/cloudmersive-cdr-api-client/api/file_sanitization_api.rb', line 17 def api_client @api_client end |
Instance Method Details
#file(opts = {}) ⇒ String
Content Disarm and Reconstruction on a File Processes the input file via CDR to produce a secured output file. Input content is parsed, disarmed, and then reconstructed into a new output file with the same file format as the input.
27 28 29 30 |
# File 'lib/cloudmersive-cdr-api-client/api/file_sanitization_api.rb', line 27 def file(opts = {}) data, _status_code, _headers = file_with_http_info(opts) data end |
#file_advanced(opts = {}) ⇒ String
Advanced Content Disarm and Reconstruction on a File Processes the input file via CDR to produce a secured output file with advanced scan options and response headers containing scan metadata.
90 91 92 93 |
# File 'lib/cloudmersive-cdr-api-client/api/file_sanitization_api.rb', line 90 def file_advanced(opts = {}) data, _status_code, _headers = file_advanced_with_http_info(opts) data end |
#file_advanced_with_http_info(opts = {}) ⇒ Array<(String, Fixnum, Hash)>
Advanced Content Disarm and Reconstruction on a File Processes the input file via CDR to produce a secured output file with advanced scan options and response headers containing scan metadata.
112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 |
# File 'lib/cloudmersive-cdr-api-client/api/file_sanitization_api.rb', line 112 def file_advanced_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: FileSanitizationApi.file_advanced ...' end # resource path local_var_path = '/cdr/sanitization/file/advanced' # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/octet-stream']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data']) header_params[:'allowExecutables'] = opts[:'allow_executables'] if !opts[:'allow_executables'].nil? header_params[:'allowInvalidFiles'] = opts[:'allow_invalid_files'] if !opts[:'allow_invalid_files'].nil? header_params[:'allowScripts'] = opts[:'allow_scripts'] if !opts[:'allow_scripts'].nil? header_params[:'allowPasswordProtectedFiles'] = opts[:'allow_password_protected_files'] if !opts[:'allow_password_protected_files'].nil? header_params[:'allowMacros'] = opts[:'allow_macros'] if !opts[:'allow_macros'].nil? header_params[:'allowXmlExternalEntities'] = opts[:'allow_xml_external_entities'] if !opts[:'allow_xml_external_entities'].nil? header_params[:'allowInsecureDeserialization'] = opts[:'allow_insecure_deserialization'] if !opts[:'allow_insecure_deserialization'].nil? header_params[:'allowHtml'] = opts[:'allow_html'] if !opts[:'allow_html'].nil? header_params[:'allowUnsafeArchives'] = opts[:'allow_unsafe_archives'] if !opts[:'allow_unsafe_archives'].nil? header_params[:'allowOleEmbeddedObject'] = opts[:'allow_ole_embedded_object'] if !opts[:'allow_ole_embedded_object'].nil? header_params[:'allowUnwantedAction'] = opts[:'allow_unwanted_action'] if !opts[:'allow_unwanted_action'].nil? header_params[:'restrictFileTypes'] = opts[:'restrict_file_types'] if !opts[:'restrict_file_types'].nil? # form parameters form_params = {} form_params['InputFile'] = opts[:'input_file'] if !opts[:'input_file'].nil? # http body (model) post_body = nil auth_names = ['Apikey'] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'String') if @api_client.config.debugging @api_client.config.logger.debug "API called: FileSanitizationApi#file_advanced\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#file_to_pdf(opts = {}) ⇒ String
Content Disarm and Reconstruction on a File with PDFA Output Processes the input file via CDR to produce a secured PDF/A output file. Input content is parsed, disarmed, and then reconstructed into a new PDF/A output file.
165 166 167 168 |
# File 'lib/cloudmersive-cdr-api-client/api/file_sanitization_api.rb', line 165 def file_to_pdf(opts = {}) data, _status_code, _headers = file_to_pdf_with_http_info(opts) data end |
#file_to_pdf_advanced(opts = {}) ⇒ String
Advanced Content Disarm and Reconstruction on a File with PDFA Output Processes the input file via CDR to produce a secured PDF/A output file with advanced scan options and response headers containing scan metadata.
228 229 230 231 |
# File 'lib/cloudmersive-cdr-api-client/api/file_sanitization_api.rb', line 228 def file_to_pdf_advanced(opts = {}) data, _status_code, _headers = file_to_pdf_advanced_with_http_info(opts) data end |
#file_to_pdf_advanced_with_http_info(opts = {}) ⇒ Array<(String, Fixnum, Hash)>
Advanced Content Disarm and Reconstruction on a File with PDFA Output Processes the input file via CDR to produce a secured PDF/A output file with advanced scan options and response headers containing scan metadata.
250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 |
# File 'lib/cloudmersive-cdr-api-client/api/file_sanitization_api.rb', line 250 def file_to_pdf_advanced_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: FileSanitizationApi.file_to_pdf_advanced ...' end # resource path local_var_path = '/cdr/sanitization/file/to/pdf/advanced' # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/octet-stream']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data']) header_params[:'allowExecutables'] = opts[:'allow_executables'] if !opts[:'allow_executables'].nil? header_params[:'allowInvalidFiles'] = opts[:'allow_invalid_files'] if !opts[:'allow_invalid_files'].nil? header_params[:'allowScripts'] = opts[:'allow_scripts'] if !opts[:'allow_scripts'].nil? header_params[:'allowPasswordProtectedFiles'] = opts[:'allow_password_protected_files'] if !opts[:'allow_password_protected_files'].nil? header_params[:'allowMacros'] = opts[:'allow_macros'] if !opts[:'allow_macros'].nil? header_params[:'allowXmlExternalEntities'] = opts[:'allow_xml_external_entities'] if !opts[:'allow_xml_external_entities'].nil? header_params[:'allowInsecureDeserialization'] = opts[:'allow_insecure_deserialization'] if !opts[:'allow_insecure_deserialization'].nil? header_params[:'allowHtml'] = opts[:'allow_html'] if !opts[:'allow_html'].nil? header_params[:'allowUnsafeArchives'] = opts[:'allow_unsafe_archives'] if !opts[:'allow_unsafe_archives'].nil? header_params[:'allowOleEmbeddedObject'] = opts[:'allow_ole_embedded_object'] if !opts[:'allow_ole_embedded_object'].nil? header_params[:'allowUnwantedAction'] = opts[:'allow_unwanted_action'] if !opts[:'allow_unwanted_action'].nil? header_params[:'restrictFileTypes'] = opts[:'restrict_file_types'] if !opts[:'restrict_file_types'].nil? # form parameters form_params = {} form_params['InputFile'] = opts[:'input_file'] if !opts[:'input_file'].nil? # http body (model) post_body = nil auth_names = ['Apikey'] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'String') if @api_client.config.debugging @api_client.config.logger.debug "API called: FileSanitizationApi#file_to_pdf_advanced\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#file_to_pdf_with_http_info(opts = {}) ⇒ Array<(String, Fixnum, Hash)>
Content Disarm and Reconstruction on a File with PDFA Output Processes the input file via CDR to produce a secured PDF/A output file. Input content is parsed, disarmed, and then reconstructed into a new PDF/A output file.
175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 |
# File 'lib/cloudmersive-cdr-api-client/api/file_sanitization_api.rb', line 175 def file_to_pdf_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: FileSanitizationApi.file_to_pdf ...' end # resource path local_var_path = '/cdr/sanitization/file/to/pdf' # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/octet-stream']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data']) # form parameters form_params = {} form_params['InputFile'] = opts[:'input_file'] if !opts[:'input_file'].nil? # http body (model) post_body = nil auth_names = ['Apikey'] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'String') if @api_client.config.debugging @api_client.config.logger.debug "API called: FileSanitizationApi#file_to_pdf\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#file_with_http_info(opts = {}) ⇒ Array<(String, Fixnum, Hash)>
Content Disarm and Reconstruction on a File Processes the input file via CDR to produce a secured output file. Input content is parsed, disarmed, and then reconstructed into a new output file with the same file format as the input.
37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 |
# File 'lib/cloudmersive-cdr-api-client/api/file_sanitization_api.rb', line 37 def file_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: FileSanitizationApi.file ...' end # resource path local_var_path = '/cdr/sanitization/file' # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/octet-stream']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data']) # form parameters form_params = {} form_params['InputFile'] = opts[:'input_file'] if !opts[:'input_file'].nil? # http body (model) post_body = nil auth_names = ['Apikey'] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'String') if @api_client.config.debugging @api_client.config.logger.debug "API called: FileSanitizationApi#file\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |