cb-api 7.3.0 → 7.4.0
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +1 -0
- data/lib/cb/requests/category/search.rb +25 -0
- data/lib/cb/responses/category/search.rb +44 -0
- data/lib/cb/responses/user/change_password.rb +0 -4
- data/lib/cb/responses/user/check_existing.rb +0 -4
- data/lib/cb/responses/user/delete.rb +0 -4
- data/lib/cb/responses/user/retrieve.rb +0 -4
- data/lib/cb/utils/response_map.rb +2 -0
- data/lib/cb/version.rb +1 -1
- metadata +6 -4
data/README.md
CHANGED
@@ -0,0 +1,25 @@
|
|
1
|
+
require_relative '../base'
|
2
|
+
|
3
|
+
module Cb
|
4
|
+
module Requests
|
5
|
+
module Category
|
6
|
+
class Search < Base
|
7
|
+
|
8
|
+
def endpoint_uri
|
9
|
+
Cb.configuration.uri_job_category_search
|
10
|
+
end
|
11
|
+
|
12
|
+
def http_method
|
13
|
+
:get
|
14
|
+
end
|
15
|
+
|
16
|
+
def query
|
17
|
+
{
|
18
|
+
CountryCode: @args[:host_site]
|
19
|
+
}
|
20
|
+
end
|
21
|
+
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
@@ -0,0 +1,44 @@
|
|
1
|
+
require 'cb/responses/api_response'
|
2
|
+
|
3
|
+
module Cb
|
4
|
+
module Responses
|
5
|
+
module Category
|
6
|
+
class Search < ApiResponse
|
7
|
+
|
8
|
+
protected
|
9
|
+
|
10
|
+
def hash_containing_metadata
|
11
|
+
response
|
12
|
+
end
|
13
|
+
|
14
|
+
def validate_api_hash
|
15
|
+
required_response_field(response_node, response)
|
16
|
+
required_response_field(categories_node, response[response_node])
|
17
|
+
required_response_field(category_node, response[response_node][categories_node])
|
18
|
+
end
|
19
|
+
|
20
|
+
def extract_models
|
21
|
+
model_array.map { |category| Cb::Models::Category.new(category) }
|
22
|
+
end
|
23
|
+
|
24
|
+
private
|
25
|
+
|
26
|
+
def response_node
|
27
|
+
"ResponseCategories"
|
28
|
+
end
|
29
|
+
|
30
|
+
def categories_node
|
31
|
+
"Categories"
|
32
|
+
end
|
33
|
+
|
34
|
+
def category_node
|
35
|
+
"Category"
|
36
|
+
end
|
37
|
+
|
38
|
+
def model_array
|
39
|
+
response[response_node][categories_node][category_node]
|
40
|
+
end
|
41
|
+
end
|
42
|
+
end
|
43
|
+
end
|
44
|
+
end
|
@@ -22,6 +22,8 @@ module Cb
|
|
22
22
|
|
23
23
|
Cb::Requests::ApplicationExternal::SubmitApplication => Cb::Responses::ApplicationExternal::SubmitApplication,
|
24
24
|
|
25
|
+
Cb::Requests::Category::Search => Cb::Responses::Category::Search,
|
26
|
+
|
25
27
|
Cb::Requests::User::ChangePassword => Cb::Responses::User::ChangePassword,
|
26
28
|
Cb::Requests::User::CheckExisting => Cb::Responses::User::CheckExisting,
|
27
29
|
Cb::Requests::User::Delete => Cb::Responses::User::Delete,
|
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: 7.
|
4
|
+
version: 7.4.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-
|
12
|
+
date: 2014-06-02 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: httparty
|
@@ -118,7 +118,7 @@ dependencies:
|
|
118
118
|
requirement: !ruby/object:Gem::Requirement
|
119
119
|
none: false
|
120
120
|
requirements:
|
121
|
-
- -
|
121
|
+
- - ~>
|
122
122
|
- !ruby/object:Gem::Version
|
123
123
|
version: '2.14'
|
124
124
|
type: :development
|
@@ -126,7 +126,7 @@ dependencies:
|
|
126
126
|
version_requirements: !ruby/object:Gem::Requirement
|
127
127
|
none: false
|
128
128
|
requirements:
|
129
|
-
- -
|
129
|
+
- - ~>
|
130
130
|
- !ruby/object:Gem::Version
|
131
131
|
version: '2.14'
|
132
132
|
- !ruby/object:Gem::Dependency
|
@@ -225,6 +225,7 @@ files:
|
|
225
225
|
- lib/cb/responses/user/temporary_password.rb
|
226
226
|
- lib/cb/responses/user/retrieve.rb
|
227
227
|
- lib/cb/responses/timing.rb
|
228
|
+
- lib/cb/responses/category/search.rb
|
228
229
|
- lib/cb/responses/application_external/submit_application.rb
|
229
230
|
- lib/cb/responses/saved_search/list.rb
|
230
231
|
- lib/cb/responses/saved_search/singular.rb
|
@@ -282,6 +283,7 @@ files:
|
|
282
283
|
- lib/cb/requests/user/temporary_password.rb
|
283
284
|
- lib/cb/requests/user/retrieve.rb
|
284
285
|
- lib/cb/requests/base.rb
|
286
|
+
- lib/cb/requests/category/search.rb
|
285
287
|
- lib/cb/requests/application_external/submit_application.rb
|
286
288
|
- lib/cb/convenience.rb
|
287
289
|
- lib/cb/clients/job_branding.rb
|