class Snov::DomainSearch
Constants
- Response
Attributes
client[R]
domain[R]
limit[R]
type[R]
Public Class Methods
new(domain:, type: 'all', limit: 10, last_id: 0, client: Snov.client)
click to toggle source
# File lib/snov/domain_search.rb, line 14 def initialize(domain:, type: 'all', limit: 10, last_id: 0, client: Snov.client) @client = client @domain = domain @type = type @limit = limit @last_id = last_id end
Public Instance Methods
company_name()
click to toggle source
# File lib/snov/domain_search.rb, line 42 def company_name raw_result.company_name end
each(&block)
click to toggle source
# File lib/snov/domain_search.rb, line 22 def each(&block) emails.each(&block) end
emails()
click to toggle source
# File lib/snov/domain_search.rb, line 46 def emails raw_result.emails end
last_id()
click to toggle source
# File lib/snov/domain_search.rb, line 38 def last_id raw_result.last_id end
raw_result()
click to toggle source
# File lib/snov/domain_search.rb, line 50 def raw_result @raw_result ||= Response.new(client.get("/v2/domain-emails-with-info", 'lastId' => @last_id, 'limit' => @limit, 'type' => type.to_s, 'domain' => domain.to_s)) end
result()
click to toggle source
# File lib/snov/domain_search.rb, line 34 def result raw_result.result end
success()
click to toggle source
# File lib/snov/domain_search.rb, line 26 def success raw_result.success end
to_h()
click to toggle source
# File lib/snov/domain_search.rb, line 58 def to_h raw_result.to_h end
webmail()
click to toggle source
# File lib/snov/domain_search.rb, line 30 def webmail raw_result.webmail end