Class: ZipRecruiter::JobAlerts::CLI
- Inherits:
-
Thor
- Object
- Thor
- ZipRecruiter::JobAlerts::CLI
- Defined in:
- lib/zip_recruiter/job_alerts/cli.rb
Instance Method Summary collapse
Instance Method Details
#status(task_id) ⇒ Object
32 33 34 35 |
# File 'lib/zip_recruiter/job_alerts/cli.rb', line 32 def status(task_id) ZipRecruiter::API.api_key = [:api_key] unless [:api_key].nil? p ZipRecruiter::JobAlerts::API.status(task_id) end |
#subscribe(path) ⇒ Object
12 13 14 15 16 17 18 19 |
# File 'lib/zip_recruiter/job_alerts/cli.rb', line 12 def subscribe(path) ZipRecruiter::API.api_key = [:api_key] unless [:api_key].nil? if File.exists?(path) p ZipRecruiter::JobAlerts::API.subscribe(path) else puts "File \"#{path}\" does not exist." end end |
#unsubscribe(path) ⇒ Object
22 23 24 25 26 27 28 29 |
# File 'lib/zip_recruiter/job_alerts/cli.rb', line 22 def unsubscribe(path) ZipRecruiter::API.api_key = [:api_key] unless [:api_key].nil? if File.exists?(path) p ZipRecruiter::JobAlerts::API.unsubscribe(path) else puts "File \"#{path}\" does not exist." end end |