Class: Hunter::Api
- Inherits:
-
Object
- Object
- Hunter::Api
- Defined in:
- lib/hunter/api.rb
Instance Attribute Summary collapse
-
#key ⇒ Object
readonly
Returns the value of attribute key.
Instance Method Summary collapse
- #domain_search(domain, options = nil) ⇒ Object
- #email_count(domain) ⇒ Object
- #email_finder(first_name, last_name, options) ⇒ Object
- #email_verifier(email) ⇒ Object
-
#initialize(key) ⇒ Api
constructor
A new instance of Api.
Constructor Details
#initialize(key) ⇒ Api
Returns a new instance of Api.
14 15 16 |
# File 'lib/hunter/api.rb', line 14 def initialize(key) @key = key end |
Instance Attribute Details
#key ⇒ Object (readonly)
Returns the value of attribute key.
12 13 14 |
# File 'lib/hunter/api.rb', line 12 def key @key end |
Instance Method Details
#domain_search(domain, options = nil) ⇒ Object
18 19 20 |
# File 'lib/hunter/api.rb', line 18 def domain_search(domain, = nil) Hunter::DomainSearch.new(domain, self.key).perform() end |
#email_count(domain) ⇒ Object
22 23 24 |
# File 'lib/hunter/api.rb', line 22 def email_count(domain) Hunter::EmailCount.new(domain).perform end |
#email_finder(first_name, last_name, options) ⇒ Object
26 27 28 |
# File 'lib/hunter/api.rb', line 26 def email_finder(first_name, last_name, ) Hunter::EmailFinder.new(first_name, last_name, self.key).perform(.reject {| key, value | value.nil? }) end |
#email_verifier(email) ⇒ Object
30 31 32 |
# File 'lib/hunter/api.rb', line 30 def email_verifier(email) Hunter::EmailVerifier.new(email, self.key).perform end |