Class: Cb::Config

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfig

Returns a new instance of Config.



24
25
26
27
# File 'lib/cb/config.rb', line 24

def initialize
  Cb::Utils::Country.inject_convenience_methods
  set_defaults
end

Instance Attribute Details

#base_uriObject

Returns the value of attribute base_uri.



3
4
5
# File 'lib/cb/config.rb', line 3

def base_uri
  @base_uri
end

#debug_apiObject

Returns the value of attribute debug_api.



3
4
5
# File 'lib/cb/config.rb', line 3

def debug_api
  @debug_api
end

#dev_keyObject

Returns the value of attribute dev_key.



3
4
5
# File 'lib/cb/config.rb', line 3

def dev_key
  @dev_key
end

#host_siteObject

Returns the value of attribute host_site.



3
4
5
# File 'lib/cb/config.rb', line 3

def host_site
  @host_site
end

#observersObject

Returns the value of attribute observers.



3
4
5
# File 'lib/cb/config.rb', line 3

def observers
  @observers
end

#test_resourcesObject

Returns the value of attribute test_resources.



3
4
5
# File 'lib/cb/config.rb', line 3

def test_resources
  @test_resources
end

#time_outObject

Returns the value of attribute time_out.



3
4
5
# File 'lib/cb/config.rb', line 3

def time_out
  @time_out
end

#uri_anon_saved_search_createObject

Returns the value of attribute uri_anon_saved_search_create.



3
4
5
# File 'lib/cb/config.rb', line 3

def uri_anon_saved_search_create
  @uri_anon_saved_search_create
end

#uri_anon_saved_search_deleteObject

Returns the value of attribute uri_anon_saved_search_delete.



3
4
5
# File 'lib/cb/config.rb', line 3

def uri_anon_saved_search_delete
  @uri_anon_saved_search_delete
end

#uri_applicationObject

Returns the value of attribute uri_application.



3
4
5
# File 'lib/cb/config.rb', line 3

def uri_application
  @uri_application
end

#uri_application_createObject

Returns the value of attribute uri_application_create.



3
4
5
# File 'lib/cb/config.rb', line 3

def uri_application_create
  @uri_application_create
end

#uri_application_externalObject

Returns the value of attribute uri_application_external.



3
4
5
# File 'lib/cb/config.rb', line 3

def uri_application_external
  @uri_application_external
end

#uri_application_formObject

Returns the value of attribute uri_application_form.



3
4
5
# File 'lib/cb/config.rb', line 3

def uri_application_form
  @uri_application_form
end

#uri_application_registeredObject

Returns the value of attribute uri_application_registered.



3
4
5
# File 'lib/cb/config.rb', line 3

def uri_application_registered
  @uri_application_registered
end

#uri_application_submitObject

Returns the value of attribute uri_application_submit.



3
4
5
# File 'lib/cb/config.rb', line 3

def uri_application_submit
  @uri_application_submit
end

#uri_company_findObject

Returns the value of attribute uri_company_find.



3
4
5
# File 'lib/cb/config.rb', line 3

def uri_company_find
  @uri_company_find
end

#uri_education_codeObject

Returns the value of attribute uri_education_code.



3
4
5
# File 'lib/cb/config.rb', line 3

def uri_education_code
  @uri_education_code
end

#uri_employee_typesObject

Returns the value of attribute uri_employee_types.



3
4
5
# File 'lib/cb/config.rb', line 3

def uri_employee_types
  @uri_employee_types
end

#uri_job_brandingObject

Returns the value of attribute uri_job_branding.



3
4
5
# File 'lib/cb/config.rb', line 3

def uri_job_branding
  @uri_job_branding
end

#uri_job_category_searchObject

Returns the value of attribute uri_job_category_search.



3
4
5
# File 'lib/cb/config.rb', line 3

def uri_job_category_search
  @uri_job_category_search
end

#uri_job_findObject

Returns the value of attribute uri_job_find.



3
4
5
# File 'lib/cb/config.rb', line 3

def uri_job_find
  @uri_job_find
end

