cb-api 14.5.0 → 14.6.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
CHANGED
@@ -2,7 +2,8 @@ Version History
|
|
2
2
|
====
|
3
3
|
* All Version bumps are required to update this file as well!!
|
4
4
|
----
|
5
|
-
|
5
|
+
* 14.6.0 Adding language data-list as well as a refactor which will make the future
|
6
|
+
data-list apis that are coming much easier.
|
6
7
|
* 14.5.0 Added education code api call for resume view edit
|
7
8
|
* 14.4.0 adding State list to the gem
|
8
9
|
* 14.3.1 Fixed missing response mapping
|
data/lib/cb/config.rb
CHANGED
@@ -88,7 +88,8 @@ 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
|
-
@
|
91
|
+
@uri_resume_education ||= '/consumer/datalist/ResumeEducation'
|
92
|
+
@uri_languages ||= '/consumer/datalist/languages'
|
92
93
|
@uri_state_list ||= '/ajax/citysuggest.aspx'
|
93
94
|
end
|
94
95
|
|
@@ -0,0 +1,40 @@
|
|
1
|
+
module Cb
|
2
|
+
module Requests
|
3
|
+
module DataLists
|
4
|
+
class DataListBase
|
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
|
+
def api_uri
|
17
|
+
raise NotImplementedError.new __method__
|
18
|
+
end
|
19
|
+
|
20
|
+
private
|
21
|
+
|
22
|
+
def request
|
23
|
+
token.get(uri)
|
24
|
+
end
|
25
|
+
|
26
|
+
def uri
|
27
|
+
base_uri + query_string
|
28
|
+
end
|
29
|
+
|
30
|
+
def base_uri
|
31
|
+
Cb.configuration.base_uri + api_uri
|
32
|
+
end
|
33
|
+
|
34
|
+
def query_string
|
35
|
+
args['countrycode'] ? "?countrycode=#{args['countrycode']}" : '?countrycode=US'
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end
|
39
|
+
end
|
40
|
+
end
|
@@ -1,34 +1,11 @@
|
|
1
|
+
require_relative 'data_list_base'
|
2
|
+
|
1
3
|
module Cb
|
2
4
|
module Requests
|
3
5
|
module DataLists
|
4
|
-
class EducationCodes
|
5
|
-
|
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'
|
6
|
+
class EducationCodes < DataListBase
|
7
|
+
def api_uri
|
8
|
+
Cb.configuration.uri_resume_education
|
32
9
|
end
|
33
10
|
end
|
34
11
|
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.6.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-25 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: httparty
|
@@ -336,6 +336,8 @@ files:
|
|
336
336
|
- lib/cb/requests/category/search.rb
|
337
337
|
- lib/cb/requests/application_external/submit_application.rb
|
338
338
|
- lib/cb/requests/company/find.rb
|
339
|
+
- lib/cb/requests/data_lists/languages.rb
|
340
|
+
- lib/cb/requests/data_lists/data_list_base.rb
|
339
341
|
- lib/cb/requests/data_lists/state.rb
|
340
342
|
- lib/cb/requests/data_lists/country_codes.rb
|
341
343
|
- lib/cb/requests/data_lists/education_codes.rb
|