完整的SN服务API实现

This commit is contained in:
2025-09-13 14:56:13 +08:00
parent f7b4f7158a
commit 01fd5dfe21
11 changed files with 428 additions and 4 deletions

View File

@@ -1,6 +1,5 @@
from ProjectCfg import DOMAIN
from SNAPI.CallServer import _make_request
from typing import List,Any,Optional,Dict
from SNAPI import *
###=========================活动API=================================
@@ -36,6 +35,8 @@ def TranslationText(Authorization: str,text:str ,Tolang:str,FromLang:str) -> dic
params = {"to":Tolang,"from":FromLang}
return _make_request('POST', url, headers, params=params,request_body=text)
###==========================服务器版本==========================
def GetServerVersion() -> dict:
"""获取服务器版本"""
url = f"{DOMAIN}/version"