Domain Expiration API - Ruby Gem
Domain Expiration Checker is a simple tool for checking the expiration date and age of a domain. It returns the expiration date and age of the domain provided.
Installation
Add this line to your application's Gemfile:
gem 'apiverve_domainexpiration'
And then execute:
$ bundle install
Or install it yourself as:
$ gem install apiverve_domainexpiration
Getting Started
Get your API key at APIVerve
Basic Usage
require 'apiverve_domainexpiration'
# Initialize the client
client = APIVerve::Domainexpiration::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::Domainexpiration::ValidationError => e
puts "Validation error: #{e.errors.join(', ')}"
rescue APIVerve::Domainexpiration::APIError => e
puts "API error: #{e.}"
puts "Status code: #{e.status_code}"
end
Debug Mode
# Enable debug logging
client = APIVerve::Domainexpiration::Client.new(
api_key: "YOUR_API_KEY",
debug: true
)
Example Response
{
"status": "ok",
"error": null,
"data": {
"domain": "myspace.com",
"expirationDate": "2029-02-23T05:00:00Z",
"daysToExpiration": 1164,
"expirationStatus": "healthy",
"createdDate": "1996-02-22T05:00:00Z",
"lastUpdatedDate": "2023-01-17T00:16:21Z",
"daysSinceLastUpdate": 1064,
"domainAgeDays": 10890,
"domainAgeYears": 29.8
}
}
Documentation
For more information, visit the API Documentation.
Support
- Website: https://domainexpiration.apiverve.com?utm_source=ruby&utm_medium=readme
- Email: hello@apiverve.com
License
This gem is available under the MIT License.