Class: Bullhorn::Jobs
- Inherits:
-
Object
- Object
- Bullhorn::Jobs
- Defined in:
- lib/bullhorn/jobs.rb
Class Method Summary collapse
-
.all ⇒ Object
Get all Jobs.
-
.fetch_category_ids_from_job_ids(job_ids) ⇒ Object
Get Nested Hash of Category ID’s by Job ID.
- .fetch_job_description(job_id) ⇒ Object
-
.fetch_job_descriptions(job_ids) ⇒ Object
Get Job Description Array from Id Array.
- .new_events ⇒ Object
- .subscribe ⇒ Object
- .unsubscribe ⇒ Object
Class Method Details
.all ⇒ Object
Get all Jobs
8 9 10 11 12 |
# File 'lib/bullhorn/jobs.rb', line 8 def all response = Bullhorn::Client.query open_approved_job_id_request ids = get_ids_from response get_jobs_from ids end |
.fetch_category_ids_from_job_ids(job_ids) ⇒ Object
Get Nested Hash of Category ID’s by Job ID
24 25 26 |
# File 'lib/bullhorn/jobs.rb', line 24 def fetch_category_ids_from_job_ids job_ids get_category_ids_from_job_ids job_ids end |
.fetch_job_description(job_id) ⇒ Object
19 20 21 |
# File 'lib/bullhorn/jobs.rb', line 19 def fetch_job_description job_id get_job_from job_id end |
.fetch_job_descriptions(job_ids) ⇒ Object
Get Job Description Array from Id Array
15 16 17 |
# File 'lib/bullhorn/jobs.rb', line 15 def fetch_job_descriptions job_ids get_jobs_from job_ids end |
.new_events ⇒ Object
36 37 38 39 40 41 42 43 44 45 46 47 |
# File 'lib/bullhorn/jobs.rb', line 36 def new_events event_response = (Bullhorn::Client.eventsGetEvents get_events_request).body[:events_get_events_response][:return][:results] if event_response if event_response[:events].kind_of?(Array) event_response[:events] else return [event_response[:events]] end else puts "NO EVENTS?" end end |
.subscribe ⇒ Object
28 29 30 |
# File 'lib/bullhorn/jobs.rb', line 28 def subscribe Bullhorn::Client.eventsSubscribe subscribe_request #[:body][:subscription_meta_data] end |
.unsubscribe ⇒ Object
32 33 34 |
# File 'lib/bullhorn/jobs.rb', line 32 def unsubscribe (Bullhorn::Client.eventsUnsubscribe unsubscribe_request).body[:events_unsubscribe_response][:return][:unsubscribed] end |