cloudmersive-validate-api-client 2.0.8 → 2.0.9

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1fb382f1dbe5f06ff959501816df879a458d77f7469f9112cfabeb1f9966917c
4
- data.tar.gz: f640178248133cd34265425ab9d4fde9ba97f353afed3fc75600f64f23f747a9
3
+ metadata.gz: 45257c18a8c0587871e54bbcfc01be00f34d09e53c57a13b969ec95f1411c18a
4
+ data.tar.gz: 39e0dff4b2d59fdb05a05bc7889b8e0517de2a5cc7c15719e4c596a589b3d0a0
5
5
  SHA512:
6
- metadata.gz: d86f5d1155b8ddeaf82843e39a5bd1155d064d10ec5b73f62a2015bdce567718480a8772188350a0919a6dd572da368a7d7f6cc03255788e2bc213b781369c5f
7
- data.tar.gz: 89f94bc4cfffc3faa4b97f451487a2f259e8e0a10c75aaa103b8f1d8377b7cece8541f95321112a39169b1ab41fa5d137a1a9c18a8caa7b3aa92ce7b81f0ed01
6
+ metadata.gz: 7bb13960378669337a7094c534b0a3beb9516436ebc526b09a885709d236628eee6f5a067aa315a6c4e9a3083b409e32af2b71f95e309d0be1dcdfa188f7b5a5
7
+ data.tar.gz: 7f30c7be9bb506338153492cfad17d0dea56ac506e8f59d9d993761faf4423e6514bce28331a7f0882115b412be8f4e4f3cadfa93f596446d4e29d51f29b6038
data/README.md CHANGED
@@ -7,7 +7,7 @@ The validation APIs help you validate data. Check if an E-mail address is real.
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.0.8
10
+ - Package version: 2.0.9
11
11
  - Build package: io.swagger.codegen.languages.RubyClientCodegen
12
12
 
13
13
  ## Installation
@@ -23,15 +23,15 @@ gem build cloudmersive-validate-api-client.gemspec
23
23
  Then either install the gem locally:
24
24
 
25
25
  ```shell
26
- gem install ./cloudmersive-validate-api-client-2.0.8.gem
26
+ gem install ./cloudmersive-validate-api-client-2.0.9.gem
27
27
  ```