#uri_job_industry_searchObject

Returns the value of attribute uri_job_industry_search.



3
4
5
# File 'lib/cb/config.rb', line 3

def uri_job_industry_search
  @uri_job_industry_search
end

#uri_job_searchObject

Returns the value of attribute uri_job_search.



3
4
5
# File 'lib/cb/config.rb', line 3

def uri_job_search
  @uri_job_search
end

#uri_recommendation_for_companyObject

Returns the value of attribute uri_recommendation_for_company.



3
4
5
# File 'lib/cb/config.rb', line 3

def uri_recommendation_for_company
  @uri_recommendation_for_company
end

#uri_recommendation_for_jobObject

Returns the value of attribute uri_recommendation_for_job.



3
4
5
# File 'lib/cb/config.rb', line 3

def uri_recommendation_for_job
  @uri_recommendation_for_job
end

#uri_recommendation_for_userObject

Returns the value of attribute uri_recommendation_for_user.



3
4
5
# File 'lib/cb/config.rb', line 3

def uri_recommendation_for_user
  @uri_recommendation_for_user
end

#uri_resume_createObject

Returns the value of attribute uri_resume_create.



3
4
5
# File 'lib/cb/config.rb', line 3

def uri_resume_create
  @uri_resume_create
end

#uri_resume_deleteObject

Returns the value of attribute uri_resume_delete.



3
4
5
# File 'lib/cb/config.rb', line 3

def uri_resume_delete
  @uri_resume_delete
end

#uri_resume_own_allObject

Returns the value of attribute uri_resume_own_all.



3
4
5
# File 'lib/cb/config.rb', line 3

def uri_resume_own_all
  @uri_resume_own_all
end

#uri_resume_retrieveObject

Returns the value of attribute uri_resume_retrieve.



3
4
5
# File 'lib/cb/config.rb', line 3

def uri_resume_retrieve
  @uri_resume_retrieve
end

#uri_resume_updateObject

Returns the value of attribute uri_resume_update.



3
4
5
# File 'lib/cb/config.rb', line 3

def uri_resume_update
  @uri_resume_update
end

#uri_saved_job_search_createObject

Returns the value of attribute uri_saved_job_search_create.



3
4
5
# File 'lib/cb/config.rb', line 3

def uri_saved_job_search_create
  @uri_saved_job_search_create
end

#uri_saved_search_createObject

Returns the value of attribute uri_saved_search_create.



3
4
5
# File 'lib/cb/config.rb', line 3

def uri_saved_search_create
  @uri_saved_search_create
end

#uri_saved_search_deleteObject

Returns the value of attribute uri_saved_search_delete.



3
4
5
# File 'lib/cb/config.rb', line 3

def uri_saved_search_delete
  @uri_saved_search_delete
end

#uri_saved_search_listObject

Returns the value of attribute uri_saved_search_list.



3
4
5
# File 'lib/cb/config.rb', line 3

def uri_saved_search_list
  @uri_saved_search_list
end

#uri_saved_search_retrieveObject

Returns the value of attribute uri_saved_search_retrieve.



3
4
5
# File 'lib/cb/config.rb', line 3

def uri_saved_search_retrieve
  @uri_saved_search_retrieve
end

#uri_saved_search_updateObject

Returns the value of attribute uri_saved_search_update.



3
4
5
# File 'lib/cb/config.rb', line 3

def uri_saved_search_update
  @uri_saved_search_update
end

#uri_spot_retrieveObject

Returns the value of attribute uri_spot_retrieve.



3
4
5
# File 'lib/cb/config.rb', line 3

def uri_spot_retrieve
  @uri_spot_retrieve
end

#uri_subscription_modifyObject

Returns the value of attribute uri_subscription_modify.



3
4
5
# File 'lib/cb/config.rb', line 3

def uri_subscription_modify
  @uri_subscription_modify
end

#uri_subscription_retrieveObject

Returns the value of attribute uri_subscription_retrieve.



3
4
5
# File 'lib/cb/config.rb', line 3

def uri_subscription_retrieve
  @uri_subscription_retrieve
