Class: WhoisXMLAPI2::Request::V1

Inherits:
Object
  • Object
show all
Defined in:
lib/whoisxmlapi2/request.rb

Class Method Summary collapse

Class Method Details

.go(domain) ⇒ Object



32
33
34
35
36
37
38
39
# File 'lib/whoisxmlapi2/request.rb', line 32

def go(domain)
  return WhoisXMLAPI2::Request.send(:fixture_value) if config.mock_out_for_testing

  timestamp = (Time.now.to_f * 1000).to_i
  digest = generate_digest(timestamp)

  JSON.parse(open(config.url + params(digest, domain, timestamp)).read)
end