Class: OPNsenseAPI::Core::CaptivePortal::Settings
- Inherits:
-
Object
- Object
- OPNsenseAPI::Core::CaptivePortal::Settings
- Includes:
- OPNsenseAPI::Core
- Defined in:
- lib/opnsense_api/core/captive_portal/settings.rb
Constant Summary collapse
- BASE_PATH =
'/captiveportal/settings'
Instance Method Summary collapse
- #add_zone(body = {}) ⇒ Object
- #del_zone(uuid:) ⇒ Object
- #get ⇒ Object
- #get_zone(uuid:) ⇒ Object
- #search_zones(body = {}) ⇒ Object
- #set_zone(uuid:, body: {}) ⇒ Object
- #toggle_zone(uuid:, enabled: nil, body: {}) ⇒ Object
Methods included from OPNsenseAPI::Core
Instance Method Details
#add_zone(body = {}) ⇒ Object
26 27 28 |
# File 'lib/opnsense_api/core/captive_portal/settings.rb', line 26 def add_zone(body = {}) @client.post("#{BASE_PATH}/addZone", body) end |
#del_zone(uuid:) ⇒ Object
30 31 32 |
# File 'lib/opnsense_api/core/captive_portal/settings.rb', line 30 def del_zone(uuid:) @client.post("#{BASE_PATH}/delZone/#{uuid}") end |
#get ⇒ Object
34 35 36 |
# File 'lib/opnsense_api/core/captive_portal/settings.rb', line 34 def get @client.get(BASE_PATH) end |
#get_zone(uuid:) ⇒ Object
38 39 40 |
# File 'lib/opnsense_api/core/captive_portal/settings.rb', line 38 def get_zone(uuid:) @client.get("#{BASE_PATH}/getZone/#{uuid}") end |
#search_zones(body = {}) ⇒ Object
42 43 44 |
# File 'lib/opnsense_api/core/captive_portal/settings.rb', line 42 def search_zones(body = {}) @client.post("#{BASE_PATH}/searchZones", body) end |
#set_zone(uuid:, body: {}) ⇒ Object
46 47 48 |
# File 'lib/opnsense_api/core/captive_portal/settings.rb', line 46 def set_zone(uuid:, body: {}) @client.post("#{BASE_PATH}/setZone/#{uuid}", body) end |
#toggle_zone(uuid:, enabled: nil, body: {}) ⇒ Object
50 51 52 |
# File 'lib/opnsense_api/core/captive_portal/settings.rb', line 50 def toggle_zone(uuid:, enabled: nil, body: {}) @client.post("#{BASE_PATH}/toggleZone/#{uuid}/#{enabled}", body) end |