end

#uri_tn_job_infoObject

Returns the value of attribute uri_tn_job_info.



3
4
5
# File 'lib/cb/config.rb', line 3

def uri_tn_job_info
  @uri_tn_job_info
end

#uri_tn_join_form_brandingObject

Returns the value of attribute uri_tn_join_form_branding.



3
4
5
# File 'lib/cb/config.rb', line 3

def uri_tn_join_form_branding
  @uri_tn_join_form_branding
end

#uri_tn_join_form_geoObject

Returns the value of attribute uri_tn_join_form_geo.



3
4
5
# File 'lib/cb/config.rb', line 3

def uri_tn_join_form_geo
  @uri_tn_join_form_geo
end

#uri_tn_join_questionsObject

Returns the value of attribute uri_tn_join_questions.



3
4
5
# File 'lib/cb/config.rb', line 3

def uri_tn_join_questions
  @uri_tn_join_questions
end

#uri_tn_member_createObject

Returns the value of attribute uri_tn_member_create.



3
4
5
# File 'lib/cb/config.rb', line 3

def uri_tn_member_create
  @uri_tn_member_create
end

#uri_user_change_passwordObject

Returns the value of attribute uri_user_change_password.



3
4
5
# File 'lib/cb/config.rb', line 3

def uri_user_change_password
  @uri_user_change_password
end

#uri_user_check_existingObject

Returns the value of attribute uri_user_check_existing.



3
4
5
# File 'lib/cb/config.rb', line 3

def uri_user_check_existing
  @uri_user_check_existing
end

#uri_user_deleteObject

Returns the value of attribute uri_user_delete.



3
4
5
# File 'lib/cb/config.rb', line 3

def uri_user_delete
  @uri_user_delete
end

#uri_user_retrieveObject

Returns the value of attribute uri_user_retrieve.



3
4
5
# File 'lib/cb/config.rb', line 3

def uri_user_retrieve
  @uri_user_retrieve
end

#uri_user_temp_passwordObject

Returns the value of attribute uri_user_temp_password.



3
4
5
# File 'lib/cb/config.rb', line 3

def uri_user_temp_password
  @uri_user_temp_password
end

#use_jsonObject

Returns the value of attribute use_json.



3
4
5
# File 'lib/cb/config.rb', line 3

def use_json
  @use_json
end

Instance Method Details

#set_base_uri(uri) ⇒ Object



118
119
120
# File 'lib/cb/config.rb', line 118

def set_base_uri (uri)
  @base_uri = uri
end

#set_default_api_urisObject



29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
# File 'lib/cb/config.rb', line 29

