31 lines
730 B
Python
31 lines
730 B
Python
"""网抑云 —— 配置注册(按《插件配置文件标准》)。
|
|
|
|
把接口地址暴露给 Web 可读可改(来源无关,store=本模块)。
|
|
"""
|
|
|
|
from __future__ import annotations
|
|
|
|
import sys as _sys
|
|
|
|
from hexi.web_hub.config_standard import register_config_items
|
|
|
|
_PLUGIN_ID = __package__
|
|
|
|
APP_NAME = "网抑云"
|
|
API_URL = "https://v.api.aa1.cn/api/api-wenan-wangyiyunreping/index.php?aa1=text"
|
|
|
|
|
|
def register_config() -> None:
|
|
register_config_items(
|
|
_PLUGIN_ID,
|
|
[
|
|
{
|
|
"key": "API_URL",
|
|
"label": "网抑云 API 地址",
|
|
"type": "string",
|
|
"default": API_URL,
|
|
},
|
|
],
|
|
store=_sys.modules[__name__],
|
|
)
|