cb-api 14.4.0 → 14.5.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.
- data/CHANGELOG.md +2 -0
- data/lib/cb/config.rb +1 -0
- data/lib/cb/models/implementations/data_lists/resume_data_list.rb +16 -0
- data/lib/cb/requests/data_lists/education_codes.rb +36 -0
- data/lib/cb/responses/{data_list → data_lists}/country_codes.rb +0 -0
- data/lib/cb/responses/data_lists/resume_data_list.rb +32 -0
- data/lib/cb/version.rb +1 -1
- metadata +6 -3
data/CHANGELOG.md
CHANGED
@@ -2,6 +2,8 @@ Version History
|
|
2
2
|
====
|
3
3
|
* All Version bumps are required to update this file as well!!
|
4
4
|
----
|
5
|
+
|
6
|
+
* 14.5.0 Added education code api call for resume view edit
|
5
7
|
* 14.4.0 adding State list to the gem
|
6
8
|
* 14.3.1 Fixed missing response mapping
|
7
9
|
* 14.3.0 Added country codes api call
|
data/lib/cb/config.rb
CHANGED
@@ -88,6 +88,7 @@ module Cb
|
|
88
88
|
@uri_resume_list ||= '/v3/resume/list'
|
89
89
|
@uri_resume_language_codes ||= '/v1/languagecodes'
|
90
90
|
@uri_country_codes ||= '/v1/countrycodes'
|
91
|
+
@uri_education_codes ||= '/consumer/datalist/ResumeEducation'
|
91
92
|
@uri_state_list ||= '/ajax/citysuggest.aspx'
|
92
93
|
end
|
93
94
|
|
@@ -0,0 +1,16 @@
|
|
1
|
+
module Cb
|
2
|
+
module Models
|
3
|
+
class ResumeDataList < ApiResponseModel
|
4
|
+
attr_accessor :key, :value
|
5
|
+
|
6
|
+
def set_model_properties
|
7
|
+
@key = api_response['key']
|
8
|
+
@value = api_response['value']
|
9
|
+
end
|
10
|
+
|
11
|
+
def required_fields
|
12
|
+
['key', 'value']
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
@@ -0,0 +1,36 @@
|
|
1
|
+
module Cb
|
2
|
+
module Requests
|
3
|
+
module DataLists
|
4
|
+
class EducationCodes
|
5
|
+
attr_reader :token, :args
|
6
|
+
|
7
|
+
def initialize(token, args)
|
8
|
+
@token = token
|
9
|
+
@args = args
|
10
|
+
end
|
11
|
+
|
12
|
+
def get
|
13
|
+
Cb::Responses::ResumeDataList.new request.parsed
|
14
|
+
end
|
15
|
+
|
16
|
+
private
|
17
|
+
|
18
|
+
def request
|
19
|
+
token.get(uri)
|
20
|
+
end
|
21
|
+
|
22
|
+
def uri
|
23
|
+
base_uri + query_string
|
24
|
+
end
|
25
|
+
|
26
|
+
def base_uri
|
27
|
+
Cb.configuration.base_uri + Cb.configuration.uri_education_codes
|
28
|
+
end
|
29
|
+
|
30
|
+
def query_string
|
31
|
+
args['countrycode'] ? "?countrycode=#{args['countrycode']}" : '?countrycode=US'
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
File without changes
|
@@ -0,0 +1,32 @@
|
|
1
|
+
module Cb
|
2
|
+
module Responses
|
3
|
+
class ResumeDataList < ApiResponse
|
4
|
+
|
5
|
+
protected
|
6
|
+
|
7
|
+
def validate_api_hash
|
8
|
+
required_response_field('TotalResults', response)
|
9
|
+
required_response_field('ReturnedResults', response)
|
10
|
+
required_response_field(collection_node, response)
|
11
|
+
end
|
12
|
+
|
13
|
+
def hash_containing_metadata
|
14
|
+
response['Errors']
|
15
|
+
end
|
16
|
+
|
17
|
+
def extract_models
|
18
|
+
model_hash.map! { |list_item| Models::ResumeDataList.new(list_item) }
|
19
|
+
end
|
20
|
+
|
21
|
+
private
|
22
|
+
|
23
|
+
def collection_node
|
24
|
+
'Results'
|
25
|
+
end
|
26
|
+
|
27
|
+
def model_hash
|
28
|
+
response[collection_node]
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
data/lib/cb/version.rb
CHANGED
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.
|
4
|
+
version: 14.5.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-11-
|
12
|
+
date: 2014-11-20 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: httparty
|
@@ -233,7 +233,6 @@ files:
|
|
233
233
|
- lib/cb/responses/application.rb
|
234
234
|
- lib/cb/responses/metadata.rb
|
235
235
|
- lib/cb/responses/data_list/state.rb
|
236
|
-
- lib/cb/responses/data_list/country_codes.rb
|
237
236
|
- lib/cb/responses/job/singular.rb
|
238
237
|
- lib/cb/responses/job/search.rb
|
239
238
|
- lib/cb/responses/application/application_form.rb
|
@@ -259,6 +258,8 @@ files:
|
|
259
258
|
- lib/cb/responses/employee_types/search.rb
|
260
259
|
- lib/cb/responses/errors.rb
|
261
260
|
- lib/cb/responses/company/find.rb
|
261
|
+
- lib/cb/responses/data_lists/country_codes.rb
|
262
|
+
- lib/cb/responses/data_lists/resume_data_list.rb
|
262
263
|
- lib/cb/responses/resumes/resume.rb
|
263
264
|
- lib/cb/responses/resumes/resume_list.rb
|
264
265
|
- lib/cb/responses/resumes/language_codes.rb
|
@@ -302,6 +303,7 @@ files:
|
|
302
303
|
- lib/cb/models/implementations/talent_network.rb
|
303
304
|
- lib/cb/models/implementations/recommended_job.rb
|
304
305
|
- lib/cb/models/implementations/spot.rb
|
306
|
+
- lib/cb/models/implementations/data_lists/resume_data_list.rb
|
305
307
|
- lib/cb/models/implementations/email_subscription.rb
|
306
308
|
- lib/cb/models/implementations/resumes/relocation.rb
|
307
309
|
- lib/cb/models/implementations/resumes/salary_information.rb
|
@@ -336,6 +338,7 @@ files:
|
|
336
338
|
- lib/cb/requests/company/find.rb
|
337
339
|
- lib/cb/requests/data_lists/state.rb
|
338
340
|
- lib/cb/requests/data_lists/country_codes.rb
|
341
|
+
- lib/cb/requests/data_lists/education_codes.rb
|
339
342
|
- lib/cb/requests/resumes/list.rb
|
340
343
|
- lib/cb/requests/resumes/put.rb
|
341
344
|
- lib/cb/requests/resumes/delete.rb
|