cloudmersive-spam-detection-api-client 2.2.0 → 2.2.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2d3f876a94ba37d340498e88c7a09e720fa277b8233cd087134497f8bcf90605
4
- data.tar.gz: f26d31ccbf73ada867ca4e85b22eb0946d3a2f6f3f2c86634285dc4ac1c9a5dd
3
+ metadata.gz: 6a070426986b622338d79527af36c6a67ae0622636c56107f2db3a0ec0cad74b
4
+ data.tar.gz: 73d7f89496568184e0ad5cd747ed9956b1c8f23671da65aee3f0ad94e9be9876
5
5
  SHA512:
6
- metadata.gz: 83f8591dd3989804c4ac1fd3800543f26e37480e593cef21b4ec77c34f45ae81ca64cc6b270e66196edf205285486ef0e21806352c7cf61ce2164c9ec652e82e
7
- data.tar.gz: 16a9a3d5cb7d960690def7b057ec968d2352a4624f869600ac45ceb55256d9ce06354dcb1ff519b27867070b4d887dec82d1a0fd7ed9114a8c0959ec59e0bf87
6
+ metadata.gz: a2c3cd8dd9c2c50240d6fe77f54df1f21b01da081ef68603c42cb4401a8b299abe814a8f0712c9fba425f337478ca33823db3c64f9a7c6692d5e16b892f72ca9
7
+ data.tar.gz: 62d782ddc28c0afce33f465ed9465f121c5cf8bcf6c90faad064f04a993fd964c87d4cd1b125df211b96f1143cbd8a1b9efd8f401c0863fd1f01199670ed24c5
data/README.md CHANGED
@@ -1,13 +1,13 @@
1
1
  # cloudmersive-spam-detection-api-client
2
2
 
3
- CloudmersiveSpamDetectionApiClient - the Ruby gem for the phishingapi
3
+ CloudmersiveSpamDetectionApiClient - the Ruby gem for the spamapi
4
4
 
5
5
  Easily and directly scan and block phishing security threats.
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.0
10
+ - Package version: 2.2.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.2.0.gem
26
+ gem install ./cloudmersive-spam-detection-api-client-2.2.1.gem
27
27
  ```
28
- (for development, run `gem install --dev ./cloudmersive-spam-detection-api-client-2.2.0.gem` to install the development dependencies)
28
+ (for development, run `gem install --dev ./cloudmersive-spam-detection-api-client-2.2.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.2.0'
34
+ gem 'cloudmersive-spam-detection-api-client', '~> 2.2.1'
35
35
 
36
36
  ### Install from Git
37
37
 
@@ -65,10 +65,11 @@ end
65
65
  api_instance = CloudmersiveSpamDetectionApiClient::SpamDetectionApi.new
66
66
 
67
67
  opts = {
68
- body: CloudmersiveSpamDetectionApiClient::SpamDetectionAdvancedRequest.new # SpamDetectionAdvancedRequest |
68
+ body: CloudmersiveSpamDetectionApiClient::SpamDetectionAdvancedRequest.new # SpamDetectionAdvancedRequest | Spam detection request
69
69
  }
70
70
 
71
71
  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.
72
73
  result = api_instance.spam_detect_text_string_advanced_post(opts)
73
74
  p result
74
75
  rescue CloudmersiveSpamDetectionApiClient::ApiError => e
@@ -83,13 +84,15 @@ All URIs are relative to *https://localhost*
83
84
 
84
85
  Class | Method | HTTP request | Description
85
86
  ------------ | ------------- | ------------- | -------------
