class TalentIQ

Constants

API_BASE

documentation under:

http://docs.talentiq.co

https://api.talentiq.co/v3/person?api_key=YOUR-API-KEY&name=larry+page&email=larry.page%40google.com&required=emails.address
VERSION

Attributes

api_key[R]

Public Class Methods

new(api_key: ) click to toggle source
# File lib/talentiq.rb, line 15
def initialize(api_key: )
  @api_key = api_key
end

Public Instance Methods

call(params) click to toggle source
# File lib/talentiq.rb, line 19
def call(params)
  uri = URI.parse(url_for(params))

  response = Net::HTTP.get_response(uri)
  JSON.parse(response.body)
end

Private Instance Methods

default_params() click to toggle source
# File lib/talentiq.rb, line 30
def default_params
  { api_key: api_key }
end
person_path() click to toggle source
# File lib/talentiq.rb, line 34
def person_path
  "#{API_BASE}/person"
end
url_for(params) click to toggle source
# File lib/talentiq.rb, line 38
def url_for(params)
  [
    person_path,
    URI.encode_www_form(default_params.merge(params))
  ].join('?')
end