Module: WhoisXMLAPI
- Defined in:
- lib/whoisxmlapi.rb,
lib/whoisxmlapi/good.rb,
lib/whoisxmlapi/client.rb,
lib/whoisxmlapi/result.rb,
lib/whoisxmlapi/contact.rb,
lib/whoisxmlapi/version.rb,
lib/whoisxmlapi/bad_domain.rb,
lib/whoisxmlapi/un_parsable.rb,
lib/whoisxmlapi/unavailable.rb,
lib/whoisxmlapi/rwhois_result.rb
Defined Under Namespace
Classes: BadDomain, Client, Contact, Good, RWhoisResult, Result, UnParsable, Unavailable
Constant Summary
collapse
- VERSION =
"0.2.2"
Class Method Summary
collapse
Class Method Details
.account_path ⇒ Object
35
36
37
|
# File 'lib/whoisxmlapi.rb', line 35
def self.account_path
@account_path ? @account_path : "https://user.whoisxmlapi.com/service/account-balance"
end
|
.account_path=(path) ⇒ Object
31
32
33
|
# File 'lib/whoisxmlapi.rb', line 31
def self.account_path=(path)
@account_path = path
end
|
.api_key ⇒ Object
40
41
42
|
# File 'lib/whoisxmlapi.rb', line 40
def self.api_key
@api_key
end
|
.api_key=(key) ⇒ Object
44
45
46
|
# File 'lib/whoisxmlapi.rb', line 44
def self.api_key=(key)
@api_key = key
end
|
.cache ⇒ Object
62
63
64
|
# File 'lib/whoisxmlapi.rb', line 62
def self.cache
@cache.nil? or @cache.blank? ? true : @cache
end
|
.cache=(bool) ⇒ Object
58
59
60
|
# File 'lib/whoisxmlapi.rb', line 58
def self.cache=(bool)
@cache = bool
end
|
.cache_length ⇒ Object
53
54
55
|
# File 'lib/whoisxmlapi.rb', line 53
def self.cache_length
@cache_length
end
|
.cache_length=(leng) ⇒ Object
49
50
51
|
# File 'lib/whoisxmlapi.rb', line 49
def self.cache_length=(leng)
@cache_length = leng
end
|
.callbacks ⇒ Object
76
77
78
79
80
81
|
# File 'lib/whoisxmlapi.rb', line 76
def self.callbacks
@callbacks ||= {}
@callbacks[:whois] ||= []
@callbacks[:rwhois] ||= []
@callbacks
end
|
94
95
96
|
# File 'lib/whoisxmlapi.rb', line 94
def self.configure
yield self
end
|
.logger ⇒ Object
84
85
86
87
|
# File 'lib/whoisxmlapi.rb', line 84
def self.logger
@logger ||= Logger.new(STDOUT)
@logger
end
|
.logger=(log) ⇒ Object
89
90
91
|
# File 'lib/whoisxmlapi.rb', line 89
def self.logger=(log)
@logger = log
end
|
.rwhois_mode ⇒ Object
71
72
73
|
# File 'lib/whoisxmlapi.rb', line 71
def self.rwhois_mode
@rwhois_mode ? @rwhois_mode : 'sample_purchase'
end
|
.rwhois_mode=(mode) ⇒ Object
67
68
69
|
# File 'lib/whoisxmlapi.rb', line 67
def self.rwhois_mode=(mode)
@rwhois_mode = mode
end
|
.rwhois_path ⇒ Object
26
27
28
|
# File 'lib/whoisxmlapi.rb', line 26
def self.rwhois_path
@rwhois_path ? @rwhois_path : "https://reverse-whois-api.whoisxmlapi.com/api/v2"
end
|
.rwhois_path=(path) ⇒ Object
22
23
24
|
# File 'lib/whoisxmlapi.rb', line 22
def self.rwhois_path=(path)
@rwhois_path = path
end
|
.whois_path ⇒ Object
17
18
19
|
# File 'lib/whoisxmlapi.rb', line 17
def self.whois_path
@whois_path ? @whois_path : "https://www.whoisxmlapi.com/whoisserver/WhoisService"
end
|
.whois_path=(path) ⇒ Object
13
14
15
|
# File 'lib/whoisxmlapi.rb', line 13
def self.whois_path=(path)
@whois_path = path
end
|