feat: Add template plugin
This commit is contained in:
parent
fea42b1177
commit
7085fbfa5c
@ -346,7 +346,6 @@ def setDNS(account,domain,records):
|
||||
'type': 'TXT',
|
||||
'txt': TXTRecords
|
||||
})
|
||||
|
||||
data = '{"records":'+str(newRecords).replace("'","\"")+'}'
|
||||
response = hsw.sendUPDATE(account_name,password,domain,data)
|
||||
return response
|
||||
|
BIN
assets/plugin_page.png
Normal file
BIN
assets/plugin_page.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 88 KiB |
BIN
assets/plugins.png
Normal file
BIN
assets/plugins.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 47 KiB |
@ -12,6 +12,8 @@ def listPlugins():
|
||||
if file.endswith(".py"):
|
||||
if file != "main.py":
|
||||
plugin = importlib.import_module("plugins."+file[:-3])
|
||||
if "info" not in dir(plugin):
|
||||
continue
|
||||
details = plugin.info
|
||||
details["link"] = file[:-3]
|
||||
plugins.append(details)
|
||||
|
32
plugins/template.py
Normal file
32
plugins/template.py
Normal file
@ -0,0 +1,32 @@
|
||||
import json
|
||||
import account
|
||||
import requests
|
||||
|
||||
# Plugin Data
|
||||
info = {
|
||||
"name": "Plugin Template",
|
||||
"description": "Plugin Description",
|
||||
"version": "1.0",
|
||||
"author": "Nathan.Woodburn/"
|
||||
}
|
||||
|
||||
# Functions
|
||||
functions = {
|
||||
"main":{
|
||||
"name": "Function name",
|
||||
"type": "dashboard",
|
||||
"description": "Description",
|
||||
"params": {},
|
||||
"returns": {
|
||||
"status":
|
||||
{
|
||||
"name": "Status of the function",
|
||||
"type": "text"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
def main(params, authentication):
|
||||
return {"status": "Success"}
|
||||
|
Loading…
Reference in New Issue
Block a user