cloudmersive-validate-api-client 2.0.5 → 2.1.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.
- checksums.yaml +4 -4
- data/README.md +14 -4
- data/docs/AddressApi.md +224 -4
- data/docs/CountryDetails.md +5 -0
- data/docs/DomainApi.md +55 -0
- data/docs/DomainQualityResponse.md +8 -0
- data/docs/IPAddressApi.md +55 -0
- data/docs/IPThreatResponse.md +9 -0
- data/docs/ReverseGeocodeAddressRequest.md +9 -0
- data/docs/ReverseGeocodeAddressResponse.md +14 -0
- data/docs/ValidateCountryResponse.md +5 -0
- data/lib/cloudmersive-validate-api-client.rb +4 -0
- data/lib/cloudmersive-validate-api-client/api/address_api.rb +224 -8
- data/lib/cloudmersive-validate-api-client/api/domain_api.rb +54 -0
- data/lib/cloudmersive-validate-api-client/api/ip_address_api.rb +54 -0
- data/lib/cloudmersive-validate-api-client/models/country_details.rb +54 -4
- data/lib/cloudmersive-validate-api-client/models/domain_quality_response.rb +186 -0
- data/lib/cloudmersive-validate-api-client/models/ip_threat_response.rb +196 -0
- data/lib/cloudmersive-validate-api-client/models/reverse_geocode_address_request.rb +196 -0
- data/lib/cloudmersive-validate-api-client/models/reverse_geocode_address_response.rb +246 -0
- data/lib/cloudmersive-validate-api-client/models/validate_country_response.rb +54 -4
- data/lib/cloudmersive-validate-api-client/version.rb +1 -1
- data/spec/api/address_api_spec.rb +52 -4
- data/spec/api/domain_api_spec.rb +12 -0
- data/spec/api/ip_address_api_spec.rb +12 -0
- data/spec/models/country_details_spec.rb +30 -0
- data/spec/models/domain_quality_response_spec.rb +41 -0
- data/spec/models/ip_threat_response_spec.rb +47 -0
- data/spec/models/reverse_geocode_address_request_spec.rb +47 -0
- data/spec/models/reverse_geocode_address_response_spec.rb +77 -0
- data/spec/models/validate_country_response_spec.rb +30 -0
- metadata +14 -2
data/docs/IPAddressApi.md
CHANGED
|
@@ -4,10 +4,65 @@ All URIs are relative to *https://api.cloudmersive.com*
|
|
|
4
4
|
|
|
5
5
|
Method | HTTP request | Description
|
|
6
6
|
------------- | ------------- | -------------
|
|
7
|
+
[**i_p_address_is_threat**](IPAddressApi.md#i_p_address_is_threat) | **POST** /validate/ip/is-threat | Check if IP address is a known threat
|
|
7
8
|
[**i_p_address_is_tor_node**](IPAddressApi.md#i_p_address_is_tor_node) | **POST** /validate/ip/is-tor-node | Check if IP address is a Tor node server
|
|
8
9
|
[**i_p_address_post**](IPAddressApi.md#i_p_address_post) | **POST** /validate/ip/geolocate | Geolocate an IP address
|
|
9
10
|
|
|
10
11
|
|
|
12
|
+
# **i_p_address_is_threat**
|
|
13
|
+
> IPThreatResponse i_p_address_is_threat(value)
|
|
14
|
+
|
|
15
|
+
Check if IP address is a known threat
|
|
16
|
+
|
|
17
|
+
Check if the input IP address is a known threat IP address. Checks against known bad IPs, botnets, compromised servers, and other lists of threats.
|
|
18
|
+
|
|
19
|
+
### Example
|
|
20
|
+
```ruby
|
|
21
|
+
# load the gem
|
|
22
|
+
require 'cloudmersive-validate-api-client'
|
|
23
|
+
# setup authorization
|
|
24
|
+
CloudmersiveValidateApiClient.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 = CloudmersiveValidateApiClient::IPAddressApi.new
|
|
32
|
+
|
|
33
|
+
value = 'value_example' # String | IP address to check, e.g. \"55.55.55.55\". The input is a string so be sure to enclose it in double-quotes.
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
begin
|
|
37
|
+
#Check if IP address is a known threat
|
|
38
|
+
result = api_instance.i_p_address_is_threat(value)
|
|
39
|
+
p result
|
|
40
|
+
rescue CloudmersiveValidateApiClient::ApiError => e
|
|
41
|
+
puts "Exception when calling IPAddressApi->i_p_address_is_threat: #{e}"
|
|
42
|
+
end
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
### Parameters
|
|
46
|
+
|
|
47
|
+
Name | Type | Description | Notes
|
|
48
|
+
------------- | ------------- | ------------- | -------------
|
|
49
|
+
**value** | **String**| IP address to check, e.g. \"55.55.55.55\". The input is a string so be sure to enclose it in double-quotes. |
|
|
50
|
+
|
|
51
|
+
### Return type
|
|
52
|
+
|
|
53
|
+
[**IPThreatResponse**](IPThreatResponse.md)
|
|
54
|
+
|
|
55
|
+
### Authorization
|
|
56
|
+
|
|
57
|
+
[Apikey](../README.md#Apikey)
|
|
58
|
+
|
|
59
|
+
### HTTP request headers
|
|
60
|
+
|
|
61
|
+
- **Content-Type**: text/javascript, application/json, text/json
|
|
62
|
+
- **Accept**: application/json, text/json, application/xml, text/xml
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
|
|
11
66
|
# **i_p_address_is_tor_node**
|
|
12
67
|
> TorNodeResponse i_p_address_is_tor_node(value)
|
|
13
68
|
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
# CloudmersiveValidateApiClient::IPThreatResponse
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
Name | Type | Description | Notes
|
|
5
|
+
------------ | ------------- | ------------- | -------------
|
|
6
|
+
**is_threat** | **BOOLEAN** | True if the input IP address is a threat, false otherwise | [optional]
|
|
7
|
+
**threat_type** | **String** | Specifies the type of IP threat; possible values include Blocklist, Botnet, WebBot | [optional]
|
|
8
|
+
|
|
9
|
+
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
# CloudmersiveValidateApiClient::ReverseGeocodeAddressRequest
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
Name | Type | Description | Notes
|
|
5
|
+
------------ | ------------- | ------------- | -------------
|
|
6
|
+
**latitude** | **Float** | Latitude coordinate in WGS84 format | [optional]
|
|
7
|
+
**longitude** | **Float** | Longitude coordinate in WGS84 format | [optional]
|
|
8
|
+
|
|
9
|
+
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# CloudmersiveValidateApiClient::ReverseGeocodeAddressResponse
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
Name | Type | Description | Notes
|
|
5
|
+
------------ | ------------- | ------------- | -------------
|
|
6
|
+
**successful** | **BOOLEAN** | True if the address operation was successful, false otherwise | [optional]
|
|
7
|
+
**street_address** | **String** | Street address to validate, such as '2950 Buskirk Ave.' | [optional]
|
|
8
|
+
**city** | **String** | City part of the addrerss to validate, such as 'Walnut Creek' | [optional]
|
|
9
|
+
**state_or_province** | **String** | State or province of the address to validate, such as 'CA' or 'California' | [optional]
|
|
10
|
+
**postal_code** | **String** | Zip code or postal code of the address to validate, such as '94597' | [optional]
|
|
11
|
+
**country_full_name** | **String** | Name of the country, such as 'United States'. Global countries are supported. | [optional]
|
|
12
|
+
**country_code** | **String** | Three-letter ISO 3166-1 country code | [optional]
|
|
13
|
+
|
|
14
|
+
|
|
@@ -10,5 +10,10 @@ Name | Type | Description | Notes
|
|
|
10
10
|
**three_letter_code** | **String** | Three-letter ISO 3166-1 country code | [optional]
|
|
11
11
|
**is_european_union_member** | **BOOLEAN** | True if this country is currently a member of the European Union (EU), false otherwise | [optional]
|
|
12
12
|
**timezones** | [**Array<Timezone>**](Timezone.md) | Time zones (IANA/Olsen) in the country | [optional]
|
|
13
|
+
**iso_currency_code** | **String** | ISO 4217 currency three-letter code associated with the country | [optional]
|
|
14
|
+
**currency_symbol** | **String** | Symbol associated with the currency | [optional]
|
|
15
|
+
**currency_english_name** | **String** | Full name of the currency | [optional]
|
|
16
|
+
**region** | **String** | Region (continent) in which the country is located; possible values are None, Europe, Americas, Asia, Africa, Oceania | [optional]
|
|
17
|
+
**subregion** | **String** | Subregion in which the country is located; possible values are None, NorthernEurope, WesternEurope, SouthernEurope, EasternEurope, CentralAmerica, NorthernAmerica, SouthAmerica, EasternAfrica, MiddleAfrica, NorthernAfrica , SouthernAfrica , WesternAfrica , CentralAsia , EasternAsia , SouthernAsia , SouthEasternAsia , WesternAsia , Southern , Middle , AustraliaandNewZealand , Melanesia , Polynesia , Micronesia , Caribbean, | [optional]
|
|
13
18
|
|
|
14
19
|
|
|
@@ -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'
|
|
@@ -32,6 +33,7 @@ require 'cloudmersive-validate-api-client/models/get_gender_request'
|
|
|
32
33
|
require 'cloudmersive-validate-api-client/models/get_gender_response'
|
|
33
34
|
require 'cloudmersive-validate-api-client/models/get_timezones_request'
|
|
34
35
|
require 'cloudmersive-validate-api-client/models/get_timezones_response'
|
|
36
|
+
require 'cloudmersive-validate-api-client/models/ip_threat_response'
|
|
35
37
|
require 'cloudmersive-validate-api-client/models/last_name_validation_request'
|
|
36
38
|
require 'cloudmersive-validate-api-client/models/last_name_validation_response'
|
|
37
39
|
require 'cloudmersive-validate-api-client/models/lead_enrichment_request'
|
|
@@ -40,6 +42,8 @@ require 'cloudmersive-validate-api-client/models/parse_address_request'
|
|
|
40
42
|
require 'cloudmersive-validate-api-client/models/parse_address_response'
|
|
41
43
|
require 'cloudmersive-validate-api-client/models/phone_number_validate_request'
|
|
42
44
|
require 'cloudmersive-validate-api-client/models/phone_number_validation_response'
|
|
45
|
+
require 'cloudmersive-validate-api-client/models/reverse_geocode_address_request'
|
|
46
|
+
require 'cloudmersive-validate-api-client/models/reverse_geocode_address_response'
|
|
43
47
|
require 'cloudmersive-validate-api-client/models/timezone'
|
|
44
48
|
require 'cloudmersive-validate-api-client/models/tor_node_response'
|
|
45
49
|
require 'cloudmersive-validate-api-client/models/user_agent_validate_request'
|
|
@@ -173,6 +173,168 @@ module CloudmersiveValidateApiClient
|
|
|
173
173
|
end
|
|
174
174
|
return data, status_code, headers
|
|
175
175
|
end
|
|
176
|
+
# Geocode a street address into latitude and longitude
|
|
177
|
+
# Geocodes a street address into latitude and longitude.
|
|
178
|
+
# @param input Input parse request
|
|
179
|
+
# @param [Hash] opts the optional parameters
|
|
180
|
+
# @return [ValidateAddressResponse]
|
|
181
|
+
def address_geocode(input, opts = {})
|
|
182
|
+
data, _status_code, _headers = address_geocode_with_http_info(input, opts)
|
|
183
|
+
data
|
|
184
|
+
end
|
|
185
|
+
|
|
186
|
+
# Geocode a street address into latitude and longitude
|
|
187
|
+
# Geocodes a street address into latitude and longitude.
|
|
188
|
+
# @param input Input parse request
|
|
189
|
+
# @param [Hash] opts the optional parameters
|
|
190
|
+
# @return [Array<(ValidateAddressResponse, Fixnum, Hash)>] ValidateAddressResponse data, response status code and response headers
|
|
191
|
+
def address_geocode_with_http_info(input, opts = {})
|
|
192
|
+
if @api_client.config.debugging
|
|
193
|
+
@api_client.config.logger.debug 'Calling API: AddressApi.address_geocode ...'
|
|
194
|
+
end
|
|
195
|
+
# verify the required parameter 'input' is set
|
|
196
|
+
if @api_client.config.client_side_validation && input.nil?
|
|
197
|
+
fail ArgumentError, "Missing the required parameter 'input' when calling AddressApi.address_geocode"
|
|
198
|
+
end
|
|
199
|
+
# resource path
|
|
200
|
+
local_var_path = '/validate/address/geocode'
|
|
201
|
+
|
|
202
|
+
# query parameters
|
|
203
|
+
query_params = {}
|
|
204
|
+
|
|
205
|
+
# header parameters
|
|
206
|
+
header_params = {}
|
|
207
|
+
# HTTP header 'Accept' (if needed)
|
|
208
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml'])
|
|
209
|
+
# HTTP header 'Content-Type'
|
|
210
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'text/json'])
|
|
211
|
+
|
|
212
|
+
# form parameters
|
|
213
|
+
form_params = {}
|
|
214
|
+
|
|
215
|
+
# http body (model)
|
|
216
|
+
post_body = @api_client.object_to_http_body(input)
|
|
217
|
+
auth_names = ['Apikey']
|
|
218
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
|
219
|
+
:header_params => header_params,
|
|
220
|
+
:query_params => query_params,
|
|
221
|
+
:form_params => form_params,
|
|
222
|
+
:body => post_body,
|
|
223
|
+
:auth_names => auth_names,
|
|
224
|
+
:return_type => 'ValidateAddressResponse')
|
|
225
|
+
if @api_client.config.debugging
|
|
226
|
+
@api_client.config.logger.debug "API called: AddressApi#address_geocode\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
227
|
+
end
|
|
228
|
+
return data, status_code, headers
|
|
229
|
+
end
|
|
230
|
+
# Get the currency of the input country
|
|
231
|
+
# Gets the currency information for the input country, including the ISO three-letter country code, currency symbol, and English currency name.
|
|
232
|
+
# @param input Input request
|
|
233
|
+
# @param [Hash] opts the optional parameters
|
|
234
|
+
# @return [ValidateCountryResponse]
|
|
235
|
+
def address_get_country_currency(input, opts = {})
|
|
236
|
+
data, _status_code, _headers = address_get_country_currency_with_http_info(input, opts)
|
|
237
|
+
data
|
|
238
|
+
end
|
|
239
|
+
|
|
240
|
+
# Get the currency of the input country
|
|
241
|
+
# Gets the currency information for the input country, including the ISO three-letter country code, currency symbol, and English currency name.
|
|
242
|
+
# @param input Input request
|
|
243
|
+
# @param [Hash] opts the optional parameters
|
|
244
|
+
# @return [Array<(ValidateCountryResponse, Fixnum, Hash)>] ValidateCountryResponse data, response status code and response headers
|
|
245
|
+
def address_get_country_currency_with_http_info(input, opts = {})
|
|
246
|
+
if @api_client.config.debugging
|
|
247
|
+
@api_client.config.logger.debug 'Calling API: AddressApi.address_get_country_currency ...'
|
|
248
|
+
end
|
|
249
|
+
# verify the required parameter 'input' is set
|
|
250
|
+
if @api_client.config.client_side_validation && input.nil?
|
|
251
|
+
fail ArgumentError, "Missing the required parameter 'input' when calling AddressApi.address_get_country_currency"
|
|
252
|
+
end
|
|
253
|
+
# resource path
|
|
254
|
+
local_var_path = '/validate/address/country/get-currency'
|
|
255
|
+
|
|
256
|
+
# query parameters
|
|
257
|
+
query_params = {}
|
|
258
|
+
|
|
259
|
+
# header parameters
|
|
260
|
+
header_params = {}
|
|
261
|
+
# HTTP header 'Accept' (if needed)
|
|
262
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml'])
|
|
263
|
+
# HTTP header 'Content-Type'
|
|
264
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'text/json'])
|
|
265
|
+
|
|
266
|
+
# form parameters
|
|
267
|
+
form_params = {}
|
|
268
|
+
|
|
269
|
+
# http body (model)
|
|
270
|
+
post_body = @api_client.object_to_http_body(input)
|
|
271
|
+
auth_names = ['Apikey']
|
|
272
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
|
273
|
+
:header_params => header_params,
|
|
274
|
+
:query_params => query_params,
|
|
275
|
+
:form_params => form_params,
|
|
276
|
+
:body => post_body,
|
|
277
|
+
:auth_names => auth_names,
|
|
278
|
+
:return_type => 'ValidateCountryResponse')
|
|
279
|
+
if @api_client.config.debugging
|
|
280
|
+
@api_client.config.logger.debug "API called: AddressApi#address_get_country_currency\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
281
|
+
end
|
|
282
|
+
return data, status_code, headers
|
|
283
|
+
end
|
|
284
|
+
# Get the region, subregion and continent of the country
|
|
285
|
+
# Gets the continent information including region and subregion for the input country.
|
|
286
|
+
# @param input Input request
|
|
287
|
+
# @param [Hash] opts the optional parameters
|
|
288
|
+
# @return [ValidateCountryResponse]
|
|
289
|
+
def address_get_country_region(input, opts = {})
|
|
290
|
+
data, _status_code, _headers = address_get_country_region_with_http_info(input, opts)
|
|
291
|
+
data
|
|
292
|
+
end
|
|
293
|
+
|
|
294
|
+
# Get the region, subregion and continent of the country
|
|
295
|
+
# Gets the continent information including region and subregion for the input country.
|
|
296
|
+
# @param input Input request
|
|
297
|
+
# @param [Hash] opts the optional parameters
|
|
298
|
+
# @return [Array<(ValidateCountryResponse, Fixnum, Hash)>] ValidateCountryResponse data, response status code and response headers
|
|
299
|
+
def address_get_country_region_with_http_info(input, opts = {})
|
|
300
|
+
if @api_client.config.debugging
|
|
301
|
+
@api_client.config.logger.debug 'Calling API: AddressApi.address_get_country_region ...'
|
|
302
|
+
end
|
|
303
|
+
# verify the required parameter 'input' is set
|
|
304
|
+
if @api_client.config.client_side_validation && input.nil?
|
|
305
|
+
fail ArgumentError, "Missing the required parameter 'input' when calling AddressApi.address_get_country_region"
|
|
306
|
+
end
|
|
307
|
+
# resource path
|
|
308
|
+
local_var_path = '/validate/address/country/get-region'
|
|
309
|
+
|
|
310
|
+
# query parameters
|
|
311
|
+
query_params = {}
|
|
312
|
+
|
|
313
|
+
# header parameters
|
|
314
|
+
header_params = {}
|
|
315
|
+
# HTTP header 'Accept' (if needed)
|
|
316
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml'])
|
|
317
|
+
# HTTP header 'Content-Type'
|
|
318
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'text/json'])
|
|
319
|
+
|
|
320
|
+
# form parameters
|
|
321
|
+
form_params = {}
|
|
322
|
+
|
|
323
|
+
# http body (model)
|
|
324
|
+
post_body = @api_client.object_to_http_body(input)
|
|
325
|
+
auth_names = ['Apikey']
|
|
326
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
|
327
|
+
:header_params => header_params,
|
|
328
|
+
:query_params => query_params,
|
|
329
|
+
:form_params => form_params,
|
|
330
|
+
:body => post_body,
|
|
331
|
+
:auth_names => auth_names,
|
|
332
|
+
:return_type => 'ValidateCountryResponse')
|
|
333
|
+
if @api_client.config.debugging
|
|
334
|
+
@api_client.config.logger.debug "API called: AddressApi#address_get_country_region\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
335
|
+
end
|
|
336
|
+
return data, status_code, headers
|
|
337
|
+
end
|
|
176
338
|
# Gets IANA/Olsen time zones for a country
|
|
177
339
|
# Gets the IANA/Olsen time zones for a country.
|
|
178
340
|
# @param input Input request
|
|
@@ -281,8 +443,62 @@ module CloudmersiveValidateApiClient
|
|
|
281
443
|
end
|
|
282
444
|
return data, status_code, headers
|
|
283
445
|
end
|
|
446
|
+
# Reverse geocode a lattitude and longitude into an address
|
|
447
|
+
# Converts lattitude and longitude coordinates into an address through reverse-geocoding.
|
|
448
|
+
# @param input Input reverse geocoding request
|
|
449
|
+
# @param [Hash] opts the optional parameters
|
|
450
|
+
# @return [ReverseGeocodeAddressResponse]
|
|
451
|
+
def address_reverse_geocode_address(input, opts = {})
|
|
452
|
+
data, _status_code, _headers = address_reverse_geocode_address_with_http_info(input, opts)
|
|
453
|
+
data
|
|
454
|
+
end
|
|
455
|
+
|
|
456
|
+
# Reverse geocode a lattitude and longitude into an address
|
|
457
|
+
# Converts lattitude and longitude coordinates into an address through reverse-geocoding.
|
|
458
|
+
# @param input Input reverse geocoding request
|
|
459
|
+
# @param [Hash] opts the optional parameters
|
|
460
|
+
# @return [Array<(ReverseGeocodeAddressResponse, Fixnum, Hash)>] ReverseGeocodeAddressResponse data, response status code and response headers
|
|
461
|
+
def address_reverse_geocode_address_with_http_info(input, opts = {})
|
|
462
|
+
if @api_client.config.debugging
|
|
463
|
+
@api_client.config.logger.debug 'Calling API: AddressApi.address_reverse_geocode_address ...'
|
|
464
|
+
end
|
|
465
|
+
# verify the required parameter 'input' is set
|
|
466
|
+
if @api_client.config.client_side_validation && input.nil?
|
|
467
|
+
fail ArgumentError, "Missing the required parameter 'input' when calling AddressApi.address_reverse_geocode_address"
|
|
468
|
+
end
|
|
469
|
+
# resource path
|
|
470
|
+
local_var_path = '/validate/address/geocode/reverse'
|
|
471
|
+
|
|
472
|
+
# query parameters
|
|
473
|
+
query_params = {}
|
|
474
|
+
|
|
475
|
+
# header parameters
|
|
476
|
+
header_params = {}
|
|
477
|
+
# HTTP header 'Accept' (if needed)
|
|
478
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml'])
|
|
479
|
+
# HTTP header 'Content-Type'
|
|
480
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'text/json'])
|
|
481
|
+
|
|
482
|
+
# form parameters
|
|
483
|
+
form_params = {}
|
|
484
|
+
|
|
485
|
+
# http body (model)
|
|
486
|
+
post_body = @api_client.object_to_http_body(input)
|
|
487
|
+
auth_names = ['Apikey']
|
|
488
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
|
489
|
+
:header_params => header_params,
|
|
490
|
+
:query_params => query_params,
|
|
491
|
+
:form_params => form_params,
|
|
492
|
+
:body => post_body,
|
|
493
|
+
:auth_names => auth_names,
|
|
494
|
+
:return_type => 'ReverseGeocodeAddressResponse')
|
|
495
|
+
if @api_client.config.debugging
|
|
496
|
+
@api_client.config.logger.debug "API called: AddressApi#address_reverse_geocode_address\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
497
|
+
end
|
|
498
|
+
return data, status_code, headers
|
|
499
|
+
end
|
|
284
500
|
# Validate a street address
|
|
285
|
-
# Determines if an input structured street address is valid or invalid. If the address is valid, also returns the latitude and longitude of the address.
|
|
501
|
+
# Determines if an input structured street address is valid or invalid. If the address is valid, also returns the latitude and longitude of the address. Supports all major international addresses.
|
|
286
502
|
# @param input Input parse request
|
|
287
503
|
# @param [Hash] opts the optional parameters
|
|
288
504
|
# @return [ValidateAddressResponse]
|
|
@@ -292,7 +508,7 @@ module CloudmersiveValidateApiClient
|
|
|
292
508
|
end
|
|
293
509
|
|
|
294
510
|
# Validate a street address
|
|
295
|
-
# Determines if an input structured street address is valid or invalid. If the address is valid, also returns the latitude and longitude of the address.
|
|
511
|
+
# Determines if an input structured street address is valid or invalid. If the address is valid, also returns the latitude and longitude of the address. Supports all major international addresses.
|
|
296
512
|
# @param input Input parse request
|
|
297
513
|
# @param [Hash] opts the optional parameters
|
|
298
514
|
# @return [Array<(ValidateAddressResponse, Fixnum, Hash)>] ValidateAddressResponse data, response status code and response headers
|
|
@@ -336,7 +552,7 @@ module CloudmersiveValidateApiClient
|
|
|
336
552
|
return data, status_code, headers
|
|
337
553
|
end
|
|
338
554
|
# Validate a City and State/Province combination, get location information about it
|
|
339
|
-
# Checks if the input city and state name or code is valid, and returns information about it such as normalized City name, State name and more.
|
|
555
|
+
# Checks if the input city and state name or code is valid, and returns information about it such as normalized City name, State name and more. Supports all major international addresses.
|
|
340
556
|
# @param input Input parse request
|
|
341
557
|
# @param [Hash] opts the optional parameters
|
|
342
558
|
# @return [ValidateCityResponse]
|
|
@@ -346,7 +562,7 @@ module CloudmersiveValidateApiClient
|
|
|
346
562
|
end
|
|
347
563
|
|
|
348
564
|
# Validate a City and State/Province combination, get location information about it
|
|
349
|
-
# Checks if the input city and state name or code is valid, and returns information about it such as normalized City name, State name and more.
|
|
565
|
+
# Checks if the input city and state name or code is valid, and returns information about it such as normalized City name, State name and more. Supports all major international addresses.
|
|
350
566
|
# @param input Input parse request
|
|
351
567
|
# @param [Hash] opts the optional parameters
|
|
352
568
|
# @return [Array<(ValidateCityResponse, Fixnum, Hash)>] ValidateCityResponse data, response status code and response headers
|
|
@@ -390,7 +606,7 @@ module CloudmersiveValidateApiClient
|
|
|
390
606
|
return data, status_code, headers
|
|
391
607
|
end
|
|
392
608
|
# Validate a postal code, get location information about it
|
|
393
|
-
# Checks if the input postal code is valid, and returns information about it such as City, State and more.
|
|
609
|
+
# Checks if the input postal code is valid, and returns information about it such as City, State and more. Supports all major countries.
|
|
394
610
|
# @param input Input parse request
|
|
395
611
|
# @param [Hash] opts the optional parameters
|
|
396
612
|
# @return [ValidatePostalCodeResponse]
|
|
@@ -400,7 +616,7 @@ module CloudmersiveValidateApiClient
|
|
|
400
616
|
end
|
|
401
617
|
|
|
402
618
|
# Validate a postal code, get location information about it
|
|
403
|
-
# Checks if the input postal code is valid, and returns information about it such as City, State and more.
|
|
619
|
+
# Checks if the input postal code is valid, and returns information about it such as City, State and more. Supports all major countries.
|
|
404
620
|
# @param input Input parse request
|
|
405
621
|
# @param [Hash] opts the optional parameters
|
|
406
622
|
# @return [Array<(ValidatePostalCodeResponse, Fixnum, Hash)>] ValidatePostalCodeResponse data, response status code and response headers
|
|
@@ -444,7 +660,7 @@ module CloudmersiveValidateApiClient
|
|
|
444
660
|
return data, status_code, headers
|
|
445
661
|
end
|
|
446
662
|
# Validate a state or province, name or abbreviation, get location information about it
|
|
447
|
-
# Checks if the input state name or code is valid, and returns information about it such as normalized State name and more.
|
|
663
|
+
# Checks if the input state name or code is valid, and returns information about it such as normalized State name and more. Supports all major countries.
|
|
448
664
|
# @param input Input parse request
|
|
449
665
|
# @param [Hash] opts the optional parameters
|
|
450
666
|
# @return [ValidateStateResponse]
|
|
@@ -454,7 +670,7 @@ module CloudmersiveValidateApiClient
|
|
|
454
670
|
end
|
|
455
671
|
|
|
456
672
|
# Validate a state or province, name or abbreviation, get location information about it
|
|
457
|
-
# Checks if the input state name or code is valid, and returns information about it such as normalized State name and more.
|
|
673
|
+
# Checks if the input state name or code is valid, and returns information about it such as normalized State name and more. Supports all major countries.
|
|
458
674
|
# @param input Input parse request
|
|
459
675
|
# @param [Hash] opts the optional parameters
|
|
460
676
|
# @return [Array<(ValidateStateResponse, Fixnum, Hash)>] ValidateStateResponse data, response status code and response headers
|
|
@@ -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. Supports over 9 million domain names. Higher quality scores indicate more trust and authority in the domain name, with values ranging from 0.0 (low quality) to 10.0 (maximum quality).
|
|
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. Supports over 9 million domain names. Higher quality scores indicate more trust and authority in the domain name, with values ranging from 0.0 (low quality) to 10.0 (maximum quality).
|
|
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
|