28
- (for development, run `gem install --dev ./cloudmersive-validate-api-client-2.0.8.gem` to install the development dependencies)
28
+ (for development, run `gem install --dev ./cloudmersive-validate-api-client-2.0.9.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-validate-api-client', '~> 2.0.8'
34
+ gem 'cloudmersive-validate-api-client', '~> 2.0.9'
35
35
 
36
36
  ### Install from Git
37
37
 
@@ -96,6 +96,7 @@ Class | Method | HTTP request | Description
96
96
  *CloudmersiveValidateApiClient::AddressApi* | [**address_validate_state**](docs/AddressApi.md#address_validate_state) | **POST** /validate/address/state | Validate a state or province, name or abbreviation, get location information about it
97
97
  *CloudmersiveValidateApiClient::DomainApi* | [**domain_check**](docs/DomainApi.md#domain_check) | **POST** /validate/domain/check | Validate a domain name
98
98
  *CloudmersiveValidateApiClient::DomainApi* | [**domain_post**](docs/DomainApi.md#domain_post) | **POST** /validate/domain/whois | Get WHOIS information for a domain
99
+ *CloudmersiveValidateApiClient::DomainApi* | [**domain_quality_score**](docs/DomainApi.md#domain_quality_score) | **POST** /validate/domain/quality-score | Validate a domain name's quality score
99
100
  *CloudmersiveValidateApiClient::DomainApi* | [**domain_url_full**](docs/DomainApi.md#domain_url_full) | **POST** /validate/domain/url/full | Validate a URL fully
100
101
  *CloudmersiveValidateApiClient::DomainApi* | [**domain_url_syntax_only**](docs/DomainApi.md#domain_url_syntax_only) | **POST** /validate/domain/url/syntax-only | Validate a URL syntactically
101
102
  *CloudmersiveValidateApiClient::EmailApi* | [**email_address_get_servers**](docs/EmailApi.md#email_address_get_servers) | **POST** /validate/email/address/servers | Partially check whether an email address is valid
@@ -122,6 +123,7 @@ Class | Method | HTTP request | Description
122
123
  - [CloudmersiveValidateApiClient::CheckResponse](docs/CheckResponse.md)
123
124
  - [CloudmersiveValidateApiClient::CountryDetails](docs/CountryDetails.md)
124
125
  - [CloudmersiveValidateApiClient::CountryListResult](docs/CountryListResult.md)
126
+ - [CloudmersiveValidateApiClient::DomainQualityResponse](docs/DomainQualityResponse.md)
125
127
  - [CloudmersiveValidateApiClient::FirstNameValidationRequest](docs/FirstNameValidationRequest.md)
126
128
  - [CloudmersiveValidateApiClient::FirstNameValidationResponse](docs/FirstNameValidationResponse.md)
127
129
  - [CloudmersiveValidateApiClient::FullEmailValidationResponse](docs/FullEmailValidationResponse.md)
@@ -6,6 +6,7 @@ Method | HTTP request | Description
6
6
  ------------- | ------------- | -------------
7
7
  [**domain_check**](DomainApi.md#domain_check) | **POST** /validate/domain/check | Validate a domain name
8
8
  [**domain_post**](DomainApi.md#domain_post) | **POST** /validate/domain/whois | Get WHOIS information for a domain
9
+ [**domain_quality_score**](DomainApi.md#domain_quality_score) | **POST** /validate/domain/quality-score | Validate a domain name's quality score
9
10
  [**domain_url_full**](DomainApi.md#domain_url_full) | **POST** /validate/domain/url/full | Validate a URL fully
10
11
  [**domain_url_syntax_only**](DomainApi.md#domain_url_syntax_only) | **POST** /validate/domain/url/syntax-only | Validate a URL syntactically
11
12
 
@@ -118,6 +119,60 @@ Name | Type | Description | Notes
118
119
 
119
120
 
120
121
 
122
+ # **domain_quality_score**
123
+ > DomainQualityResponse domain_quality_score(domain)
124
+
125
+ Validate a domain name's quality score
126
+
127
+ Check the quality of a domain name. Higher quality scores indicate more trust and authority in the domain name.
128
+
129
+ ### Example
130
+ ```ruby
131
+ # load the gem
132
+ require 'cloudmersive-validate-api-client'
133
+ # setup authorization
134
+ CloudmersiveValidateApiClient.configure do |config|
135
+ # Configure API key authorization: Apikey
136
+ config.api_key['Apikey'] = 'YOUR API KEY'
137
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
138
+ #config.api_key_prefix['Apikey'] = 'Bearer'
139
+ end
140
+
141
+ api_instance = CloudmersiveValidateApiClient::DomainApi.new
142
+
143
+ domain = 'domain_example' # String | Domain name to check, for example \"cloudmersive.com\".
144
+
145
+
146
+ begin
147
+ #Validate a domain name's quality score
148
+ result = api_instance.domain_quality_score(domain)
149
+ p result
150
+ rescue CloudmersiveValidateApiClient::ApiError => e
151
+ puts "Exception when calling DomainApi->domain_quality_score: #{e}"
152
+ end
153
+ ```
154
+
155
+ ### Parameters
156
+
157
+ Name | Type | Description | Notes
158
+ ------------- | ------------- | ------------- | -------------
159
+ **domain** | **String**| Domain name to check, for example \"cloudmersive.com\". |
160
+
161
+ ### Return type
162
+
163
+ [**DomainQualityResponse**](DomainQualityResponse.md)
164
+
165
+ ### Authorization
166
+
167
+ [Apikey](../README.md#Apikey)
168
+
169
+ ### HTTP request headers
170
+
171
+ - **Content-Type**: text/javascript, application/json, text/json
172
+ - **Accept**: application/json, text/json, application/xml, text/xml
173
+
174
+
175
+
121
176
  # **domain_url_full**
122
177
  > ValidateUrlResponseFull domain_url_full(request)
123
178
 
@@ -0,0 +1,8 @@
1
+ # CloudmersiveValidateApiClient::DomainQualityResponse
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **domain_quality_score** | **Float** | The quality score of the domain name; possible values are 0.0 to 10.0 with 10.0 being the highest and 0.0 being the lowest quality. | [optional]
7
+
8
+
@@ -22,6 +22,7 @@ require 'cloudmersive-validate-api-client/models/address_verify_syntax_only_resp
22
22
  require 'cloudmersive-validate-api-client/models/check_response'
23
23
  require 'cloudmersive-validate-api-client/models/country_details'
24
24
  require 'cloudmersive-validate-api-client/models/country_list_result'
25
+ require 'cloudmersive-validate-api-client/models/domain_quality_response'
25
26
  require 'cloudmersive-validate-api-client/models/first_name_validation_request'
26
27
  require 'cloudmersive-validate-api-client/models/first_name_validation_response'
27
28
  require 'cloudmersive-validate-api-client/models/full_email_validation_response'
@@ -127,6 +127,60 @@ module CloudmersiveValidateApiClient
127
127
  end
128
128
  return data, status_code, headers
129
129
  end
130
+ # Validate a domain name's quality score
131
+ # Check the quality of a domain name. Higher quality scores indicate more trust and authority in the domain name.
132
+ # @param domain Domain name to check, for example \"cloudmersive.com\".
133
+ # @param [Hash] opts the optional parameters
134
+ # @return [DomainQualityResponse]
135
+ def domain_quality_score(domain, opts = {})
136
+ data, _status_code, _headers = domain_quality_score_with_http_info(domain, opts)
137
+ data
138
+ end
139
+
140
+ # Validate a domain name's quality score
141
+ # Check the quality of a domain name. Higher quality scores indicate more trust and authority in the domain name.
142
+ # @param domain Domain name to check, for example \"cloudmersive.com\".
143
+ # @param [Hash] opts the optional parameters
144
+ # @return [Array<(DomainQualityResponse, Fixnum, Hash)>] DomainQualityResponse data, response status code and response headers
145
+ def domain_quality_score_with_http_info(domain, opts = {})
146
+ if @api_client.config.debugging
147
+ @api_client.config.logger.debug 'Calling API: DomainApi.domain_quality_score ...'
148
+ end
149
+ # verify the required parameter 'domain' is set
150
+ if @api_client.config.client_side_validation && domain.nil?
151
+ fail ArgumentError, "Missing the required parameter 'domain' when calling DomainApi.domain_quality_score"
152
+ end
153
+ # resource path
154
+ local_var_path = '/validate/domain/quality-score'
155
+
156
+ # query parameters
157
+ query_params = {}
158
+
159
+ # header parameters
160
+ header_params = {}
161
+ # HTTP header 'Accept' (if needed)
162
+ header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml'])
163
+ # HTTP header 'Content-Type'
164
+ header_params['Content-Type'] = @api_client.select_header_content_type(['text/javascript', 'application/json', 'text/json'])
165
+
166
+ # form parameters
167
+ form_params = {}
168
+
169
+ # http body (model)
170
+ post_body = @api_client.object_to_http_body(domain)
171
+ auth_names = ['Apikey']
172
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
173
+ :header_params => header_params,
174
+ :query_params => query_params,
175
+ :form_params => form_params,
176
+ :body => post_body,
177
+ :auth_names => auth_names,
178
+ :return_type => 'DomainQualityResponse')
179
+ if @api_client.config.debugging
180
+ @api_client.config.logger.debug "API called: DomainApi#domain_quality_score\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
181
+ end
182
+ return data, status_code, headers
183
+ end
130
184
  # Validate a URL fully
131
185
  # Validate whether a URL is syntactically valid (does not check endpoint for validity), whether it exists, and whether the endpoint is up and passes virus scan checks. Accepts various types of input and produces a well-formed URL as output.
132
186
  # @param request Input URL request
@@ -0,0 +1,186 @@
1
+ =begin
2
+ #validateapi
3
+
4
+ #The validation APIs help you validate data. Check if an E-mail address is real. Check if a domain is real. Check up on an IP address, and even where it is located. All this and much more is available in the validation API.
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 CloudmersiveValidateApiClient
16
+ # Result of performing a domain quality score operation
17
+ class DomainQualityResponse
18
+ # The quality score of the domain name; possible values are 0.0 to 10.0 with 10.0 being the highest and 0.0 being the lowest quality.
19
+ attr_accessor :domain_quality_score
20
+
21
+ # Attribute mapping from ruby-style variable name to JSON key.
22
+ def self.attribute_map
23
+ {
24
+ :'domain_quality_score' => :'DomainQualityScore'
25
+ }
26
+ end
27
+
28
+ # Attribute type mapping.
29
+ def self.swagger_types
30
+ {
31
+ :'domain_quality_score' => :'Float'
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?(:'DomainQualityScore')
44
+ self.domain_quality_score = attributes[:'DomainQualityScore']
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
+ domain_quality_score == o.domain_quality_score
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
+ [domain_quality_score].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 = CloudmersiveValidateApiClient.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
@@ -11,5 +11,5 @@ Swagger Codegen version: 2.4.14
11
11
  =end
12
12
 
13
13
  module CloudmersiveValidateApiClient
14
- VERSION = '2.0.8'
14
+ VERSION = '2.0.9'
15
15
  end
@@ -56,6 +56,18 @@ describe 'DomainApi' do
56
56
  end
57
57
  end
58
58
 
59
+ # unit tests for domain_quality_score
60
+ # Validate a domain name&#39;s quality score
61
+ # Check the quality of a domain name. Higher quality scores indicate more trust and authority in the domain name.
62
+ # @param domain Domain name to check, for example \&quot;cloudmersive.com\&quot;.
63
+ # @param [Hash] opts the optional parameters
64
+ # @return [DomainQualityResponse]
65
+ describe 'domain_quality_score test' 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
+
59
71
  # unit tests for domain_url_full
60
72
  # Validate a URL fully
61
73
  # Validate whether a URL is syntactically valid (does not check endpoint for validity), whether it exists, and whether the endpoint is up and passes virus scan checks. Accepts various types of input and produces a well-formed URL as output.
@@ -0,0 +1,41 @@
1
+ =begin
2
+ #validateapi
3
+
4
+ #The validation APIs help you validate data. Check if an E-mail address is real. Check if a domain is real. Check up on an IP address, and even where it is located. All this and much more is available in the validation API.
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 CloudmersiveValidateApiClient::DomainQualityResponse
18
+ # Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen)
19
+ # Please update as you see appropriate
20
+ describe 'DomainQualityResponse' do
21
+ before do
22
+ # run before each test
23
+ @instance = CloudmersiveValidateApiClient::DomainQualityResponse.new
24
+ end
25
+
26
+ after do
27
+ # run after each test
28
+ end
29
+
30
+ describe 'test an instance of DomainQualityResponse' do
31
+ it 'should create an instance of DomainQualityResponse' do
32
+ expect(@instance).to be_instance_of(CloudmersiveValidateApiClient::DomainQualityResponse)
33
+ end
34
+ end
35
+ describe 'test attribute "domain_quality_score"' 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
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cloudmersive-validate-api-client
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.8
4
+ version: 2.0.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Cloudmersive
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-09-16 00:00:00.000000000 Z
11
+ date: 2020-09-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: typhoeus
@@ -210,6 +210,7 @@ files:
210
210
  - "./docs/CountryDetails.md"
211
211
  - "./docs/CountryListResult.md"
212
212
  - "./docs/DomainApi.md"
213
+ - "./docs/DomainQualityResponse.md"
213
214
  - "./docs/EmailApi.md"
214
215
  - "./docs/FirstNameValidationRequest.md"
215
216
  - "./docs/FirstNameValidationResponse.md"
@@ -278,6 +279,7 @@ files:
278
279
  - "./lib/cloudmersive-validate-api-client/models/check_response.rb"
279
280
  - "./lib/cloudmersive-validate-api-client/models/country_details.rb"
280
281
  - "./lib/cloudmersive-validate-api-client/models/country_list_result.rb"
282
+ - "./lib/cloudmersive-validate-api-client/models/domain_quality_response.rb"
281
283
  - "./lib/cloudmersive-validate-api-client/models/first_name_validation_request.rb"
282
284
  - "./lib/cloudmersive-validate-api-client/models/first_name_validation_response.rb"
283
285
  - "./lib/cloudmersive-validate-api-client/models/full_email_validation_response.rb"
@@ -337,6 +339,7 @@ files:
337
339
  - "./spec/models/check_response_spec.rb"
338
340
  - "./spec/models/country_details_spec.rb"
339
341
  - "./spec/models/country_list_result_spec.rb"
342
+ - "./spec/models/domain_quality_response_spec.rb"
340
343
  - "./spec/models/first_name_validation_request_spec.rb"
341
344
  - "./spec/models/first_name_validation_response_spec.rb"
342
345
  - "./spec/models/full_email_validation_response_spec.rb"