Class: OPNsenseAPI::Core::Unbound::Service

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

Overview

Constant Summary collapse

BASE_PATH =
'/diagnostics/service'

Instance Method Summary collapse

Methods included from OPNsenseAPI::Core

#initialize

Instance Method Details

#dnsbl(params = {}) ⇒ Object



27
28
29
# File 'lib/opnsense_api/core/unbound/service.rb', line 27

def dnsbl(params = {})
  @client.get("#{BASE_PATH}/dnsbl", params)
end

#reconfigure(params = {}) ⇒ Object



31
32
33
# File 'lib/opnsense_api/core/unbound/service.rb', line 31

def reconfigure(params = {})
  @client.get("#{BASE_PATH}/reconfigure", params)
end

#restart(body = {}) ⇒ Object



35
36
37
# File 'lib/opnsense_api/core/unbound/service.rb', line 35

def restart(body = {})
  @client.post("#{BASE_PATH}/restart", body)
end

#start(body = {}) ⇒ Object



39
40
41
# File 'lib/opnsense_api/core/unbound/service.rb', line 39

def start(body = {})
  @client.post("#{BASE_PATH}/start", body)
end

#status(params = {}) ⇒ Object



43
44
45
# File 'lib/opnsense_api/core/unbound/service.rb', line 43

def status(params = {})
  @client.get("#{BASE_PATH}/status", params)
end

#stop(body = {}) ⇒ Object



47
48
49
# File 'lib/opnsense_api/core/unbound/service.rb', line 47

def stop(body = {})
  @client.post("#{BASE_PATH}/stop", body)
end