Class: CloudmersiveVirusScanApiClient::ScanApi
- Inherits:
-
Object
- Object
- CloudmersiveVirusScanApiClient::ScanApi
- Defined in:
- lib/cloudmersive-virus-scan-api-client/api/scan_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#initialize(api_client = ApiClient.default) ⇒ ScanApi
constructor
A new instance of ScanApi.
-
#scan_file(input_file, opts = {}) ⇒ VirusScanResult
Scan a file for viruses Scan files and content for viruses.
-
#scan_file_advanced(input_file, opts = {}) ⇒ VirusScanAdvancedResult
Advanced Scan a file for viruses Advanced Scan files with 360-degree Content Protection across Viruses and Malware, executables, invalid files, scripts, and even restrictions on accepted file types with complete content verification.
-
#scan_file_advanced_with_http_info(input_file, opts = {}) ⇒ Array<(VirusScanAdvancedResult, Fixnum, Hash)>
Advanced Scan a file for viruses Advanced Scan files with 360-degree Content Protection across Viruses and Malware, executables, invalid files, scripts, and even restrictions on accepted file types with complete content verification.
-
#scan_file_with_http_info(input_file, opts = {}) ⇒ Array<(VirusScanResult, Fixnum, Hash)>
Scan a file for viruses Scan files and content for viruses.
-
#scan_website(input, opts = {}) ⇒ WebsiteScanResult
Scan a website for malicious content and threats Operation includes scanning the content of the URL for various types of malicious content and threats, including viruses and threats (including Phishing).
-
#scan_website_with_http_info(input, opts = {}) ⇒ Array<(WebsiteScanResult, Fixnum, Hash)>
Scan a website for malicious content and threats Operation includes scanning the content of the URL for various types of malicious content and threats, including viruses and threats (including Phishing).
Constructor Details
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
17 18 19 |
# File 'lib/cloudmersive-virus-scan-api-client/api/scan_api.rb', line 17 def api_client @api_client end |
Instance Method Details
#scan_file(input_file, opts = {}) ⇒ VirusScanResult
Scan a file for viruses Scan files and content for viruses. Leverage continuously updated signatures for millions of threats, and advanced high-performance scanning capabilities. Over 17 million virus and malware signatures. Continuous cloud-based updates. Wide file format support including Office, PDF, HTML, Flash. Zip support including .Zip, .Rar, .DMG, .Tar, and other archive formats. Multi-threat scanning across viruses, malware, trojans, ransomware, and spyware. High-speed in-memory scanning delivers subsecond typical response time.
27 28 29 30 |
# File 'lib/cloudmersive-virus-scan-api-client/api/scan_api.rb', line 27 def scan_file(input_file, opts = {}) data, _status_code, _headers = scan_file_with_http_info(input_file, opts) data end |
#scan_file_advanced(input_file, opts = {}) ⇒ VirusScanAdvancedResult
Advanced Scan a file for viruses Advanced Scan files with 360-degree Content Protection across Viruses and Malware, executables, invalid files, scripts, and even restrictions on accepted file types with complete content verification. Customize threat rules to your needs. Leverage continuously updated signatures for millions of threats, and advanced high-performance scanning capabilities. Over 17 million virus and malware signatures. Continuous cloud-based updates. Block threats beyond viruses including executables, scripts, invalid files, and more. Optionally limit input files to a specific set of file types (e.g. PDF and Word Documents only). Wide file format support including Office, PDF, HTML, Flash, MSG, and a wide range of image file formats. Zip support including .Zip, .Rar, .DMG, .Tar, and other archive formats. Multi-threat scanning across viruses, malware, trojans, ransomware, and spyware. High-speed in-memory scanning delivers subsecond typical response time.
95 96 97 98 |
# File 'lib/cloudmersive-virus-scan-api-client/api/scan_api.rb', line 95 def scan_file_advanced(input_file, opts = {}) data, _status_code, _headers = scan_file_advanced_with_http_info(input_file, opts) data end |
#scan_file_advanced_with_http_info(input_file, opts = {}) ⇒ Array<(VirusScanAdvancedResult, Fixnum, Hash)>
Advanced Scan a file for viruses Advanced Scan files with 360-degree Content Protection across Viruses and Malware, executables, invalid files, scripts, and even restrictions on accepted file types with complete content verification. Customize threat rules to your needs. Leverage continuously updated signatures for millions of threats, and advanced high-performance scanning capabilities. Over 17 million virus and malware signatures. Continuous cloud-based updates. Block threats beyond viruses including executables, scripts, invalid files, and more. Optionally limit input files to a specific set of file types (e.g. PDF and Word Documents only). Wide file format support including Office, PDF, HTML, Flash, MSG, and a wide range of image file formats. Zip support including .Zip, .Rar, .DMG, .Tar, and other archive formats. Multi-threat scanning across viruses, malware, trojans, ransomware, and spyware. High-speed in-memory scanning delivers subsecond typical response time.
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 160 161 162 163 164 165 166 167 168 169 170 |
# File 'lib/cloudmersive-virus-scan-api-client/api/scan_api.rb', line 118 def scan_file_advanced_with_http_info(input_file, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ScanApi.scan_file_advanced ...' end # verify the required parameter 'input_file' is set if @api_client.config.client_side_validation && input_file.nil? fail ArgumentError, "Missing the required parameter 'input_file' when calling ScanApi.scan_file_advanced" end # resource path local_var_path = '/virus/scan/file/advanced' # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data']) header_params[:'fileName'] = opts[:'file_name'] if !opts[:'file_name'].nil? 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[:'options'] = opts[:'options'] if !opts[:'options'].nil? header_params[:'restrictFileTypes'] = opts[:'restrict_file_types'] if !opts[:'restrict_file_types'].nil? # form parameters form_params = {} form_params['inputFile'] = input_file # 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 => 'VirusScanAdvancedResult') if @api_client.config.debugging @api_client.config.logger.debug "API called: ScanApi#scan_file_advanced\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#scan_file_with_http_info(input_file, opts = {}) ⇒ Array<(VirusScanResult, Fixnum, Hash)>
Scan a file for viruses Scan files and content for viruses. Leverage continuously updated signatures for millions of threats, and advanced high-performance scanning capabilities. Over 17 million virus and malware signatures. Continuous cloud-based updates. Wide file format support including Office, PDF, HTML, Flash. Zip support including .Zip, .Rar, .DMG, .Tar, and other archive formats. Multi-threat scanning across viruses, malware, trojans, ransomware, and spyware. High-speed in-memory scanning delivers subsecond typical response time.
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 73 74 75 76 |
# File 'lib/cloudmersive-virus-scan-api-client/api/scan_api.rb', line 37 def scan_file_with_http_info(input_file, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ScanApi.scan_file ...' end # verify the required parameter 'input_file' is set if @api_client.config.client_side_validation && input_file.nil? fail ArgumentError, "Missing the required parameter 'input_file' when calling ScanApi.scan_file" end # resource path local_var_path = '/virus/scan/file' # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data']) # form parameters form_params = {} form_params['inputFile'] = input_file # 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 => 'VirusScanResult') if @api_client.config.debugging @api_client.config.logger.debug "API called: ScanApi#scan_file\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#scan_website(input, opts = {}) ⇒ WebsiteScanResult
Scan a website for malicious content and threats Operation includes scanning the content of the URL for various types of malicious content and threats, including viruses and threats (including Phishing).
176 177 178 179 |
# File 'lib/cloudmersive-virus-scan-api-client/api/scan_api.rb', line 176 def scan_website(input, opts = {}) data, _status_code, _headers = scan_website_with_http_info(input, opts) data end |
#scan_website_with_http_info(input, opts = {}) ⇒ Array<(WebsiteScanResult, Fixnum, Hash)>
Scan a website for malicious content and threats Operation includes scanning the content of the URL for various types of malicious content and threats, including viruses and threats (including Phishing).
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 211 212 213 214 215 216 217 218 219 220 221 222 223 224 |
# File 'lib/cloudmersive-virus-scan-api-client/api/scan_api.rb', line 186 def scan_website_with_http_info(input, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ScanApi.scan_website ...' end # verify the required parameter 'input' is set if @api_client.config.client_side_validation && input.nil? fail ArgumentError, "Missing the required parameter 'input' when calling ScanApi.scan_website" end # resource path local_var_path = '/virus/scan/website' # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'text/json', 'application/xml', 'text/xml', 'application/x-www-form-urlencoded']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(input) 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 => 'WebsiteScanResult') if @api_client.config.debugging @api_client.config.logger.debug "API called: ScanApi#scan_website\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |