Class: Cb::Clients::TalentNetwork

Inherits:
Object
  • Object
show all
Defined in:
lib/cb/clients/talent_network.rb

Class Method Summary collapse

Class Method Details

.join_form_branding(tndid) ⇒ Object



12
13
14
15
16
17
18
19
20
21
# File 'lib/cb/clients/talent_network.rb', line 12

def self.join_form_branding(tndid)
  my_api = Cb::Utils::Api.instance
  json_hash = my_api.cb_get("#{Cb.configuration.uri_tn_join_form_branding}/#{tndid}/json")

  if json_hash.has_key? 'Branding'
    tn_join_form_branding = Models::TalentNetwork::JoinFormBranding.new(json_hash['Branding'])
  end

  my_api.append_api_responses(tn_join_form_branding, json_hash)
end

.join_form_geography(tnlanguage = "USEnglish") ⇒ Object



23
24
25
26
27
28
# File 'lib/cb/clients/talent_network.rb', line 23

def self.join_form_geography(tnlanguage="USEnglish")
  my_api = Cb::Utils::Api.instance
  json_hash = my_api.cb_get("#{Cb.configuration.uri_tn_join_form_geo}", :query => {:TNLanguage => "#{tnlanguage}"})
  geo_dropdown = Models::TalentNetwork::JoinFormGeo.new(json_hash)
  my_api.append_api_responses(geo_dropdown, json_hash)
end

.join_form_questions(tndid) ⇒ Object



5
6
7
8
9
10
# File 'lib/cb/clients/talent_network.rb', line 5

def self.join_form_questions(tndid)
  my_api = Cb::Utils::Api.instance
  json_hash = my_api.cb_get("#{Cb.configuration.uri_tn_join_questions}/#{tndid}/json")
  tn_questions_collection = Models::TalentNetwork.new(json_hash)
  my_api.append_api_responses(tn_questions_collection, json_hash)
end

.member_create(args = {}) ⇒ Object



30
31
32
33
34
35
# File 'lib/cb/clients/talent_network.rb', line 30

def self.member_create(args={})
  my_api = Cb::Utils::Api.instance
  tn_member = Models::TalentNetwork::Member.new(args)
  json_hash = my_api.cb_post("#{Cb.configuration.uri_tn_member_create}/json", :body => tn_member.to_xml )
  my_api.append_api_responses(json_hash, json_hash)
end

.tn_job_information(job_did, join_form_intercept = "true") ⇒ Object



37
38
39
40
41
42
43
44
45
46
47
# File 'lib/cb/clients/talent_network.rb', line 37

def self.tn_job_information(job_did, join_form_intercept="true")
  my_api = Cb::Utils::Api.instance
  json_hash = my_api.cb_get("#{Cb.configuration.uri_tn_job_info}/#{job_did}/json", :query=> {
     :RequestJoinFormIntercept => join_form_intercept})

  if json_hash.has_key? 'Response'
    tn_job_info = Models::TalentNetwork::JobInfo.new(json_hash['Response'])
  end

  my_api.append_api_responses(tn_job_info, json_hash)
end