cloudmersive-validate-api-client 2.0.9 → 2.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +8 -4
- data/docs/AddressApi.md +110 -0
- data/docs/DomainApi.md +1 -1
- data/docs/ReverseGeocodeAddressRequest.md +9 -0
- data/docs/ReverseGeocodeAddressResponse.md +14 -0
- data/lib/cloudmersive-validate-api-client.rb +2 -0
- data/lib/cloudmersive-validate-api-client/api/address_api.rb +108 -0
- data/lib/cloudmersive-validate-api-client/api/domain_api.rb +2 -2
- 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/version.rb +1 -1
- data/spec/api/address_api_spec.rb +24 -0
- data/spec/api/domain_api_spec.rb +1 -1
- data/spec/models/reverse_geocode_address_request_spec.rb +47 -0
- data/spec/models/reverse_geocode_address_response_spec.rb +77 -0
- metadata +8 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6daaaef2952b05ae4b9390e85c7048dddeec9faa67a923ee8432f4bd67e1995e
|
4
|
+
data.tar.gz: 7ccddf3fe43ec00e0cc7fb390ecde5ad4fadfa018c515534220dc181309bac58
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4f7c2edc50db74ad5db5934abc98532818683c4f844e7ab42a978b87d4584efbc86e7721176bdf9c219502a96d8d717ef885b5187bb092a21e71c88f27483b0e
|
7
|
+
data.tar.gz: 7dab4bdbbdf089c4694e420f432ee2342bf121fb94748201ebc54c42be49fa42e13430182714aaad4962de157ceef9dbaac6e4ede5343a322d71cc766a77b18a
|
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
|
10
|
+
- Package version: 2.1.0
|
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.
|
26
|
+
gem install ./cloudmersive-validate-api-client-2.1.0.gem
|
27
27
|
```
|
28
|
-
(for development, run `gem install --dev ./cloudmersive-validate-api-client-2.0.
|
28
|
+
(for development, run `gem install --dev ./cloudmersive-validate-api-client-2.1.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-validate-api-client', '~> 2.0
|
34
|
+
gem 'cloudmersive-validate-api-client', '~> 2.1.0'
|
35
35
|
|
36
36
|
### Install from Git
|
37
37
|
|
@@ -86,10 +86,12 @@ Class | Method | HTTP request | Description
|
|
86
86
|
*CloudmersiveValidateApiClient::AddressApi* | [**address_check_eu_membership**](docs/AddressApi.md#address_check_eu_membership) | **POST** /validate/address/country/check-eu-membership | Check if a country is a member of the European Union (EU)
|
87
87
|
*CloudmersiveValidateApiClient::AddressApi* | [**address_country**](docs/AddressApi.md#address_country) | **POST** /validate/address/country | Validate and normalize country information, return ISO 3166-1 country codes and country name
|
88
88
|
*CloudmersiveValidateApiClient::AddressApi* | [**address_country_list**](docs/AddressApi.md#address_country_list) | **POST** /validate/address/country/list | Get a list of ISO 3166-1 countries
|
89
|
+
*CloudmersiveValidateApiClient::AddressApi* | [**address_geocode**](docs/AddressApi.md#address_geocode) | **POST** /validate/address/geocode | Geocode a street address into latitude and longitude
|
89
90
|
*CloudmersiveValidateApiClient::AddressApi* | [**address_get_country_currency**](docs/AddressApi.md#address_get_country_currency) | **POST** /validate/address/country/get-currency | Get the currency of the input country
|
90
91
|
*CloudmersiveValidateApiClient::AddressApi* | [**address_get_country_region**](docs/AddressApi.md#address_get_country_region) | **POST** /validate/address/country/get-region | Get the region, subregion and continent of the country
|
91
92
|
*CloudmersiveValidateApiClient::AddressApi* | [**address_get_timezone**](docs/AddressApi.md#address_get_timezone) | **POST** /validate/address/country/get-timezones | Gets IANA/Olsen time zones for a country
|
92
93
|
*CloudmersiveValidateApiClient::AddressApi* | [**address_parse_string**](docs/AddressApi.md#address_parse_string) | **POST** /validate/address/parse | Parse an unstructured input text string into an international, formatted address
|
94
|
+
*CloudmersiveValidateApiClient::AddressApi* | [**address_reverse_geocode_address**](docs/AddressApi.md#address_reverse_geocode_address) | **POST** /validate/address/geocode/reverse | Reverse geocode a lattitude and longitude into an address
|
93
95
|
*CloudmersiveValidateApiClient::AddressApi* | [**address_validate_address**](docs/AddressApi.md#address_validate_address) | **POST** /validate/address/street-address | Validate a street address
|
94
96
|
*CloudmersiveValidateApiClient::AddressApi* | [**address_validate_city**](docs/AddressApi.md#address_validate_city) | **POST** /validate/address/city | Validate a City and State/Province combination, get location information about it
|
95
97
|
*CloudmersiveValidateApiClient::AddressApi* | [**address_validate_postal_code**](docs/AddressApi.md#address_validate_postal_code) | **POST** /validate/address/postal-code | Validate a postal code, get location information about it
|
@@ -143,6 +145,8 @@ Class | Method | HTTP request | Description
|
|
143
145
|
- [CloudmersiveValidateApiClient::ParseAddressResponse](docs/ParseAddressResponse.md)
|
144
146
|
- [CloudmersiveValidateApiClient::PhoneNumberValidateRequest](docs/PhoneNumberValidateRequest.md)
|
145
147
|
- [CloudmersiveValidateApiClient::PhoneNumberValidationResponse](docs/PhoneNumberValidationResponse.md)
|
148
|
+
- [CloudmersiveValidateApiClient::ReverseGeocodeAddressRequest](docs/ReverseGeocodeAddressRequest.md)
|
149
|
+
- [CloudmersiveValidateApiClient::ReverseGeocodeAddressResponse](docs/ReverseGeocodeAddressResponse.md)
|
146
150
|
- [CloudmersiveValidateApiClient::Timezone](docs/Timezone.md)
|
147
151
|
- [CloudmersiveValidateApiClient::TorNodeResponse](docs/TorNodeResponse.md)
|
148
152
|
- [CloudmersiveValidateApiClient::UserAgentValidateRequest](docs/UserAgentValidateRequest.md)
|
data/docs/AddressApi.md
CHANGED
@@ -7,10 +7,12 @@ Method | HTTP request | Description
|
|
7
7
|
[**address_check_eu_membership**](AddressApi.md#address_check_eu_membership) | **POST** /validate/address/country/check-eu-membership | Check if a country is a member of the European Union (EU)
|
8
8
|
[**address_country**](AddressApi.md#address_country) | **POST** /validate/address/country | Validate and normalize country information, return ISO 3166-1 country codes and country name
|
9
9
|
[**address_country_list**](AddressApi.md#address_country_list) | **POST** /validate/address/country/list | Get a list of ISO 3166-1 countries
|
10
|
+
[**address_geocode**](AddressApi.md#address_geocode) | **POST** /validate/address/geocode | Geocode a street address into latitude and longitude
|
10
11
|
[**address_get_country_currency**](AddressApi.md#address_get_country_currency) | **POST** /validate/address/country/get-currency | Get the currency of the input country
|
11
12
|
[**address_get_country_region**](AddressApi.md#address_get_country_region) | **POST** /validate/address/country/get-region | Get the region, subregion and continent of the country
|
12
13
|
[**address_get_timezone**](AddressApi.md#address_get_timezone) | **POST** /validate/address/country/get-timezones | Gets IANA/Olsen time zones for a country
|
13
14
|
[**address_parse_string**](AddressApi.md#address_parse_string) | **POST** /validate/address/parse | Parse an unstructured input text string into an international, formatted address
|
15
|
+
[**address_reverse_geocode_address**](AddressApi.md#address_reverse_geocode_address) | **POST** /validate/address/geocode/reverse | Reverse geocode a lattitude and longitude into an address
|
14
16
|
[**address_validate_address**](AddressApi.md#address_validate_address) | **POST** /validate/address/street-address | Validate a street address
|
15
17
|
[**address_validate_city**](AddressApi.md#address_validate_city) | **POST** /validate/address/city | Validate a City and State/Province combination, get location information about it
|
16
18
|
[**address_validate_postal_code**](AddressApi.md#address_validate_postal_code) | **POST** /validate/address/postal-code | Validate a postal code, get location information about it
|
@@ -173,6 +175,60 @@ This endpoint does not need any parameter.
|
|
173
175
|
|
174
176
|
|
175
177
|
|
178
|
+
# **address_geocode**
|
179
|
+
> ValidateAddressResponse address_geocode(input)
|
180
|
+
|
181
|
+
Geocode a street address into latitude and longitude
|
182
|
+
|
183
|
+
Geocodes a street address into latitude and longitude.
|
184
|
+
|
185
|
+
### Example
|
186
|
+
```ruby
|
187
|
+
# load the gem
|
188
|
+
require 'cloudmersive-validate-api-client'
|
189
|
+
# setup authorization
|
190
|
+
CloudmersiveValidateApiClient.configure do |config|
|
191
|
+
# Configure API key authorization: Apikey
|
192
|
+
config.api_key['Apikey'] = 'YOUR API KEY'
|
193
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
194
|
+
#config.api_key_prefix['Apikey'] = 'Bearer'
|
195
|
+
end
|
196
|
+
|
197
|
+
api_instance = CloudmersiveValidateApiClient::AddressApi.new
|
198
|
+
|
199
|
+
input = CloudmersiveValidateApiClient::ValidateAddressRequest.new # ValidateAddressRequest | Input parse request
|
200
|
+
|
201
|
+
|
202
|
+
begin
|
203
|
+
#Geocode a street address into latitude and longitude
|
204
|
+
result = api_instance.address_geocode(input)
|
205
|
+
p result
|
206
|
+
rescue CloudmersiveValidateApiClient::ApiError => e
|
207
|
+
puts "Exception when calling AddressApi->address_geocode: #{e}"
|
208
|
+
end
|
209
|
+
```
|
210
|
+
|
211
|
+
### Parameters
|
212
|
+
|
213
|
+
Name | Type | Description | Notes
|
214
|
+
------------- | ------------- | ------------- | -------------
|
215
|
+
**input** | [**ValidateAddressRequest**](ValidateAddressRequest.md)| Input parse request |
|
216
|
+
|
217
|
+
### Return type
|
218
|
+
|
219
|
+
[**ValidateAddressResponse**](ValidateAddressResponse.md)
|
220
|
+
|
221
|
+
### Authorization
|
222
|
+
|
223
|
+
[Apikey](../README.md#Apikey)
|
224
|
+
|
225
|
+
### HTTP request headers
|
226
|
+
|
227
|
+
- **Content-Type**: application/json, text/json
|
228
|
+
- **Accept**: application/json, text/json, application/xml, text/xml
|
229
|
+
|
230
|
+
|
231
|
+
|
176
232
|
# **address_get_country_currency**
|
177
233
|
> ValidateCountryResponse address_get_country_currency(input)
|
178
234
|
|
@@ -389,6 +445,60 @@ Name | Type | Description | Notes
|
|
389
445
|
|
390
446
|
|
391
447
|
|
448
|
+
# **address_reverse_geocode_address**
|
449
|
+
> ReverseGeocodeAddressResponse address_reverse_geocode_address(input)
|
450
|
+
|
451
|
+
Reverse geocode a lattitude and longitude into an address
|
452
|
+
|
453
|
+
Converts lattitude and longitude coordinates into an address through reverse-geocoding.
|
454
|
+
|
455
|
+
### Example
|
456
|
+
```ruby
|
457
|
+
# load the gem
|
458
|
+
require 'cloudmersive-validate-api-client'
|
459
|
+
# setup authorization
|
460
|
+
CloudmersiveValidateApiClient.configure do |config|
|
461
|
+
# Configure API key authorization: Apikey
|
462
|
+
config.api_key['Apikey'] = 'YOUR API KEY'
|
463
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
464
|
+
#config.api_key_prefix['Apikey'] = 'Bearer'
|
465
|
+
end
|
466
|
+
|
467
|
+
api_instance = CloudmersiveValidateApiClient::AddressApi.new
|
468
|
+
|
469
|
+
input = CloudmersiveValidateApiClient::ReverseGeocodeAddressRequest.new # ReverseGeocodeAddressRequest | Input reverse geocoding request
|
470
|
+
|
471
|
+
|
472
|
+
begin
|
473
|
+
#Reverse geocode a lattitude and longitude into an address
|
474
|
+
result = api_instance.address_reverse_geocode_address(input)
|
475
|
+
p result
|
476
|
+
rescue CloudmersiveValidateApiClient::ApiError => e
|
477
|
+
puts "Exception when calling AddressApi->address_reverse_geocode_address: #{e}"
|
478
|
+
end
|
479
|
+
```
|
480
|
+
|
481
|
+
### Parameters
|
482
|
+
|
483
|
+
Name | Type | Description | Notes
|
484
|
+
------------- | ------------- | ------------- | -------------
|
485
|
+
**input** | [**ReverseGeocodeAddressRequest**](ReverseGeocodeAddressRequest.md)| Input reverse geocoding request |
|
486
|
+
|
487
|
+
### Return type
|
488
|
+
|
489
|
+
[**ReverseGeocodeAddressResponse**](ReverseGeocodeAddressResponse.md)
|
490
|
+
|
491
|
+
### Authorization
|
492
|
+
|
493
|
+
[Apikey](../README.md#Apikey)
|
494
|
+
|
495
|
+
### HTTP request headers
|
496
|
+
|
497
|
+
- **Content-Type**: application/json, text/json
|
498
|
+
- **Accept**: application/json, text/json, application/xml, text/xml
|
499
|
+
|
500
|
+
|
501
|
+
|
392
502
|
# **address_validate_address**
|
393
503
|
> ValidateAddressResponse address_validate_address(input)
|
394
504
|
|
data/docs/DomainApi.md
CHANGED
@@ -124,7 +124,7 @@ Name | Type | Description | Notes
|
|
124
124
|
|
125
125
|
Validate a domain name's quality score
|
126
126
|
|
127
|
-
Check the quality of a domain name. Higher quality scores indicate more trust and authority in the domain name.
|
127
|
+
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).
|
128
128
|
|
129
129
|
### Example
|
130
130
|
```ruby
|
@@ -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
|
+
|
@@ -42,6 +42,8 @@ require 'cloudmersive-validate-api-client/models/parse_address_request'
|
|
42
42
|
require 'cloudmersive-validate-api-client/models/parse_address_response'
|
43
43
|
require 'cloudmersive-validate-api-client/models/phone_number_validate_request'
|
44
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'
|
45
47
|
require 'cloudmersive-validate-api-client/models/timezone'
|
46
48
|
require 'cloudmersive-validate-api-client/models/tor_node_response'
|
47
49
|
require 'cloudmersive-validate-api-client/models/user_agent_validate_request'
|
@@ -173,6 +173,60 @@ 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
|
176
230
|
# Get the currency of the input country
|
177
231
|
# Gets the currency information for the input country, including the ISO three-letter country code, currency symbol, and English currency name.
|
178
232
|
# @param input Input request
|
@@ -389,6 +443,60 @@ module CloudmersiveValidateApiClient
|
|
389
443
|
end
|
390
444
|
return data, status_code, headers
|
391
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
|
392
500
|
# Validate a street address
|
393
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.
|
394
502
|
# @param input Input parse request
|
@@ -128,7 +128,7 @@ module CloudmersiveValidateApiClient
|
|
128
128
|
return data, status_code, headers
|
129
129
|
end
|
130
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.
|
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
132
|
# @param domain Domain name to check, for example \"cloudmersive.com\".
|
133
133
|
# @param [Hash] opts the optional parameters
|
134
134
|
# @return [DomainQualityResponse]
|
@@ -138,7 +138,7 @@ module CloudmersiveValidateApiClient
|
|
138
138
|
end
|
139
139
|
|
140
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.
|
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
142
|
# @param domain Domain name to check, for example \"cloudmersive.com\".
|
143
143
|
# @param [Hash] opts the optional parameters
|
144
144
|
# @return [Array<(DomainQualityResponse, Fixnum, Hash)>] DomainQualityResponse data, response status code and response headers
|
@@ -0,0 +1,196 @@
|
|
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
|
+
# Request to reverse geocode a Street Address
|
17
|
+
class ReverseGeocodeAddressRequest
|
18
|
+
# Latitude coordinate in WGS84 format
|
19
|
+
attr_accessor :latitude
|
20
|
+
|
21
|
+
# Longitude coordinate in WGS84 format
|
22
|
+
attr_accessor :longitude
|
23
|
+
|
24
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
25
|
+
def self.attribute_map
|
26
|
+
{
|
27
|
+
:'latitude' => :'Latitude',
|
28
|
+
:'longitude' => :'Longitude'
|
29
|
+
}
|
30
|
+
end
|
31
|
+
|
32
|
+
# Attribute type mapping.
|
33
|
+
def self.swagger_types
|
34
|
+
{
|
35
|
+
:'latitude' => :'Float',
|
36
|
+
:'longitude' => :'Float'
|
37
|
+
}
|
38
|
+
end
|
39
|
+
|
40
|
+
# Initializes the object
|
41
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
42
|
+
def initialize(attributes = {})
|
43
|
+
return unless attributes.is_a?(Hash)
|
44
|
+
|
45
|
+
# convert string to symbol for hash key
|
46
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
47
|
+
|
48
|
+
if attributes.has_key?(:'Latitude')
|
49
|
+
self.latitude = attributes[:'Latitude']
|
50
|
+
end
|
51
|
+
|
52
|
+
if attributes.has_key?(:'Longitude')
|
53
|
+
self.longitude = attributes[:'Longitude']
|
54
|
+
end
|
55
|
+
end
|
56
|
+
|
57
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
58
|
+
# @return Array for valid properties with the reasons
|
59
|
+
def list_invalid_properties
|
60
|
+
invalid_properties = Array.new
|
61
|
+
invalid_properties
|
62
|
+
end
|
63
|
+
|
64
|
+
# Check to see if the all the properties in the model are valid
|
65
|
+
# @return true if the model is valid
|
66
|
+
def valid?
|
67
|
+
true
|
68
|
+
end
|
69
|
+
|
70
|
+
# Checks equality by comparing each attribute.
|
71
|
+
# @param [Object] Object to be compared
|
72
|
+
def ==(o)
|
73
|
+
return true if self.equal?(o)
|
74
|
+
self.class == o.class &&
|
75
|
+
latitude == o.latitude &&
|
76
|
+
longitude == o.longitude
|
77
|
+
end
|
78
|
+
|
79
|
+
# @see the `==` method
|
80
|
+
# @param [Object] Object to be compared
|
81
|
+
def eql?(o)
|
82
|
+
self == o
|
83
|
+
end
|
84
|
+
|
85
|
+
# Calculates hash code according to all attributes.
|
86
|
+
# @return [Fixnum] Hash code
|
87
|
+
def hash
|
88
|
+
[latitude, longitude].hash
|
89
|
+
end
|
90
|
+
|
91
|
+
# Builds the object from hash
|
92
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
93
|
+
# @return [Object] Returns the model itself
|
94
|
+
def build_from_hash(attributes)
|
95
|
+
return nil unless attributes.is_a?(Hash)
|
96
|
+
self.class.swagger_types.each_pair do |key, type|
|
97
|
+
if type =~ /\AArray<(.*)>/i
|
98
|
+
# check to ensure the input is an array given that the attribute
|
99
|
+
# is documented as an array but the input is not
|
100
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
101
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
102
|
+
end
|
103
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
104
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
105
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
106
|
+
end
|
107
|
+
|
108
|
+
self
|
109
|
+
end
|
110
|
+
|
111
|
+
# Deserializes the data based on type
|
112
|
+
# @param string type Data type
|
113
|
+
# @param string value Value to be deserialized
|
114
|
+
# @return [Object] Deserialized data
|
115
|
+
def _deserialize(type, value)
|
116
|
+
case type.to_sym
|
117
|
+
when :DateTime
|
118
|
+
DateTime.parse(value)
|
119
|
+
when :Date
|
120
|
+
Date.parse(value)
|
121
|
+
when :String
|
122
|
+
value.to_s
|
123
|
+
when :Integer
|
124
|
+
value.to_i
|
125
|
+
when :Float
|
126
|
+
value.to_f
|
127
|
+
when :BOOLEAN
|
128
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
129
|
+
true
|
130
|
+
else
|
131
|
+
false
|
132
|
+
end
|
133
|
+
when :Object
|
134
|
+
# generic object (usually a Hash), return directly
|
135
|
+
value
|
136
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
137
|
+
inner_type = Regexp.last_match[:inner_type]
|
138
|
+
value.map { |v| _deserialize(inner_type, v) }
|
139
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
140
|
+
k_type = Regexp.last_match[:k_type]
|
141
|
+
v_type = Regexp.last_match[:v_type]
|
142
|
+
{}.tap do |hash|
|
143
|
+
value.each do |k, v|
|
144
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
145
|
+
end
|
146
|
+
end
|
147
|
+
else # model
|
148
|
+
temp_model = CloudmersiveValidateApiClient.const_get(type).new
|
149
|
+
temp_model.build_from_hash(value)
|
150
|
+
end
|
151
|
+
end
|
152
|
+
|
153
|
+
# Returns the string representation of the object
|
154
|
+
# @return [String] String presentation of the object
|
155
|
+
def to_s
|
156
|
+
to_hash.to_s
|
157
|
+
end
|
158
|
+
|
159
|
+
# to_body is an alias to to_hash (backward compatibility)
|
160
|
+
# @return [Hash] Returns the object in the form of hash
|
161
|
+
def to_body
|
162
|
+
to_hash
|
163
|
+
end
|
164
|
+
|
165
|
+
# Returns the object in the form of hash
|
166
|
+
# @return [Hash] Returns the object in the form of hash
|
167
|
+
def to_hash
|
168
|
+
hash = {}
|
169
|
+
self.class.attribute_map.each_pair do |attr, param|
|
170
|
+
value = self.send(attr)
|
171
|
+
next if value.nil?
|
172
|
+
hash[param] = _to_hash(value)
|
173
|
+
end
|
174
|
+
hash
|
175
|
+
end
|
176
|
+
|
177
|
+
# Outputs non-array value in the form of hash
|
178
|
+
# For object, use to_hash. Otherwise, just return the value
|
179
|
+
# @param [Object] value Any valid value
|
180
|
+
# @return [Hash] Returns the value in the form of hash
|
181
|
+
def _to_hash(value)
|
182
|
+
if value.is_a?(Array)
|
183
|
+
value.compact.map { |v| _to_hash(v) }
|
184
|
+
elsif value.is_a?(Hash)
|
185
|
+
{}.tap do |hash|
|
186
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
187
|
+
end
|
188
|
+
elsif value.respond_to? :to_hash
|
189
|
+
value.to_hash
|
190
|
+
else
|
191
|
+
value
|
192
|
+
end
|
193
|
+
end
|
194
|
+
|
195
|
+
end
|
196
|
+
end
|
@@ -0,0 +1,246 @@
|
|
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 reverse geocoding a street address
|
17
|
+
class ReverseGeocodeAddressResponse
|
18
|
+
# True if the address operation was successful, false otherwise
|
19
|
+
attr_accessor :successful
|
20
|
+
|
21
|
+
# Street address to validate, such as '2950 Buskirk Ave.'
|
22
|
+
attr_accessor :street_address
|
23
|
+
|
24
|
+
# City part of the addrerss to validate, such as 'Walnut Creek'
|
25
|
+
attr_accessor :city
|
26
|
+
|
27
|
+
# State or province of the address to validate, such as 'CA' or 'California'
|
28
|
+
attr_accessor :state_or_province
|
29
|
+
|
30
|
+
# Zip code or postal code of the address to validate, such as '94597'
|
31
|
+
attr_accessor :postal_code
|
32
|
+
|
33
|
+
# Name of the country, such as 'United States'. Global countries are supported.
|
34
|
+
attr_accessor :country_full_name
|
35
|
+
|
36
|
+
# Three-letter ISO 3166-1 country code
|
37
|
+
attr_accessor :country_code
|
38
|
+
|
39
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
40
|
+
def self.attribute_map
|
41
|
+
{
|
42
|
+
:'successful' => :'Successful',
|
43
|
+
:'street_address' => :'StreetAddress',
|
44
|
+
:'city' => :'City',
|
45
|
+
:'state_or_province' => :'StateOrProvince',
|
46
|
+
:'postal_code' => :'PostalCode',
|
47
|
+
:'country_full_name' => :'CountryFullName',
|
48
|
+
:'country_code' => :'CountryCode'
|
49
|
+
}
|
50
|
+
end
|
51
|
+
|
52
|
+
# Attribute type mapping.
|
53
|
+
def self.swagger_types
|
54
|
+
{
|
55
|
+
:'successful' => :'BOOLEAN',
|
56
|
+
:'street_address' => :'String',
|
57
|
+
:'city' => :'String',
|
58
|
+
:'state_or_province' => :'String',
|
59
|
+
:'postal_code' => :'String',
|
60
|
+
:'country_full_name' => :'String',
|
61
|
+
:'country_code' => :'String'
|
62
|
+
}
|
63
|
+
end
|
64
|
+
|
65
|
+
# Initializes the object
|
66
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
67
|
+
def initialize(attributes = {})
|
68
|
+
return unless attributes.is_a?(Hash)
|
69
|
+
|
70
|
+
# convert string to symbol for hash key
|
71
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
72
|
+
|
73
|
+
if attributes.has_key?(:'Successful')
|
74
|
+
self.successful = attributes[:'Successful']
|
75
|
+
end
|
76
|
+
|
77
|
+
if attributes.has_key?(:'StreetAddress')
|
78
|
+
self.street_address = attributes[:'StreetAddress']
|
79
|
+
end
|
80
|
+
|
81
|
+
if attributes.has_key?(:'City')
|
82
|
+
self.city = attributes[:'City']
|
83
|
+
end
|
84
|
+
|
85
|
+
if attributes.has_key?(:'StateOrProvince')
|
86
|
+
self.state_or_province = attributes[:'StateOrProvince']
|
87
|
+
end
|
88
|
+
|
89
|
+
if attributes.has_key?(:'PostalCode')
|
90
|
+
self.postal_code = attributes[:'PostalCode']
|
91
|
+
end
|
92
|
+
|
93
|
+
if attributes.has_key?(:'CountryFullName')
|
94
|
+
self.country_full_name = attributes[:'CountryFullName']
|
95
|
+
end
|
96
|
+
|
97
|
+
if attributes.has_key?(:'CountryCode')
|
98
|
+
self.country_code = attributes[:'CountryCode']
|
99
|
+
end
|
100
|
+
end
|
101
|
+
|
102
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
103
|
+
# @return Array for valid properties with the reasons
|
104
|
+
def list_invalid_properties
|
105
|
+
invalid_properties = Array.new
|
106
|
+
invalid_properties
|
107
|
+
end
|
108
|
+
|
109
|
+
# Check to see if the all the properties in the model are valid
|
110
|
+
# @return true if the model is valid
|
111
|
+
def valid?
|
112
|
+
true
|
113
|
+
end
|
114
|
+
|
115
|
+
# Checks equality by comparing each attribute.
|
116
|
+
# @param [Object] Object to be compared
|
117
|
+
def ==(o)
|
118
|
+
return true if self.equal?(o)
|
119
|
+
self.class == o.class &&
|
120
|
+
successful == o.successful &&
|
121
|
+
street_address == o.street_address &&
|
122
|
+
city == o.city &&
|
123
|
+
state_or_province == o.state_or_province &&
|
124
|
+
postal_code == o.postal_code &&
|
125
|
+
country_full_name == o.country_full_name &&
|
126
|
+
country_code == o.country_code
|
127
|
+
end
|
128
|
+
|
129
|
+
# @see the `==` method
|
130
|
+
# @param [Object] Object to be compared
|
131
|
+
def eql?(o)
|
132
|
+
self == o
|
133
|
+
end
|
134
|
+
|
135
|
+
# Calculates hash code according to all attributes.
|
136
|
+
# @return [Fixnum] Hash code
|
137
|
+
def hash
|
138
|
+
[successful, street_address, city, state_or_province, postal_code, country_full_name, country_code].hash
|
139
|
+
end
|
140
|
+
|
141
|
+
# Builds the object from hash
|
142
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
143
|
+
# @return [Object] Returns the model itself
|
144
|
+
def build_from_hash(attributes)
|
145
|
+
return nil unless attributes.is_a?(Hash)
|
146
|
+
self.class.swagger_types.each_pair do |key, type|
|
147
|
+
if type =~ /\AArray<(.*)>/i
|
148
|
+
# check to ensure the input is an array given that the attribute
|
149
|
+
# is documented as an array but the input is not
|
150
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
151
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
152
|
+
end
|
153
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
154
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
155
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
156
|
+
end
|
157
|
+
|
158
|
+
self
|
159
|
+
end
|
160
|
+
|
161
|
+
# Deserializes the data based on type
|
162
|
+
# @param string type Data type
|
163
|
+
# @param string value Value to be deserialized
|
164
|
+
# @return [Object] Deserialized data
|
165
|
+
def _deserialize(type, value)
|
166
|
+
case type.to_sym
|
167
|
+
when :DateTime
|
168
|
+
DateTime.parse(value)
|
169
|
+
when :Date
|
170
|
+
Date.parse(value)
|
171
|
+
when :String
|
172
|
+
value.to_s
|
173
|
+
when :Integer
|
174
|
+
value.to_i
|
175
|
+
when :Float
|
176
|
+
value.to_f
|
177
|
+
when :BOOLEAN
|
178
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
179
|
+
true
|
180
|
+
else
|
181
|
+
false
|
182
|
+
end
|
183
|
+
when :Object
|
184
|
+
# generic object (usually a Hash), return directly
|
185
|
+
value
|
186
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
187
|
+
inner_type = Regexp.last_match[:inner_type]
|
188
|
+
value.map { |v| _deserialize(inner_type, v) }
|
189
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
190
|
+
k_type = Regexp.last_match[:k_type]
|
191
|
+
v_type = Regexp.last_match[:v_type]
|
192
|
+
{}.tap do |hash|
|
193
|
+
value.each do |k, v|
|
194
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
195
|
+
end
|
196
|
+
end
|
197
|
+
else # model
|
198
|
+
temp_model = CloudmersiveValidateApiClient.const_get(type).new
|
199
|
+
temp_model.build_from_hash(value)
|
200
|
+
end
|
201
|
+
end
|
202
|
+
|
203
|
+
# Returns the string representation of the object
|
204
|
+
# @return [String] String presentation of the object
|
205
|
+
def to_s
|
206
|
+
to_hash.to_s
|
207
|
+
end
|
208
|
+
|
209
|
+
# to_body is an alias to to_hash (backward compatibility)
|
210
|
+
# @return [Hash] Returns the object in the form of hash
|
211
|
+
def to_body
|
212
|
+
to_hash
|
213
|
+
end
|
214
|
+
|
215
|
+
# Returns the object in the form of hash
|
216
|
+
# @return [Hash] Returns the object in the form of hash
|
217
|
+
def to_hash
|
218
|
+
hash = {}
|
219
|
+
self.class.attribute_map.each_pair do |attr, param|
|
220
|
+
value = self.send(attr)
|
221
|
+
next if value.nil?
|
222
|
+
hash[param] = _to_hash(value)
|
223
|
+
end
|
224
|
+
hash
|
225
|
+
end
|
226
|
+
|
227
|
+
# Outputs non-array value in the form of hash
|
228
|
+
# For object, use to_hash. Otherwise, just return the value
|
229
|
+
# @param [Object] value Any valid value
|
230
|
+
# @return [Hash] Returns the value in the form of hash
|
231
|
+
def _to_hash(value)
|
232
|
+
if value.is_a?(Array)
|
233
|
+
value.compact.map { |v| _to_hash(v) }
|
234
|
+
elsif value.is_a?(Hash)
|
235
|
+
{}.tap do |hash|
|
236
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
237
|
+
end
|
238
|
+
elsif value.respond_to? :to_hash
|
239
|
+
value.to_hash
|
240
|
+
else
|
241
|
+
value
|
242
|
+
end
|
243
|
+
end
|
244
|
+
|
245
|
+
end
|
246
|
+
end
|
@@ -67,6 +67,18 @@ describe 'AddressApi' do
|
|
67
67
|
end
|
68
68
|
end
|
69
69
|
|
70
|
+
# unit tests for address_geocode
|
71
|
+
# Geocode a street address into latitude and longitude
|
72
|
+
# Geocodes a street address into latitude and longitude.
|
73
|
+
# @param input Input parse request
|
74
|
+
# @param [Hash] opts the optional parameters
|
75
|
+
# @return [ValidateAddressResponse]
|
76
|
+
describe 'address_geocode test' do
|
77
|
+
it 'should work' do
|
78
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
79
|
+
end
|
80
|
+
end
|
81
|
+
|
70
82
|
# unit tests for address_get_country_currency
|
71
83
|
# Get the currency of the input country
|
72
84
|
# Gets the currency information for the input country, including the ISO three-letter country code, currency symbol, and English currency name.
|
@@ -115,6 +127,18 @@ describe 'AddressApi' do
|
|
115
127
|
end
|
116
128
|
end
|
117
129
|
|
130
|
+
# unit tests for address_reverse_geocode_address
|
131
|
+
# Reverse geocode a lattitude and longitude into an address
|
132
|
+
# Converts lattitude and longitude coordinates into an address through reverse-geocoding.
|
133
|
+
# @param input Input reverse geocoding request
|
134
|
+
# @param [Hash] opts the optional parameters
|
135
|
+
# @return [ReverseGeocodeAddressResponse]
|
136
|
+
describe 'address_reverse_geocode_address test' do
|
137
|
+
it 'should work' do
|
138
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
139
|
+
end
|
140
|
+
end
|
141
|
+
|
118
142
|
# unit tests for address_validate_address
|
119
143
|
# Validate a street address
|
120
144
|
# 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.
|
data/spec/api/domain_api_spec.rb
CHANGED
@@ -58,7 +58,7 @@ describe 'DomainApi' do
|
|
58
58
|
|
59
59
|
# unit tests for domain_quality_score
|
60
60
|
# Validate a domain name's quality score
|
61
|
-
# Check the quality of a domain name. Higher quality scores indicate more trust and authority in the domain name.
|
61
|
+
# 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).
|
62
62
|
# @param domain Domain name to check, for example \"cloudmersive.com\".
|
63
63
|
# @param [Hash] opts the optional parameters
|
64
64
|
# @return [DomainQualityResponse]
|
@@ -0,0 +1,47 @@
|
|
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::ReverseGeocodeAddressRequest
|
18
|
+
# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen)
|
19
|
+
# Please update as you see appropriate
|
20
|
+
describe 'ReverseGeocodeAddressRequest' do
|
21
|
+
before do
|
22
|
+
# run before each test
|
23
|
+
@instance = CloudmersiveValidateApiClient::ReverseGeocodeAddressRequest.new
|
24
|
+
end
|
25
|
+
|
26
|
+
after do
|
27
|
+
# run after each test
|
28
|
+
end
|
29
|
+
|
30
|
+
describe 'test an instance of ReverseGeocodeAddressRequest' do
|
31
|
+
it 'should create an instance of ReverseGeocodeAddressRequest' do
|
32
|
+
expect(@instance).to be_instance_of(CloudmersiveValidateApiClient::ReverseGeocodeAddressRequest)
|
33
|
+
end
|
34
|
+
end
|
35
|
+
describe 'test attribute "latitude"' 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
|
+
describe 'test attribute "longitude"' do
|
42
|
+
it 'should work' do
|
43
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
44
|
+
end
|
45
|
+
end
|
46
|
+
|
47
|
+
end
|
@@ -0,0 +1,77 @@
|
|
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::ReverseGeocodeAddressResponse
|
18
|
+
# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen)
|
19
|
+
# Please update as you see appropriate
|
20
|
+
describe 'ReverseGeocodeAddressResponse' do
|
21
|
+
before do
|
22
|
+
# run before each test
|
23
|
+
@instance = CloudmersiveValidateApiClient::ReverseGeocodeAddressResponse.new
|
24
|
+
end
|
25
|
+
|
26
|
+
after do
|
27
|
+
# run after each test
|
28
|
+
end
|
29
|
+
|
30
|
+
describe 'test an instance of ReverseGeocodeAddressResponse' do
|
31
|
+
it 'should create an instance of ReverseGeocodeAddressResponse' do
|
32
|
+
expect(@instance).to be_instance_of(CloudmersiveValidateApiClient::ReverseGeocodeAddressResponse)
|
33
|
+
end
|
34
|
+
end
|
35
|
+
describe 'test attribute "successful"' 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
|
+
describe 'test attribute "street_address"' do
|
42
|
+
it 'should work' do
|
43
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
44
|
+
end
|
45
|
+
end
|
46
|
+
|
47
|
+
describe 'test attribute "city"' do
|
48
|
+
it 'should work' do
|
49
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
50
|
+
end
|
51
|
+
end
|
52
|
+
|
53
|
+
describe 'test attribute "state_or_province"' do
|
54
|
+
it 'should work' do
|
55
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
56
|
+
end
|
57
|
+
end
|
58
|
+
|
59
|
+
describe 'test attribute "postal_code"' do
|
60
|
+
it 'should work' do
|
61
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
62
|
+
end
|
63
|
+
end
|
64
|
+
|
65
|
+
describe 'test attribute "country_full_name"' 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
|
+
|
71
|
+
describe 'test attribute "country_code"' do
|
72
|
+
it 'should work' do
|
73
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
74
|
+
end
|
75
|
+
end
|
76
|
+
|
77
|
+
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
|
4
|
+
version: 2.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Cloudmersive
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-10-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: typhoeus
|
@@ -235,6 +235,8 @@ files:
|
|
235
235
|
- "./docs/PhoneNumberApi.md"
|
236
236
|
- "./docs/PhoneNumberValidateRequest.md"
|
237
237
|
- "./docs/PhoneNumberValidationResponse.md"
|
238
|
+
- "./docs/ReverseGeocodeAddressRequest.md"
|
239
|
+
- "./docs/ReverseGeocodeAddressResponse.md"
|
238
240
|
- "./docs/Timezone.md"
|
239
241
|
- "./docs/TorNodeResponse.md"
|
240
242
|
- "./docs/UserAgentApi.md"
|
@@ -299,6 +301,8 @@ files:
|
|
299
301
|
- "./lib/cloudmersive-validate-api-client/models/parse_address_response.rb"
|
300
302
|
- "./lib/cloudmersive-validate-api-client/models/phone_number_validate_request.rb"
|
301
303
|
- "./lib/cloudmersive-validate-api-client/models/phone_number_validation_response.rb"
|
304
|
+
- "./lib/cloudmersive-validate-api-client/models/reverse_geocode_address_request.rb"
|
305
|
+
- "./lib/cloudmersive-validate-api-client/models/reverse_geocode_address_response.rb"
|
302
306
|
- "./lib/cloudmersive-validate-api-client/models/timezone.rb"
|
303
307
|
- "./lib/cloudmersive-validate-api-client/models/tor_node_response.rb"
|
304
308
|
- "./lib/cloudmersive-validate-api-client/models/user_agent_validate_request.rb"
|
@@ -359,6 +363,8 @@ files:
|
|
359
363
|
- "./spec/models/parse_address_response_spec.rb"
|
360
364
|
- "./spec/models/phone_number_validate_request_spec.rb"
|
361
365
|
- "./spec/models/phone_number_validation_response_spec.rb"
|
366
|
+
- "./spec/models/reverse_geocode_address_request_spec.rb"
|
367
|
+
- "./spec/models/reverse_geocode_address_response_spec.rb"
|
362
368
|
- "./spec/models/timezone_spec.rb"
|
363
369
|
- "./spec/models/tor_node_response_spec.rb"
|
364
370
|
- "./spec/models/user_agent_validate_request_spec.rb"
|