86
- *CloudmersiveSpamDetectionApiClient::SpamDetectionApi* | [**spam_detect_text_string_advanced_post**](docs/SpamDetectionApi.md#spam_detect_text_string_advanced_post) | **POST** /spam/detect/text-string/advanced |
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.
87
89
 
88
90
 
89
91
  ## Documentation for Models
90
92
 
91
93
  - [CloudmersiveSpamDetectionApiClient::SpamDetectionAdvancedRequest](docs/SpamDetectionAdvancedRequest.md)
92
94
  - [CloudmersiveSpamDetectionApiClient::SpamDetectionAdvancedResponse](docs/SpamDetectionAdvancedResponse.md)
95
+ - [CloudmersiveSpamDetectionApiClient::SpamDetectionResponse](docs/SpamDetectionResponse.md)
93
96
 
94
97
 
95
98
  ## Documentation for Authorization
@@ -1,7 +1,7 @@
1
1
  # -*- encoding: utf-8 -*-
2
2
 
3
3
  =begin
4
- #phishingapi
4
+ #spamapi
5
5
 
6
6
  #Easily and directly scan and block phishing security threats.
7
7
 
@@ -3,6 +3,6 @@
3
3
  ## Properties
4
4
  Name | Type | Description | Notes
5
5
  ------------ | ------------- | ------------- | -------------
6
- **input_string** | **String** | | [optional]
6
+ **input_string** | **String** | Input text string to detect spam against | [optional]
7
7
 
8
8
 
@@ -3,6 +3,6 @@
3
3
  ## Properties
4
4
  Name | Type | Description | Notes
5
5
  ------------ | ------------- | ------------- | -------------
6
- **clean_result** | **BOOLEAN** | | [optional]
6
+ **clean_result** | **BOOLEAN** | True if the result is not spam (clean), and false otherwise | [optional]
7
7
 
8
8
 
@@ -4,13 +4,14 @@ 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 |
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.
8
9
 
9
10
 
10
11
  # **spam_detect_text_string_advanced_post**
11
12
  > SpamDetectionAdvancedResponse spam_detect_text_string_advanced_post(opts)
12
13
 
13
-
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.
14
15
 
15
16
  ### Example
16
17
  ```ruby
@@ -27,10 +28,11 @@ end
27
28
  api_instance = CloudmersiveSpamDetectionApiClient::SpamDetectionApi.new
28
29
 
29
30
  opts = {
30
- body: CloudmersiveSpamDetectionApiClient::SpamDetectionAdvancedRequest.new # SpamDetectionAdvancedRequest |
31
+ body: CloudmersiveSpamDetectionApiClient::SpamDetectionAdvancedRequest.new # SpamDetectionAdvancedRequest | Spam detection request
31
32
  }
32
33
 
33
34
  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.
34
36
  result = api_instance.spam_detect_text_string_advanced_post(opts)
35
37
  p result
36
38
  rescue CloudmersiveSpamDetectionApiClient::ApiError => e
@@ -42,7 +44,7 @@ end
42
44
 
43
45
  Name | Type | Description | Notes
44
46
  ------------- | ------------- | ------------- | -------------
45
- **body** | [**SpamDetectionAdvancedRequest**](SpamDetectionAdvancedRequest.md)| | [optional]
47
+ **body** | [**SpamDetectionAdvancedRequest**](SpamDetectionAdvancedRequest.md)| Spam detection request | [optional]
46
48
 
47
49
  ### Return type
48
50
 
@@ -59,3 +61,56 @@ Name | Type | Description | Notes
59
61
 
60
62
 
61
63
 
64
+ # **spam_detect_text_string_post**
65
+ > SpamDetectionResponse spam_detect_text_string_post(opts)
66
+
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.
68
+
69
+ ### Example
70
+ ```ruby
71
+ # load the gem
72
+ require 'cloudmersive-spam-detection-api-client'
73
+ # setup authorization
74
+ CloudmersiveSpamDetectionApiClient.configure do |config|
75
+ # Configure API key authorization: Apikey
76
+ config.api_key['Apikey'] = 'YOUR API KEY'
77
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
78
+ #config.api_key_prefix['Apikey'] = 'Bearer'
79
+ end
80
+
81
+ api_instance = CloudmersiveSpamDetectionApiClient::SpamDetectionApi.new
82
+
83
+ opts = {
84
+ body: CloudmersiveSpamDetectionApiClient::SpamDetectionAdvancedRequest.new # SpamDetectionAdvancedRequest | Spam detection request
85
+ }
86
+
87
+ 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.
89
+ result = api_instance.spam_detect_text_string_post(opts)
90
+ p result
91
+ rescue CloudmersiveSpamDetectionApiClient::ApiError => e
92
+ puts "Exception when calling SpamDetectionApi->spam_detect_text_string_post: #{e}"
93
+ end
94
+ ```
95
+
96
+ ### Parameters
97
+
98
+ Name | Type | Description | Notes
99
+ ------------- | ------------- | ------------- | -------------
100
+ **body** | [**SpamDetectionAdvancedRequest**](SpamDetectionAdvancedRequest.md)| Spam detection request | [optional]
101
+
102
+ ### Return type
103
+
104
+ [**SpamDetectionResponse**](SpamDetectionResponse.md)
105
+
106
+ ### Authorization
107
+
108
+ [Apikey](../README.md#Apikey)
109
+
110
+ ### HTTP request headers
111
+
112
+ - **Content-Type**: application/json, text/json, application/*+json
113
+ - **Accept**: text/plain, application/json, text/json
114
+
115
+
116
+
@@ -0,0 +1,8 @@
1
+ # CloudmersiveSpamDetectionApiClient::SpamDetectionResponse
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
+
8
+
@@ -1,5 +1,5 @@
1
1
  =begin
2
- #phishingapi
2
+ #spamapi
3
3
 
4
4
  #Easily and directly scan and block phishing security threats.
5
5
 
@@ -19,16 +19,18 @@ 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
23
  # @param [Hash] opts the optional parameters
23
- # @option opts [SpamDetectionAdvancedRequest] :body
24
+ # @option opts [SpamDetectionAdvancedRequest] :body Spam detection request
24
25
  # @return [SpamDetectionAdvancedResponse]
25
26
  def spam_detect_text_string_advanced_post(opts = {})
26
27
  data, _status_code, _headers = spam_detect_text_string_advanced_post_with_http_info(opts)
27
28
  data
28
29
  end
29
30
 
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.
30
32
  # @param [Hash] opts the optional parameters
31
- # @option opts [SpamDetectionAdvancedRequest] :body
33
+ # @option opts [SpamDetectionAdvancedRequest] :body Spam detection request
32
34
  # @return [Array<(SpamDetectionAdvancedResponse, Fixnum, Hash)>] SpamDetectionAdvancedResponse data, response status code and response headers
33
35
  def spam_detect_text_string_advanced_post_with_http_info(opts = {})
34
36
  if @api_client.config.debugging
@@ -65,5 +67,53 @@ module CloudmersiveSpamDetectionApiClient
65
67
  end
66
68
  return data, status_code, headers
67
69
  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.
71
+ # @param [Hash] opts the optional parameters
72
+ # @option opts [SpamDetectionAdvancedRequest] :body Spam detection request
73
+ # @return [SpamDetectionResponse]
74
+ def spam_detect_text_string_post(opts = {})
75
+ data, _status_code, _headers = spam_detect_text_string_post_with_http_info(opts)
76
+ data
77
+ end
78
+
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.
80
+ # @param [Hash] opts the optional parameters
81
+ # @option opts [SpamDetectionAdvancedRequest] :body Spam detection request
82
+ # @return [Array<(SpamDetectionResponse, Fixnum, Hash)>] SpamDetectionResponse data, response status code and response headers
83
+ def spam_detect_text_string_post_with_http_info(opts = {})
84
+ if @api_client.config.debugging
85
+ @api_client.config.logger.debug 'Calling API: SpamDetectionApi.spam_detect_text_string_post ...'
86
+ end
87
+ # resource path
88
+ local_var_path = '/spam/detect/text-string'
89
+
90
+ # query parameters
91
+ query_params = {}
92
+
93
+ # header parameters
94
+ header_params = {}
95
+ # HTTP header 'Accept' (if needed)
96
+ header_params['Accept'] = @api_client.select_header_accept(['text/plain', 'application/json', 'text/json'])
97
+ # HTTP header 'Content-Type'
98
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'text/json', 'application/*+json'])
99
+
100
+ # form parameters
101
+ form_params = {}
102
+
103
+ # http body (model)
104
+ post_body = @api_client.object_to_http_body(opts[:'body'])
105
+ auth_names = ['Apikey']
106
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
107
+ :header_params => header_params,
108
+ :query_params => query_params,
109
+ :form_params => form_params,
110
+ :body => post_body,
111
+ :auth_names => auth_names,
112
+ :return_type => 'SpamDetectionResponse')
113
+ if @api_client.config.debugging
114
+ @api_client.config.logger.debug "API called: SpamDetectionApi#spam_detect_text_string_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
115
+ end
116
+ return data, status_code, headers
117
+ end
68
118
  end
69
119
  end
@@ -1,5 +1,5 @@
1
1
  =begin
2
- #phishingapi
2
+ #spamapi
3
3
 
4
4
  #Easily and directly scan and block phishing security threats.
5
5
 
@@ -1,5 +1,5 @@
1
1
  =begin
2
- #phishingapi
2
+ #spamapi
3
3
 
4
4
  #Easily and directly scan and block phishing security threats.
5
5
 
@@ -1,5 +1,5 @@
1
1
  =begin
2
- #phishingapi
2
+ #spamapi
3
3
 
4
4
  #Easily and directly scan and block phishing security threats.
5
5
 
@@ -1,5 +1,5 @@
1
1
  =begin
2
- #phishingapi
2
+ #spamapi
3
3
 
4
4
  #Easily and directly scan and block phishing security threats.
5
5
 
@@ -13,13 +13,15 @@ Swagger Codegen version: 2.4.14
13
13
  require 'date'
14
14
 
15
15
  module CloudmersiveSpamDetectionApiClient
16
+ # AI advanced spam detection request
16
17
  class SpamDetectionAdvancedRequest
18
+ # Input text string to detect spam against
17
19
  attr_accessor :input_string
18
20
 
19
21
  # Attribute mapping from ruby-style variable name to JSON key.
20
22
  def self.attribute_map
21
23
  {
22
- :'input_string' => :'inputString'
24
+ :'input_string' => :'InputString'
23
25
  }
24
26
  end
25
27
 
@@ -38,8 +40,8 @@ module CloudmersiveSpamDetectionApiClient
38
40
  # convert string to symbol for hash key
39
41
  attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
40
42
 
41
- if attributes.has_key?(:'inputString')
42
- self.input_string = attributes[:'inputString']
43
+ if attributes.has_key?(:'InputString')
44
+ self.input_string = attributes[:'InputString']
43
45
  end
44
46
  end
45
47
 
@@ -1,5 +1,5 @@
1
1
  =begin
2
- #phishingapi
2
+ #spamapi
3
3
 
4
4
  #Easily and directly scan and block phishing security threats.
5
5
 
@@ -13,13 +13,15 @@ Swagger Codegen version: 2.4.14
13
13
  require 'date'
14
14
 
15
15
  module CloudmersiveSpamDetectionApiClient
16
+ # Result of detecting spam using AI
16
17
  class SpamDetectionAdvancedResponse
18
+ # True if the result is not spam (clean), and false otherwise
17
19
  attr_accessor :clean_result
18
20
 
19
21
  # Attribute mapping from ruby-style variable name to JSON key.
20
22
  def self.attribute_map
21
23
  {
22
- :'clean_result' => :'cleanResult'
24
+ :'clean_result' => :'CleanResult'
23
25
  }
24
26
  end
25
27
 
@@ -38,8 +40,8 @@ module CloudmersiveSpamDetectionApiClient
38
40
  # convert string to symbol for hash key
39
41
  attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
40
42
 
41
- if attributes.has_key?(:'cleanResult')
42
- self.clean_result = attributes[:'cleanResult']
43
+ if attributes.has_key?(:'CleanResult')
44
+ self.clean_result = attributes[:'CleanResult']
43
45
  end
44
46
  end
45
47
 
@@ -0,0 +1,186 @@
1
+ =begin
2
+ #spamapi
3
+
4
+ #Easily and directly scan and block phishing security threats.
5
+
6
+ OpenAPI spec version: v1
7
+
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+ Swagger Codegen version: 2.4.14
10
+
11
+ =end
12
+
13
+ require 'date'
14
+
15
+ module CloudmersiveSpamDetectionApiClient
16
+ # Result of detecting spam using AI
17
+ class SpamDetectionResponse
18
+ # True if the result is not spam (clean), and false otherwise
19
+ attr_accessor :clean_result
20
+
21
+ # Attribute mapping from ruby-style variable name to JSON key.
22
+ def self.attribute_map
23
+ {
24
+ :'clean_result' => :'CleanResult'
25
+ }
26
+ end
27
+
28
+ # Attribute type mapping.
29
+ def self.swagger_types
30
+ {
31
+ :'clean_result' => :'BOOLEAN'
32
+ }
33
+ end
34
+
35
+ # Initializes the object
36
+ # @param [Hash] attributes Model attributes in the form of hash
37
+ def initialize(attributes = {})
38
+ return unless attributes.is_a?(Hash)
39
+
40
+ # convert string to symbol for hash key
41
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
42
+
43
+ if attributes.has_key?(:'CleanResult')
44
+ self.clean_result = attributes[:'CleanResult']
45
+ end
46
+ end
47
+
48
+ # Show invalid properties with the reasons. Usually used together with valid?
49
+ # @return Array for valid properties with the reasons
50
+ def list_invalid_properties
51
+ invalid_properties = Array.new
52
+ invalid_properties
53
+ end
54
+
55
+ # Check to see if the all the properties in the model are valid
56
+ # @return true if the model is valid
57
+ def valid?
58
+ true
59
+ end
60
+
61
+ # Checks equality by comparing each attribute.
62
+ # @param [Object] Object to be compared
63
+ def ==(o)
64
+ return true if self.equal?(o)
65
+ self.class == o.class &&
66
+ clean_result == o.clean_result
67
+ end
68
+
69
+ # @see the `==` method
70
+ # @param [Object] Object to be compared
71
+ def eql?(o)
72
+ self == o
73
+ end
74
+
75
+ # Calculates hash code according to all attributes.
76
+ # @return [Fixnum] Hash code
77
+ def hash
78
+ [clean_result].hash
79
+ end
80
+
81
+ # Builds the object from hash
82
+ # @param [Hash] attributes Model attributes in the form of hash
83
+ # @return [Object] Returns the model itself
84
+ def build_from_hash(attributes)
85
+ return nil unless attributes.is_a?(Hash)
86
+ self.class.swagger_types.each_pair do |key, type|
87
+ if type =~ /\AArray<(.*)>/i
88
+ # check to ensure the input is an array given that the attribute
89
+ # is documented as an array but the input is not
90
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
91
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
92
+ end
93
+ elsif !attributes[self.class.attribute_map[key]].nil?
94
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
95
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
96
+ end
97
+
98
+ self
99
+ end
100
+
101
+ # Deserializes the data based on type
102
+ # @param string type Data type
103
+ # @param string value Value to be deserialized
104
+ # @return [Object] Deserialized data
105
+ def _deserialize(type, value)
106
+ case type.to_sym
107
+ when :DateTime
108
+ DateTime.parse(value)
109
+ when :Date
110
+ Date.parse(value)
111
+ when :String
112
+ value.to_s
113
+ when :Integer
114
+ value.to_i
115
+ when :Float
116
+ value.to_f
117
+ when :BOOLEAN
118
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
119
+ true
120
+ else
121
+ false
122
+ end
123
+ when :Object
124
+ # generic object (usually a Hash), return directly
125
+ value
126
+ when /\AArray<(?<inner_type>.+)>\z/
127
+ inner_type = Regexp.last_match[:inner_type]
128
+ value.map { |v| _deserialize(inner_type, v) }
129
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
130
+ k_type = Regexp.last_match[:k_type]
131
+ v_type = Regexp.last_match[:v_type]
132
+ {}.tap do |hash|
133
+ value.each do |k, v|
134
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
135
+ end
136
+ end
137
+ else # model
138
+ temp_model = CloudmersiveSpamDetectionApiClient.const_get(type).new
139
+ temp_model.build_from_hash(value)
140
+ end
141
+ end
142
+
143
+ # Returns the string representation of the object
144
+ # @return [String] String presentation of the object
145
+ def to_s
146
+ to_hash.to_s
147
+ end
148
+
149
+ # to_body is an alias to to_hash (backward compatibility)
150
+ # @return [Hash] Returns the object in the form of hash
151
+ def to_body
152
+ to_hash
153
+ end
154
+
155
+ # Returns the object in the form of hash
156
+ # @return [Hash] Returns the object in the form of hash
157
+ def to_hash
158
+ hash = {}
159
+ self.class.attribute_map.each_pair do |attr, param|
160
+ value = self.send(attr)
161
+ next if value.nil?
162
+ hash[param] = _to_hash(value)
163
+ end
164
+ hash
165
+ end
166
+
167
+ # Outputs non-array value in the form of hash
168
+ # For object, use to_hash. Otherwise, just return the value
169
+ # @param [Object] value Any valid value
170
+ # @return [Hash] Returns the value in the form of hash
171
+ def _to_hash(value)
172
+ if value.is_a?(Array)
173
+ value.compact.map { |v| _to_hash(v) }
174
+ elsif value.is_a?(Hash)
175
+ {}.tap do |hash|
176
+ value.each { |k, v| hash[k] = _to_hash(v) }
177
+ end
178
+ elsif value.respond_to? :to_hash
179
+ value.to_hash
180
+ else
181
+ value
182
+ end
183
+ end
184
+
185
+ end
186
+ end
@@ -1,5 +1,5 @@
1
1
  =begin
2
- #phishingapi
2
+ #spamapi
3
3
 
4
4
  #Easily and directly scan and block phishing security threats.
5
5
 
@@ -11,5 +11,5 @@ Swagger Codegen version: 2.4.14
11
11
  =end
12
12
 
13
13
  module CloudmersiveSpamDetectionApiClient
14
- VERSION = '2.2.0'
14
+ VERSION = '2.2.1'
15
15
  end
@@ -1,5 +1,5 @@
1
1
  =begin
2
- #phishingapi
2
+ #spamapi
3
3
 
4
4
  #Easily and directly scan and block phishing security threats.
5
5
 
@@ -19,6 +19,7 @@ require 'cloudmersive-spam-detection-api-client/configuration'
19
19
  # Models
20
20
  require 'cloudmersive-spam-detection-api-client/models/spam_detection_advanced_request'
21
21
  require 'cloudmersive-spam-detection-api-client/models/spam_detection_advanced_response'
22
+ require 'cloudmersive-spam-detection-api-client/models/spam_detection_response'
22
23
 
23
24
  # APIs
24
25
  require 'cloudmersive-spam-detection-api-client/api/spam_detection_api'
@@ -1,5 +1,5 @@
1
1
  =begin
2
- #phishingapi
2
+ #spamapi
3
3
 
4
4
  #Easily and directly scan and block phishing security threats.
5
5
 
@@ -33,8 +33,9 @@ describe 'SpamDetectionApi' do
33
33
  end
34
34
 
35
35
  # unit tests for spam_detect_text_string_advanced_post
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.
36
37
  # @param [Hash] opts the optional parameters
37
- # @option opts [SpamDetectionAdvancedRequest] :body
38
+ # @option opts [SpamDetectionAdvancedRequest] :body Spam detection request
38
39
  # @return [SpamDetectionAdvancedResponse]
39
40
  describe 'spam_detect_text_string_advanced_post test' do
40
41
  it 'should work' do
@@ -42,4 +43,15 @@ describe 'SpamDetectionApi' do
42
43
  end
43
44
  end
44
45
 
46
+ # unit tests for spam_detect_text_string_post
47
+ # 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.
48
+ # @param [Hash] opts the optional parameters
49
+ # @option opts [SpamDetectionAdvancedRequest] :body Spam detection request
50
+ # @return [SpamDetectionResponse]
51
+ describe 'spam_detect_text_string_post test' do
52
+ it 'should work' do
53
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
54
+ end
55
+ end
56
+
45
57
  end
@@ -1,5 +1,5 @@
1
1
  =begin
2
- #phishingapi
2
+ #spamapi
3
3
 
4
4
  #Easily and directly scan and block phishing security threats.
5
5
 
@@ -1,5 +1,5 @@
1
1
  =begin
2
- #phishingapi
2
+ #spamapi
3
3
 
4
4
  #Easily and directly scan and block phishing security threats.
5
5
 
@@ -1,5 +1,5 @@
1
1
  =begin
2
- #phishingapi
2
+ #spamapi
3
3
 
4
4
  #Easily and directly scan and block phishing security threats.
5
5
 
@@ -1,5 +1,5 @@
1
1
  =begin
2
- #phishingapi
2
+ #spamapi
3
3
 
4
4
  #Easily and directly scan and block phishing security threats.
5
5
 
@@ -0,0 +1,41 @@
1
+ =begin
2
+ #spamapi
3
+
4
+ #Easily and directly scan and block phishing security threats.
5
+
6
+ OpenAPI spec version: v1
7
+
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+ Swagger Codegen version: 2.4.14
10
+
11
+ =end
12
+
13
+ require 'spec_helper'
14
+ require 'json'
15
+ require 'date'
16
+
17
+ # Unit tests for CloudmersiveSpamDetectionApiClient::SpamDetectionResponse
18
+ # Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen)
19
+ # Please update as you see appropriate
20
+ describe 'SpamDetectionResponse' do
21
+ before do
22
+ # run before each test
23
+ @instance = CloudmersiveSpamDetectionApiClient::SpamDetectionResponse.new
24
+ end
25
+
26
+ after do
27
+ # run after each test
28
+ end
29
+
30
+ describe 'test an instance of SpamDetectionResponse' do
31
+ it 'should create an instance of SpamDetectionResponse' do
32
+ expect(@instance).to be_instance_of(CloudmersiveSpamDetectionApiClient::SpamDetectionResponse)
33
+ end
34
+ end
35
+ describe 'test attribute "clean_result"' do
36
+ it 'should work' do
37
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
38
+ end
39
+ end
40
+
41
+ end
data/spec/spec_helper.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  =begin
2
- #phishingapi
2
+ #spamapi
3
3
 
4
4
  #Easily and directly scan and block phishing security threats.
5
5
 
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.2.0
4
+ version: 2.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Cloudmersive
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-10-23 00:00:00.000000000 Z
11
+ date: 2025-07-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: typhoeus
@@ -204,6 +204,7 @@ files:
204
204
  - "./docs/SpamDetectionAdvancedRequest.md"
205
205
  - "./docs/SpamDetectionAdvancedResponse.md"
206
206
  - "./docs/SpamDetectionApi.md"
207
+ - "./docs/SpamDetectionResponse.md"
207
208
  - "./git_push.sh"
208
209
  - "./lib/cloudmersive-spam-detection-api-client.rb"
209
210
  - "./lib/cloudmersive-spam-detection-api-client/api/spam_detection_api.rb"
@@ -212,12 +213,14 @@ files:
212
213
  - "./lib/cloudmersive-spam-detection-api-client/configuration.rb"
213
214
  - "./lib/cloudmersive-spam-detection-api-client/models/spam_detection_advanced_request.rb"
214
215
  - "./lib/cloudmersive-spam-detection-api-client/models/spam_detection_advanced_response.rb"
216
+ - "./lib/cloudmersive-spam-detection-api-client/models/spam_detection_response.rb"
215
217
  - "./lib/cloudmersive-spam-detection-api-client/version.rb"
216
218
  - "./spec/api/spam_detection_api_spec.rb"
217
219
  - "./spec/api_client_spec.rb"
218
220
  - "./spec/configuration_spec.rb"
219
221
  - "./spec/models/spam_detection_advanced_request_spec.rb"
220
222
  - "./spec/models/spam_detection_advanced_response_spec.rb"
223
+ - "./spec/models/spam_detection_response_spec.rb"
221
224
  - "./spec/spec_helper.rb"
222
225
  homepage: https://www.cloudmersive.com/spam-api
223
226
  licenses: