Module: Domainr
- Extended by:
- Domainr
- Includes:
- HTTParty
- Included in:
- Domainr
- Defined in:
- lib/domainr.rb,
lib/domainr/version.rb
Constant Summary collapse
- VERSION =
'0.3.0'
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.client_id ⇒ Object
15 16 17 |
# File 'lib/domainr.rb', line 15 def self.client_id @client_id || 'domainr_rubygem' end |
.client_id=(id) ⇒ Object
11 12 13 |
# File 'lib/domainr.rb', line 11 def self.client_id=(id) @client_id = id end |
Instance Method Details
#info(domain) ⇒ Object
24 25 26 27 |
# File 'lib/domainr.rb', line 24 def info(domain) = { :q => domain, :client_id => client_id } Hashie::Mash.new(get('/v1/info', { :query => })) end |
#search(term) ⇒ Object
19 20 21 22 |
# File 'lib/domainr.rb', line 19 def search(term) = { :q => term, :client_id => client_id } Hashie::Mash.new(get('/v1/search', { :query => })) end |