Module: Snov

Defined in:
lib/snov.rb,
lib/snov/client.rb,
lib/snov/version.rb,
lib/snov/fake_client.rb,
lib/snov/domain_search.rb,
lib/snov/get_user_lists.rb,
lib/snov/get_prospect_list.rb,
lib/snov/types/date_details.rb,
lib/snov/get_emails_from_name.rb,
lib/snov/get_profile_by_email.rb,
lib/snov/get_prospects_by_email.rb,
lib/snov/add_names_to_find_emails.rb,
lib/snov/get_emails_by_social_url.rb,
lib/snov/get_all_prospects_from_list.rb

Defined Under Namespace

Modules: Types Classes: AddNamesToFindEmails, Client, DomainSearch, Error, FakeClient, GetAllProspectsFromList, GetEmailsBySocialUrl, GetEmailsFromName, GetProfileByEmail, GetProspectList, GetProspectsByEmail, GetUserLists

Constant Summary collapse

VERSION =
"0.6.5"

Class Method Summary collapse

Class Method Details

.clientObject



6
7
8
9
10
11
12
# File 'lib/snov.rb', line 6

def self.client
  if !use_fake?
    Client.new(client_id: ENV['SNOV_USER_ID'], client_secret: ENV['SNOV_SECRET'])
  else
    FakeClient.new
  end
end

.use_fake?Boolean

Returns:

  • (Boolean)


14
15
16
# File 'lib/snov.rb', line 14

def self.use_fake?
  ENV['SNOV_USE_FAKE'].present? || (!ENV.key?('SNOV_USER_ID') && !ENV.key?('SNOV_SECRET'))
end