cloudmersive-spam-detection-api-client 2.4.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.
- checksums.yaml +4 -4
- data/README.md +11 -10
- data/docs/SpamDetectionAdvancedRequest.md +1 -0
- data/docs/SpamDetectionApi.md +27 -15
- data/lib/cloudmersive-spam-detection-api-client/api/spam_detection_api.rb +23 -10
- data/lib/cloudmersive-spam-detection-api-client/models/spam_detection_advanced_request.rb +14 -4
- data/lib/cloudmersive-spam-detection-api-client/version.rb +1 -1
- data/spec/api/spam_detection_api_spec.rb +11 -5
- data/spec/models/spam_detection_advanced_request_spec.rb +6 -0
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 43118e3c22c9dde6a27a06d94420d8c04773d40d46f70d9a4bc1bf33e9fdd3bd
|
|
4
|
+
data.tar.gz: 0a9aaf253388aaf786ad14ad00a5dbc280e1783432d7dee7343b69de69fd90d0
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 4d7d3f0428640f0c50fe5a83ffcfb155f83ded9b99525b83c7129a0d9c7becf4f7cf4089b17c033d54d61ad7d223a8104f920642e3107fd9f411e221b8762fcd
|
|
7
|
+
data.tar.gz: 49772a9cac003efbfc17d75993dcb3cfb53675e53ea5c479a6731c181c36eb8d3362d9637798bf00b0e7c9fb3496e9274a1ad1093e9b1732b3284dc19c1fcf2a
|
data/README.md
CHANGED
|
@@ -7,7 +7,7 @@ Easily and directly scan and block spam security threats in input.
|
|
|
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.4.
|
|
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.4.
|
|
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.4.
|
|
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.4.
|
|
34
|
+
gem 'cloudmersive-spam-detection-api-client', '~> 2.4.1'
|
|
35
35
|
|
|
36
36
|
### Install from Git
|
|
37
37
|
|
|
@@ -70,11 +70,12 @@ opts = {
|
|
|
70
70
|
allow_phishing: false, # BOOLEAN | True if phishing should be allowed, false otherwise
|
|
71
71
|
allow_unsolicited_sales: false, # BOOLEAN | True if unsolicited sales should be allowed, false otherwise
|
|
72
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
|
|
73
74
|
input_file: File.new('/path/to/file.txt') # File |
|
|
74
75
|
}
|
|
75
76
|
|
|
76
77
|
begin
|
|
77
|
-
#Perform advanced AI spam detection and classification against input text
|
|
78
|
+
#Perform advanced AI spam detection and classification against input text file.
|
|
78
79
|
result = api_instance.spam_detect_file_advanced_post(opts)
|
|
79
80
|
p result
|
|
80
81
|
rescue CloudmersiveSpamDetectionApiClient::ApiError => e
|
|
@@ -89,11 +90,11 @@ All URIs are relative to *https://localhost*
|
|
|
89
90
|
|
|
90
91
|
Class | Method | HTTP request | Description
|
|
91
92
|
------------ | ------------- | ------------- | -------------
|
|
92
|
-
*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
|
|
93
|
-
*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)
|
|
94
|
-
*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
|
|
95
|
-
*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
|
|
96
|
-
*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
|
|
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
|
|
97
98
|
|
|
98
99
|
|
|
99
100
|
## Documentation for Models
|
|
@@ -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
|
|
data/docs/SpamDetectionApi.md
CHANGED
|
@@ -4,17 +4,19 @@ All URIs are relative to *https://localhost*
|
|
|
4
4
|
|
|
5
5
|
Method | HTTP request | Description
|
|
6
6
|
------------- | ------------- | -------------
|
|
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
|
|
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
|
|
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
12
|
|
|
13
13
|
|
|
14
14
|
# **spam_detect_file_advanced_post**
|
|
15
15
|
> SpamDetectionAdvancedResponse spam_detect_file_advanced_post(opts)
|
|
16
16
|
|
|
17
|
-
Perform advanced AI spam detection and classification against input text
|
|
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.
|
|
18
20
|
|
|
19
21
|
### Example
|
|
20
22
|
```ruby
|
|
@@ -36,11 +38,12 @@ opts = {
|
|
|
36
38
|
allow_phishing: false, # BOOLEAN | True if phishing should be allowed, false otherwise
|
|
37
39
|
allow_unsolicited_sales: false, # BOOLEAN | True if unsolicited sales should be allowed, false otherwise
|
|
38
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
|
|
39
42
|
input_file: File.new('/path/to/file.txt') # File |
|
|
40
43
|
}
|
|
41
44
|
|
|
42
45
|
begin
|
|
43
|
-
#Perform advanced AI spam detection and classification against input text
|
|
46
|
+
#Perform advanced AI spam detection and classification against input text file.
|
|
44
47
|
result = api_instance.spam_detect_file_advanced_post(opts)
|
|
45
48
|
p result
|
|
46
49
|
rescue CloudmersiveSpamDetectionApiClient::ApiError => e
|
|
@@ -57,6 +60,7 @@ Name | Type | Description | Notes
|
|
|
57
60
|
**allow_phishing** | **BOOLEAN**| True if phishing should be allowed, false otherwise | [optional] [default to false]
|
|
58
61
|
**allow_unsolicited_sales** | **BOOLEAN**| True if unsolicited sales should be allowed, false otherwise | [optional] [default to false]
|
|
59
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]
|
|
60
64
|
**input_file** | **File**| | [optional]
|
|
61
65
|
|
|
62
66
|
### Return type
|
|
@@ -77,7 +81,9 @@ Name | Type | Description | Notes
|
|
|
77
81
|
# **spam_detect_file_post**
|
|
78
82
|
> SpamDetectionResponse spam_detect_file_post(opts)
|
|
79
83
|
|
|
80
|
-
Perform AI spam detection and classification on an input image or document (PDF or DOCX)
|
|
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.
|
|
81
87
|
|
|
82
88
|
### Example
|
|
83
89
|
```ruby
|
|
@@ -99,7 +105,7 @@ opts = {
|
|
|
99
105
|
}
|
|
100
106
|
|
|
101
107
|
begin
|
|
102
|
-
#Perform AI spam detection and classification on an input image or document (PDF or DOCX)
|
|
108
|
+
#Perform AI spam detection and classification on an input image or document (PDF or DOCX)
|
|
103
109
|
result = api_instance.spam_detect_file_post(opts)
|
|
104
110
|
p result
|
|
105
111
|
rescue CloudmersiveSpamDetectionApiClient::ApiError => e
|
|
@@ -132,7 +138,9 @@ Name | Type | Description | Notes
|
|
|
132
138
|
# **spam_detect_form_submission_advanced_post**
|
|
133
139
|
> SpamDetectionFormSubmissionAdvancedResponse spam_detect_form_submission_advanced_post(opts)
|
|
134
140
|
|
|
135
|
-
Perform advanced AI spam detection and classification against a form submission
|
|
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.
|
|
136
144
|
|
|
137
145
|
### Example
|
|
138
146
|
```ruby
|
|
@@ -153,7 +161,7 @@ opts = {
|
|
|
153
161
|
}
|
|
154
162
|
|
|
155
163
|
begin
|
|
156
|
-
#Perform advanced AI spam detection and classification against a form submission
|
|
164
|
+
#Perform advanced AI spam detection and classification against a form submission
|
|
157
165
|
result = api_instance.spam_detect_form_submission_advanced_post(opts)
|
|
158
166
|
p result
|
|
159
167
|
rescue CloudmersiveSpamDetectionApiClient::ApiError => e
|
|
@@ -185,7 +193,9 @@ Name | Type | Description | Notes
|
|
|
185
193
|
# **spam_detect_text_string_advanced_post**
|
|
186
194
|
> SpamDetectionAdvancedResponse spam_detect_text_string_advanced_post(opts)
|
|
187
195
|
|
|
188
|
-
Perform advanced AI spam detection and classification against input text string
|
|
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.
|
|
189
199
|
|
|
190
200
|
### Example
|
|
191
201
|
```ruby
|
|
@@ -206,7 +216,7 @@ opts = {
|
|
|
206
216
|
}
|
|
207
217
|
|
|
208
218
|
begin
|
|
209
|
-
#Perform advanced AI spam detection and classification against input text string
|
|
219
|
+
#Perform advanced AI spam detection and classification against input text string
|
|
210
220
|
result = api_instance.spam_detect_text_string_advanced_post(opts)
|
|
211
221
|
p result
|
|
212
222
|
rescue CloudmersiveSpamDetectionApiClient::ApiError => e
|
|
@@ -238,7 +248,9 @@ Name | Type | Description | Notes
|
|
|
238
248
|
# **spam_detect_text_string_post**
|
|
239
249
|
> SpamDetectionResponse spam_detect_text_string_post(opts)
|
|
240
250
|
|
|
241
|
-
Perform AI spam detection and classification against input text string
|
|
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.
|
|
242
254
|
|
|
243
255
|
### Example
|
|
244
256
|
```ruby
|
|
@@ -259,7 +271,7 @@ opts = {
|
|
|
259
271
|
}
|
|
260
272
|
|
|
261
273
|
begin
|
|
262
|
-
#Perform AI spam detection and classification against input text string
|
|
274
|
+
#Perform AI spam detection and classification against input text string
|
|
263
275
|
result = api_instance.spam_detect_text_string_post(opts)
|
|
264
276
|
p result
|
|
265
277
|
rescue CloudmersiveSpamDetectionApiClient::ApiError => e
|
|
@@ -19,13 +19,15 @@ 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
|
|
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.
|
|
23
24
|
# @param [Hash] opts the optional parameters
|
|
24
25
|
# @option opts [String] :model Optional: Specify which AI model to use. Possible choices are Normal and Advanced. Default is Advanced. (default to Advanced)
|
|
25
26
|
# @option opts [String] :preprocessing Optional: Specify which preprocessing to Use. Possible choices are None, Compatability and Auto. Default is Auto. (default to Auto)
|
|
26
27
|
# @option opts [BOOLEAN] :allow_phishing True if phishing should be allowed, false otherwise (default to false)
|
|
27
28
|
# @option opts [BOOLEAN] :allow_unsolicited_sales True if unsolicited sales should be allowed, false otherwise (default to false)
|
|
28
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
|
|
29
31
|
# @option opts [File] :input_file
|
|
30
32
|
# @return [SpamDetectionAdvancedResponse]
|
|
31
33
|
def spam_detect_file_advanced_post(opts = {})
|
|
@@ -33,13 +35,15 @@ module CloudmersiveSpamDetectionApiClient
|
|
|
33
35
|
data
|
|
34
36
|
end
|
|
35
37
|
|
|
36
|
-
# Perform advanced AI spam detection and classification against input text
|
|
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.
|
|
37
40
|
# @param [Hash] opts the optional parameters
|
|
38
41
|
# @option opts [String] :model Optional: Specify which AI model to use. Possible choices are Normal and Advanced. Default is Advanced.
|
|
39
42
|
# @option opts [String] :preprocessing Optional: Specify which preprocessing to Use. Possible choices are None, Compatability and Auto. Default is Auto.
|
|
40
43
|
# @option opts [BOOLEAN] :allow_phishing True if phishing should be allowed, false otherwise
|
|
41
44
|
# @option opts [BOOLEAN] :allow_unsolicited_sales True if unsolicited sales should be allowed, false otherwise
|
|
42
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
|
|
43
47
|
# @option opts [File] :input_file
|
|
44
48
|
# @return [Array<(SpamDetectionAdvancedResponse, Fixnum, Hash)>] SpamDetectionAdvancedResponse data, response status code and response headers
|
|
45
49
|
def spam_detect_file_advanced_post_with_http_info(opts = {})
|
|
@@ -63,6 +67,7 @@ module CloudmersiveSpamDetectionApiClient
|
|
|
63
67
|
header_params[:'allowPhishing'] = opts[:'allow_phishing'] if !opts[:'allow_phishing'].nil?
|
|
64
68
|
header_params[:'allowUnsolicitedSales'] = opts[:'allow_unsolicited_sales'] if !opts[:'allow_unsolicited_sales'].nil?
|
|
65
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?
|
|
66
71
|
|
|
67
72
|
# form parameters
|
|
68
73
|
form_params = {}
|
|
@@ -83,7 +88,8 @@ module CloudmersiveSpamDetectionApiClient
|
|
|
83
88
|
end
|
|
84
89
|
return data, status_code, headers
|
|
85
90
|
end
|
|
86
|
-
# Perform AI spam detection and classification on an input image or document (PDF or DOCX)
|
|
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.
|
|
87
93
|
# @param [Hash] opts the optional parameters
|
|
88
94
|
# @option opts [String] :model Model to use; default setting is Advanced (default to Advanced)
|
|
89
95
|
# @option opts [File] :input_file
|
|
@@ -93,7 +99,8 @@ module CloudmersiveSpamDetectionApiClient
|
|
|
93
99
|
data
|
|
94
100
|
end
|
|
95
101
|
|
|
96
|
-
# Perform AI spam detection and classification on an input image or document (PDF or DOCX)
|
|
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.
|
|
97
104
|
# @param [Hash] opts the optional parameters
|
|
98
105
|
# @option opts [String] :model Model to use; default setting is Advanced
|
|
99
106
|
# @option opts [File] :input_file
|
|
@@ -135,7 +142,8 @@ module CloudmersiveSpamDetectionApiClient
|
|
|
135
142
|
end
|
|
136
143
|
return data, status_code, headers
|
|
137
144
|
end
|
|
138
|
-
# Perform advanced AI spam detection and classification against a form submission
|
|
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.
|
|
139
147
|
# @param [Hash] opts the optional parameters
|
|
140
148
|
# @option opts [SpamDetectionAdvancedFormSubmissionRequest] :body Spam detection request
|
|
141
149
|
# @return [SpamDetectionFormSubmissionAdvancedResponse]
|
|
@@ -144,7 +152,8 @@ module CloudmersiveSpamDetectionApiClient
|
|
|
144
152
|
data
|
|
145
153
|
end
|
|
146
154
|
|
|
147
|
-
# Perform advanced AI spam detection and classification against a form submission
|
|
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.
|
|
148
157
|
# @param [Hash] opts the optional parameters
|
|
149
158
|
# @option opts [SpamDetectionAdvancedFormSubmissionRequest] :body Spam detection request
|
|
150
159
|
# @return [Array<(SpamDetectionFormSubmissionAdvancedResponse, Fixnum, Hash)>] SpamDetectionFormSubmissionAdvancedResponse data, response status code and response headers
|
|
@@ -183,7 +192,8 @@ module CloudmersiveSpamDetectionApiClient
|
|
|
183
192
|
end
|
|
184
193
|
return data, status_code, headers
|
|
185
194
|
end
|
|
186
|
-
# Perform advanced AI spam detection and classification against input text string
|
|
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.
|
|
187
197
|
# @param [Hash] opts the optional parameters
|
|
188
198
|
# @option opts [SpamDetectionAdvancedRequest] :body Spam detection request
|
|
189
199
|
# @return [SpamDetectionAdvancedResponse]
|
|
@@ -192,7 +202,8 @@ module CloudmersiveSpamDetectionApiClient
|
|
|
192
202
|
data
|
|
193
203
|
end
|
|
194
204
|
|
|
195
|
-
# Perform advanced AI spam detection and classification against input text string
|
|
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.
|
|
196
207
|
# @param [Hash] opts the optional parameters
|
|
197
208
|
# @option opts [SpamDetectionAdvancedRequest] :body Spam detection request
|
|
198
209
|
# @return [Array<(SpamDetectionAdvancedResponse, Fixnum, Hash)>] SpamDetectionAdvancedResponse data, response status code and response headers
|
|
@@ -231,7 +242,8 @@ module CloudmersiveSpamDetectionApiClient
|
|
|
231
242
|
end
|
|
232
243
|
return data, status_code, headers
|
|
233
244
|
end
|
|
234
|
-
# Perform AI spam detection and classification against input text string
|
|
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.
|
|
235
247
|
# @param [Hash] opts the optional parameters
|
|
236
248
|
# @option opts [SpamDetectionRequest] :body Spam detection request
|
|
237
249
|
# @return [SpamDetectionResponse]
|
|
@@ -240,7 +252,8 @@ module CloudmersiveSpamDetectionApiClient
|
|
|
240
252
|
data
|
|
241
253
|
end
|
|
242
254
|
|
|
243
|
-
# Perform AI spam detection and classification against input text string
|
|
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.
|
|
244
257
|
# @param [Hash] opts the optional parameters
|
|
245
258
|
# @option opts [SpamDetectionRequest] :body Spam detection request
|
|
246
259
|
# @return [Array<(SpamDetectionResponse, Fixnum, Hash)>] SpamDetectionResponse data, response status code and response headers
|
|
@@ -30,6 +30,9 @@ module CloudmersiveSpamDetectionApiClient
|
|
|
30
30
|
# True if phishing should be allowed, false otherwise
|
|
31
31
|
attr_accessor :allow_phishing
|
|
32
32
|
|
|
33
|
+
# 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
|
|
34
|
+
attr_accessor :custom_policy_id
|
|
35
|
+
|
|
33
36
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
34
37
|
def self.attribute_map
|
|
35
38
|
{
|
|
@@ -37,7 +40,8 @@ module CloudmersiveSpamDetectionApiClient
|
|
|
37
40
|
:'model' => :'Model',
|
|
38
41
|
:'allow_unsolicited_sales' => :'AllowUnsolicitedSales',
|
|
39
42
|
:'allow_promotional_content' => :'AllowPromotionalContent',
|
|
40
|
-
:'allow_phishing' => :'AllowPhishing'
|
|
43
|
+
:'allow_phishing' => :'AllowPhishing',
|
|
44
|
+
:'custom_policy_id' => :'CustomPolicyID'
|
|
41
45
|
}
|
|
42
46
|
end
|
|
43
47
|
|
|
@@ -48,7 +52,8 @@ module CloudmersiveSpamDetectionApiClient
|
|
|
48
52
|
:'model' => :'String',
|
|
49
53
|
:'allow_unsolicited_sales' => :'BOOLEAN',
|
|
50
54
|
:'allow_promotional_content' => :'BOOLEAN',
|
|
51
|
-
:'allow_phishing' => :'BOOLEAN'
|
|
55
|
+
:'allow_phishing' => :'BOOLEAN',
|
|
56
|
+
:'custom_policy_id' => :'String'
|
|
52
57
|
}
|
|
53
58
|
end
|
|
54
59
|
|
|
@@ -79,6 +84,10 @@ module CloudmersiveSpamDetectionApiClient
|
|
|
79
84
|
if attributes.has_key?(:'AllowPhishing')
|
|
80
85
|
self.allow_phishing = attributes[:'AllowPhishing']
|
|
81
86
|
end
|
|
87
|
+
|
|
88
|
+
if attributes.has_key?(:'CustomPolicyID')
|
|
89
|
+
self.custom_policy_id = attributes[:'CustomPolicyID']
|
|
90
|
+
end
|
|
82
91
|
end
|
|
83
92
|
|
|
84
93
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
@@ -103,7 +112,8 @@ module CloudmersiveSpamDetectionApiClient
|
|
|
103
112
|
model == o.model &&
|
|
104
113
|
allow_unsolicited_sales == o.allow_unsolicited_sales &&
|
|
105
114
|
allow_promotional_content == o.allow_promotional_content &&
|
|
106
|
-
allow_phishing == o.allow_phishing
|
|
115
|
+
allow_phishing == o.allow_phishing &&
|
|
116
|
+
custom_policy_id == o.custom_policy_id
|
|
107
117
|
end
|
|
108
118
|
|
|
109
119
|
# @see the `==` method
|
|
@@ -115,7 +125,7 @@ module CloudmersiveSpamDetectionApiClient
|
|
|
115
125
|
# Calculates hash code according to all attributes.
|
|
116
126
|
# @return [Fixnum] Hash code
|
|
117
127
|
def hash
|
|
118
|
-
[input_string, model, allow_unsolicited_sales, allow_promotional_content, allow_phishing].hash
|
|
128
|
+
[input_string, model, allow_unsolicited_sales, allow_promotional_content, allow_phishing, custom_policy_id].hash
|
|
119
129
|
end
|
|
120
130
|
|
|
121
131
|
# Builds the object from hash
|
|
@@ -33,13 +33,15 @@ describe 'SpamDetectionApi' do
|
|
|
33
33
|
end
|
|
34
34
|
|
|
35
35
|
# unit tests for spam_detect_file_advanced_post
|
|
36
|
-
# Perform advanced AI spam detection and classification against input text
|
|
36
|
+
# Perform advanced AI spam detection and classification against input text file.
|
|
37
|
+
# 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.
|
|
37
38
|
# @param [Hash] opts the optional parameters
|
|
38
39
|
# @option opts [String] :model Optional: Specify which AI model to use. Possible choices are Normal and Advanced. Default is Advanced.
|
|
39
40
|
# @option opts [String] :preprocessing Optional: Specify which preprocessing to Use. Possible choices are None, Compatability and Auto. Default is Auto.
|
|
40
41
|
# @option opts [BOOLEAN] :allow_phishing True if phishing should be allowed, false otherwise
|
|
41
42
|
# @option opts [BOOLEAN] :allow_unsolicited_sales True if unsolicited sales should be allowed, false otherwise
|
|
42
43
|
# @option opts [BOOLEAN] :allow_promotional_content True if promotional content should be allowed, false otherwise
|
|
44
|
+
# @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
|
|
43
45
|
# @option opts [File] :input_file
|
|
44
46
|
# @return [SpamDetectionAdvancedResponse]
|
|
45
47
|
describe 'spam_detect_file_advanced_post test' do
|
|
@@ -49,7 +51,8 @@ describe 'SpamDetectionApi' do
|
|
|
49
51
|
end
|
|
50
52
|
|
|
51
53
|
# unit tests for spam_detect_file_post
|
|
52
|
-
# Perform AI spam detection and classification on an input image or document (PDF or DOCX)
|
|
54
|
+
# Perform AI spam detection and classification on an input image or document (PDF or DOCX)
|
|
55
|
+
# 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.
|
|
53
56
|
# @param [Hash] opts the optional parameters
|
|
54
57
|
# @option opts [String] :model Model to use; default setting is Advanced
|
|
55
58
|
# @option opts [File] :input_file
|
|
@@ -61,7 +64,8 @@ describe 'SpamDetectionApi' do
|
|
|
61
64
|
end
|
|
62
65
|
|
|
63
66
|
# unit tests for spam_detect_form_submission_advanced_post
|
|
64
|
-
# Perform advanced AI spam detection and classification against a form submission
|
|
67
|
+
# Perform advanced AI spam detection and classification against a form submission
|
|
68
|
+
# 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.
|
|
65
69
|
# @param [Hash] opts the optional parameters
|
|
66
70
|
# @option opts [SpamDetectionAdvancedFormSubmissionRequest] :body Spam detection request
|
|
67
71
|
# @return [SpamDetectionFormSubmissionAdvancedResponse]
|
|
@@ -72,7 +76,8 @@ describe 'SpamDetectionApi' do
|
|
|
72
76
|
end
|
|
73
77
|
|
|
74
78
|
# unit tests for spam_detect_text_string_advanced_post
|
|
75
|
-
# Perform advanced AI spam detection and classification against input text string
|
|
79
|
+
# Perform advanced AI spam detection and classification against input text string
|
|
80
|
+
# 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.
|
|
76
81
|
# @param [Hash] opts the optional parameters
|
|
77
82
|
# @option opts [SpamDetectionAdvancedRequest] :body Spam detection request
|
|
78
83
|
# @return [SpamDetectionAdvancedResponse]
|
|
@@ -83,7 +88,8 @@ describe 'SpamDetectionApi' do
|
|
|
83
88
|
end
|
|
84
89
|
|
|
85
90
|
# unit tests for spam_detect_text_string_post
|
|
86
|
-
# Perform AI spam detection and classification against input text string
|
|
91
|
+
# Perform AI spam detection and classification against input text string
|
|
92
|
+
# 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.
|
|
87
93
|
# @param [Hash] opts the optional parameters
|
|
88
94
|
# @option opts [SpamDetectionRequest] :body Spam detection request
|
|
89
95
|
# @return [SpamDetectionResponse]
|
|
@@ -62,4 +62,10 @@ describe 'SpamDetectionAdvancedRequest' do
|
|
|
62
62
|
end
|
|
63
63
|
end
|
|
64
64
|
|
|
65
|
+
describe 'test attribute "custom_policy_id"' do
|
|
66
|
+
it 'should work' do
|
|
67
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
|
68
|
+
end
|
|
69
|
+
end
|
|
70
|
+
|
|
65
71
|
end
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: cloudmersive-spam-detection-api-client
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 2.4.
|
|
4
|
+
version: 2.4.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Cloudmersive
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2025-12-
|
|
11
|
+
date: 2025-12-18 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: typhoeus
|