cloudmersive-spam-detection-api-client 2.3.0 → 2.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (34) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +23 -11
  3. data/cloudmersive-spam-detection-api-client.gemspec +1 -1
  4. data/docs/SpamDetectionAdvancedFormField.md +9 -0
  5. data/docs/SpamDetectionAdvancedFormSubmissionRequest.md +11 -0
  6. data/docs/SpamDetectionAdvancedRequest.md +1 -0
  7. data/docs/SpamDetectionAdvancedResponse.md +2 -0
  8. data/docs/SpamDetectionApi.md +192 -6
  9. data/docs/SpamDetectionFormSubmissionAdvancedResponse.md +14 -0
  10. data/lib/cloudmersive-spam-detection-api-client/api/spam_detection_api.rb +182 -5
  11. data/lib/cloudmersive-spam-detection-api-client/api_client.rb +1 -1
  12. data/lib/cloudmersive-spam-detection-api-client/api_error.rb +1 -1
  13. data/lib/cloudmersive-spam-detection-api-client/configuration.rb +1 -1
  14. data/lib/cloudmersive-spam-detection-api-client/models/spam_detection_advanced_form_field.rb +196 -0
  15. data/lib/cloudmersive-spam-detection-api-client/models/spam_detection_advanced_form_submission_request.rb +218 -0
  16. data/lib/cloudmersive-spam-detection-api-client/models/spam_detection_advanced_request.rb +15 -5
  17. data/lib/cloudmersive-spam-detection-api-client/models/spam_detection_advanced_response.rb +25 -5
  18. data/lib/cloudmersive-spam-detection-api-client/models/spam_detection_form_submission_advanced_response.rb +246 -0
  19. data/lib/cloudmersive-spam-detection-api-client/models/spam_detection_request.rb +1 -1
  20. data/lib/cloudmersive-spam-detection-api-client/models/spam_detection_response.rb +1 -1
  21. data/lib/cloudmersive-spam-detection-api-client/version.rb +2 -2
  22. data/lib/cloudmersive-spam-detection-api-client.rb +4 -1
  23. data/spec/api/spam_detection_api_spec.rb +48 -3
  24. data/spec/api_client_spec.rb +1 -1
  25. data/spec/configuration_spec.rb +1 -1
  26. data/spec/models/spam_detection_advanced_form_field_spec.rb +47 -0
  27. data/spec/models/spam_detection_advanced_form_submission_request_spec.rb +59 -0
  28. data/spec/models/spam_detection_advanced_request_spec.rb +7 -1
  29. data/spec/models/spam_detection_advanced_response_spec.rb +13 -1
  30. data/spec/models/spam_detection_form_submission_advanced_response_spec.rb +77 -0
  31. data/spec/models/spam_detection_request_spec.rb +1 -1
  32. data/spec/models/spam_detection_response_spec.rb +1 -1
  33. data/spec/spec_helper.rb +1 -1
  34. metadata +11 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b6c35d673d893361bc3597ccae72552fedef2b936c40b228bc2bc1fd01a6b7a9
4
- data.tar.gz: c1c41115fa8dfb2a7a1a07f6a14805ba8d32b519b8cad9f9b9b414aeba879c91
3
+ metadata.gz: 43118e3c22c9dde6a27a06d94420d8c04773d40d46f70d9a4bc1bf33e9fdd3bd
4
+ data.tar.gz: 0a9aaf253388aaf786ad14ad00a5dbc280e1783432d7dee7343b69de69fd90d0
5
5
  SHA512:
6
- metadata.gz: 07b2200a1df7403389143d0a90982846d507e7a2125de4f1ed7bf443be625bd604e2a2cf59f679198099a6325eec9fe8e942e64f055ae7f73c1a9ef20fe1453d
7
- data.tar.gz: 6615752fc301424a9ea5cf4cb18044ce5640e3038352ec74ff456118c9378ae67c077d9563abcc1c9aaeb6a6423e7ad43a083b7175caa6a8e6915206361dc316
6
+ metadata.gz: 4d7d3f0428640f0c50fe5a83ffcfb155f83ded9b99525b83c7129a0d9c7becf4f7cf4089b17c033d54d61ad7d223a8104f920642e3107fd9f411e221b8762fcd
7
+ data.tar.gz: 49772a9cac003efbfc17d75993dcb3cfb53675e53ea5c479a6731c181c36eb8d3362d9637798bf00b0e7c9fb3496e9274a1ad1093e9b1732b3284dc19c1fcf2a
data/README.md CHANGED
@@ -2,12 +2,12 @@
2
2
 
3
3
  CloudmersiveSpamDetectionApiClient - the Ruby gem for the spamapi
4
4
 
5
- Easily and directly scan and block phishing security threats.
5
+ Easily and directly scan and block spam security threats in input.
6
6
 
7
7
  This SDK is automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project:
8
8
 
9
9
  - API version: v1
10
- - Package version: 2.3.0
10
+ - Package version: 2.4.1
11
11
  - Build package: io.swagger.codegen.languages.RubyClientCodegen
12
12
 
13
13
  ## Installation
@@ -23,15 +23,15 @@ gem build cloudmersive-spam-detection-api-client.gemspec
23
23
  Then either install the gem locally:
