Class: OPNsenseAPI::Core::Cron::Settings
- Inherits:
-
Object
- Object
- OPNsenseAPI::Core::Cron::Settings
- Includes:
- OPNsenseAPI::Core
- Defined in:
- lib/opnsense_api/core/cron/settings.rb
Constant Summary collapse
- BASE_PATH =
'/cron/settings'
Instance Method Summary collapse
- #add_job(body) ⇒ Object
- #del_job(uuid:) ⇒ Object
- #get ⇒ Object
- #get_job(uuid: nil) ⇒ Object
- #search_jobs(body) ⇒ Object
- #set(body) ⇒ Object
- #set_job(uuid:, body: {}) ⇒ Object
- #toggle_job(uuid:, enabled: nil) ⇒ Object
Methods included from OPNsenseAPI::Core
Instance Method Details
#add_job(body) ⇒ Object
26 27 28 |
# File 'lib/opnsense_api/core/cron/settings.rb', line 26 def add_job(body) @client.post("#{BASE_PATH}/addJob", body) end |
#del_job(uuid:) ⇒ Object
30 31 32 |
# File 'lib/opnsense_api/core/cron/settings.rb', line 30 def del_job(uuid:) @client.post("#{BASE_PATH}/delJob/#{uuid}") end |
#get ⇒ Object
34 35 36 |
# File 'lib/opnsense_api/core/cron/settings.rb', line 34 def get @client.get("#{BASE_PATH}/get") end |
#get_job(uuid: nil) ⇒ Object
38 39 40 |
# File 'lib/opnsense_api/core/cron/settings.rb', line 38 def get_job(uuid: nil) @client.get("#{BASE_PATH}/getJob/#{uuid}") end |
#search_jobs(body) ⇒ Object
42 43 44 |
# File 'lib/opnsense_api/core/cron/settings.rb', line 42 def search_jobs(body) @client.post("#{BASE_PATH}/searchJobs", body) end |
#set(body) ⇒ Object
46 47 48 |
# File 'lib/opnsense_api/core/cron/settings.rb', line 46 def set(body) @client.post("#{BASE_PATH}/set", body) end |
#set_job(uuid:, body: {}) ⇒ Object
50 51 52 |
# File 'lib/opnsense_api/core/cron/settings.rb', line 50 def set_job(uuid:, body: {}) @client.post("#{BASE_PATH}/setJob/#{uuid}", body) end |
#toggle_job(uuid:, enabled: nil) ⇒ Object
54 55 56 |
# File 'lib/opnsense_api/core/cron/settings.rb', line 54 def toggle_job(uuid:, enabled: nil) @client.post("#{BASE_PATH}/toggleJob/#{uuid}/#{enabled}") end |