Class: Cb::Config
- Inherits:
-
Object
- Object
- Cb::Config
- Defined in:
- lib/cb/config.rb
Instance Attribute Summary collapse
-
#base_uri ⇒ Object
Returns the value of attribute base_uri.
-
#debug_api ⇒ Object
Returns the value of attribute debug_api.
-
#dev_key ⇒ Object
Returns the value of attribute dev_key.
-
#host_site ⇒ Object
Returns the value of attribute host_site.
-
#test_resources ⇒ Object
Returns the value of attribute test_resources.
-
#time_out ⇒ Object
Returns the value of attribute time_out.
-
#uri_anon_saved_search_create ⇒ Object
Returns the value of attribute uri_anon_saved_search_create.
-
#uri_anon_saved_search_delete ⇒ Object
Returns the value of attribute uri_anon_saved_search_delete.
-
#uri_application ⇒ Object
Returns the value of attribute uri_application.
-
#uri_application_external ⇒ Object
Returns the value of attribute uri_application_external.
-
#uri_application_registered ⇒ Object
Returns the value of attribute uri_application_registered.
-
#uri_application_submit ⇒ Object
Returns the value of attribute uri_application_submit.
-
#uri_company_find ⇒ Object
Returns the value of attribute uri_company_find.
-
#uri_education_code ⇒ Object
Returns the value of attribute uri_education_code.
-
#uri_employee_types ⇒ Object
Returns the value of attribute uri_employee_types.
-
#uri_job_branding ⇒ Object
Returns the value of attribute uri_job_branding.
-
#uri_job_category_search ⇒ Object
Returns the value of attribute uri_job_category_search.
-
#uri_job_find ⇒ Object
Returns the value of attribute uri_job_find.
-
#uri_job_search ⇒ Object
Returns the value of attribute uri_job_search.
-
#uri_recommendation_for_company ⇒ Object
Returns the value of attribute uri_recommendation_for_company.
-
#uri_recommendation_for_job ⇒ Object
Returns the value of attribute uri_recommendation_for_job.
-
#uri_recommendation_for_user ⇒ Object
Returns the value of attribute uri_recommendation_for_user.
-
#uri_resume_create ⇒ Object
Returns the value of attribute uri_resume_create.
-
#uri_resume_delete ⇒ Object
Returns the value of attribute uri_resume_delete.
-
#uri_resume_own_all ⇒ Object
Returns the value of attribute uri_resume_own_all.
-
#uri_resume_retrieve ⇒ Object
Returns the value of attribute uri_resume_retrieve.
-
#uri_resume_update ⇒ Object
Returns the value of attribute uri_resume_update.
-
#uri_saved_job_search_create ⇒ Object
Returns the value of attribute uri_saved_job_search_create.
-
#uri_saved_search_create ⇒ Object
Returns the value of attribute uri_saved_search_create.
-
#uri_saved_search_delete ⇒ Object
Returns the value of attribute uri_saved_search_delete.
-
#uri_saved_search_list ⇒ Object
Returns the value of attribute uri_saved_search_list.
-
#uri_saved_search_retrieve ⇒ Object
Returns the value of attribute uri_saved_search_retrieve.
-
#uri_saved_search_update ⇒ Object
Returns the value of attribute uri_saved_search_update.
-
#uri_spot_retrieve ⇒ Object
Returns the value of attribute uri_spot_retrieve.
-
#uri_subscription_modify ⇒ Object
Returns the value of attribute uri_subscription_modify.
-
#uri_subscription_retrieve ⇒ Object
Returns the value of attribute uri_subscription_retrieve.
-
#uri_tn_job_info ⇒ Object
Returns the value of attribute uri_tn_job_info.
-
#uri_tn_join_form_branding ⇒ Object
Returns the value of attribute uri_tn_join_form_branding.
-
#uri_tn_join_form_geo ⇒ Object
Returns the value of attribute uri_tn_join_form_geo.
-
#uri_tn_join_questions ⇒ Object
Returns the value of attribute uri_tn_join_questions.
-
#uri_tn_member_create ⇒ Object
Returns the value of attribute uri_tn_member_create.
-
#uri_user_change_password ⇒ Object
Returns the value of attribute uri_user_change_password.
-
#uri_user_check_existing ⇒ Object
Returns the value of attribute uri_user_check_existing.
-
#uri_user_delete ⇒ Object
Returns the value of attribute uri_user_delete.
-
#uri_user_retrieve ⇒ Object
Returns the value of attribute uri_user_retrieve.
-
#use_json ⇒ Object
Returns the value of attribute use_json.
Instance Method Summary collapse
-
#initialize ⇒ Config
constructor
A new instance of Config.
- #set_base_uri(uri) ⇒ Object
- #set_default_api_uris ⇒ Object
- #to_hash ⇒ Object
Constructor Details
#initialize ⇒ Config
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_uri ⇒ Object
Returns the value of attribute base_uri.
3 4 5 |
# File 'lib/cb/config.rb', line 3 def base_uri @base_uri end |
#debug_api ⇒ Object
Returns the value of attribute debug_api.
3 4 5 |
# File 'lib/cb/config.rb', line 3 def debug_api @debug_api end |
#dev_key ⇒ Object
Returns the value of attribute dev_key.
3 4 5 |
# File 'lib/cb/config.rb', line 3 def dev_key @dev_key end |
#host_site ⇒ Object
Returns the value of attribute host_site.
3 4 5 |
# File 'lib/cb/config.rb', line 3 def host_site @host_site end |
#test_resources ⇒ Object
Returns the value of attribute test_resources.
3 4 5 |
# File 'lib/cb/config.rb', line 3 def test_resources @test_resources end |
#time_out ⇒ Object
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_create ⇒ Object
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_delete ⇒ Object
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_application ⇒ Object
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_external ⇒ Object
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_registered ⇒ Object
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_submit ⇒ Object
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_find ⇒ Object
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_code ⇒ Object
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_types ⇒ Object
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_branding ⇒ Object
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_search ⇒ Object
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_find ⇒ Object
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_search ⇒ Object
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_company ⇒ Object
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_job ⇒ Object
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_user ⇒ Object
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_create ⇒ Object
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_delete ⇒ Object
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_all ⇒ Object
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_retrieve ⇒ Object
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_update ⇒ Object
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_create ⇒ Object
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_create ⇒ Object
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_delete ⇒ Object
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_list ⇒ Object
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_retrieve ⇒ Object
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_update ⇒ Object
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_retrieve ⇒ Object
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_modify ⇒ Object
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_retrieve ⇒ Object
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_info ⇒ Object
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_branding ⇒ Object
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_geo ⇒ Object
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_questions ⇒ Object
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_create ⇒ Object
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_password ⇒ Object
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_existing ⇒ Object
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_delete ⇒ Object
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_retrieve ⇒ Object
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 |
#use_json ⇒ Object
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
113 114 115 |
# File 'lib/cb/config.rb', line 113 def set_base_uri (uri) @base_uri = uri end |
#set_default_api_uris ⇒ Object
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 |
# File 'lib/cb/config.rb', line 29 def set_default_api_uris @uri_job_category_search ||= '/v1/categories' @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_submit ||= '/v1/Application/submit' @uri_application_registered ||= '/v3/application/registered' @uri_application_external ||= '/v1/application/external' @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_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 ||= '/v1/savedsearch/retrieve' @uri_saved_search_create ||= '/v2/savedsearch/create' @uri_saved_search_update ||= '/v2/savedsearch/update' @uri_saved_search_delete ||= '/v1/savedsearch/delete' @uri_saved_search_list ||= '/v1/savedsearch/list' @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_hash ⇒ Object
71 72 73 74 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 |
# File 'lib/cb/config.rb', line 71 def to_hash { :uri_job_category_search => @uri_job_category_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 |