feat: Add template plugin
This commit is contained in:
parent
fea42b1177
commit
7085fbfa5c
@ -345,8 +345,7 @@ def setDNS(account,domain,records):
|
|||||||
newRecords.append({
|
newRecords.append({
|
||||||
'type': 'TXT',
|
'type': 'TXT',
|
||||||
'txt': TXTRecords
|
'txt': TXTRecords
|
||||||
})
|
})
|
||||||
|
|
||||||
data = '{"records":'+str(newRecords).replace("'","\"")+'}'
|
data = '{"records":'+str(newRecords).replace("'","\"")+'}'
|
||||||
response = hsw.sendUPDATE(account_name,password,domain,data)
|
response = hsw.sendUPDATE(account_name,password,domain,data)
|
||||||
return response
|
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.endswith(".py"):
|
||||||
if file != "main.py":
|
if file != "main.py":
|
||||||
plugin = importlib.import_module("plugins."+file[:-3])
|
plugin = importlib.import_module("plugins."+file[:-3])
|
||||||
|
if "info" not in dir(plugin):
|
||||||
|
continue
|
||||||
details = plugin.info
|
details = plugin.info
|
||||||
details["link"] = file[:-3]
|
details["link"] = file[:-3]
|
||||||
plugins.append(details)
|
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