cloudmersive-spam-detection-api-client 2.2.1 → 2.4.0

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 (35) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +23 -11
  3. data/cloudmersive-spam-detection-api-client.gemspec +2 -2
  4. data/docs/SpamDetectionAdvancedFormField.md +9 -0
  5. data/docs/SpamDetectionAdvancedFormSubmissionRequest.md +11 -0
  6. data/docs/SpamDetectionAdvancedRequest.md +4 -0
  7. data/docs/SpamDetectionAdvancedResponse.md +6 -0
  8. data/docs/SpamDetectionApi.md +182 -8
  9. data/docs/SpamDetectionFormSubmissionAdvancedResponse.md +14 -0
  10. data/docs/SpamDetectionRequest.md +9 -0
  11. data/lib/cloudmersive-spam-detection-api-client/api/spam_detection_api.rb +171 -7
  12. data/lib/cloudmersive-spam-detection-api-client/api_client.rb +1 -1
  13. data/lib/cloudmersive-spam-detection-api-client/api_error.rb +1 -1
  14. data/lib/cloudmersive-spam-detection-api-client/configuration.rb +1 -1
  15. data/lib/cloudmersive-spam-detection-api-client/models/spam_detection_advanced_form_field.rb +196 -0
  16. data/lib/cloudmersive-spam-detection-api-client/models/spam_detection_advanced_form_submission_request.rb +218 -0
  17. data/lib/cloudmersive-spam-detection-api-client/models/spam_detection_advanced_request.rb +45 -5
  18. data/lib/cloudmersive-spam-detection-api-client/models/spam_detection_advanced_response.rb +65 -5
  19. data/lib/cloudmersive-spam-detection-api-client/models/spam_detection_form_submission_advanced_response.rb +246 -0
  20. data/lib/cloudmersive-spam-detection-api-client/models/spam_detection_request.rb +196 -0
  21. data/lib/cloudmersive-spam-detection-api-client/models/spam_detection_response.rb +1 -1
  22. data/lib/cloudmersive-spam-detection-api-client/version.rb +2 -2
  23. data/lib/cloudmersive-spam-detection-api-client.rb +5 -1
  24. data/spec/api/spam_detection_api_spec.rb +43 -4
  25. data/spec/api_client_spec.rb +1 -1
  26. data/spec/configuration_spec.rb +1 -1
  27. data/spec/models/spam_detection_advanced_form_field_spec.rb +47 -0
  28. data/spec/models/spam_detection_advanced_form_submission_request_spec.rb +59 -0
  29. data/spec/models/spam_detection_advanced_request_spec.rb +25 -1
  30. data/spec/models/spam_detection_advanced_response_spec.rb +37 -1
  31. data/spec/models/spam_detection_form_submission_advanced_response_spec.rb +77 -0
  32. data/spec/models/spam_detection_request_spec.rb +47 -0
  33. data/spec/models/spam_detection_response_spec.rb +1 -1
  34. data/spec/spec_helper.rb +1 -1
  35. metadata +15 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6a070426986b622338d79527af36c6a67ae0622636c56107f2db3a0ec0cad74b
4
- data.tar.gz: 73d7f89496568184e0ad5cd747ed9956b1c8f23671da65aee3f0ad94e9be9876
3
+ metadata.gz: 764b7e5ec5157619d0c2c7e28a8b96b1d09c771b20109c4f577f7c647783dd07
4
+ data.tar.gz: 2a388acaf096073bfccf08cc4c332f0888dc2bc1c9446197df8e3ddb6d1a25c9
5
5
  SHA512:
