cb-api 20.1.1 → 20.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ca4880b64adf005d1e51e49d9bead282fccb83e5
4
- data.tar.gz: fc5fb46ddf058bdabec0110d8b6c19b6318b4e17
3
+ metadata.gz: 92374c6c4f74849c829bf162b42c4440a2baa7d0
4
+ data.tar.gz: ef474853a7d47abd21bd3160975777fe1e2dac6c
5
5
  SHA512:
6
- metadata.gz: 0b38c28f72f14b3d278814bcc01eb5afb829398ef978adb40bafcf60486c59f484eca283f536a7b818d7528157bb7d211ed4bf80e73fa4eefa5cc6776c4b1def
7
- data.tar.gz: 159543938ac7f192f7a6d7045db7ffaaad6ab2a6a24ad9d383457299ef6880fa5b969ea8005a2430dc8f4f3775d0d1784a88f098c2fabf5065da6bf5f4b5c462
6
+ metadata.gz: 2f9e367fdf0b70fbe9a21ac298fc6b8c8fc9d08a92db6401fd4f221850abb9ae07e7872e9a9b9350ee5949d6d20d2d0f6c8a355eb8283fc828e6e6bf47af94f1
7
+ data.tar.gz: 92339cb6c2668404be9dff090ca1dec9b16925eb27f0abca5e791579352178892a6e71bbfb21f6bd58c8066eb348523de66aa7565cd9196717c3541b34f67457
@@ -2,6 +2,7 @@ Version History
2
2
  ====
3
3
  * All Version bumps are required to update this file as well!!
4
4
  ----
5
+ * 20.2.0 Adding job insights client
5
6
  * 20.1.1 Having nil reponses behave more like we did pre ruby 2.2 so as not to break downstream peeps
6
7
  * 20.1.0 Remove Migration ID field from resume listing model.
7
8
  * 20.0.0 Refactoring of the clients. Breaking changes to AnonSavedSearch, EmployeeTypes, SavedSearch
@@ -1,4 +1,4 @@
1
- # Copyright 2015 CareerBuilder, LLC
1
+ # Copyright 2016 CareerBuilder, LLC
2
2
  # Licensed under the Apache License, Version 2.0 (the "License");
3
3
  # you may not use this file except in compliance with the License.
4
4
  # You may obtain a copy of the License at
@@ -14,6 +14,14 @@ module Cb
14
14
  def self.cb_client
15
15
  @cb_client ||= Cb::Utils::Api.instance
16
16
  end
17
+
18
+ def self.headers(args)
19
+ {
20
+ 'Accept' => 'application/json',
21
+ 'Authorization' => "Bearer #{ args[:oauth_token] }",
22
+ 'Content-Type' => 'application/json'
23
+ }
24
+ end
17
25
  end
18
26
  end
19
27
  end
@@ -1,4 +1,4 @@
1
- # Copyright 2015 CareerBuilder, LLC
1
+ # Copyright 2016 CareerBuilder, LLC
2
2
  # Licensed under the Apache License, Version 2.0 (the "License");
3
3
  # you may not use this file except in compliance with the License.
4
4
  # You may obtain a copy of the License at
@@ -35,13 +35,6 @@ module Cb
35
35
  end
36
36
 
37
37
  private
38
- def self.headers(args)
39
- {
40
- 'Accept' => 'application/json',
41
- 'Authorization' => "Bearer #{ args[:oauth_token] }",
42
- 'Content-Type' => 'application/json'
43
- }
44
- end
45
38
 
46
39
  def self.body(args)
47
40
  body = Hash.new
@@ -0,0 +1,21 @@
1
+ # Copyright 2016 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 'base'
12
+ module Cb
13
+ module Clients
14
+ class JobInsights < Base
15
+ def self.get(args={})
16
+ uri = "#{ Cb.configuration.uri_job_insights }/#{ args[:id] }"
17
+ cb_client.cb_get(uri, headers: headers(args))
18
+ end
19
+ end
20
+ end
21
+ end
@@ -74,6 +74,7 @@ module Cb
74
74
  @uri_job_branding ||= '/branding'
75
75
  @uri_job_category_search ||= '/v1/categories'
