cb-api 14.1.2 → 14.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -2,6 +2,7 @@ Version History
2
2
  ====
3
3
  * All Version bumps are required to update this file as well!!
4
4
  ----
5
+ * 14.2.0 Added resume language codes api call
5
6
  * 14.1.2 Added count limit to resume recommendations call
6
7
  * 14.1.1 Added case for Job model "pay" when setting model properties
7
8
  so job search result pay field would be added to response as well
@@ -86,6 +86,8 @@ module Cb
86
86
  @uri_resume_put ||= '/cbapi/resumes/:resume_hash'
87
87
  @uri_resume_delete ||= '/cbapi/resumes/:resume_hash'
88
88
  @uri_resume_list ||= '/v3/resume/list'
89
+ @uri_resume_language_codes ||= '/v1/languagecodes'
90
+
89
91
  end
90
92
 
91
93
  def set_attr_accessors
@@ -93,4 +95,4 @@ module Cb
93
95
  end
94
96
 
95
97
  end
96
- end
98
+ end
@@ -77,7 +77,10 @@ module Cb
77
77
  def spot
78
78
  Cb::Clients::Spot
79
79
  end
80
-
80
+
81
+ def language_codes
82
+ Cb::Clients::LanguageCodes
83
+ end
81
84
  end
82
85
  end
83
86
  end
@@ -0,0 +1,16 @@
1
+ module Cb
2
+ module Models
3
+ class LanguageCode < ApiResponseModel
4
+ attr_accessor :code,:name
5
+
6
+ def set_model_properties
7
+ @code = api_response['Code']
8
+ @name = api_response['Name']
9
+ end
10
+
11
+ def required_fields
12
+ ['Code', 'Name']
13
+ end
14
+ end
15
+ end
16
+ end
@@ -0,0 +1,24 @@
1
+ require_relative '../base'
2
+
3
+ module Cb
4
+ module Requests
5
+ module Resumes
6
+ class LanguageCodes < Base
7
+ def endpoint_uri
8
+ Cb.configuration.uri_resume_language_codes
9
+ end
10
+
11
+ def http_method
12
+ :get
13
+ end
14
+
15
+ def headers
16
+ {
17
+ 'DeveloperKey' => Cb.configuration.dev_key,
18
+ 'Content-Type' => 'application/json'
19
+ }
20
+ end
21
+ end
22
+ end
23
+ end
24
+ end
@@ -0,0 +1,34 @@
1
+ module Cb
2
+ module Responses
3
+ class LanguageCodes < ApiResponse
4
+ protected
5
+ def validate_api_hash
6
+ required_response_field(root_node, response)
7
+ required_response_field(collection_node, response[root_node])
8
+ required_response_field('LanguageCode', response[root_node][collection_node])
9
+ end
10
+
11
+ def hash_containing_metadata
12
+ response[root_node]
13
+ end
14
+
15
+ def extract_models
16
+ model_hash.map { |language_code| Models::LanguageCode.new(language_code) }
17
+ end
18
+
19
+ private
20
+
21
+ def root_node
22
+ 'ResponseLanguageCodes'
23
+ end
24
+
25
+ def collection_node
26
+ 'LanguageCodes'
27
+ end
28
+
29
+ def model_hash
30
+ response[root_node][collection_node]['LanguageCode']
31
+ end
32
+ end
33
+ end
34
+ end
@@ -45,6 +45,7 @@ module Cb
45
45
  Cb::Requests::Resumes::Put => Cb::Responses::Resume,
46
46
  Cb::Requests::Resumes::Delete => Cb::Responses::Resume,
47
47
  Cb::Requests::Resumes::List => Cb::Responses::ResumeList,
48
+ Cb::Requests::Resumes::LanguageCodes => Cb::Responses::LanguageCodes,
48
49
 
49
50
  Cb::Requests::User::ChangePassword => Cb::Responses::User::ChangePassword,
50
51
  Cb::Requests::User::CheckExisting => Cb::Responses::User::CheckExisting,
@@ -1,3 +1,3 @@
1
1
  module Cb
2
- VERSION = '14.1.2'
2
+ VERSION = '14.2.0'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cb-api
3
3
  version: !ruby/object:Gem::Version
4
- version: 14.1.2
4
+ version: 14.2.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-10-30 00:00:00.000000000 Z
12
+ date: 2014-11-07 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: httparty
@@ -259,6 +259,7 @@ files:
259
259
  - lib/cb/responses/company/find.rb
260
260
  - lib/cb/responses/resumes/resume.rb
261
261
  - lib/cb/responses/resumes/resume_list.rb
262
+ - lib/cb/responses/resumes/language_codes.rb
262
263
  - lib/cb/responses/education/get.rb
263
264
  - lib/cb/exceptions.rb
264
265
  - lib/cb/config.rb
@@ -301,6 +302,7 @@ files:
301
302
  - lib/cb/models/implementations/email_subscription.rb
302
303
  - lib/cb/models/implementations/resumes/relocation.rb
303
304
  - lib/cb/models/implementations/resumes/salary_information.rb
305
+ - lib/cb/models/implementations/resumes/language_code.rb
304
306
  - lib/cb/models/implementations/resumes/education.rb
305
307
  - lib/cb/models/implementations/resumes/skills_and_qualifications.rb
306
308
  - lib/cb/models/implementations/resumes/work_experience.rb
@@ -332,6 +334,7 @@ files:
332
334
  - lib/cb/requests/resumes/put.rb
333
335
  - lib/cb/requests/resumes/delete.rb
334
336
  - lib/cb/requests/resumes/get.rb
337
+ - lib/cb/requests/resumes/language_codes.rb
335
338
  - lib/cb/requests/education/get.rb
336
339
  - lib/cb/convenience.rb
337
340
  - lib/cb/clients/job_branding.rb