6
- metadata.gz: a2c3cd8dd9c2c50240d6fe77f54df1f21b01da081ef68603c42cb4401a8b299abe814a8f0712c9fba425f337478ca33823db3c64f9a7c6692d5e16b892f72ca9
7
- data.tar.gz: 62d782ddc28c0afce33f465ed9465f121c5cf8bcf6c90faad064f04a993fd964c87d4cd1b125df211b96f1143cbd8a1b9efd8f401c0863fd1f01199670ed24c5
6
+ metadata.gz: bf49d64f15a66c8b642ccbf0e79ff2932c9860e5885e4c02cead82989bd2b6737ec14d352c43b1d02169f1507b3a8f1912bf299dc7597f9208e2b8a77972444a
7
+ data.tar.gz: 3afbafdeb1ffdb45e6ea5f006726ae2012c90a00327f38494ba4cd7f68c7d1dec11ed6317666704b8c7235aa65bd8675d6939cd13871e438f2ebcb4bf753d968
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.2.1
10
+ - Package version: 2.4.0
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.2.1.gem
26
+ gem install ./cloudmersive-spam-detection-api-client-2.4.0.gem
27
27
  ```
28
- (for development, run `gem install --dev ./cloudmersive-spam-detection-api-client-2.2.1.gem` to install the development dependencies)
28
+ (for development, run `gem install --dev ./cloudmersive-spam-detection-api-client-2.4.0.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.2.1'
34
+ gem 'cloudmersive-spam-detection-api-client', '~> 2.4.0'
35
35
 
36
36
  ### Install from Git
37
37
 
@@ -65,15 +65,20 @@ 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
+ input_file: File.new('/path/to/file.txt') # File |
69
74
  }
70
75
 
71
76
  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.
73
- result = api_instance.spam_detect_text_string_advanced_post(opts)
77
+ #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.
78
+ result = api_instance.spam_detect_file_advanced_post(opts)
74
79
  p result
75
80
  rescue CloudmersiveSpamDetectionApiClient::ApiError => e
76
- puts "Exception when calling SpamDetectionApi->spam_detect_text_string_advanced_post: #{e}"
81
+ puts "Exception when calling SpamDetectionApi->spam_detect_file_advanced_post: #{e}"
77
82
  end
78
83
 
