Module: Pipl::Default

Defined in:
lib/pipl/default.rb

Constant Summary collapse

API_ENDPOINT =
'https://api.pipl.com/search/'.freeze
API_KEY =
'sample_key'.freeze
USER_AGENT =
"piplapis/ruby/#{Pipl::VERSION}".freeze

Class Method Summary collapse

Class Method Details

.api_endpointObject



57
58
59
# File 'lib/pipl/default.rb', line 57

def api_endpoint
  ENV.fetch 'PIPL_API_ENDPOINT', API_ENDPOINT
end

.api_keyObject



17
18
19
# File 'lib/pipl/default.rb', line 17

def api_key
  ENV.fetch 'PIPL_API_KEY', API_KEY
end

.hide_sponsoredObject



29
30
31
# File 'lib/pipl/default.rb', line 29

def hide_sponsored
  ENV['PIPL_HIDE_SPONSORED']
end

.infer_personsObject



49
50
51
# File 'lib/pipl/default.rb', line 49

def infer_persons
  ENV['PIPL_INFER_PERSONS']
end

.live_feedsObject



33
34
35
# File 'lib/pipl/default.rb', line 33

def live_feeds
  ENV['PIPL_LIVE_FEEDS']
end

.match_requirementsObject



41
42
43
# File 'lib/pipl/default.rb', line 41

def match_requirements
  ENV['PIPL_MATCH_REQUIREMENTS']
end

.minimum_matchObject



25
26
27
# File 'lib/pipl/default.rb', line 25

def minimum_match
  ENV['PIPL_MINIMUM_MATCH']
end

.minimum_probabilityObject



21
22
23
# File 'lib/pipl/default.rb', line 21

def minimum_probability
  ENV['PIPL_MINIMUM_PROBABILITY']
end

.optionsObject



13
14
15
# File 'lib/pipl/default.rb', line 13

def options
  Hash[Pipl::Configurable.keys.map{|key| [key, send(key)]}]
end

.show_sourcesObject



37
38
39
# File 'lib/pipl/default.rb', line 37

def show_sources
  ENV['PIPL_SHOW_SOURCES']
end

.source_category_requirementsObject



45
46
47
# File 'lib/pipl/default.rb', line 45

def source_category_requirements
  ENV['PIPL_SOURCE_CATEGORY_REQUIREMENTS']
end

.strict_validationObject



53
54
55
# File 'lib/pipl/default.rb', line 53

def strict_validation
  ENV['PIPL_USER_STRICT_VALIDATION']
end

.user_agentObject



61
62
63
# File 'lib/pipl/default.rb', line 61

def user_agent
  ENV.fetch 'PIPL_USER_AGENT', USER_AGENT
end