Module: Domaintally
- Includes:
- HTTParty
- Defined in:
- lib/domaintally/whois.rb,
lib/domaintally/version.rb
Constant Summary collapse
- VERSION =
'0.0.1'
Class Attribute Summary collapse
-
.api_access_token ⇒ Object
Returns the value of attribute api_access_token.
Class Method Summary collapse
Class Attribute Details
.api_access_token ⇒ Object
Returns the value of attribute api_access_token.
4 5 6 |
# File 'lib/domaintally/whois.rb', line 4 def api_access_token @api_access_token end |
Class Method Details
.whois(domain) ⇒ Object
11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
# File 'lib/domaintally/whois.rb', line 11 def self.whois(domain) params = { :access_token => api_access_token, :domain => domain } body = get('/whois/', :query => params).parsed_response if body['meta']['code'] == 200 body else raise ArgumentError, body['meta']['errorDetail'] end end |