Class: CloudmersiveSpamDetectionApiClient::SpamDetectionApi
- Inherits:
-
Object
- Object
- CloudmersiveSpamDetectionApiClient::SpamDetectionApi
- Defined in:
- lib/cloudmersive-spam-detection-api-client/api/spam_detection_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) ⇒ SpamDetectionApi
constructor
A new instance of SpamDetectionApi.
-
#spam_detect_text_string_advanced_post(opts = {}) ⇒ SpamDetectionAdvancedResponse
Perform advanced AI spam detection and classification against input text string.
-
#spam_detect_text_string_advanced_post_with_http_info(opts = {}) ⇒ Array<(SpamDetectionAdvancedResponse, Fixnum, Hash)>
Perform advanced AI spam detection and classification against input text string.
-
#spam_detect_text_string_post(opts = {}) ⇒ SpamDetectionResponse
Perform AI spam detection and classification against input text string.
-
#spam_detect_text_string_post_with_http_info(opts = {}) ⇒ Array<(SpamDetectionResponse, Fixnum, Hash)>
Perform AI spam detection and classification against input text string.
Constructor Details
#initialize(api_client = ApiClient.default) ⇒ SpamDetectionApi
Returns a new instance of SpamDetectionApi.
19 20 21 |
# File 'lib/cloudmersive-spam-detection-api-client/api/spam_detection_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-spam-detection-api-client/api/spam_detection_api.rb', line 17 def api_client @api_client end |
Instance Method Details
#spam_detect_text_string_advanced_post(opts = {}) ⇒ SpamDetectionAdvancedResponse
Perform advanced AI spam detection and classification against input text string. Analyzes input content as well as embedded URLs with AI deep learnign to detect spam, phishing and other unsafe content. Uses 25-100 API calls depending on model selected.
26 27 28 29 |
# File 'lib/cloudmersive-spam-detection-api-client/api/spam_detection_api.rb', line 26 def spam_detect_text_string_advanced_post(opts = {}) data, _status_code, _headers = spam_detect_text_string_advanced_post_with_http_info(opts) data end |
#spam_detect_text_string_advanced_post_with_http_info(opts = {}) ⇒ Array<(SpamDetectionAdvancedResponse, Fixnum, Hash)>
Perform advanced AI spam detection and classification against input text string. Analyzes input content as well as embedded URLs with AI deep learnign to detect spam, phishing and other unsafe content. Uses 25-100 API calls depending on model selected.
35 36 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 |
# File 'lib/cloudmersive-spam-detection-api-client/api/spam_detection_api.rb', line 35 def spam_detect_text_string_advanced_post_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: SpamDetectionApi.spam_detect_text_string_advanced_post ...' end # resource path local_var_path = '/spam/detect/text-string/advanced' # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['text/plain', 'application/json', 'text/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'text/json', 'application/*+json']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(opts[:'body']) 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 => 'SpamDetectionAdvancedResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: SpamDetectionApi#spam_detect_text_string_advanced_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#spam_detect_text_string_post(opts = {}) ⇒ SpamDetectionResponse
Perform AI spam detection and classification against input text string. Analyzes input content as well as embedded URLs with AI deep learnign to detect spam, phishing and other unsafe content. Uses 25-75 API calls depending on model selected.
74 75 76 77 |
# File 'lib/cloudmersive-spam-detection-api-client/api/spam_detection_api.rb', line 74 def spam_detect_text_string_post(opts = {}) data, _status_code, _headers = spam_detect_text_string_post_with_http_info(opts) data end |
#spam_detect_text_string_post_with_http_info(opts = {}) ⇒ Array<(SpamDetectionResponse, Fixnum, Hash)>
Perform AI spam detection and classification against input text string. Analyzes input content as well as embedded URLs with AI deep learnign to detect spam, phishing and other unsafe content. Uses 25-75 API calls depending on model selected.
83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 |
# File 'lib/cloudmersive-spam-detection-api-client/api/spam_detection_api.rb', line 83 def spam_detect_text_string_post_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: SpamDetectionApi.spam_detect_text_string_post ...' end # resource path local_var_path = '/spam/detect/text-string' # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['text/plain', 'application/json', 'text/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'text/json', 'application/*+json']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(opts[:'body']) 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 => 'SpamDetectionResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: SpamDetectionApi#spam_detect_text_string_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |