cb-api 18.4.0 → 18.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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +1 -0
- data/lib/cb/config.rb +1 -0
- data/lib/cb/requests/cover_letter/update.rb +40 -0
- data/lib/cb/responses/cover_letter/delete.rb +5 -17
- data/lib/cb/responses/cover_letter/retrieve.rb +1 -1
- data/lib/cb/responses/cover_letter/status.rb +31 -0
- data/lib/cb/responses/cover_letter/update.rb +27 -0
- data/lib/cb/responses/nil_model.rb +21 -0
- data/lib/cb/utils/response_map.rb +1 -0
- data/lib/cb/version.rb +1 -1
- metadata +6 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7a528b3ab30440eccd01a070105898be492bdba0
|
4
|
+
data.tar.gz: 40b8622dcf684443ccd1fb8a0cf9af96757be970
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bde953029280007924d3d3cd52ff1a5e39205461cf68fdc42a8db6aa19a8c41f8d42def51dee2e3decaa91a72c8464e852eed358b2b244cde837daeaf6884667
|
7
|
+
data.tar.gz: cf7e3f2eca41c415c0dbd35282803d6112b03dc1c4e8aab8a8629165dd2dc5c51582ced8606e87a4cc24d86181db8d6a48893b267f22285e469b35d405a15d11
|
data/CHANGELOG.md
CHANGED
@@ -3,6 +3,7 @@ Version History
|
|
3
3
|
* All Version bumps are required to update this file as well!!
|
4
4
|
----
|
5
5
|
|
6
|
+
* 18.5.0 Adding support for Cover Letter Update.
|
6
7
|
* 18.4.0 Adding support for Cover Letter APIs - Retrieve, List, and Delete.
|
7
8
|
* 18.3.0 Correcting report a job to use xml request and correctly map model from response.
|
8
9
|
* 18.2.2 Filter out release directory related information when getting the API caller.
|
data/lib/cb/config.rb
CHANGED
@@ -107,6 +107,7 @@ module Cb
|
|
107
107
|
@uri_report_job ||= '/v1/job/report'
|
108
108
|
@uri_cover_letter_list ||= '/v1/coverletter/list'
|
109
109
|
@uri_cover_letter_retrieve ||= '/coverletter/retrieve'
|
110
|
+
@uri_cover_letter_update ||= '/coverletter/edit'
|
110
111
|
@uri_cover_letter_delete ||= '/coverletter/delete'
|
111
112
|
end
|
112
113
|
|
@@ -0,0 +1,40 @@
|
|
1
|
+
# Copyright 2015 CareerBuilder, LLC
|
2
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
3
|
+
# you may not use this file except in compliance with the License.
|
4
|
+
# You may obtain a copy of the License at
|
5
|
+
#
|
6
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
7
|
+
# Unless required by applicable law or agreed to in writing, software
|
8
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
9
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
10
|
+
# See the License for the specific language governing permissions and limitations under the License.
|
11
|
+
require 'cb/requests/base'
|
12
|
+
|
13
|
+
module Cb
|
14
|
+
module Requests
|
15
|
+
module CoverLetter
|
16
|
+
class Update < Base
|
17
|
+
def endpoint_uri
|
18
|
+
Cb.configuration.uri_cover_letter_update
|
19
|
+
end
|
20
|
+
|
21
|
+
def http_method
|
22
|
+
:post
|
23
|
+
end
|
24
|
+
|
25
|
+
def body
|
26
|
+
<<-eos
|
27
|
+
<Request>
|
28
|
+
<DeveloperKey>#{ Cb.configuration.dev_key }</DeveloperKey>
|
29
|
+
<ExternalID>#{ args[:external_id] }</ExternalID>
|
30
|
+
<ExternalUserID>#{ args[:external_user_id] }</ExternalUserID>
|
31
|
+
<CoverLetterTitle>#{ args[:cover_letter_title] }</CoverLetterTitle>
|
32
|
+
<Text>#{ args[:text] }</Text>
|
33
|
+
<Test>#{ args[:test] || false }</Test>
|
34
|
+
</Request>
|
35
|
+
eos
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end
|
39
|
+
end
|
40
|
+
end
|
@@ -8,27 +8,15 @@
|
|
8
8
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
9
9
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
10
10
|
# See the License for the specific language governing permissions and limitations under the License.
|
11
|
+
require_relative 'status'
|
12
|
+
require_relative '../nil_model'
|
13
|
+
|
11
14
|
module Cb
|
12
15
|
module Responses
|
13
16
|
module CoverLetter
|
14
17
|
class Delete < ApiResponse
|
15
|
-
|
16
|
-
|
17
|
-
end
|
18
|
-
|
19
|
-
private
|
20
|
-
|
21
|
-
def extract_models
|
22
|
-
nil
|
23
|
-
end
|
24
|
-
|
25
|
-
def validate_api_hash
|
26
|
-
required_response_field(root_node, response)
|
27
|
-
end
|
28
|
-
|
29
|
-
def hash_containing_metadata
|
30
|
-
response
|
31
|
-
end
|
18
|
+
include Cb::Responses::CoverLetter::Status
|
19
|
+
include Cb::Responses::NilModel
|
32
20
|
|
33
21
|
def root_node
|
34
22
|
'ResponseUserDelete'
|
@@ -0,0 +1,31 @@
|
|
1
|
+
# Copyright 2015 CareerBuilder, LLC
|
2
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
3
|
+
# you may not use this file except in compliance with the License.
|
4
|
+
# You may obtain a copy of the License at
|
5
|
+
#
|
6
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
7
|
+
# Unless required by applicable law or agreed to in writing, software
|
8
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
9
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
10
|
+
# See the License for the specific language governing permissions and limitations under the License.
|
11
|
+
module Cb
|
12
|
+
module Responses
|
13
|
+
module CoverLetter
|
14
|
+
module Status
|
15
|
+
def status
|
16
|
+
response[root_node]['Status']
|
17
|
+
end
|
18
|
+
|
19
|
+
private
|
20
|
+
|
21
|
+
def validate_api_hash
|
22
|
+
required_response_field(root_node, response)
|
23
|
+
end
|
24
|
+
|
25
|
+
def hash_containing_metadata
|
26
|
+
response
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
@@ -0,0 +1,27 @@
|
|
1
|
+
# Copyright 2015 CareerBuilder, LLC
|
2
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
3
|
+
# you may not use this file except in compliance with the License.
|
4
|
+
# You may obtain a copy of the License at
|
5
|
+
#
|
6
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
7
|
+
# Unless required by applicable law or agreed to in writing, software
|
8
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
9
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
10
|
+
# See the License for the specific language governing permissions and limitations under the License.
|
11
|
+
require_relative 'status'
|
12
|
+
require_relative '../nil_model'
|
13
|
+
|
14
|
+
module Cb
|
15
|
+
module Responses
|
16
|
+
module CoverLetter
|
17
|
+
class Update < ApiResponse
|
18
|
+
include Cb::Responses::CoverLetter::Status
|
19
|
+
include Cb::Responses::NilModel
|
20
|
+
|
21
|
+
def root_node
|
22
|
+
'ResponseUserUpdate'
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
# Copyright 2015 CareerBuilder, LLC
|
2
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
3
|
+
# you may not use this file except in compliance with the License.
|
4
|
+
# You may obtain a copy of the License at
|
5
|
+
#
|
6
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
7
|
+
# Unless required by applicable law or agreed to in writing, software
|
8
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
9
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
10
|
+
# See the License for the specific language governing permissions and limitations under the License.
|
11
|
+
module Cb
|
12
|
+
module Responses
|
13
|
+
module NilModel
|
14
|
+
private
|
15
|
+
|
16
|
+
def extract_models
|
17
|
+
nil
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
@@ -46,6 +46,7 @@ module Cb
|
|
46
46
|
|
47
47
|
Cb::Requests::CoverLetter::List => Cb::Responses::CoverLetter::List,
|
48
48
|
Cb::Requests::CoverLetter::Retrieve => Cb::Responses::CoverLetter::Retrieve,
|
49
|
+
Cb::Requests::CoverLetter::Update => Cb::Responses::CoverLetter::Update,
|
49
50
|
Cb::Requests::CoverLetter::Delete => Cb::Responses::CoverLetter::Delete,
|
50
51
|
|
51
52
|
Cb::Requests::Education::Get => Cb::Responses::Education::Get,
|
data/lib/cb/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cb-api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 18.
|
4
|
+
version: 18.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- The CareerBuilder.com Niche and Consumer Development teams
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-10-
|
11
|
+
date: 2015-10-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: httparty
|
@@ -304,6 +304,7 @@ files:
|
|
304
304
|
- lib/cb/requests/cover_letter/delete.rb
|
305
305
|
- lib/cb/requests/cover_letter/list.rb
|
306
306
|
- lib/cb/requests/cover_letter/retrieve.rb
|
307
|
+
- lib/cb/requests/cover_letter/update.rb
|
307
308
|
- lib/cb/requests/data_lists/countries.rb
|
308
309
|
- lib/cb/requests/data_lists/data_list_base.rb
|
309
310
|
- lib/cb/requests/data_lists/desired_job_type.rb
|
@@ -340,6 +341,8 @@ files:
|
|
340
341
|
- lib/cb/responses/cover_letter/delete.rb
|
341
342
|
- lib/cb/responses/cover_letter/list.rb
|
342
343
|
- lib/cb/responses/cover_letter/retrieve.rb
|
344
|
+
- lib/cb/responses/cover_letter/status.rb
|
345
|
+
- lib/cb/responses/cover_letter/update.rb
|
343
346
|
- lib/cb/responses/data_list/state.rb
|
344
347
|
- lib/cb/responses/data_lists/resume_data_list.rb
|
345
348
|
- lib/cb/responses/education/get.rb
|
@@ -352,6 +355,7 @@ files:
|
|
352
355
|
- lib/cb/responses/job/search_v3.rb
|
353
356
|
- lib/cb/responses/job/singular.rb
|
354
357
|
- lib/cb/responses/metadata.rb
|
358
|
+
- lib/cb/responses/nil_model.rb
|
355
359
|
- lib/cb/responses/resumes/language_codes.rb
|
356
360
|
- lib/cb/responses/resumes/resume.rb
|
357
361
|
- lib/cb/responses/resumes/resume_document.rb
|