cb-api 15.0.3 → 15.1.0
Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG.md
CHANGED
@@ -3,6 +3,8 @@ Version History
|
|
3
3
|
* All Version bumps are required to update this file as well!!
|
4
4
|
----
|
5
5
|
|
6
|
+
* 15.1.0 Added resume post
|
7
|
+
* 15.0.3 Add desc to doc.rake so it shows in `rake -T`
|
6
8
|
* 15.0.2 Include the rake tasks in the gem
|
7
9
|
* 15.0.1 Add `cb:test` rake task for rspec independence on the build server
|
8
10
|
* 15.0.0 Removing old country_codes call and replacing it with new countries call
|
@@ -10,7 +12,7 @@ Version History
|
|
10
12
|
* 14.6.0 Adding language data-list as well as a refactor which will make the future
|
11
13
|
data-list apis that are coming much easier.
|
12
14
|
* 14.5.0 Added education code api call for resume view edit
|
13
|
-
* 14.4.0
|
15
|
+
* 14.4.0 Added State list to the gem
|
14
16
|
* 14.3.1 Fixed missing response mapping
|
15
17
|
* 14.3.0 Added country codes api call
|
16
18
|
* 14.2.0 Added resume language codes api call
|
data/lib/cb/config.rb
CHANGED
@@ -85,6 +85,7 @@ module Cb
|
|
85
85
|
@uri_resume_get ||= '/cbapi/resumes/:resume_hash'
|
86
86
|
@uri_resume_put ||= '/cbapi/resumes/:resume_hash'
|
87
87
|
@uri_resume_delete ||= '/cbapi/resumes/:resume_hash'
|
88
|
+
@uri_resume_post ||= '/consumer/resumedocuments'
|
88
89
|
@uri_resume_list ||= '/v3/resume/list'
|
89
90
|
@uri_resume_language_codes ||= '/v1/languagecodes'
|
90
91
|
@uri_countries ||= '/consumer/datalist/countries'
|
@@ -0,0 +1,20 @@
|
|
1
|
+
module Cb
|
2
|
+
module Models
|
3
|
+
class ResumeDocument < ApiResponseModel
|
4
|
+
attr_accessor :resume_id, :desired_job_title, :privacy_setting, :resume_file_data, :resume_file_name, :host_site
|
5
|
+
|
6
|
+
def set_model_properties
|
7
|
+
@resume_id = api_response['resumeID']
|
8
|
+
@desired_job_title = api_response['desiredJobTitle']
|
9
|
+
@privacy_setting = api_response['privacySetting']
|
10
|
+
@resume_file_data = api_response['resumeFileData']
|
11
|
+
@resume_file_name = api_response['resumeFileName']
|
12
|
+
@host_site = api_response['hostSite']
|
13
|
+
end
|
14
|
+
|
15
|
+
def required_fields
|
16
|
+
['resumeID']
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
@@ -0,0 +1,39 @@
|
|
1
|
+
require_relative '../base'
|
2
|
+
|
3
|
+
module Cb
|
4
|
+
module Requests
|
5
|
+
module Resumes
|
6
|
+
class Post < Base
|
7
|
+
def endpoint_uri
|
8
|
+
Cb.configuration.uri_resume_post
|
9
|
+
end
|
10
|
+
|
11
|
+
def http_method
|
12
|
+
:post
|
13
|
+
end
|
14
|
+
|
15
|
+
def body
|
16
|
+
{
|
17
|
+
desiredJobTitle: args[:desired_job_title],
|
18
|
+
privacySetting: args[:privacy_setting],
|
19
|
+
resumeFileData: args[:resume_file_data],
|
20
|
+
resumeFileName: args[:resume_file_name],
|
21
|
+
hostSite: args[:host_site]
|
22
|
+
}.to_json
|
23
|
+
end
|
24
|
+
|
25
|
+
def headers
|
26
|
+
{
|
27
|
+
'HostSite' => Cb.configuration.host_site,
|
28
|
+
'Content-Type' => 'application/json',
|
29
|
+
'Authorization' => three_scale_bearer_token
|
30
|
+
}
|
31
|
+
end
|
32
|
+
|
33
|
+
def three_scale_bearer_token
|
34
|
+
"Bearer #{args[:three_scale_token]}"
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end
|
39
|
+
end
|
@@ -0,0 +1,23 @@
|
|
1
|
+
module Cb
|
2
|
+
module Responses
|
3
|
+
class ResumeDocument < ApiResponse
|
4
|
+
attr_accessor :resume_id, :desired_job_title, :privacy_setting, :resume_file_data, :resume_file_name, :host_site
|
5
|
+
|
6
|
+
def validate_api_hash
|
7
|
+
required_response_field(root_node, response)
|
8
|
+
end
|
9
|
+
|
10
|
+
def extract_models
|
11
|
+
response[root_node].map { |resume| Models::ResumeDocument.new(resume) }
|
12
|
+
end
|
13
|
+
|
14
|
+
def hash_containing_metadata
|
15
|
+
response
|
16
|
+
end
|
17
|
+
|
18
|
+
def root_node
|
19
|
+
'Results'
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
@@ -44,6 +44,7 @@ module Cb
|
|
44
44
|
Cb::Requests::Resumes::Get => Cb::Responses::Resume,
|
45
45
|
Cb::Requests::Resumes::Put => Cb::Responses::Resume,
|
46
46
|
Cb::Requests::Resumes::Delete => Cb::Responses::Resume,
|
47
|
+
Cb::Requests::Resumes::Post => Cb::Responses::ResumeDocument,
|
47
48
|
Cb::Requests::Resumes::List => Cb::Responses::ResumeList,
|
48
49
|
Cb::Requests::Resumes::LanguageCodes => Cb::Responses::LanguageCodes,
|
49
50
|
|
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: 15.0
|
4
|
+
version: 15.1.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: 2015-01-
|
12
|
+
date: 2015-01-15 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: httparty
|
@@ -261,6 +261,7 @@ files:
|
|
261
261
|
- lib/cb/responses/data_lists/resume_data_list.rb
|
262
262
|
- lib/cb/responses/resumes/resume.rb
|
263
263
|
- lib/cb/responses/resumes/resume_list.rb
|
264
|
+
- lib/cb/responses/resumes/resume_document.rb
|
264
265
|
- lib/cb/responses/resumes/language_codes.rb
|
265
266
|
- lib/cb/responses/education/get.rb
|
266
267
|
- lib/cb/exceptions.rb
|
@@ -283,6 +284,7 @@ files:
|
|
283
284
|
- lib/cb/models/implementations/application_external.rb
|
284
285
|
- lib/cb/models/implementations/saved_search.rb
|
285
286
|
- lib/cb/models/implementations/employee_type.rb
|
287
|
+
- lib/cb/models/implementations/resume_document.rb
|
286
288
|
- lib/cb/models/implementations/branding/section.rb
|
287
289
|
- lib/cb/models/implementations/branding/styles/job_details.rb
|
288
290
|
- lib/cb/models/implementations/branding/styles/content.rb
|
@@ -344,6 +346,7 @@ files:
|
|
344
346
|
- lib/cb/requests/resumes/list.rb
|
345
347
|
- lib/cb/requests/resumes/put.rb
|
346
348
|
- lib/cb/requests/resumes/delete.rb
|
349
|
+
- lib/cb/requests/resumes/post.rb
|
347
350
|
- lib/cb/requests/resumes/get.rb
|
348
351
|
- lib/cb/requests/resumes/language_codes.rb
|
349
352
|
- lib/cb/requests/education/get.rb
|