Class: CareerBuilder::Client

Inherits:
Object
  • Object
show all
Defined in:
lib/career_builder/client.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(email, password) ⇒ Client

Returns a new instance of Client.



7
8
9
# File 'lib/career_builder/client.rb', line 7

def initialize(email, password)
  @email, @password = email, password
end

Instance Attribute Details

#emailObject (readonly)

Returns the value of attribute email.



5
6
7
# File 'lib/career_builder/client.rb', line 5

def email
  @email
end

#passwordObject (readonly)

Returns the value of attribute password.



5
6
7
# File 'lib/career_builder/client.rb', line 5

def password
  @password
end

#session_tokenObject (readonly)

Returns the value of attribute session_token.



5
6
7
# File 'lib/career_builder/client.rb', line 5

def session_token
  @session_token
end

Instance Method Details

#advanced_resume_search(options = {}) ⇒ Object



23
24
25
# File 'lib/career_builder/client.rb', line 23

def advanced_resume_search(options = {})
  Requests::AdvancedResumeSearch.new(self, options).perform
end

#authenticateObject



11
12
13
# File 'lib/career_builder/client.rb', line 11

def authenticate
  @session_token = Requests::Authentication.new(self, :email => email, :password => password).perform
end

#authenticated?Boolean

Returns:

  • (Boolean)


15
16
17
# File 'lib/career_builder/client.rb', line 15

def authenticated?
  !session_token.nil?
end

#get_resume(options = {}) ⇒ Object



27
28
29
# File 'lib/career_builder/client.rb', line 27

def get_resume(options = {})
  Requests::GetResume.new(self, options).perform
end

#resume_actions_remaining_today(options = {}) ⇒ Object



31
32
33
# File 'lib/career_builder/client.rb', line 31

def resume_actions_remaining_today(options = {})
  Requests::ResumeActionsRemainingToday.new(self, options).perform
end

#resumes(options = {}) ⇒ Object



19
20
21
# File 'lib/career_builder/client.rb', line 19

def resumes(options = {})
  Resume::LazyCollection.new(self, options)
end