def set_default_api_uris
  @uri_job_category_search            ||= '/v1/categories'
  @uri_job_industry_search            ||= '/v1/industrycodes'
  @uri_employee_types                 ||= '/v1/employeetypes'
  @uri_company_find                   ||= '/Employer/CompanyDetails'
  @uri_job_search                     ||= '/v1/JobSearch'
  @uri_job_find                       ||= '/v3/Job'
  @uri_education_code                 ||= '/v1/EducationCodes'
  @uri_recommendation_for_job         ||= '/v1/Recommendations/ForJob'
  @uri_recommendation_for_user        ||= '/v1/Recommendations/ForUser'
  @uri_recommendation_for_company     ||= '/Employer/JobRecommendation'
  @uri_application                    ||= '/cbapi/application/:did'
  @uri_application_create             ||= '/cbapi/application/'
  @uri_application_submit             ||= '/v1/Application/submit'
  @uri_application_registered         ||= '/v3/application/registered'
  @uri_application_external           ||= '/v1/application/external'
  @uri_application_form               ||= '/cbapi/job/:did/applicationform'
  @uri_user_change_password           ||= '/v2/User/ChangePW'
  @uri_user_delete                    ||= '/v2/User/delete'
  @uri_user_retrieve                  ||= '/v2/user/retrieve'
  @uri_user_check_existing            ||= '/v2/user/checkexisting'
  @uri_user_temp_password             ||= '/v1/user/temporarypassword'
  @uri_job_branding                   ||= '/branding'
  @uri_resume_own_all                 ||= '/v2/resume/ownall'
  @uri_resume_retrieve                ||= '/v2/resume/retrieve'
  @uri_resume_create                  ||= '/v2/resume/create'
  @uri_resume_update                  ||= '/v2/resume/update'
  @uri_resume_delete                  ||= '/v2/resume/delete'
  @uri_saved_search_retrieve          ||= '/cbapi/savedsearches/:did'
  @uri_saved_search_create            ||= '/v2/savedsearch/create'
  @uri_saved_search_update            ||= '/cbapi/SavedSearches'
  @uri_saved_search_delete            ||= '/cbapi/savedsearches/:did'
  @uri_saved_search_list              ||= '/cbapi/savedsearches'
  @uri_anon_saved_search_create       ||= '/v1/anonymoussavedjobsearch/create'
  @uri_anon_saved_search_delete       ||= '/v1/anonymoussavedjobsearch/delete'
  @uri_tn_join_questions              ||= '/talentnetwork/config/join/questions'
  @uri_tn_job_info                    ||= '/talentnetwork/internal/job'
  @uri_tn_join_form_geo               ||= '/tn/JoinForm/Geo'
  @uri_tn_join_form_branding          ||= '/talentnetwork/config/layout/branding'
  @uri_tn_member_create               ||= '/talentnetwork/member/create'
  @uri_subscription_retrieve          ||= '/v1/user/subscription/retrieve'
  @uri_subscription_modify            ||= '/v1/user/subscription'
  @uri_saved_job_search_create        ||= '/v2/savedsearch/create'
  @uri_spot_retrieve                  ||= '/v2/spot/load'
end

#to_hashObject



75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
# File 'lib/cb/config.rb', line 75

def to_hash
  {
    :uri_job_category_search          => @uri_job_category_search,
    :uri_job_industry_search          => @uri_job_industry_search,
    :uri_employee_types               => @uri_employee_types,
    :dev_key                          => @dev_key,
    :host_site                        => @host_site,
    :time_out                         => @time_out,
    :use_json                         => @use_json,
    :uri_job_search                   => @uri_job_search,
    :uri_job_find                     => @uri_job_find,
    :uri_company_find                 => @uri_company_find,
    :uri_education_code               => @uri_education_code,
    :uri_recommendation_for_job       => @uri_recommendation_for_job,
    :uri_recommendation_for_user      => @uri_recommendation_for_user,
    :uri_recommendation_for_company   => @uri_recommendation_for_company,
    :uri_application                  => @uri_application,
    :uri_application_submit           => @uri_application_submit,
    :uri_application_registered       => @uri_application_registered,
    :uri_application_external         => @uri_application_external,
    :uri_user_change_password         => @uri_user_change_password,
    :uri_user_retrieve                => @uri_user_retrieve,
    :uri_user_check_existing          => @uri_user_check_existing,
    :uri_job_branding                 => @uri_job_branding,
    :uri_resume_own_all               => @uri_resume_own_all,
    :uri_resume_retrieve              => @uri_resume_retrieve,
    :uri_resume_create                => @uri_resume_create,
    :uri_resume_update                => @uri_resume_update,
    :uri_resume_delete                => @uri_resume_delete,
    :uri_saved_search_retrieve        => @uri_saved_search_retrieve,
    :uri_saved_search_create          => @uri_saved_search_create,
    :uri_saved_search_update          => @uri_saved_search_update,
    :uri_saved_search_delete          => @uri_saved_search_delete,
    :uri_saved_search_list            => @uri_saved_search_list,
    :uri_anon_saved_search_create     => @uri_anon_saved_search_create,
    :uri_tn_join_questions            => @uri_tn_join_questions,
    :uri_subscription_retrieve        => @uri_subscription_retrieve,
    :uri_subscription_modify          => @uri_subscription_modify,
    :uri_saved_job_search_create      => @uri_saved_job_search_create,
    :uri_spot_retrieve                => @uri_spot_retrieve
  }
end