cb-api 2.0.0 → 3.0.0
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +4 -0
- data/lib/cb/clients/job.rb +3 -4
- data/lib/cb/convenience.rb +0 -4
- data/lib/cb/version.rb +1 -1
- metadata +2 -3
- data/lib/cb/criteria/job/search.rb +0 -25
data/README.md
CHANGED
@@ -13,6 +13,10 @@ Set your dev key, and any other configuration settings in a place that will run
|
|
13
13
|
config.dev_key = 'your-dev-key-goes-here'
|
14
14
|
config.time_out = 5
|
15
15
|
end
|
16
|
+
|
17
|
+
Available Endpoints
|
18
|
+
================
|
19
|
+
https://github.com/cbdr/ruby-cb-api/blob/master/lib/cb/config.rb
|
16
20
|
|
17
21
|
Job Search
|
18
22
|
================
|
data/lib/cb/clients/job.rb
CHANGED
@@ -4,15 +4,14 @@ module Cb
|
|
4
4
|
module Clients
|
5
5
|
class Job
|
6
6
|
|
7
|
-
def self.search(
|
8
|
-
args = args[0] if args.is_a?(Array) && args.count == 1
|
7
|
+
def self.search(api_args_hash)
|
9
8
|
my_api = Cb::Utils::Api.new
|
10
|
-
json_hash = my_api.cb_get(Cb.configuration.uri_job_search, :query =>
|
9
|
+
json_hash = my_api.cb_get(Cb.configuration.uri_job_search, :query => api_args_hash)
|
11
10
|
|
12
11
|
jobs = Array.new
|
13
12
|
if !json_hash['ResponseJobSearch'].nil? && !json_hash['ResponseJobSearch']['Results'].nil?
|
14
13
|
job_results = json_hash['ResponseJobSearch']['Results']['JobSearchResult']
|
15
|
-
job_results = [job_results]
|
14
|
+
job_results = [job_results] unless job_results.is_a?(Array)
|
16
15
|
job_results.each { |job_hash| jobs.push(Models::Job.new(job_hash)) }
|
17
16
|
my_api.append_api_responses(jobs, json_hash['ResponseJobSearch'])
|
18
17
|
|
data/lib/cb/convenience.rb
CHANGED
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:
|
4
|
+
version: 3.0.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: 2013-12-
|
12
|
+
date: 2013-12-20 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: httparty
|
@@ -227,7 +227,6 @@ files:
|
|
227
227
|
- lib/cb/config.rb
|
228
228
|
- lib/cb/convenience.rb
|
229
229
|
- lib/cb/criteria/job/details.rb
|
230
|
-
- lib/cb/criteria/job/search.rb
|
231
230
|
- lib/cb/criteria/spot/retrieve.rb
|
232
231
|
- lib/cb/exceptions.rb
|
233
232
|
- lib/cb/models/api_response_model.rb
|
@@ -1,25 +0,0 @@
|
|
1
|
-
module Cb
|
2
|
-
module Criteria
|
3
|
-
module Job
|
4
|
-
class Search
|
5
|
-
extend Cb::Utils::FluidAttributes
|
6
|
-
|
7
|
-
fluid_attr_accessor :advanced_grouping_mode, :boolean_operator, :category, :co_brand, :company_did,
|
8
|
-
:company_did_csv, :company_name, :company_name_boost_params, :country_code,
|
9
|
-
:education_code, :emp_type, :enable_company_collapse, :exclude_company_names,
|
10
|
-
:exclude_job_titles, :exclude_keywords, :exclude_national, :exclude_non_traditional_jobs,
|
11
|
-
:exclude_product_id, :facet_category, :facet_company, :facet_city, :facet_state,
|
12
|
-
:facet_city_state, :facet_pay, :facet_normalized_company_did, :host_site,
|
13
|
-
:include_company_children, :industry_codes, :job_title, :keywords, :location,
|
14
|
-
:normalized_company_did, :normalized_company_did_boost_params,
|
15
|
-
:normalized_company_name, :onet_code, :order_by, :order_direction, :page_number,
|
16
|
-
:partner_id, :pay_high, :pay_info_only, :pay_low, :per_page, :posted_within,
|
17
|
-
:product_id, :radius, :records_per_group, :relocate_jobs, :soc_code, :school_site_id,
|
18
|
-
:search_all_countries, :search_view, :show_categories, :show_apply_requirements,
|
19
|
-
:apply_requirements, :exclude_apply_requirements, :single_onet_search, :site_entity, :site_id, :skills, :specific_education,
|
20
|
-
:spoken_language, :tags, :talent_network_did, :url_compression_service, :use_facets,
|
21
|
-
:str_crit
|
22
|
-
end
|
23
|
-
end
|
24
|
-
end
|
25
|
-
end
|