cloudmersive-validate-api-client
CloudmersiveValidateApiClient - the Ruby gem for the validateapi
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.
This SDK is automatically generated by the Swagger Codegen project:
- API version: v1
- Package version: 1.3.1
- Build package: io.swagger.codegen.languages.RubyClientCodegen
Installation
Build a gem
To build the Ruby code into a gem:
gem build cloudmersive-validate-api-client.gemspec
Then either install the gem locally:
gem install ./cloudmersive-validate-api-client-1.3.1.gem
(for development, run gem install --dev ./cloudmersive-validate-api-client-1.3.1.gem to install the development dependencies)
or publish the gem to a gem hosting service, e.g. RubyGems.
Finally add this to the Gemfile:
gem 'cloudmersive-validate-api-client', '~> 1.3.1'
Install from Git
If the Ruby gem is hosted at a git repository: https://github.com/GIT_USER_ID/GIT_REPO_ID, then add the following in the Gemfile:
gem 'cloudmersive-validate-api-client', :git => 'https://github.com/GIT_USER_ID/GIT_REPO_ID.git'
Include the Ruby code directly
Include the Ruby code directly using -I as follows:
ruby -Ilib script.rb
Getting Started
Please follow the installation procedure and then run the following code:
# Load the gem
require 'cloudmersive-validate-api-client'
# Setup authorization
CloudmersiveValidateApiClient.configure do |config|
# Configure API key authorization: Apikey
config.api_key['Apikey'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
#config.api_key_prefix['Apikey'] = 'Bearer'
end
api_instance = CloudmersiveValidateApiClient::DomainApi.new
domain = "domain_example" # String | Domain name to check, for example \"cloudmersive.com\". The input is a string so be sure to enclose it in double-quotes.
begin
#Validate a domain name
result = api_instance.domain_check(domain)
p result
rescue CloudmersiveValidateApiClient::ApiError => e
puts "Exception when calling DomainApi->domain_check: #{e}"
end
Documentation for API Endpoints
All URIs are relative to https://api.cloudmersive.com
| Class | Method | HTTP request | Description |
|---|---|---|---|
| CloudmersiveValidateApiClient::DomainApi | domain_check | POST /validate/domain/check | Validate a domain name |
| CloudmersiveValidateApiClient::DomainApi | domain_post | POST /validate/domain/whois | Get WHOIS information for a domain |
| CloudmersiveValidateApiClient::EmailApi | email_address_get_servers | POST /validate/email/address/servers | Partially check whether an email address is valid |
| CloudmersiveValidateApiClient::EmailApi | email_full_validation | POST /validate/email/address/full | Fully validate an email address |
| CloudmersiveValidateApiClient::EmailApi | email_post | POST /validate/email/address/syntaxOnly | Validate email adddress for syntactic correctness only |
| CloudmersiveValidateApiClient::IPAddressApi | i_p_address_post | POST /validate/ip/geolocate | Geolocate an IP address |
| CloudmersiveValidateApiClient::NameApi | name_get_gender | POST /validate/name/get-gender | Get the gender of a first name |
| CloudmersiveValidateApiClient::NameApi | name_validate_first_name | POST /validate/name/first | Validate a first name |
| CloudmersiveValidateApiClient::NameApi | name_validate_full_name | POST /validate/name/full-name | Parse and validate a full name |
| CloudmersiveValidateApiClient::NameApi | name_validate_last_name | POST /validate/name/last | Validate a last name |
| CloudmersiveValidateApiClient::PhoneNumberApi | phone_number_syntax_only | POST /validate/phonenumber/basic | Validate phone number (basic) |
| CloudmersiveValidateApiClient::VatApi | vat_vat_lookup | POST /validate/vat/lookup | Lookup a VAT code |
Documentation for Models
- CloudmersiveValidateApiClient::AddressGetServersResponse
- CloudmersiveValidateApiClient::AddressVerifySyntaxOnlyResponse
- CloudmersiveValidateApiClient::CheckResponse
- CloudmersiveValidateApiClient::FirstNameValidationRequest
- CloudmersiveValidateApiClient::FirstNameValidationResponse
- CloudmersiveValidateApiClient::FullEmailValidationResponse
- CloudmersiveValidateApiClient::FullNameValidationRequest
- CloudmersiveValidateApiClient::FullNameValidationResponse
- CloudmersiveValidateApiClient::GeolocateResponse
- CloudmersiveValidateApiClient::GetGenderRequest
- CloudmersiveValidateApiClient::GetGenderResponse
- CloudmersiveValidateApiClient::LastNameValidationRequest
- CloudmersiveValidateApiClient::LastNameValidationResponse
- CloudmersiveValidateApiClient::PhoneNumberValidateRequest
- CloudmersiveValidateApiClient::PhoneNumberValidationResponse
- CloudmersiveValidateApiClient::VatLookupRequest
- CloudmersiveValidateApiClient::VatLookupResponse
- CloudmersiveValidateApiClient::WhoisResponse
Documentation for Authorization
Apikey
- Type: API key
- API key parameter name: Apikey
- Location: HTTP header