79
84
  ```
@@ -84,14 +89,21 @@ All URIs are relative to *https://localhost*
84
89
 
85
90
  Class | Method | HTTP request | Description
86
91
  ------------ | ------------- | ------------- | -------------
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.
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.
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 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.
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). 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.
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. 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.
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. 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.
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. 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.
89
97
 
90
98
 
91
99
  ## Documentation for Models
92
100
 
101
+ - [CloudmersiveSpamDetectionApiClient::SpamDetectionAdvancedFormField](docs/SpamDetectionAdvancedFormField.md)
102
+ - [CloudmersiveSpamDetectionApiClient::SpamDetectionAdvancedFormSubmissionRequest](docs/SpamDetectionAdvancedFormSubmissionRequest.md)
93
103
  - [CloudmersiveSpamDetectionApiClient::SpamDetectionAdvancedRequest](docs/SpamDetectionAdvancedRequest.md)
94
104
  - [CloudmersiveSpamDetectionApiClient::SpamDetectionAdvancedResponse](docs/SpamDetectionAdvancedResponse.md)
105
+ - [CloudmersiveSpamDetectionApiClient::SpamDetectionFormSubmissionAdvancedResponse](docs/SpamDetectionFormSubmissionAdvancedResponse.md)
106
+ - [CloudmersiveSpamDetectionApiClient::SpamDetectionRequest](docs/SpamDetectionRequest.md)
95
107
  - [CloudmersiveSpamDetectionApiClient::SpamDetectionResponse](docs/SpamDetectionResponse.md)
96
108
 
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
 
@@ -21,7 +21,7 @@ Gem::Specification.new do |s|
21
21
  s.platform = Gem::Platform::RUBY
22
22
  s.authors = ["Cloudmersive"]
23
23
  s.email = [""]
24
- s.homepage = "https://www.cloudmersive.com/spam-api"
24
+ s.homepage = "https://cloudmersive.com/spam-detection-api"
25
25
  s.summary = "Scan content for spam."
26
26
  s.description = "Spam Detection API lets you scan content for spam using AI."
27
27
  s.license = 'Apache 2.0'
@@ -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
+
@@ -4,5 +4,9 @@
4
4
  Name | Type | Description | Notes
5
5
  ------------ | ------------- | ------------- | -------------
6
6
  **input_string** | **String** | Input text string to detect spam against | [optional]
7
+ **model** | **String** | Optional: Specify which AI model to use. Possible choices are Normal and Advanced. Default is Advanced. | [optional]
8
+ **allow_unsolicited_sales** | **BOOLEAN** | True if unsolicited sales should be allowed, false otherwise | [optional]
9
+ **allow_promotional_content** | **BOOLEAN** | True if promotional content should be allowed, false otherwise | [optional]
10
+ **allow_phishing** | **BOOLEAN** | True if phishing should be allowed, false otherwise | [optional]
7
11
 
8
12
 
@@ -4,5 +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]
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]
7
13
 
8
14
 
@@ -4,14 +4,188 @@ 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.
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.
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 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_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). 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.
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. 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.
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. 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.
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. 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.
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 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.
18
+
19
+ ### Example
20
+ ```ruby
21
+ # load the gem
22
+ require 'cloudmersive-spam-detection-api-client'
23
+ # setup authorization
24
+ CloudmersiveSpamDetectionApiClient.configure do |config|
25
+ # Configure API key authorization: Apikey
26
+ config.api_key['Apikey'] = 'YOUR API KEY'
27
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
28
+ #config.api_key_prefix['Apikey'] = 'Bearer'
29
+ end
30
+
31
+ api_instance = CloudmersiveSpamDetectionApiClient::SpamDetectionApi.new
32
+
33
+ opts = {
34
+ model: 'Advanced', # String | Optional: Specify which AI model to use. Possible choices are Normal and Advanced. Default is Advanced.
35
+ preprocessing: 'Auto', # String | Optional: Specify which preprocessing to Use. Possible choices are None, Compatability and Auto. Default is Auto.
36
+ allow_phishing: false, # BOOLEAN | True if phishing should be allowed, false otherwise
37
+ allow_unsolicited_sales: false, # BOOLEAN | True if unsolicited sales should be allowed, false otherwise
38
+ allow_promotional_content: true, # BOOLEAN | True if promotional content should be allowed, false otherwise
39
+ input_file: File.new('/path/to/file.txt') # File |
40
+ }
41
+
42
+ begin
43
+ #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.
44
+ result = api_instance.spam_detect_file_advanced_post(opts)
45
+ p result
46
+ rescue CloudmersiveSpamDetectionApiClient::ApiError => e
47
+ puts "Exception when calling SpamDetectionApi->spam_detect_file_advanced_post: #{e}"
48
+ end
49
+ ```
50
+
51
+ ### Parameters
52
+
53
+ Name | Type | Description | Notes
54
+ ------------- | ------------- | ------------- | -------------
55
+ **model** | **String**| Optional: Specify which AI model to use. Possible choices are Normal and Advanced. Default is Advanced. | [optional] [default to Advanced]
56
+ **preprocessing** | **String**| Optional: Specify which preprocessing to Use. Possible choices are None, Compatability and Auto. Default is Auto. | [optional] [default to Auto]
57
+ **allow_phishing** | **BOOLEAN**| True if phishing should be allowed, false otherwise | [optional] [default to false]
58
+ **allow_unsolicited_sales** | **BOOLEAN**| True if unsolicited sales should be allowed, false otherwise | [optional] [default to false]
59
+ **allow_promotional_content** | **BOOLEAN**| True if promotional content should be allowed, false otherwise | [optional] [default to true]
60
+ **input_file** | **File**| | [optional]
61
+
62
+ ### Return type
63
+
64
+ [**SpamDetectionAdvancedResponse**](SpamDetectionAdvancedResponse.md)
65
+
66
+ ### Authorization
67
+
68
+ [Apikey](../README.md#Apikey)
69
+
70
+ ### HTTP request headers
71
+
72
+ - **Content-Type**: multipart/form-data
73
+ - **Accept**: text/plain, application/json, text/json
74
+
75
+
76
+
77
+ # **spam_detect_file_post**
78
+ > SpamDetectionResponse spam_detect_file_post(opts)
79
+
80
+ Perform AI spam detection and classification on an input image or document (PDF or DOCX). 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.
81
+
82
+ ### Example
83
+ ```ruby
84
+ # load the gem
85
+ require 'cloudmersive-spam-detection-api-client'
86
+ # setup authorization
87
+ CloudmersiveSpamDetectionApiClient.configure do |config|
88
+ # Configure API key authorization: Apikey
89
+ config.api_key['Apikey'] = 'YOUR API KEY'
90
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
91
+ #config.api_key_prefix['Apikey'] = 'Bearer'
92
+ end
93
+
94
+ api_instance = CloudmersiveSpamDetectionApiClient::SpamDetectionApi.new
95
+
96
+ opts = {
97
+ model: 'Advanced', # String | Model to use; default setting is Advanced
98
+ input_file: File.new('/path/to/file.txt') # File |
99
+ }
100
+
101
+ begin
102
+ #Perform AI spam detection and classification on an input image or document (PDF or DOCX). 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.
103
+ result = api_instance.spam_detect_file_post(opts)
104
+ p result
105
+ rescue CloudmersiveSpamDetectionApiClient::ApiError => e
106
+ puts "Exception when calling SpamDetectionApi->spam_detect_file_post: #{e}"
107
+ end
108
+ ```
109
+
110
+ ### Parameters
111
+
112
+ Name | Type | Description | Notes
113
+ ------------- | ------------- | ------------- | -------------
114
+ **model** | **String**| Model to use; default setting is Advanced | [optional] [default to Advanced]
115
+ **input_file** | **File**| | [optional]
116
+
117
+ ### Return type
118
+
119
+ [**SpamDetectionResponse**](SpamDetectionResponse.md)
120
+
121
+ ### Authorization
122
+
123
+ [Apikey](../README.md#Apikey)
124
+
125
+ ### HTTP request headers
126
+
127
+ - **Content-Type**: multipart/form-data
128
+ - **Accept**: text/plain, application/json, text/json
129
+
130
+
131
+
132
+ # **spam_detect_form_submission_advanced_post**
133
+ > SpamDetectionFormSubmissionAdvancedResponse spam_detect_form_submission_advanced_post(opts)
134
+
135
+ Perform advanced AI spam detection and classification against a form submission. 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
+
137
+ ### Example
138
+ ```ruby
139
+ # load the gem
140
+ require 'cloudmersive-spam-detection-api-client'
141
+ # setup authorization
142
+ CloudmersiveSpamDetectionApiClient.configure do |config|
143
+ # Configure API key authorization: Apikey
144
+ config.api_key['Apikey'] = 'YOUR API KEY'
145
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
146
+ #config.api_key_prefix['Apikey'] = 'Bearer'
147
+ end
148
+
149
+ api_instance = CloudmersiveSpamDetectionApiClient::SpamDetectionApi.new
150
+
151
+ opts = {
152
+ body: CloudmersiveSpamDetectionApiClient::SpamDetectionAdvancedFormSubmissionRequest.new # SpamDetectionAdvancedFormSubmissionRequest | Spam detection request
153
+ }
154
+
155
+ begin
156
+ #Perform advanced AI spam detection and classification against a form submission. 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
+ result = api_instance.spam_detect_form_submission_advanced_post(opts)
158
+ p result
159
+ rescue CloudmersiveSpamDetectionApiClient::ApiError => e
160
+ puts "Exception when calling SpamDetectionApi->spam_detect_form_submission_advanced_post: #{e}"
161
+ end
162
+ ```
163
+
164
+ ### Parameters
165
+
166
+ Name | Type | Description | Notes
167
+ ------------- | ------------- | ------------- | -------------
168
+ **body** | [**SpamDetectionAdvancedFormSubmissionRequest**](SpamDetectionAdvancedFormSubmissionRequest.md)| Spam detection request | [optional]
169
+
170
+ ### Return type
171
+
172
+ [**SpamDetectionFormSubmissionAdvancedResponse**](SpamDetectionFormSubmissionAdvancedResponse.md)
173
+
174
+ ### Authorization
175
+
176
+ [Apikey](../README.md#Apikey)
177
+
178
+ ### HTTP request headers
179
+
180
+ - **Content-Type**: application/json, text/json, application/*+json
181
+ - **Accept**: text/plain, application/json, text/json
182
+
9
183
 
10
184
 
11
185
  # **spam_detect_text_string_advanced_post**
12
186
  > SpamDetectionAdvancedResponse spam_detect_text_string_advanced_post(opts)
13
187
 
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.
188
+ 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.
15
189
 
16
190
  ### Example
17
191
  ```ruby