76
76
  @uri_job_find ||= '/v3/Job'
77
+ @uri_job_insights ||= '/consumer/job-insights'
77
78
  @uri_job_industry_search ||= '/v1/industrycodes'
78
79
  @uri_job_search ||= '/consumer/jobs/search/'
79
80
  @uri_languages ||= '/consumer/datalist/languages'
@@ -11,68 +11,76 @@
11
11
  module Cb
12
12
  module Convenience
13
13
  module ClassMethods
14
+ def anon_saved_search
15
+ Cb::Clients::AnonSavedSearch
16
+ end
17
+
14
18
  def api_client
15
19
  Cb::Utils::Api
16
20
  end
17
21
 
18
- def job
19
- Cb::Clients::Job
22
+ def application
23
+ Cb::Clients::Application
20
24
  end
21
25
 
22
- def job_details_criteria
23
- Cb::Criteria::Job::Details.new
26
+ def application_external
27
+ Cb::Clients::ApplicationExternal
24
28
  end
25
29
 
26
30
  def category
27
31
  Cb::Clients::Category
28
32
  end
29
33
 
30
- def cover_letters
31
- Cb::Clients::CoverLetters
32
- end
33
-
34
- def industry
35
- Cb::Clients::Industry
34
+ def country
35
+ Cb::Utils::Country
36
36
  end
37
37
 
38
38
  def company
39
39
  Cb::Clients::Company
40
40
  end
41
41
 
42
+ def cover_letters
43
+ Cb::Clients::CoverLetters
44
+ end
45
+
42
46
  def education_code
43
47
  Cb::Clients::Education
44
48
  end
45
49
 
50
+ def email_subscription
51
+ Cb::Clients::EmailSubscription
52
+ end
53
+
46
54
  def employee_types
47
55
  Cb::Clients::EmployeeTypes
48
56
  end
49
57
 
50
- def recommendation
51
- Cb::Clients::Recommendation
58
+ def industry
59
+ Cb::Clients::Industry
52
60
  end
53
61
 
54
- def application
55
- Cb::Clients::Application
62
+ def job
63
+ Cb::Clients::Job
56
64
  end
57
65
 
58
- def application_external
59
- Cb::Clients::ApplicationExternal
66
+ def job_branding
67
+ Cb::Clients::JobBranding
60
68
  end
61
69
 
62
- def country
63
- Cb::Utils::Country
70
+ def job_details_criteria
71
+ Cb::Criteria::Job::Details.new
64
72
  end
65
73
 
66
- def user
67
- Cb::Clients::User
74
+ def job_insights
75
+ Cb::Clients::JobInsights
68
76
  end
69
77
 
70
- def job_branding
71
- Cb::Clients::JobBranding
78
+ def language_codes
79
+ Cb::Clients::LanguageCodes
72
80
  end
73
81
 
74
- def email_subscription
75
- Cb::Clients::EmailSubscription
82
+ def recommendation
83
+ Cb::Clients::Recommendation
76
84
  end
77
85
 
78
86
  def saved_search
@@ -83,12 +91,8 @@ module Cb
83
91
  Cb::Clients::TalentNetwork
84
92
  end
85
93
 
86
- def anon_saved_search
87
- Cb::Clients::AnonSavedSearch
88
- end
89
-
90
- def language_codes
91
- Cb::Clients::LanguageCodes
94
+ def user
95
+ Cb::Clients::User
92
96
  end
93
97
  end
94
98
  end
@@ -9,5 +9,5 @@
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
11
  module Cb
12
- VERSION = '20.1.1'
12
+ VERSION = '20.2.0'
13
13
  end
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: 20.1.1
4
+ version: 20.2.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: 2016-03-07 00:00:00.000000000 Z
11
+ date: 2016-03-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: httparty
@@ -222,6 +222,7 @@ files:
222
222
  - lib/cb/clients/industry.rb
223
223
  - lib/cb/clients/job.rb
224
224
  - lib/cb/clients/job_branding.rb
225
+ - lib/cb/clients/job_insights.rb
225
226
  - lib/cb/clients/recommendation.rb
226
227
  - lib/cb/clients/saved_search.rb
227
228
  - lib/cb/clients/talent_network.rb