Domain Availability API - Ruby Gem
Domain Availability Checker is a simple tool for checking the availability of a domain. It returns if the domain is available or not.
Installation
Add this line to your application's Gemfile:
gem 'apiverve_domainavailability'
And then execute:
$ bundle install
Or install it yourself as:
$ gem install apiverve_domainavailability
Getting Started
Get your API key at APIVerve
Basic Usage
require 'apiverve_domainavailability'
# Initialize the client
client = APIVerve::Domainavailability::Client.new(api_key: "YOUR_API_KEY")
# Make a request
response = client.execute({ domain: "myspace.com" })
# Print the response
puts response
Error Handling
begin
response = client.execute({ domain: "myspace.com" })
puts response["data"]
rescue APIVerve::Domainavailability::ValidationError => e
puts "Validation error: #{e.errors.join(', ')}"
rescue APIVerve::Domainavailability::APIError => e
puts "API error: #{e.}"
puts "Status code: #{e.status_code}"
end
Debug Mode
# Enable debug logging
client = APIVerve::Domainavailability::Client.new(
api_key: "YOUR_API_KEY",
debug: true
)
Example Response
{
"status": "ok",
"error": null,
"data": {
"domain": "myspace.com",
"available": false,
"owner": {
"registrar": "GoDaddy.com, LLC"
}
}
}
Documentation
For more information, visit the API Documentation.
Support
- Website: https://domainavailability.apiverve.com?utm_source=ruby&utm_medium=readme
- Email: hello@apiverve.com
License
This gem is available under the MIT License.