cloudmersive-validate-api-client 2.1.1 → 2.1.2
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 +17 -4
- data/docs/AddressApi.md +55 -0
- data/docs/DateTimeApi.md +222 -0
- data/docs/DateTimeNaturalLanguageParseRequest.md +8 -0
- data/docs/DateTimeNowResult.md +10 -0
- data/docs/DateTimeStandardizedParseRequest.md +9 -0
- data/docs/DateTimeStandardizedParseResponse.md +16 -0
- data/docs/DomainApi.md +3 -3
- data/docs/EmailApi.md +3 -3
- data/docs/GetPublicHolidaysRequest.md +9 -0
- data/docs/IPAddressApi.md +4 -4
- data/docs/NormalizeAddressResponse.md +18 -0
- data/docs/PublicHolidayOccurrence.md +12 -0
- data/docs/PublicHolidaysResponse.md +9 -0
- data/docs/TextInputApi.md +2 -2
- data/lib/cloudmersive-validate-api-client.rb +9 -0
- data/lib/cloudmersive-validate-api-client/api/address_api.rb +54 -0
- data/lib/cloudmersive-validate-api-client/api/date_time_api.rb +231 -0
- data/lib/cloudmersive-validate-api-client/api/domain_api.rb +3 -3
- data/lib/cloudmersive-validate-api-client/api/email_api.rb +3 -3
- data/lib/cloudmersive-validate-api-client/api/ip_address_api.rb +4 -4
- data/lib/cloudmersive-validate-api-client/api/text_input_api.rb +2 -2
- data/lib/cloudmersive-validate-api-client/models/date_time_natural_language_parse_request.rb +186 -0
- data/lib/cloudmersive-validate-api-client/models/date_time_now_result.rb +206 -0
- data/lib/cloudmersive-validate-api-client/models/date_time_standardized_parse_request.rb +196 -0
- data/lib/cloudmersive-validate-api-client/models/date_time_standardized_parse_response.rb +266 -0
- data/lib/cloudmersive-validate-api-client/models/get_public_holidays_request.rb +196 -0
- data/lib/cloudmersive-validate-api-client/models/normalize_address_response.rb +286 -0
- data/lib/cloudmersive-validate-api-client/models/public_holiday_occurrence.rb +226 -0
- data/lib/cloudmersive-validate-api-client/models/public_holidays_response.rb +198 -0
- data/lib/cloudmersive-validate-api-client/version.rb +1 -1
- data/spec/api/address_api_spec.rb +12 -0
- data/spec/api/date_time_api_spec.rb +82 -0
- data/spec/models/date_time_natural_language_parse_request_spec.rb +41 -0
- data/spec/models/date_time_now_result_spec.rb +53 -0
- data/spec/models/date_time_standardized_parse_request_spec.rb +47 -0
- data/spec/models/date_time_standardized_parse_response_spec.rb +89 -0
- data/spec/models/get_public_holidays_request_spec.rb +47 -0
- data/spec/models/normalize_address_response_spec.rb +101 -0
- data/spec/models/public_holiday_occurrence_spec.rb +65 -0
- data/spec/models/public_holidays_response_spec.rb +47 -0
- metadata +29 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 580343d1f2610163655fb867547c08b843993d3c68f01cd59479e40e78d80341
|
4
|
+
data.tar.gz: 5f9844a43674a566b61c5564c1685fd81322293e4aa5394d219e5faf3111e5a4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a2c34afc7f80fea8724806691dc82b381dc6b33ec2253ffcad3675fbf96bb9c58602f8be6673c0414052c983e9c0f268b9c55cee582d7a2461f4a499be834ecd
|
7
|
+
data.tar.gz: a72610132b934a0d25d1c691a7fbf37fbab351afc53b8f8620658bf3fb47e12e6e51655c29885fbe98e8bbf88e90f0dd0521c092594ac3d4afce774c5d4b9d47
|
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.1.
|
10
|
+
- Package version: 2.1.2
|
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.1.
|
26
|
+
gem install ./cloudmersive-validate-api-client-2.1.2.gem
|
27
27
|
```
|
28
|
-
(for development, run `gem install --dev ./cloudmersive-validate-api-client-2.1.
|
28
|
+
(for development, run `gem install --dev ./cloudmersive-validate-api-client-2.1.2.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.1.
|
34
|
+
gem 'cloudmersive-validate-api-client', '~> 2.1.2'
|
35
35
|
|
36
36
|
### Install from Git
|
37
37
|
|
@@ -90,12 +90,17 @@ Class | Method | HTTP request | Description
|
|
90
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
|
91
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
|
92
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
|
93
|
+
*CloudmersiveValidateApiClient::AddressApi* | [**address_normalize_address**](docs/AddressApi.md#address_normalize_address) | **POST** /validate/address/street-address/normalize | Normalize a street address
|
93
94
|
*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
95
|
*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
|
95
96
|
*CloudmersiveValidateApiClient::AddressApi* | [**address_validate_address**](docs/AddressApi.md#address_validate_address) | **POST** /validate/address/street-address | Validate a street address
|
96
97
|
*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
|
97
98
|
*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
|
98
99
|
*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
|
100
|
+
*CloudmersiveValidateApiClient::DateTimeApi* | [**date_time_get_now_simple**](docs/DateTimeApi.md#date_time_get_now_simple) | **GET** /validate/date-time/get/now | Get current date and time as of now
|
101
|
+
*CloudmersiveValidateApiClient::DateTimeApi* | [**date_time_get_public_holidays**](docs/DateTimeApi.md#date_time_get_public_holidays) | **POST** /validate/date-time/get/holidays | Get public holidays in the specified country and year
|
102
|
+
*CloudmersiveValidateApiClient::DateTimeApi* | [**date_time_parse_natural_language_date_time**](docs/DateTimeApi.md#date_time_parse_natural_language_date_time) | **POST** /validate/date-time/parse/date-time/natural-language | Parses a free-form natural language date and time string into a date and time
|
103
|
+
*CloudmersiveValidateApiClient::DateTimeApi* | [**date_time_parse_standard_date_time**](docs/DateTimeApi.md#date_time_parse_standard_date_time) | **POST** /validate/date-time/parse/date-time/structured | Parses a standardized date and time string into a date and time
|
99
104
|
*CloudmersiveValidateApiClient::DomainApi* | [**domain_check**](docs/DomainApi.md#domain_check) | **POST** /validate/domain/check | Validate a domain name
|
100
105
|
*CloudmersiveValidateApiClient::DomainApi* | [**domain_post**](docs/DomainApi.md#domain_post) | **POST** /validate/domain/whois | Get WHOIS information for a domain
|
101
106
|
*CloudmersiveValidateApiClient::DomainApi* | [**domain_quality_score**](docs/DomainApi.md#domain_quality_score) | **POST** /validate/domain/quality-score | Validate a domain name's quality score
|
@@ -128,6 +133,10 @@ Class | Method | HTTP request | Description
|
|
128
133
|
- [CloudmersiveValidateApiClient::CheckResponse](docs/CheckResponse.md)
|
129
134
|
- [CloudmersiveValidateApiClient::CountryDetails](docs/CountryDetails.md)
|
130
135
|
- [CloudmersiveValidateApiClient::CountryListResult](docs/CountryListResult.md)
|
136
|
+
- [CloudmersiveValidateApiClient::DateTimeNaturalLanguageParseRequest](docs/DateTimeNaturalLanguageParseRequest.md)
|
137
|
+
- [CloudmersiveValidateApiClient::DateTimeNowResult](docs/DateTimeNowResult.md)
|
138
|
+
- [CloudmersiveValidateApiClient::DateTimeStandardizedParseRequest](docs/DateTimeStandardizedParseRequest.md)
|
139
|
+
- [CloudmersiveValidateApiClient::DateTimeStandardizedParseResponse](docs/DateTimeStandardizedParseResponse.md)
|
131
140
|
- [CloudmersiveValidateApiClient::DomainQualityResponse](docs/DomainQualityResponse.md)
|
132
141
|
- [CloudmersiveValidateApiClient::FirstNameValidationRequest](docs/FirstNameValidationRequest.md)
|
133
142
|
- [CloudmersiveValidateApiClient::FirstNameValidationResponse](docs/FirstNameValidationResponse.md)
|
@@ -138,6 +147,7 @@ Class | Method | HTTP request | Description
|
|
138
147
|
- [CloudmersiveValidateApiClient::GeolocateStreetAddressResponse](docs/GeolocateStreetAddressResponse.md)
|
139
148
|
- [CloudmersiveValidateApiClient::GetGenderRequest](docs/GetGenderRequest.md)
|
140
149
|
- [CloudmersiveValidateApiClient::GetGenderResponse](docs/GetGenderResponse.md)
|
150
|
+
- [CloudmersiveValidateApiClient::GetPublicHolidaysRequest](docs/GetPublicHolidaysRequest.md)
|
141
151
|
- [CloudmersiveValidateApiClient::GetTimezonesRequest](docs/GetTimezonesRequest.md)
|
142
152
|
- [CloudmersiveValidateApiClient::GetTimezonesResponse](docs/GetTimezonesResponse.md)
|
143
153
|
- [CloudmersiveValidateApiClient::IPThreatResponse](docs/IPThreatResponse.md)
|
@@ -145,10 +155,13 @@ Class | Method | HTTP request | Description
|
|
145
155
|
- [CloudmersiveValidateApiClient::LastNameValidationResponse](docs/LastNameValidationResponse.md)
|
146
156
|
- [CloudmersiveValidateApiClient::LeadEnrichmentRequest](docs/LeadEnrichmentRequest.md)
|
147
157
|
- [CloudmersiveValidateApiClient::LeadEnrichmentResponse](docs/LeadEnrichmentResponse.md)
|
158
|
+
- [CloudmersiveValidateApiClient::NormalizeAddressResponse](docs/NormalizeAddressResponse.md)
|
148
159
|
- [CloudmersiveValidateApiClient::ParseAddressRequest](docs/ParseAddressRequest.md)
|
149
160
|
- [CloudmersiveValidateApiClient::ParseAddressResponse](docs/ParseAddressResponse.md)
|
150
161
|
- [CloudmersiveValidateApiClient::PhoneNumberValidateRequest](docs/PhoneNumberValidateRequest.md)
|
151
162
|
- [CloudmersiveValidateApiClient::PhoneNumberValidationResponse](docs/PhoneNumberValidationResponse.md)
|
163
|
+
- [CloudmersiveValidateApiClient::PublicHolidayOccurrence](docs/PublicHolidayOccurrence.md)
|
164
|
+
- [CloudmersiveValidateApiClient::PublicHolidaysResponse](docs/PublicHolidaysResponse.md)
|
152
165
|
- [CloudmersiveValidateApiClient::ReverseGeocodeAddressRequest](docs/ReverseGeocodeAddressRequest.md)
|
153
166
|
- [CloudmersiveValidateApiClient::ReverseGeocodeAddressResponse](docs/ReverseGeocodeAddressResponse.md)
|
154
167
|
- [CloudmersiveValidateApiClient::Timezone](docs/Timezone.md)
|
data/docs/AddressApi.md
CHANGED
@@ -11,6 +11,7 @@ Method | HTTP request | Description
|
|
11
11
|
[**address_get_country_currency**](AddressApi.md#address_get_country_currency) | **POST** /validate/address/country/get-currency | Get the currency of the input country
|
12
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
|
13
13
|
[**address_get_timezone**](AddressApi.md#address_get_timezone) | **POST** /validate/address/country/get-timezones | Gets IANA/Olsen time zones for a country
|
14
|
+
[**address_normalize_address**](AddressApi.md#address_normalize_address) | **POST** /validate/address/street-address/normalize | Normalize a street address
|
14
15
|
[**address_parse_string**](AddressApi.md#address_parse_string) | **POST** /validate/address/parse | Parse an unstructured input text string into an international, formatted address
|
15
16
|
[**address_reverse_geocode_address**](AddressApi.md#address_reverse_geocode_address) | **POST** /validate/address/geocode/reverse | Reverse geocode a lattitude and longitude into an address
|
16
17
|
[**address_validate_address**](AddressApi.md#address_validate_address) | **POST** /validate/address/street-address | Validate a street address
|
@@ -391,6 +392,60 @@ Name | Type | Description | Notes
|
|
391
392
|
|
392
393
|
|
393
394
|
|
395
|
+
# **address_normalize_address**
|
396
|
+
> NormalizeAddressResponse address_normalize_address(input)
|
397
|
+
|
398
|
+
Normalize a street address
|
399
|
+
|
400
|
+
Normalizes 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.
|
401
|
+
|
402
|
+
### Example
|
403
|
+
```ruby
|
404
|
+
# load the gem
|
405
|
+
require 'cloudmersive-validate-api-client'
|
406
|
+
# setup authorization
|
407
|
+
CloudmersiveValidateApiClient.configure do |config|
|
408
|
+
# Configure API key authorization: Apikey
|
409
|
+
config.api_key['Apikey'] = 'YOUR API KEY'
|
410
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
411
|
+
#config.api_key_prefix['Apikey'] = 'Bearer'
|
412
|
+
end
|
413
|
+
|
414
|
+
api_instance = CloudmersiveValidateApiClient::AddressApi.new
|
415
|
+
|
416
|
+
input = CloudmersiveValidateApiClient::ValidateAddressRequest.new # ValidateAddressRequest | Input parse request
|
417
|
+
|
418
|
+
|
419
|
+
begin
|
420
|
+
#Normalize a street address
|
421
|
+
result = api_instance.address_normalize_address(input)
|
422
|
+
p result
|
423
|
+
rescue CloudmersiveValidateApiClient::ApiError => e
|
424
|
+
puts "Exception when calling AddressApi->address_normalize_address: #{e}"
|
425
|
+
end
|
426
|
+
```
|
427
|
+
|
428
|
+
### Parameters
|
429
|
+
|
430
|
+
Name | Type | Description | Notes
|
431
|
+
------------- | ------------- | ------------- | -------------
|
432
|
+
**input** | [**ValidateAddressRequest**](ValidateAddressRequest.md)| Input parse request |
|
433
|
+
|
434
|
+
### Return type
|
435
|
+
|
436
|
+
[**NormalizeAddressResponse**](NormalizeAddressResponse.md)
|
437
|
+
|
438
|
+
### Authorization
|
439
|
+
|
440
|
+
[Apikey](../README.md#Apikey)
|
441
|
+
|
442
|
+
### HTTP request headers
|
443
|
+
|
444
|
+
- **Content-Type**: application/json, text/json
|
445
|
+
- **Accept**: application/json, text/json, application/xml, text/xml
|
446
|
+
|
447
|
+
|
448
|
+
|
394
449
|
# **address_parse_string**
|
395
450
|
> ParseAddressResponse address_parse_string(input)
|
396
451
|
|
data/docs/DateTimeApi.md
ADDED
@@ -0,0 +1,222 @@
|
|
1
|
+
# CloudmersiveValidateApiClient::DateTimeApi
|
2
|
+
|
3
|
+
All URIs are relative to *https://api.cloudmersive.com*
|
4
|
+
|
5
|
+
Method | HTTP request | Description
|
6
|
+
------------- | ------------- | -------------
|
7
|
+
[**date_time_get_now_simple**](DateTimeApi.md#date_time_get_now_simple) | **GET** /validate/date-time/get/now | Get current date and time as of now
|
8
|
+
[**date_time_get_public_holidays**](DateTimeApi.md#date_time_get_public_holidays) | **POST** /validate/date-time/get/holidays | Get public holidays in the specified country and year
|
9
|
+
[**date_time_parse_natural_language_date_time**](DateTimeApi.md#date_time_parse_natural_language_date_time) | **POST** /validate/date-time/parse/date-time/natural-language | Parses a free-form natural language date and time string into a date and time
|
10
|
+
[**date_time_parse_standard_date_time**](DateTimeApi.md#date_time_parse_standard_date_time) | **POST** /validate/date-time/parse/date-time/structured | Parses a standardized date and time string into a date and time
|
11
|
+
|
12
|
+
|
13
|
+
# **date_time_get_now_simple**
|
14
|
+
> DateTimeNowResult date_time_get_now_simple
|
15
|
+
|
16
|
+
Get current date and time as of now
|
17
|
+
|
18
|
+
Gets the current date and time. Response time is syncronized with atomic clocks, and represents a monotonic, centrally available, consistent clock.
|
19
|
+
|
20
|
+
### Example
|
21
|
+
```ruby
|
22
|
+
# load the gem
|
23
|
+
require 'cloudmersive-validate-api-client'
|
24
|
+
# setup authorization
|
25
|
+
CloudmersiveValidateApiClient.configure do |config|
|
26
|
+
# Configure API key authorization: Apikey
|
27
|
+
config.api_key['Apikey'] = 'YOUR API KEY'
|
28
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
29
|
+
#config.api_key_prefix['Apikey'] = 'Bearer'
|
30
|
+
end
|
31
|
+
|
32
|
+
api_instance = CloudmersiveValidateApiClient::DateTimeApi.new
|
33
|
+
|
34
|
+
begin
|
35
|
+
#Get current date and time as of now
|
36
|
+
result = api_instance.date_time_get_now_simple
|
37
|
+
p result
|
38
|
+
rescue CloudmersiveValidateApiClient::ApiError => e
|
39
|
+
puts "Exception when calling DateTimeApi->date_time_get_now_simple: #{e}"
|
40
|
+
end
|
41
|
+
```
|
42
|
+
|
43
|
+
### Parameters
|
44
|
+
This endpoint does not need any parameter.
|
45
|
+
|
46
|
+
### Return type
|
47
|
+
|
48
|
+
[**DateTimeNowResult**](DateTimeNowResult.md)
|
49
|
+
|
50
|
+
### Authorization
|
51
|
+
|
52
|
+
[Apikey](../README.md#Apikey)
|
53
|
+
|
54
|
+
### HTTP request headers
|
55
|
+
|
56
|
+
- **Content-Type**: Not defined
|
57
|
+
- **Accept**: application/json, text/json, application/xml, text/xml
|
58
|
+
|
59
|
+
|
60
|
+
|
61
|
+
# **date_time_get_public_holidays**
|
62
|
+
> PublicHolidaysResponse date_time_get_public_holidays(input)
|
63
|
+
|
64
|
+
Get public holidays in the specified country and year
|
65
|
+
|
66
|
+
Enumerates all public holidays in a given country for a given year. Supports over 100 countries.
|
67
|
+
|
68
|
+
### Example
|
69
|
+
```ruby
|
70
|
+
# load the gem
|
71
|
+
require 'cloudmersive-validate-api-client'
|
72
|
+
# setup authorization
|
73
|
+
CloudmersiveValidateApiClient.configure do |config|
|
74
|
+
# Configure API key authorization: Apikey
|
75
|
+
config.api_key['Apikey'] = 'YOUR API KEY'
|
76
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
77
|
+
#config.api_key_prefix['Apikey'] = 'Bearer'
|
78
|
+
end
|
79
|
+
|
80
|
+
api_instance = CloudmersiveValidateApiClient::DateTimeApi.new
|
81
|
+
|
82
|
+
input = CloudmersiveValidateApiClient::GetPublicHolidaysRequest.new # GetPublicHolidaysRequest | Input request
|
83
|
+
|
84
|
+
|
85
|
+
begin
|
86
|
+
#Get public holidays in the specified country and year
|
87
|
+
result = api_instance.date_time_get_public_holidays(input)
|
88
|
+
p result
|
89
|
+
rescue CloudmersiveValidateApiClient::ApiError => e
|
90
|
+
puts "Exception when calling DateTimeApi->date_time_get_public_holidays: #{e}"
|
91
|
+
end
|
92
|
+
```
|
93
|
+
|
94
|
+
### Parameters
|
95
|
+
|
96
|
+
Name | Type | Description | Notes
|
97
|
+
------------- | ------------- | ------------- | -------------
|
98
|
+
**input** | [**GetPublicHolidaysRequest**](GetPublicHolidaysRequest.md)| Input request |
|
99
|
+
|
100
|
+
### Return type
|
101
|
+
|
102
|
+
[**PublicHolidaysResponse**](PublicHolidaysResponse.md)
|
103
|
+
|
104
|
+
### Authorization
|
105
|
+
|
106
|
+
[Apikey](../README.md#Apikey)
|
107
|
+
|
108
|
+
### HTTP request headers
|
109
|
+
|
110
|
+
- **Content-Type**: application/json, text/json
|
111
|
+
- **Accept**: application/json, text/json, application/xml, text/xml
|
112
|
+
|
113
|
+
|
114
|
+
|
115
|
+
# **date_time_parse_natural_language_date_time**
|
116
|
+
> DateTimeStandardizedParseResponse date_time_parse_natural_language_date_time(input)
|
117
|
+
|
118
|
+
Parses a free-form natural language date and time string into a date and time
|
119
|
+
|
120
|
+
Parses an unstructured, free-form, natural language date and time string into a date time object. This is intended for lightweight human-entered input, such as \"tomorrow at 3pm\" or \"tuesday\".
|
121
|
+
|
122
|
+
### Example
|
123
|
+
```ruby
|
124
|
+
# load the gem
|
125
|
+
require 'cloudmersive-validate-api-client'
|
126
|
+
# setup authorization
|
127
|
+
CloudmersiveValidateApiClient.configure do |config|
|
128
|
+
# Configure API key authorization: Apikey
|
129
|
+
config.api_key['Apikey'] = 'YOUR API KEY'
|
130
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
131
|
+
#config.api_key_prefix['Apikey'] = 'Bearer'
|
132
|
+
end
|
133
|
+
|
134
|
+
api_instance = CloudmersiveValidateApiClient::DateTimeApi.new
|
135
|
+
|
136
|
+
input = CloudmersiveValidateApiClient::DateTimeNaturalLanguageParseRequest.new # DateTimeNaturalLanguageParseRequest | Input request
|
137
|
+
|
138
|
+
|
139
|
+
begin
|
140
|
+
#Parses a free-form natural language date and time string into a date and time
|
141
|
+
result = api_instance.date_time_parse_natural_language_date_time(input)
|
142
|
+
p result
|
143
|
+
rescue CloudmersiveValidateApiClient::ApiError => e
|
144
|
+
puts "Exception when calling DateTimeApi->date_time_parse_natural_language_date_time: #{e}"
|
145
|
+
end
|
146
|
+
```
|
147
|
+
|
148
|
+
### Parameters
|
149
|
+
|
150
|
+
Name | Type | Description | Notes
|
151
|
+
------------- | ------------- | ------------- | -------------
|
152
|
+
**input** | [**DateTimeNaturalLanguageParseRequest**](DateTimeNaturalLanguageParseRequest.md)| Input request |
|
153
|
+
|
154
|
+
### Return type
|
155
|
+
|
156
|
+
[**DateTimeStandardizedParseResponse**](DateTimeStandardizedParseResponse.md)
|
157
|
+
|
158
|
+
### Authorization
|
159
|
+
|
160
|
+
[Apikey](../README.md#Apikey)
|
161
|
+
|
162
|
+
### HTTP request headers
|
163
|
+
|
164
|
+
- **Content-Type**: application/json, text/json
|
165
|
+
- **Accept**: application/json, text/json, application/xml, text/xml
|
166
|
+
|
167
|
+
|
168
|
+
|
169
|
+
# **date_time_parse_standard_date_time**
|
170
|
+
> DateTimeStandardizedParseResponse date_time_parse_standard_date_time(input)
|
171
|
+
|
172
|
+
Parses a standardized date and time string into a date and time
|
173
|
+
|
174
|
+
Parses a structured date and time string into a date time object. This is intended for standardized date strings that adhere to formatting conventions, rather than natural language input.
|
175
|
+
|
176
|
+
### Example
|
177
|
+
```ruby
|
178
|
+
# load the gem
|
179
|
+
require 'cloudmersive-validate-api-client'
|
180
|
+
# setup authorization
|
181
|
+
CloudmersiveValidateApiClient.configure do |config|
|
182
|
+
# Configure API key authorization: Apikey
|
183
|
+
config.api_key['Apikey'] = 'YOUR API KEY'
|
184
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
185
|
+
#config.api_key_prefix['Apikey'] = 'Bearer'
|
186
|
+
end
|
187
|
+
|
188
|
+
api_instance = CloudmersiveValidateApiClient::DateTimeApi.new
|
189
|
+
|
190
|
+
input = CloudmersiveValidateApiClient::DateTimeStandardizedParseRequest.new # DateTimeStandardizedParseRequest | Input request
|
191
|
+
|
192
|
+
|
193
|
+
begin
|
194
|
+
#Parses a standardized date and time string into a date and time
|
195
|
+
result = api_instance.date_time_parse_standard_date_time(input)
|
196
|
+
p result
|
197
|
+
rescue CloudmersiveValidateApiClient::ApiError => e
|
198
|
+
puts "Exception when calling DateTimeApi->date_time_parse_standard_date_time: #{e}"
|
199
|
+
end
|
200
|
+
```
|
201
|
+
|
202
|
+
### Parameters
|
203
|
+
|
204
|
+
Name | Type | Description | Notes
|
205
|
+
------------- | ------------- | ------------- | -------------
|
206
|
+
**input** | [**DateTimeStandardizedParseRequest**](DateTimeStandardizedParseRequest.md)| Input request |
|
207
|
+
|
208
|
+
### Return type
|
209
|
+
|
210
|
+
[**DateTimeStandardizedParseResponse**](DateTimeStandardizedParseResponse.md)
|
211
|
+
|
212
|
+
### Authorization
|
213
|
+
|
214
|
+
[Apikey](../README.md#Apikey)
|
215
|
+
|
216
|
+
### HTTP request headers
|
217
|
+
|
218
|
+
- **Content-Type**: application/json, text/json
|
219
|
+
- **Accept**: application/json, text/json, application/xml, text/xml
|
220
|
+
|
221
|
+
|
222
|
+
|
@@ -0,0 +1,8 @@
|
|
1
|
+
# CloudmersiveValidateApiClient::DateTimeNaturalLanguageParseRequest
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
Name | Type | Description | Notes
|
5
|
+
------------ | ------------- | ------------- | -------------
|
6
|
+
**raw_date_time_input** | **String** | Raw string input of a natural language-formatted date and time for parsing | [optional]
|
7
|
+
|
8
|
+
|
@@ -0,0 +1,10 @@
|
|
1
|
+
# CloudmersiveValidateApiClient::DateTimeNowResult
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
Name | Type | Description | Notes
|
5
|
+
------------ | ------------- | ------------- | -------------
|
6
|
+
**successful** | **BOOLEAN** | True if successful, false otherwise | [optional]
|
7
|
+
**now** | **DateTime** | Current date, time, and time zone in standard JSON date format | [optional]
|
8
|
+
**now_gmt** | **DateTime** | Current GMT-time-zone date, time, and time zone in standard JSON date format | [optional]
|
9
|
+
|
10
|
+
|
@@ -0,0 +1,9 @@
|
|
1
|
+
# CloudmersiveValidateApiClient::DateTimeStandardizedParseRequest
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
Name | Type | Description | Notes
|
5
|
+
------------ | ------------- | ------------- | -------------
|
6
|
+
**raw_date_time_input** | **String** | Raw string input of a standard-formatted date and time for parsing | [optional]
|
7
|
+
**country_code** | **String** | Optional: specify the two-letter country code to optimzie date formatting; default is US | [optional]
|
8
|
+
|
9
|
+
|
@@ -0,0 +1,16 @@
|
|
1
|
+
# CloudmersiveValidateApiClient::DateTimeStandardizedParseResponse
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
Name | Type | Description | Notes
|
5
|
+
------------ | ------------- | ------------- | -------------
|
6
|
+
**successful** | **BOOLEAN** | True if successful, false otherwise | [optional]
|
7
|
+
**parsed_date_result** | **DateTime** | Result of performing a date time parsing | [optional]
|
8
|
+
**year** | **Integer** | Year of the parsed date time result | [optional]
|
9
|
+
**month** | **Integer** | Month of the parsed date time result | [optional]
|
10
|
+
**day** | **Integer** | Day of the parsed date time result | [optional]
|
11
|
+
**hour** | **Integer** | Hour of the parsed date time result (24-hour) | [optional]
|
12
|
+
**minute** | **Integer** | Minute of the parsed date time result | [optional]
|
13
|
+
**second** | **Integer** | Second of the parsed date time result | [optional]
|
14
|
+
**day_of_week** | **String** | Day of week | [optional]
|
15
|
+
|
16
|
+
|
data/docs/DomainApi.md
CHANGED
@@ -60,7 +60,7 @@ Name | Type | Description | Notes
|
|
60
60
|
|
61
61
|
### HTTP request headers
|
62
62
|
|
63
|
-
- **Content-Type**:
|
63
|
+
- **Content-Type**: application/json, text/json
|
64
64
|
- **Accept**: application/json, text/json, application/xml, text/xml
|
65
65
|
|
66
66
|
|
@@ -114,7 +114,7 @@ Name | Type | Description | Notes
|
|
114
114
|
|
115
115
|
### HTTP request headers
|
116
116
|
|
117
|
-
- **Content-Type**:
|
117
|
+
- **Content-Type**: application/json, text/json
|
118
118
|
- **Accept**: application/json, text/json, application/xml, text/xml
|
119
119
|
|
120
120
|
|
@@ -168,7 +168,7 @@ Name | Type | Description | Notes
|
|
168
168
|
|
169
169
|
### HTTP request headers
|
170
170
|
|
171
|
-
- **Content-Type**:
|
171
|
+
- **Content-Type**: application/json, text/json
|
172
172
|
- **Accept**: application/json, text/json, application/xml, text/xml
|
173
173
|
|
174
174
|
|