24
24
 
25
25
  ```shell
26
- gem install ./cloudmersive-spam-detection-api-client-2.3.0.gem
26
+ gem install ./cloudmersive-spam-detection-api-client-2.4.1.gem
27
27
  ```
28
- (for development, run `gem install --dev ./cloudmersive-spam-detection-api-client-2.3.0.gem` to install the development dependencies)
28
+ (for development, run `gem install --dev ./cloudmersive-spam-detection-api-client-2.4.1.gem` to install the development dependencies)
29
29
 
30
30
  or publish the gem to a gem hosting service, e.g. [RubyGems](https://rubygems.org/).
31
31
 
32
32
  Finally add this to the Gemfile:
33
33
 
34
- gem 'cloudmersive-spam-detection-api-client', '~> 2.3.0'
34
+ gem 'cloudmersive-spam-detection-api-client', '~> 2.4.1'
35
35
 
36
36
  ### Install from Git
37
37
 
@@ -65,15 +65,21 @@ end
65
65
  api_instance = CloudmersiveSpamDetectionApiClient::SpamDetectionApi.new
66
66
 
67
67
  opts = {
68
- body: CloudmersiveSpamDetectionApiClient::SpamDetectionAdvancedRequest.new # SpamDetectionAdvancedRequest | Spam detection request
68
+ model: 'Advanced', # String | Optional: Specify which AI model to use. Possible choices are Normal and Advanced. Default is Advanced.
69
+ preprocessing: 'Auto', # String | Optional: Specify which preprocessing to Use. Possible choices are None, Compatability and Auto. Default is Auto.
70
+ allow_phishing: false, # BOOLEAN | True if phishing should be allowed, false otherwise
71
+ allow_unsolicited_sales: false, # BOOLEAN | True if unsolicited sales should be allowed, false otherwise
72
+ allow_promotional_content: true, # BOOLEAN | True if promotional content should be allowed, false otherwise
73
+ custom_policy_id: 'custom_policy_id_example', # String | Apply a Custom Policy for Spam Enforcement by providing the ID; to create a Custom Policy, navigate to the Cloudmersive Management Portal and select Custom Policies. Requires Managed Instance or Private Cloud
74
+ input_file: File.new('/path/to/file.txt') # File |
69
75
  }
70
76
 
71
77
  begin
72
- #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.
73
- result = api_instance.spam_detect_text_string_advanced_post(opts)
78
+ #Perform advanced AI spam detection and classification against input text file.
79
+ result = api_instance.spam_detect_file_advanced_post(opts)
74
80
  p result
75
81
  rescue CloudmersiveSpamDetectionApiClient::ApiError => e
76
- puts "Exception when calling SpamDetectionApi->spam_detect_text_string_advanced_post: #{e}"
82
+ puts "Exception when calling SpamDetectionApi->spam_detect_file_advanced_post: #{e}"
77
83
  end
78
84
 
79
85
  ```
@@ -84,14 +90,20 @@ All URIs are relative to *https://localhost*
84
90
 
85
91
  Class | Method | HTTP request | Description
86
92
  ------------ | ------------- | ------------- | -------------
87
- *CloudmersiveSpamDetectionApiClient::SpamDetectionApi* | [**spam_detect_text_string_advanced_post**](docs/SpamDetectionApi.md#spam_detect_text_string_advanced_post) | **POST** /spam/detect/text-string/advanced | 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.
88
- *CloudmersiveSpamDetectionApiClient::SpamDetectionApi* | [**spam_detect_text_string_post**](docs/SpamDetectionApi.md#spam_detect_text_string_post) | **POST** /spam/detect/text-string | 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.
93
+ *CloudmersiveSpamDetectionApiClient::SpamDetectionApi* | [**spam_detect_file_advanced_post**](docs/SpamDetectionApi.md#spam_detect_file_advanced_post) | **POST** /spam/detect/file/advanced | Perform advanced AI spam detection and classification against input text file.
94
+ *CloudmersiveSpamDetectionApiClient::SpamDetectionApi* | [**spam_detect_file_post**](docs/SpamDetectionApi.md#spam_detect_file_post) | **POST** /spam/detect/file | Perform AI spam detection and classification on an input image or document (PDF or DOCX)
95
+ *CloudmersiveSpamDetectionApiClient::SpamDetectionApi* | [**spam_detect_form_submission_advanced_post**](docs/SpamDetectionApi.md#spam_detect_form_submission_advanced_post) | **POST** /spam/detect/form-submission/advanced | Perform advanced AI spam detection and classification against a form submission
96
+ *CloudmersiveSpamDetectionApiClient::SpamDetectionApi* | [**spam_detect_text_string_advanced_post**](docs/SpamDetectionApi.md#spam_detect_text_string_advanced_post) | **POST** /spam/detect/text-string/advanced | Perform advanced AI spam detection and classification against input text string
97
+ *CloudmersiveSpamDetectionApiClient::SpamDetectionApi* | [**spam_detect_text_string_post**](docs/SpamDetectionApi.md#spam_detect_text_string_post) | **POST** /spam/detect/text-string | Perform AI spam detection and classification against input text string
89
98
 
90
99
 
91
100
  ## Documentation for Models
92
101
 
102
+ - [CloudmersiveSpamDetectionApiClient::SpamDetectionAdvancedFormField](docs/SpamDetectionAdvancedFormField.md)
103
+ - [CloudmersiveSpamDetectionApiClient::SpamDetectionAdvancedFormSubmissionRequest](docs/SpamDetectionAdvancedFormSubmissionRequest.md)
93
104
  - [CloudmersiveSpamDetectionApiClient::SpamDetectionAdvancedRequest](docs/SpamDetectionAdvancedRequest.md)
94
105
  - [CloudmersiveSpamDetectionApiClient::SpamDetectionAdvancedResponse](docs/SpamDetectionAdvancedResponse.md)
106
+ - [CloudmersiveSpamDetectionApiClient::SpamDetectionFormSubmissionAdvancedResponse](docs/SpamDetectionFormSubmissionAdvancedResponse.md)
95
107
  - [CloudmersiveSpamDetectionApiClient::SpamDetectionRequest](docs/SpamDetectionRequest.md)
96
108
  - [CloudmersiveSpamDetectionApiClient::SpamDetectionResponse](docs/SpamDetectionResponse.md)
97
109
 
@@ -3,7 +3,7 @@
3
3
  =begin
4
4
  #spamapi
5
5
 
6
- #Easily and directly scan and block phishing security threats.
6
+ #Easily and directly scan and block spam security threats in input.
7
7
 
8
8
  OpenAPI spec version: v1
9
9
 
@@ -0,0 +1,9 @@
1
+ # CloudmersiveSpamDetectionApiClient::SpamDetectionAdvancedFormField
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **field_title** | **String** | Title of the field | [optional]
7
+ **field_value** | **String** | Value of the field | [optional]
8
+
9
+
@@ -0,0 +1,11 @@
1
+ # CloudmersiveSpamDetectionApiClient::SpamDetectionAdvancedFormSubmissionRequest
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **input_form_fields** | [**Array<SpamDetectionAdvancedFormField>**](SpamDetectionAdvancedFormField.md) | Form fields and values that you received in your form submission | [optional]
7
+ **allow_unsolicited_sales** | **BOOLEAN** | True if unsolicited sales should be allowed, false otherwise | [optional]
8
+ **allow_promotional_content** | **BOOLEAN** | True if promotional content should be allowed, false otherwise | [optional]
9
+ **allow_phishing** | **BOOLEAN** | True if phishing should be allowed, false otherwise | [optional]
10
+
11
+
@@ -8,5 +8,6 @@ Name | Type | Description | Notes
8
8
  **allow_unsolicited_sales** | **BOOLEAN** | True if unsolicited sales should be allowed, false otherwise | [optional]
9
9
  **allow_promotional_content** | **BOOLEAN** | True if promotional content should be allowed, false otherwise | [optional]
10
10
  **allow_phishing** | **BOOLEAN** | True if phishing should be allowed, false otherwise | [optional]
11
+ **custom_policy_id** | **String** | Apply a Custom Policy for Spam Enforcement by providing the ID; to create a Custom Policy, navigate to the Cloudmersive Management Portal and select Custom Policies. Requires Managed Instance or Private Cloud | [optional]
11
12
 
12
13
 
@@ -4,9 +4,11 @@
4
4
  Name | Type | Description | Notes
5
5
  ------------ | ------------- | ------------- | -------------
6
6
  **clean_result** | **BOOLEAN** | True if the result is not spam (clean), and false otherwise | [optional]
7
+ **spam_risk_level** | **Float** | Overall spam risk level between 0.0 and 1.0 | [optional]
7
8
  **contains_spam** | **BOOLEAN** | True if the input text contains spam, false otherwise | [optional]
8
9
  **contains_unsolicited_sales** | **BOOLEAN** | True if the input text contains unsolicited sales, false otherwise | [optional]
9
10
  **contains_promotional_content** | **BOOLEAN** | True if the input text contains promotional content, false otherwise | [optional]
10
11
  **contains_phishing_attempt** | **BOOLEAN** | True if the input text contains a phishing attempt, false otherwise | [optional]
12
+ **analysis_rationale** | **String** | Rationale for why the conclusion was formed | [optional]
11
13
 
12
14
 
@@ -4,14 +4,198 @@ All URIs are relative to *https://localhost*
4
4
 
5
5
  Method | HTTP request | Description
6
6
  ------------- | ------------- | -------------
7
- [**spam_detect_text_string_advanced_post**](SpamDetectionApi.md#spam_detect_text_string_advanced_post) | **POST** /spam/detect/text-string/advanced | 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.
8
- [**spam_detect_text_string_post**](SpamDetectionApi.md#spam_detect_text_string_post) | **POST** /spam/detect/text-string | 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.
7
+ [**spam_detect_file_advanced_post**](SpamDetectionApi.md#spam_detect_file_advanced_post) | **POST** /spam/detect/file/advanced | Perform advanced AI spam detection and classification against input text file.
8
+ [**spam_detect_file_post**](SpamDetectionApi.md#spam_detect_file_post) | **POST** /spam/detect/file | Perform AI spam detection and classification on an input image or document (PDF or DOCX)
9
+ [**spam_detect_form_submission_advanced_post**](SpamDetectionApi.md#spam_detect_form_submission_advanced_post) | **POST** /spam/detect/form-submission/advanced | Perform advanced AI spam detection and classification against a form submission
10
+ [**spam_detect_text_string_advanced_post**](SpamDetectionApi.md#spam_detect_text_string_advanced_post) | **POST** /spam/detect/text-string/advanced | Perform advanced AI spam detection and classification against input text string
11
+ [**spam_detect_text_string_post**](SpamDetectionApi.md#spam_detect_text_string_post) | **POST** /spam/detect/text-string | Perform AI spam detection and classification against input text string
12
+
13
+
14
+ # **spam_detect_file_advanced_post**
15
+ > SpamDetectionAdvancedResponse spam_detect_file_advanced_post(opts)
16
+
17
+ Perform advanced AI spam detection and classification against input text file.
18
+
19
+ Analyzes input content as well as embedded URLs with AI deep learning to detect spam, phishing and other unsafe content. Uses 25-100 API calls depending on model selected. Supported file formats include DOCX, PDF, XLSX, PPTX, EML, MSG, JPG, PNG and WEBP.
20
+
21
+ ### Example
22
+ ```ruby
23
+ # load the gem
24
+ require 'cloudmersive-spam-detection-api-client'
25
+ # setup authorization
26
+ CloudmersiveSpamDetectionApiClient.configure do |config|
27
+ # Configure API key authorization: Apikey
28
+ config.api_key['Apikey'] = 'YOUR API KEY'
29
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
30
+ #config.api_key_prefix['Apikey'] = 'Bearer'
31
+ end
32
+
33
+ api_instance = CloudmersiveSpamDetectionApiClient::SpamDetectionApi.new
34
+
35
+ opts = {
36
+ model: 'Advanced', # String | Optional: Specify which AI model to use. Possible choices are Normal and Advanced. Default is Advanced.
37
+ preprocessing: 'Auto', # String | Optional: Specify which preprocessing to Use. Possible choices are None, Compatability and Auto. Default is Auto.
38
+ allow_phishing: false, # BOOLEAN | True if phishing should be allowed, false otherwise
39
+ allow_unsolicited_sales: false, # BOOLEAN | True if unsolicited sales should be allowed, false otherwise
40
+ allow_promotional_content: true, # BOOLEAN | True if promotional content should be allowed, false otherwise
41
+ custom_policy_id: 'custom_policy_id_example', # String | Apply a Custom Policy for Spam Enforcement by providing the ID; to create a Custom Policy, navigate to the Cloudmersive Management Portal and select Custom Policies. Requires Managed Instance or Private Cloud
42
+ input_file: File.new('/path/to/file.txt') # File |
43
+ }
44
+
45
+ begin
46
+ #Perform advanced AI spam detection and classification against input text file.
47
+ result = api_instance.spam_detect_file_advanced_post(opts)
48
+ p result
49
+ rescue CloudmersiveSpamDetectionApiClient::ApiError => e
50
+ puts "Exception when calling SpamDetectionApi->spam_detect_file_advanced_post: #{e}"
51
+ end
52
+ ```
53
+
54
+ ### Parameters
55
+
56
+ Name | Type | Description | Notes
57
+ ------------- | ------------- | ------------- | -------------
58
+ **model** | **String**| Optional: Specify which AI model to use. Possible choices are Normal and Advanced. Default is Advanced. | [optional] [default to Advanced]
59
+ **preprocessing** | **String**| Optional: Specify which preprocessing to Use. Possible choices are None, Compatability and Auto. Default is Auto. | [optional] [default to Auto]
60
+ **allow_phishing** | **BOOLEAN**| True if phishing should be allowed, false otherwise | [optional] [default to false]
61
+ **allow_unsolicited_sales** | **BOOLEAN**| True if unsolicited sales should be allowed, false otherwise | [optional] [default to false]
62
+ **allow_promotional_content** | **BOOLEAN**| True if promotional content should be allowed, false otherwise | [optional] [default to true]
63
+ **custom_policy_id** | **String**| Apply a Custom Policy for Spam Enforcement by providing the ID; to create a Custom Policy, navigate to the Cloudmersive Management Portal and select Custom Policies. Requires Managed Instance or Private Cloud | [optional]
64
+ **input_file** | **File**| | [optional]
65
+
66
+ ### Return type
67
+
68
+ [**SpamDetectionAdvancedResponse**](SpamDetectionAdvancedResponse.md)
69
+
70
+ ### Authorization
71
+
72
+ [Apikey](../README.md#Apikey)
73
+
74
+ ### HTTP request headers
75
+
76
+ - **Content-Type**: multipart/form-data
77
+ - **Accept**: text/plain, application/json, text/json
78
+
79
+
80
+
81
+ # **spam_detect_file_post**
82
+ > SpamDetectionResponse spam_detect_file_post(opts)
83
+
84
+ Perform AI spam detection and classification on an input image or document (PDF or DOCX)
85
+
86
+ Analyzes input content as well as embedded URLs with AI deep learnign to detect spam, phishing and other unsafe content. Uses 100-125 API calls depending on model selected. Supported file formats include DOCX, PDF, XLSX, PPTX, EML, MSG, JPG, PNG and WEBP.
87
+
88
+ ### Example
89
+ ```ruby
90
+ # load the gem
91
+ require 'cloudmersive-spam-detection-api-client'
92
+ # setup authorization
93
+ CloudmersiveSpamDetectionApiClient.configure do |config|
94
+ # Configure API key authorization: Apikey
95
+ config.api_key['Apikey'] = 'YOUR API KEY'
96
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
97
+ #config.api_key_prefix['Apikey'] = 'Bearer'
98
+ end
99
+
100
+ api_instance = CloudmersiveSpamDetectionApiClient::SpamDetectionApi.new
101
+
102
+ opts = {
103
+ model: 'Advanced', # String | Model to use; default setting is Advanced
104
+ input_file: File.new('/path/to/file.txt') # File |
105
+ }
106
+
107
+ begin
108
+ #Perform AI spam detection and classification on an input image or document (PDF or DOCX)
109
+ result = api_instance.spam_detect_file_post(opts)
110
+ p result
111
+ rescue CloudmersiveSpamDetectionApiClient::ApiError => e
112
+ puts "Exception when calling SpamDetectionApi->spam_detect_file_post: #{e}"
113
+ end
114
+ ```
115
+
116
+ ### Parameters
117
+
118
+ Name | Type | Description | Notes
119
+ ------------- | ------------- | ------------- | -------------
120
+ **model** | **String**| Model to use; default setting is Advanced | [optional] [default to Advanced]
121
+ **input_file** | **File**| | [optional]
122
+
123
+ ### Return type
124
+
125
+ [**SpamDetectionResponse**](SpamDetectionResponse.md)
126
+
127
+ ### Authorization
128
+
129
+ [Apikey](../README.md#Apikey)
130
+
131
+ ### HTTP request headers
132
+
133
+ - **Content-Type**: multipart/form-data
134
+ - **Accept**: text/plain, application/json, text/json
135
+
136
+
137
+
138
+ # **spam_detect_form_submission_advanced_post**
139
+ > SpamDetectionFormSubmissionAdvancedResponse spam_detect_form_submission_advanced_post(opts)
140
+
141
+ Perform advanced AI spam detection and classification against a form submission
142
+
143
+ Analyzes form 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.
144
+
145
+ ### Example
146
+ ```ruby
147
+ # load the gem
148
+ require 'cloudmersive-spam-detection-api-client'
149
+ # setup authorization
150
+ CloudmersiveSpamDetectionApiClient.configure do |config|
151
+ # Configure API key authorization: Apikey
152
+ config.api_key['Apikey'] = 'YOUR API KEY'
153
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
154
+ #config.api_key_prefix['Apikey'] = 'Bearer'
155
+ end
156
+
157
+ api_instance = CloudmersiveSpamDetectionApiClient::SpamDetectionApi.new
158
+
159
+ opts = {
160
+ body: CloudmersiveSpamDetectionApiClient::SpamDetectionAdvancedFormSubmissionRequest.new # SpamDetectionAdvancedFormSubmissionRequest | Spam detection request
161
+ }
162
+
163
+ begin
164
+ #Perform advanced AI spam detection and classification against a form submission
165
+ result = api_instance.spam_detect_form_submission_advanced_post(opts)
166
+ p result
167
+ rescue CloudmersiveSpamDetectionApiClient::ApiError => e
168
+ puts "Exception when calling SpamDetectionApi->spam_detect_form_submission_advanced_post: #{e}"
169
+ end
170
+ ```
171
+
172
+ ### Parameters
173
+
174
+ Name | Type | Description | Notes
175
+ ------------- | ------------- | ------------- | -------------
176
+ **body** | [**SpamDetectionAdvancedFormSubmissionRequest**](SpamDetectionAdvancedFormSubmissionRequest.md)| Spam detection request | [optional]
177
+
178
+ ### Return type
179
+
180
+ [**SpamDetectionFormSubmissionAdvancedResponse**](SpamDetectionFormSubmissionAdvancedResponse.md)
181
+
182
+ ### Authorization
183
+
184
+ [Apikey](../README.md#Apikey)
185
+
186
+ ### HTTP request headers
187
+
188
+ - **Content-Type**: application/json, text/json, application/*+json
189
+ - **Accept**: text/plain, application/json, text/json
190
+
9
191
 
10
192
 
11
193
  # **spam_detect_text_string_advanced_post**
12
194
  > SpamDetectionAdvancedResponse spam_detect_text_string_advanced_post(opts)
13
195
 
14
- 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.
196
+ Perform advanced AI spam detection and classification against input text string
197
+
198
+ 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.
15
199
 
16
200
  ### Example
17
201
  ```ruby
@@ -32,7 +216,7 @@ opts = {
32
216
  }
33
217
 
34
218
  begin
35
- #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.
219
+ #Perform advanced AI spam detection and classification against input text string
36
220
  result = api_instance.spam_detect_text_string_advanced_post(opts)
37
221
  p result
38
222
  rescue CloudmersiveSpamDetectionApiClient::ApiError => e
@@ -64,7 +248,9 @@ Name | Type | Description | Notes
64
248
  # **spam_detect_text_string_post**
65
249
  > SpamDetectionResponse spam_detect_text_string_post(opts)
66
250
 
67
- 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.
251
+ Perform AI spam detection and classification against input text string
252
+
253
+ 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.
68
254
 
69
255
  ### Example
70
256
  ```ruby
@@ -85,7 +271,7 @@ opts = {
85
271
  }
86
272
 
87
273
  begin
88
- #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.
274
+ #Perform AI spam detection and classification against input text string
89
275
  result = api_instance.spam_detect_text_string_post(opts)
90
276
  p result
91
277
  rescue CloudmersiveSpamDetectionApiClient::ApiError => e
@@ -0,0 +1,14 @@
1
+ # CloudmersiveSpamDetectionApiClient::SpamDetectionFormSubmissionAdvancedResponse
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **clean_result** | **BOOLEAN** | True if the result is not spam (clean), and false otherwise | [optional]
7
+ **spam_risk_level** | **Float** | Overall spam risk level between 0.0 and 1.0 | [optional]
8
+ **contains_spam** | **BOOLEAN** | True if the input text contains spam, false otherwise | [optional]
9
+ **contains_unsolicited_sales** | **BOOLEAN** | True if the input text contains unsolicited sales, false otherwise | [optional]
10
+ **contains_promotional_content** | **BOOLEAN** | True if the input text contains promotional content, false otherwise | [optional]
11
+ **contains_phishing_attempt** | **BOOLEAN** | True if the input text contains a phishing attempt, false otherwise | [optional]
12
+ **analysis_rationale** | **String** | Rationale for why the conclusion was formed | [optional]
13
+
14
+
@@ -1,7 +1,7 @@
1
1
  =begin
2
2
  #spamapi
3
3
 
4
- #Easily and directly scan and block phishing security threats.
4
+ #Easily and directly scan and block spam security threats in input.
5
5
 
6
6
  OpenAPI spec version: v1
7
7
 
@@ -19,7 +19,181 @@ module CloudmersiveSpamDetectionApiClient
19
19
  def initialize(api_client = ApiClient.default)
20
20
  @api_client = api_client
21
21
  end
22
- # 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.
22
+ # Perform advanced AI spam detection and classification against input text file.
23
+ # Analyzes input content as well as embedded URLs with AI deep learning to detect spam, phishing and other unsafe content. Uses 25-100 API calls depending on model selected. Supported file formats include DOCX, PDF, XLSX, PPTX, EML, MSG, JPG, PNG and WEBP.
24
+ # @param [Hash] opts the optional parameters
25
+ # @option opts [String] :model Optional: Specify which AI model to use. Possible choices are Normal and Advanced. Default is Advanced. (default to Advanced)
26
+ # @option opts [String] :preprocessing Optional: Specify which preprocessing to Use. Possible choices are None, Compatability and Auto. Default is Auto. (default to Auto)
27
+ # @option opts [BOOLEAN] :allow_phishing True if phishing should be allowed, false otherwise (default to false)
28
+ # @option opts [BOOLEAN] :allow_unsolicited_sales True if unsolicited sales should be allowed, false otherwise (default to false)
29
+ # @option opts [BOOLEAN] :allow_promotional_content True if promotional content should be allowed, false otherwise (default to true)
30
+ # @option opts [String] :custom_policy_id Apply a Custom Policy for Spam Enforcement by providing the ID; to create a Custom Policy, navigate to the Cloudmersive Management Portal and select Custom Policies. Requires Managed Instance or Private Cloud
31
+ # @option opts [File] :input_file
32
+ # @return [SpamDetectionAdvancedResponse]
33
+ def spam_detect_file_advanced_post(opts = {})
34
+ data, _status_code, _headers = spam_detect_file_advanced_post_with_http_info(opts)
35
+ data
36
+ end
37
+
38
+ # Perform advanced AI spam detection and classification against input text file.
39
+ # Analyzes input content as well as embedded URLs with AI deep learning to detect spam, phishing and other unsafe content. Uses 25-100 API calls depending on model selected. Supported file formats include DOCX, PDF, XLSX, PPTX, EML, MSG, JPG, PNG and WEBP.
40
+ # @param [Hash] opts the optional parameters
41
+ # @option opts [String] :model Optional: Specify which AI model to use. Possible choices are Normal and Advanced. Default is Advanced.
42
+ # @option opts [String] :preprocessing Optional: Specify which preprocessing to Use. Possible choices are None, Compatability and Auto. Default is Auto.
43
+ # @option opts [BOOLEAN] :allow_phishing True if phishing should be allowed, false otherwise
44
+ # @option opts [BOOLEAN] :allow_unsolicited_sales True if unsolicited sales should be allowed, false otherwise
45
+ # @option opts [BOOLEAN] :allow_promotional_content True if promotional content should be allowed, false otherwise
46
+ # @option opts [String] :custom_policy_id Apply a Custom Policy for Spam Enforcement by providing the ID; to create a Custom Policy, navigate to the Cloudmersive Management Portal and select Custom Policies. Requires Managed Instance or Private Cloud
47
+ # @option opts [File] :input_file
48
+ # @return [Array<(SpamDetectionAdvancedResponse, Fixnum, Hash)>] SpamDetectionAdvancedResponse data, response status code and response headers
49
+ def spam_detect_file_advanced_post_with_http_info(opts = {})
50
+ if @api_client.config.debugging
51
+ @api_client.config.logger.debug 'Calling API: SpamDetectionApi.spam_detect_file_advanced_post ...'
52
+ end
53
+ # resource path
54
+ local_var_path = '/spam/detect/file/advanced'
55
+
56
+ # query parameters
57
+ query_params = {}
58
+
59
+ # header parameters
60
+ header_params = {}
61
+ # HTTP header 'Accept' (if needed)
62
+ header_params['Accept'] = @api_client.select_header_accept(['text/plain', 'application/json', 'text/json'])
63
+ # HTTP header 'Content-Type'
64
+ header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
65
+ header_params[:'model'] = opts[:'model'] if !opts[:'model'].nil?
66
+ header_params[:'preprocessing'] = opts[:'preprocessing'] if !opts[:'preprocessing'].nil?
67
+ header_params[:'allowPhishing'] = opts[:'allow_phishing'] if !opts[:'allow_phishing'].nil?
68
+ header_params[:'allowUnsolicitedSales'] = opts[:'allow_unsolicited_sales'] if !opts[:'allow_unsolicited_sales'].nil?
69
+ header_params[:'allowPromotionalContent'] = opts[:'allow_promotional_content'] if !opts[:'allow_promotional_content'].nil?
70
+ header_params[:'customPolicyId'] = opts[:'custom_policy_id'] if !opts[:'custom_policy_id'].nil?
71
+
72
+ # form parameters
73
+ form_params = {}
74
+ form_params['inputFile'] = opts[:'input_file'] if !opts[:'input_file'].nil?
75
+
76
+ # http body (model)
77
+ post_body = nil
78
+ auth_names = ['Apikey']
79
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
80
+ :header_params => header_params,
81
+ :query_params => query_params,
82
+ :form_params => form_params,
83
+ :body => post_body,
84
+ :auth_names => auth_names,
85
+ :return_type => 'SpamDetectionAdvancedResponse')
86
+ if @api_client.config.debugging
87
+ @api_client.config.logger.debug "API called: SpamDetectionApi#spam_detect_file_advanced_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
88
+ end
89
+ return data, status_code, headers
90
+ end
91
+ # Perform AI spam detection and classification on an input image or document (PDF or DOCX)
92
+ # Analyzes input content as well as embedded URLs with AI deep learnign to detect spam, phishing and other unsafe content. Uses 100-125 API calls depending on model selected. Supported file formats include DOCX, PDF, XLSX, PPTX, EML, MSG, JPG, PNG and WEBP.
93
+ # @param [Hash] opts the optional parameters
94
+ # @option opts [String] :model Model to use; default setting is Advanced (default to Advanced)
95
+ # @option opts [File] :input_file
96
+ # @return [SpamDetectionResponse]
97
+ def spam_detect_file_post(opts = {})
98
+ data, _status_code, _headers = spam_detect_file_post_with_http_info(opts)
99
+ data
100
+ end
101
+
102
+ # Perform AI spam detection and classification on an input image or document (PDF or DOCX)
103
+ # Analyzes input content as well as embedded URLs with AI deep learnign to detect spam, phishing and other unsafe content. Uses 100-125 API calls depending on model selected. Supported file formats include DOCX, PDF, XLSX, PPTX, EML, MSG, JPG, PNG and WEBP.
104
+ # @param [Hash] opts the optional parameters
105
+ # @option opts [String] :model Model to use; default setting is Advanced
106
+ # @option opts [File] :input_file
107
+ # @return [Array<(SpamDetectionResponse, Fixnum, Hash)>] SpamDetectionResponse data, response status code and response headers
108
+ def spam_detect_file_post_with_http_info(opts = {})
109
+ if @api_client.config.debugging
110
+ @api_client.config.logger.debug 'Calling API: SpamDetectionApi.spam_detect_file_post ...'
111
+ end
112
+ # resource path
113
+ local_var_path = '/spam/detect/file'
114
+
115
+ # query parameters
116
+ query_params = {}
117
+
118
+ # header parameters
119
+ header_params = {}
120
+ # HTTP header 'Accept' (if needed)
121
+ header_params['Accept'] = @api_client.select_header_accept(['text/plain', 'application/json', 'text/json'])
122
+ # HTTP header 'Content-Type'
123
+ header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
124
+ header_params[:'model'] = opts[:'model'] if !opts[:'model'].nil?
125
+
126
+ # form parameters
127
+ form_params = {}
128
+ form_params['inputFile'] = opts[:'input_file'] if !opts[:'input_file'].nil?
129
+
130
+ # http body (model)
131
+ post_body = nil
132
+ auth_names = ['Apikey']
133
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
134
+ :header_params => header_params,
135
+ :query_params => query_params,
136
+ :form_params => form_params,
137
+ :body => post_body,
138
+ :auth_names => auth_names,
139
+ :return_type => 'SpamDetectionResponse')
140
+ if @api_client.config.debugging
141
+ @api_client.config.logger.debug "API called: SpamDetectionApi#spam_detect_file_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
142
+ end
143
+ return data, status_code, headers
144
+ end
145
+ # Perform advanced AI spam detection and classification against a form submission
146
+ # Analyzes form 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.
147
+ # @param [Hash] opts the optional parameters
148
+ # @option opts [SpamDetectionAdvancedFormSubmissionRequest] :body Spam detection request
149
+ # @return [SpamDetectionFormSubmissionAdvancedResponse]
150
+ def spam_detect_form_submission_advanced_post(opts = {})
151
+ data, _status_code, _headers = spam_detect_form_submission_advanced_post_with_http_info(opts)
152
+ data
153
+ end
154
+
155
+ # Perform advanced AI spam detection and classification against a form submission
156
+ # Analyzes form 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.
157
+ # @param [Hash] opts the optional parameters
158
+ # @option opts [SpamDetectionAdvancedFormSubmissionRequest] :body Spam detection request
159
+ # @return [Array<(SpamDetectionFormSubmissionAdvancedResponse, Fixnum, Hash)>] SpamDetectionFormSubmissionAdvancedResponse data, response status code and response headers
160
+ def spam_detect_form_submission_advanced_post_with_http_info(opts = {})
161
+ if @api_client.config.debugging
162
+ @api_client.config.logger.debug 'Calling API: SpamDetectionApi.spam_detect_form_submission_advanced_post ...'
163
+ end
164
+ # resource path
165
+ local_var_path = '/spam/detect/form-submission/advanced'
166
+
167
+ # query parameters
168
+ query_params = {}
169
+
170
+ # header parameters
171
+ header_params = {}
172
+ # HTTP header 'Accept' (if needed)
173
+ header_params['Accept'] = @api_client.select_header_accept(['text/plain', 'application/json', 'text/json'])
174
+ # HTTP header 'Content-Type'
175
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'text/json', 'application/*+json'])
176
+
177
+ # form parameters
178
+ form_params = {}
179
+
180
+ # http body (model)
181
+ post_body = @api_client.object_to_http_body(opts[:'body'])
182
+ auth_names = ['Apikey']
183
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
184
+ :header_params => header_params,
185
+ :query_params => query_params,
186
+ :form_params => form_params,
187
+ :body => post_body,
188
+ :auth_names => auth_names,
189
+ :return_type => 'SpamDetectionFormSubmissionAdvancedResponse')
190
+ if @api_client.config.debugging
191
+ @api_client.config.logger.debug "API called: SpamDetectionApi#spam_detect_form_submission_advanced_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
192
+ end
193
+ return data, status_code, headers
194
+ end
195
+ # Perform advanced AI spam detection and classification against input text string
196
+ # 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.
23
197
  # @param [Hash] opts the optional parameters
24
198
  # @option opts [SpamDetectionAdvancedRequest] :body Spam detection request
25
199
  # @return [SpamDetectionAdvancedResponse]
@@ -28,7 +202,8 @@ module CloudmersiveSpamDetectionApiClient
28
202
  data
29
203
  end
30
204
 
31
- # 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.
205
+ # Perform advanced AI spam detection and classification against input text string
206
+ # 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.
32
207
  # @param [Hash] opts the optional parameters
33
208
  # @option opts [SpamDetectionAdvancedRequest] :body Spam detection request
34
209
  # @return [Array<(SpamDetectionAdvancedResponse, Fixnum, Hash)>] SpamDetectionAdvancedResponse data, response status code and response headers
@@ -67,7 +242,8 @@ module CloudmersiveSpamDetectionApiClient
67
242
  end
68
243
  return data, status_code, headers
69
244
  end
70
- # 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.
245
+ # Perform AI spam detection and classification against input text string
246
+ # 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.
71
247
  # @param [Hash] opts the optional parameters
72
248
  # @option opts [SpamDetectionRequest] :body Spam detection request
73
249
  # @return [SpamDetectionResponse]
@@ -76,7 +252,8 @@ module CloudmersiveSpamDetectionApiClient
76
252
  data
77
253
  end
78
254
 
79
- # 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.
255
+ # Perform AI spam detection and classification against input text string
256
+ # 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.
80
257
  # @param [Hash] opts the optional parameters
81
258
  # @option opts [SpamDetectionRequest] :body Spam detection request
82
259
  # @return [Array<(SpamDetectionResponse, Fixnum, Hash)>] SpamDetectionResponse data, response status code and response headers
@@ -1,7 +1,7 @@
1
1
  =begin
2
2
  #spamapi
3
3
 
4
- #Easily and directly scan and block phishing security threats.
4
+ #Easily and directly scan and block spam security threats in input.
5
5
 
6
6
  OpenAPI spec version: v1
7
7
 
@@ -1,7 +1,7 @@
1
1
  =begin
2
2
  #spamapi
3
3
 
4
- #Easily and directly scan and block phishing security threats.
4
+ #Easily and directly scan and block spam security threats in input.
5
5
 
6
6
  OpenAPI spec version: v1
7
7
 
@@ -1,7 +1,7 @@
1
1
  =begin
2
2
  #spamapi
3
3
 
4
- #Easily and directly scan and block phishing security threats.
4
+ #Easily and directly scan and block spam security threats in input.
5
5
 
6
6
  OpenAPI spec version: v1
7
7