Module: Pipl::Default

Defined in:
lib/pipl/default.rb

Constant Summary collapse

API_ENDPOINT =

API_ENDPOINT = 'https://api.pipl.com/search/'.freeze

'https://qa-api.pipl.pro/apis/gateway/search/'.freeze
USER_AGENT =
"piplapis/ruby/#{Pipl::VERSION}".freeze

Class Method Summary collapse

Class Method Details

.api_endpoint ⇒ Object



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

def api_endpoint
  ENV.fetch 'PIPL_API_ENDPOINT', API_ENDPOINT
end

.api_key ⇒ Object



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

def api_key
  ENV['PIPL_API_KEY']
end

.hide_sponsored ⇒ Object



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

def hide_sponsored
  ENV['PIPL_HIDE_SPONSORED']
end

.infer_persons ⇒ Object



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

def infer_persons
  ENV['PIPL_INFER_PERSONS']
end

.live_feeds ⇒ Object



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

def live_feeds
  ENV['PIPL_LIVE_FEEDS']
end

.match_requirements ⇒ Object



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

def match_requirements
  ENV['PIPL_MATCH_REQUIREMENTS']
end

.minimum_match ⇒ Object



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

def minimum_match
  ENV['PIPL_MINIMUM_MATCH']
end

.minimum_probability ⇒ Object



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

def minimum_probability
  ENV['PIPL_MINIMUM_PROBABILITY']
end

.options ⇒ Object



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

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

.show_sources ⇒ Object



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

def show_sources
  ENV['PIPL_SHOW_SOURCES']
end

.source_category_requirements ⇒ Object



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

def source_category_requirements
  ENV['PIPL_SOURCE_CATEGORY_REQUIREMENTS']
end

.strict_validation ⇒ Object



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

def strict_validation
  ENV['PIPL_USER_STRICT_VALIDATION']
end

.top_match ⇒ Object



65
66
67
# File 'lib/pipl/default.rb', line 65

def top_match
  ENV['PIPL_TOP_MATCH']
end

.user_agent ⇒ Object



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

def user_agent
  ENV.fetch 'PIPL_USER_AGENT', USER_AGENT
end