A ruby gem that provides a nice way to interact with Whois.Az
Source: https://github.com/narkoz/whoaz
Before:
After:
Install it via bundler:
gem 'whoaz'
Install it via command line:
gem install whoaz
Requires Ruby 2.0 and above.
Property | Class |
---|---|
organization |
String / Nil |
name |
String / Nil |
address |
String / Nil |
phone |
String / Nil |
fax |
String / Nil |
email |
String / Nil |
nameservers |
Array / Nil |
Method | Class |
---|---|
free? |
Boolean |
registered? |
Boolean |
Example:
:001 > require 'whoaz' # => true :002 > w = Whoaz.whois 'google.az' # => #<Whoaz::Whois:0x000001010a98b0 @organization="Google Inc.", @name="Admin", @address="94043, Mountain View, 1600 Amphitheatre Parkway", @phone="+16503300100", @fax="+16506188571", @email="dns-admin@google.com", @nameservers=["ns1.google.com", "ns2.google.com"]> :003 > w.registered? # => true :004 > w.free? # => false
Usage: whoaz [OPTIONS] DOMAIN
Options:
-h
, --help
- show help message
-v
, --version
- show version
Example:
$ whoaz google.az Whoaz Version 1.0.0 Domain Name: GOOGLE.AZ Name Server: NS1.GOOGLE.COM Name Server: NS2.GOOGLE.COM Registrant: Organization: Google Inc. Name: Admin Address: 94043, Mountain View, 1600 Amphitheatre Parkway Phone: +16503300100 Fax: +16506188571 Email: dns-admin@google.com
Example request: GET
https://whoaz.herokuapp.com/v1/google.az
Returns whois info in JSON format:
{ domain: "google.az", nameservers: [ "ns1.google.com", "ns2.google.com" ], registrant: { organization: "Google Inc.", name: "Admin", address: "94043, Mountain View, 1600 Amphitheatre Parkway", phone: "+16503300100", fax: "+16506188571", email: "dns-admin@google.com" } }