Class: OPNsenseAPI::Core::Interfaces::Base
- Inherits:
-
Object
- Object
- OPNsenseAPI::Core::Interfaces::Base
show all
- Includes:
- OPNsenseAPI::Core
- Defined in:
- lib/opnsense_api/core/interfaces/base.rb
Overview
Common methods for all interface types
Instance Method Summary
collapse
#initialize
Instance Method Details
#add_item(body = {}) ⇒ Object
25
26
27
|
# File 'lib/opnsense_api/core/interfaces/base.rb', line 25
def add_item(body = {})
@client.post("#{BASE_PATH}/addItem", body)
end
|
#del_item(uuid:) ⇒ Object
29
30
31
|
# File 'lib/opnsense_api/core/interfaces/base.rb', line 29
def del_item(uuid:)
@client.post("#{BASE_PATH}/delItem/#{uuid}")
end
|
#get(params = {}) ⇒ Object
33
34
35
|
# File 'lib/opnsense_api/core/interfaces/base.rb', line 33
def get(params = {})
@client.get("#{BASE_PATH}/get", params)
end
|
#get_item(uuid: nil) ⇒ Object
37
38
39
|
# File 'lib/opnsense_api/core/interfaces/base.rb', line 37
def get_item(uuid: nil)
@client.get("#{BASE_PATH}/getItem/#{uuid}")
end
|
41
42
43
|
# File 'lib/opnsense_api/core/interfaces/base.rb', line 41
def reconfigure(body = {})
@client.post("#{BASE_PATH}/reconfigure", body)
end
|
#search_item(body = {}) ⇒ Object
45
46
47
|
# File 'lib/opnsense_api/core/interfaces/base.rb', line 45
def search_item(body = {})
@client.post("#{BASE_PATH}/searchItem", body)
end
|
#set(body = {}) ⇒ Object
49
50
51
|
# File 'lib/opnsense_api/core/interfaces/base.rb', line 49
def set(body = {})
@client.post("#{BASE_PATH}/set", body)
end
|
#set_item(uuid:, body: {}) ⇒ Object
53
54
55
|
# File 'lib/opnsense_api/core/interfaces/base.rb', line 53
def set_item(uuid:, body: {})
@client.post("#{BASE_PATH}/setItem/#{uuid}", body)
end
|