@@ -32,7 +206,7 @@ opts = {
32
206
  }
33
207
 
34
208
  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.
209
+ #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.
36
210
  result = api_instance.spam_detect_text_string_advanced_post(opts)
37
211
  p result
38
212
  rescue CloudmersiveSpamDetectionApiClient::ApiError => e
@@ -64,7 +238,7 @@ Name | Type | Description | Notes
64
238
  # **spam_detect_text_string_post**
65
239
  > SpamDetectionResponse spam_detect_text_string_post(opts)
66
240
 
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.
241
+ 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.
68
242
 
69
243
  ### Example
70
244
  ```ruby
@@ -81,11 +255,11 @@ end
81
255
  api_instance = CloudmersiveSpamDetectionApiClient::SpamDetectionApi.new
82
256
 
83
257
  opts = {
84
- body: CloudmersiveSpamDetectionApiClient::SpamDetectionAdvancedRequest.new # SpamDetectionAdvancedRequest | Spam detection request
258
+ body: CloudmersiveSpamDetectionApiClient::SpamDetectionRequest.new # SpamDetectionRequest | Spam detection request
85
259
  }
86
260
 
87
261
  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.
262
+ #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.
89
263
  result = api_instance.spam_detect_text_string_post(opts)
90
264
  p result
91
265
  rescue CloudmersiveSpamDetectionApiClient::ApiError => e
@@ -97,7 +271,7 @@ end
97
271
 
98
272
  Name | Type | Description | Notes
99
273
  ------------- | ------------- | ------------- | -------------
100
- **body** | [**SpamDetectionAdvancedRequest**](SpamDetectionAdvancedRequest.md)| Spam detection request | [optional]
274
+ **body** | [**SpamDetectionRequest**](SpamDetectionRequest.md)| Spam detection request | [optional]
101
275
 
102
276
  ### Return type
103
277
 
@@ -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
+
@@ -0,0 +1,9 @@
1
+ # CloudmersiveSpamDetectionApiClient::SpamDetectionRequest
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **input_string** | **String** | Input text string to detect spam against | [optional]
7
+ **model** | **String** | Optional: Specify which AI model to use. Possible choices are Normal and Advanced. Default is Advanced. | [optional]
8
+
9
+
@@ -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,171 @@ 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.
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.
23
+ # @param [Hash] opts the optional parameters
24
+ # @option opts [String] :model Optional: Specify which AI model to use. Possible choices are Normal and Advanced. Default is Advanced. (default to Advanced)
25
+ # @option opts [String] :preprocessing Optional: Specify which preprocessing to Use. Possible choices are None, Compatability and Auto. Default is Auto. (default to Auto)
26
+ # @option opts [BOOLEAN] :allow_phishing True if phishing should be allowed, false otherwise (default to false)
27
+ # @option opts [BOOLEAN] :allow_unsolicited_sales True if unsolicited sales should be allowed, false otherwise (default to false)
28
+ # @option opts [BOOLEAN] :allow_promotional_content True if promotional content should be allowed, false otherwise (default to true)
29
+ # @option opts [File] :input_file
30
+ # @return [SpamDetectionAdvancedResponse]
31
+ def spam_detect_file_advanced_post(opts = {})
32
+ data, _status_code, _headers = spam_detect_file_advanced_post_with_http_info(opts)
33
+ data
34
+ end
35
+
36
+ # 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.
37
+ # @param [Hash] opts the optional parameters
38
+ # @option opts [String] :model Optional: Specify which AI model to use. Possible choices are Normal and Advanced. Default is Advanced.
39
+ # @option opts [String] :preprocessing Optional: Specify which preprocessing to Use. Possible choices are None, Compatability and Auto. Default is Auto.
40
+ # @option opts [BOOLEAN] :allow_phishing True if phishing should be allowed, false otherwise
41
+ # @option opts [BOOLEAN] :allow_unsolicited_sales True if unsolicited sales should be allowed, false otherwise
42
+ # @option opts [BOOLEAN] :allow_promotional_content True if promotional content should be allowed, false otherwise
43
+ # @option opts [File] :input_file
44
+ # @return [Array<(SpamDetectionAdvancedResponse, Fixnum, Hash)>] SpamDetectionAdvancedResponse data, response status code and response headers
45
+ def spam_detect_file_advanced_post_with_http_info(opts = {})
46
+ if @api_client.config.debugging
47
+ @api_client.config.logger.debug 'Calling API: SpamDetectionApi.spam_detect_file_advanced_post ...'
48
+ end
49
+ # resource path
50
+ local_var_path = '/spam/detect/file/advanced'
51
+
52
+ # query parameters
53
+ query_params = {}
54
+
55
+ # header parameters
56
+ header_params = {}
57
+ # HTTP header 'Accept' (if needed)
58
+ header_params['Accept'] = @api_client.select_header_accept(['text/plain', 'application/json', 'text/json'])
59
+ # HTTP header 'Content-Type'
60
+ header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
61
+ header_params[:'model'] = opts[:'model'] if !opts[:'model'].nil?
62
+ header_params[:'preprocessing'] = opts[:'preprocessing'] if !opts[:'preprocessing'].nil?
63
+ header_params[:'allowPhishing'] = opts[:'allow_phishing'] if !opts[:'allow_phishing'].nil?
64
+ header_params[:'allowUnsolicitedSales'] = opts[:'allow_unsolicited_sales'] if !opts[:'allow_unsolicited_sales'].nil?
65
+ header_params[:'allowPromotionalContent'] = opts[:'allow_promotional_content'] if !opts[:'allow_promotional_content'].nil?
66
+
67
+ # form parameters
68
+ form_params = {}
69
+ form_params['inputFile'] = opts[:'input_file'] if !opts[:'input_file'].nil?
70
+
71
+ # http body (model)
72
+ post_body = nil
73
+ auth_names = ['Apikey']
74
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
75
+ :header_params => header_params,
76
+ :query_params => query_params,
77
+ :form_params => form_params,
78
+ :body => post_body,
79
+ :auth_names => auth_names,
80
+ :return_type => 'SpamDetectionAdvancedResponse')
81
+ if @api_client.config.debugging
82
+ @api_client.config.logger.debug "API called: SpamDetectionApi#spam_detect_file_advanced_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
83
+ end
84
+ return data, status_code, headers
85
+ end
86
+ # Perform AI spam detection and classification on an input image or document (PDF or DOCX). 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.
87
+ # @param [Hash] opts the optional parameters
88
+ # @option opts [String] :model Model to use; default setting is Advanced (default to Advanced)
89
+ # @option opts [File] :input_file
90
+ # @return [SpamDetectionResponse]
91
+ def spam_detect_file_post(opts = {})
92
+ data, _status_code, _headers = spam_detect_file_post_with_http_info(opts)
93
+ data
94
+ end
95
+
96
+ # Perform AI spam detection and classification on an input image or document (PDF or DOCX). 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.
97
+ # @param [Hash] opts the optional parameters
98
+ # @option opts [String] :model Model to use; default setting is Advanced
99
+ # @option opts [File] :input_file
100
+ # @return [Array<(SpamDetectionResponse, Fixnum, Hash)>] SpamDetectionResponse data, response status code and response headers
101
+ def spam_detect_file_post_with_http_info(opts = {})
102
+ if @api_client.config.debugging
103
+ @api_client.config.logger.debug 'Calling API: SpamDetectionApi.spam_detect_file_post ...'
104
+ end
105
+ # resource path
106
+ local_var_path = '/spam/detect/file'
107
+
108
+ # query parameters
109
+ query_params = {}
110
+
111
+ # header parameters
112
+ header_params = {}
113
+ # HTTP header 'Accept' (if needed)
114
+ header_params['Accept'] = @api_client.select_header_accept(['text/plain', 'application/json', 'text/json'])
115
+ # HTTP header 'Content-Type'
116
+ header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
117
+ header_params[:'model'] = opts[:'model'] if !opts[:'model'].nil?
118
+
119
+ # form parameters
120
+ form_params = {}
121
+ form_params['inputFile'] = opts[:'input_file'] if !opts[:'input_file'].nil?
122
+
123
+ # http body (model)
124
+ post_body = nil
125
+ auth_names = ['Apikey']
126
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
127
+ :header_params => header_params,
128
+ :query_params => query_params,
129
+ :form_params => form_params,
130
+ :body => post_body,
131
+ :auth_names => auth_names,
132
+ :return_type => 'SpamDetectionResponse')
133
+ if @api_client.config.debugging
134
+ @api_client.config.logger.debug "API called: SpamDetectionApi#spam_detect_file_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
135
+ end
136
+ return data, status_code, headers
137
+ end
138
+ # Perform advanced AI spam detection and classification against a form submission. 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
+ # @param [Hash] opts the optional parameters
140
+ # @option opts [SpamDetectionAdvancedFormSubmissionRequest] :body Spam detection request
141
+ # @return [SpamDetectionFormSubmissionAdvancedResponse]
142
+ def spam_detect_form_submission_advanced_post(opts = {})
143
+ data, _status_code, _headers = spam_detect_form_submission_advanced_post_with_http_info(opts)
144
+ data
145
+ end
146
+
147
+ # Perform advanced AI spam detection and classification against a form submission. 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
+ # @param [Hash] opts the optional parameters
149
+ # @option opts [SpamDetectionAdvancedFormSubmissionRequest] :body Spam detection request
150
+ # @return [Array<(SpamDetectionFormSubmissionAdvancedResponse, Fixnum, Hash)>] SpamDetectionFormSubmissionAdvancedResponse data, response status code and response headers
151
+ def spam_detect_form_submission_advanced_post_with_http_info(opts = {})
152
+ if @api_client.config.debugging
153
+ @api_client.config.logger.debug 'Calling API: SpamDetectionApi.spam_detect_form_submission_advanced_post ...'
154
+ end
155
+ # resource path
156
+ local_var_path = '/spam/detect/form-submission/advanced'
157
+
158
+ # query parameters
159
+ query_params = {}
160
+
161
+ # header parameters
162
+ header_params = {}
163
+ # HTTP header 'Accept' (if needed)
164
+ header_params['Accept'] = @api_client.select_header_accept(['text/plain', 'application/json', 'text/json'])
165
+ # HTTP header 'Content-Type'
166
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'text/json', 'application/*+json'])
167
+
168
+ # form parameters
169
+ form_params = {}
170
+
171
+ # http body (model)
172
+ post_body = @api_client.object_to_http_body(opts[:'body'])
173
+ auth_names = ['Apikey']
174
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
175
+ :header_params => header_params,
176
+ :query_params => query_params,
177
+ :form_params => form_params,
178
+ :body => post_body,
179
+ :auth_names => auth_names,
180
+ :return_type => 'SpamDetectionFormSubmissionAdvancedResponse')
181
+ if @api_client.config.debugging
182
+ @api_client.config.logger.debug "API called: SpamDetectionApi#spam_detect_form_submission_advanced_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
183
+ end
184
+ return data, status_code, headers
185
+ end
186
+ # 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.
23
187
  # @param [Hash] opts the optional parameters
24
188
  # @option opts [SpamDetectionAdvancedRequest] :body Spam detection request
25
189
  # @return [SpamDetectionAdvancedResponse]
@@ -28,7 +192,7 @@ module CloudmersiveSpamDetectionApiClient
28
192
  data
29
193
  end
30
194
 
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.
195
+ # 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.
32
196
  # @param [Hash] opts the optional parameters
33
197
  # @option opts [SpamDetectionAdvancedRequest] :body Spam detection request
34
198
  # @return [Array<(SpamDetectionAdvancedResponse, Fixnum, Hash)>] SpamDetectionAdvancedResponse data, response status code and response headers
@@ -67,18 +231,18 @@ module CloudmersiveSpamDetectionApiClient
67
231
  end
68
232
  return data, status_code, headers
69
233
  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.
234
+ # 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.
71
235
  # @param [Hash] opts the optional parameters
72
- # @option opts [SpamDetectionAdvancedRequest] :body Spam detection request
236
+ # @option opts [SpamDetectionRequest] :body Spam detection request
73
237
  # @return [SpamDetectionResponse]
74
238
  def spam_detect_text_string_post(opts = {})
75
239
  data, _status_code, _headers = spam_detect_text_string_post_with_http_info(opts)
76
240
  data
77
241
  end
78
242
 
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.
243
+ # 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.
80
244
  # @param [Hash] opts the optional parameters
81
- # @option opts [SpamDetectionAdvancedRequest] :body Spam detection request
245
+ # @option opts [SpamDetectionRequest] :body Spam detection request
82
246
  # @return [Array<(SpamDetectionResponse, Fixnum, Hash)>] SpamDetectionResponse data, response status code and response headers
83
247
  def spam_detect_text_string_post_with_http_info(opts = {})
84
248
  if @api_client.config.debugging
@@ -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