Class: OPNsenseAPI::Core::CaptivePortal::Access

Inherits:
Object
  • Object
show all
Includes:
OPNsenseAPI::Core
Defined in:
lib/opnsense_api/core/captive_portal/access.rb

Constant Summary collapse

BASE_PATH =
'/captiveportal/access'

Instance Method Summary collapse

Methods included from OPNsenseAPI::Core

#initialize

Instance Method Details

#logoff(zoneid: 0) ⇒ Object



26
27
28
# File 'lib/opnsense_api/core/captive_portal/access.rb', line 26

def logoff(zoneid: 0)
  @client.get("#{BASE_PATH}/logoff/#{zoneid}")
end

#logon(zoneid: 0, body: {}) ⇒ Object



30
31
32
# File 'lib/opnsense_api/core/captive_portal/access.rb', line 30

def logon(zoneid: 0, body: {})
  @client.post("#{BASE_PATH}/logon/#{zoneid}", body)
end

#status(zoneid: 0, body: {}) ⇒ Object



34
35
36
# File 'lib/opnsense_api/core/captive_portal/access.rb', line 34

def status(zoneid: 0, body: {})
  @client.post("#{BASE_PATH}/status/#{zoneid}", body)
end