class Recruitee::Client
The Recruitee
API
client class that acts as a container for basic client authentication.
Attributes
api_token[RW]
company_id[RW]
http_client[RW]
Public Class Methods
new(company_id, api_token, options = {})
click to toggle source
# File lib/recruitee/client.rb, line 13 def initialize(company_id, api_token, options = {}) @company_id = company_id @api_token = api_token @http_client = HTTP::Client.new(self, options) validate! end
Public Instance Methods
admins()
click to toggle source
# File lib/recruitee/client.rb, line 21 def admins @_admins ||= API::Admins.new(self) end
candidates()
click to toggle source
# File lib/recruitee/client.rb, line 25 def candidates @_candidates ||= API::Candidates.new(self) end
interview_events()
click to toggle source
# File lib/recruitee/client.rb, line 29 def interview_events @_interview_events ||= API::InterviewEvents.new(self) end
interview_results()
click to toggle source
# File lib/recruitee/client.rb, line 33 def interview_results @_interview_results ||= API::InterviewResults.new(self) end
Also aliased as: evaluations
offers()
click to toggle source
# File lib/recruitee/client.rb, line 38 def offers @_offers ||= API::Offers.new(self) end
placements()
click to toggle source
# File lib/recruitee/client.rb, line 42 def placements @_placements ||= API::Placements.new(self) end
Private Instance Methods
validate!()
click to toggle source
# File lib/recruitee/client.rb, line 48 def validate! [:company_id, :api_token].each do |name| unless send(name) raise ArgumentError, "Error! Missing required #{name}." end end end