第一次提交:阿龙电竞 Django 后端最新版本

This commit is contained in:
XingQue
2026-06-14 02:23:24 +08:00
commit 4f7bf00224
9654 changed files with 5417000 additions and 0 deletions

View File

@@ -0,0 +1,87 @@
# -*- coding: utf8 -*-
# Copyright (c) 2017-2025 Tencent. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# CAM签名/鉴权错误。
AUTHFAILURE = 'AuthFailure'
# 内部错误。
INTERNALERROR = 'InternalError'
# 请求超时。
INTERNALERROR_ERRTEXTTIMEOUT = 'InternalError.ErrTextTimeOut'
# 参数错误。
INVALIDPARAMETER = 'InvalidParameter'
# 错误的action。
INVALIDPARAMETER_ERRACTION = 'InvalidParameter.ErrAction'
# 请求的文本长度过长。
INVALIDPARAMETER_ERRTEXTCONTENTLEN = 'InvalidParameter.ErrTextContentLen'
# 文本类型错误需要base64的文本。
INVALIDPARAMETER_ERRTEXTCONTENTTYPE = 'InvalidParameter.ErrTextContentType'
# 参数内容格式错误。
INVALIDPARAMETER_INVALIDPARAMETERCONTENT = 'InvalidParameter.InvalidParameterContent'
# 参数取值错误。
INVALIDPARAMETERVALUE = 'InvalidParameterValue'
# 请求的文本格式错误需要base64编码格式的文本
INVALIDPARAMETERVALUE_ERRTEXTCONTENTTYPE = 'InvalidParameterValue.ErrTextContentType'
# EvilContent参数太长。
INVALIDPARAMETERVALUE_INVALIDEVILCONTENT = 'InvalidParameterValue.InvalidEvilContent'
# EvilType取值错误。
INVALIDPARAMETERVALUE_INVALIDEVILTYPE = 'InvalidParameterValue.InvalidEvilType'
# ReportedAccount参数错误。
INVALIDPARAMETERVALUE_INVALIDREPORTEDACCOUNT = 'InvalidParameterValue.InvalidReportedAccount'
# ReportedAccount参数太长。
INVALIDPARAMETERVALUE_INVALIDREPORTEDACCOUNTLENGTH = 'InvalidParameterValue.InvalidReportedAccountLength'
# ReportedAccountType参数错误。
INVALIDPARAMETERVALUE_INVALIDREPORTEDACCOUNTTYPE = 'InvalidParameterValue.InvalidReportedAccountType'
# SenderAccount参数错误。
INVALIDPARAMETERVALUE_INVALIDSENDERACCOUNT = 'InvalidParameterValue.InvalidSenderAccount'
# SenderAccount参数太长。
INVALIDPARAMETERVALUE_INVALIDSENDERACCOUNTLENGTH = 'InvalidParameterValue.InvalidSenderAccountLength'
# SenderAccountType参数错误。
INVALIDPARAMETERVALUE_INVALIDSENDERACCOUNTTYPE = 'InvalidParameterValue.InvalidSenderAccountType'
# SenderIP参数错误。
INVALIDPARAMETERVALUE_INVALIDSENDERIP = 'InvalidParameterValue.InvalidSenderIP'
# 超过配额限制。
LIMITEXCEEDED = 'LimitExceeded'
# 缺少参数错误。
MISSINGPARAMETER = 'MissingParameter'
# 资源被占用。
RESOURCEINUSE = 'ResourceInUse'
# 资源不存在。
RESOURCENOTFOUND = 'ResourceNotFound'
# 未获取到接口授权。
UNAUTHORIZEDOPERATION_UNAUTHORIZED = 'UnauthorizedOperation.Unauthorized'

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,118 @@
# -*- coding: utf8 -*-
# Copyright (c) 2017-2025 Tencent. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
import json
from tencentcloud.common.exception.tencent_cloud_sdk_exception import TencentCloudSDKException
from tencentcloud.common.abstract_client import AbstractClient
from tencentcloud.tms.v20200713 import models
class TmsClient(AbstractClient):
_apiVersion = '2020-07-13'
_endpoint = 'tms.tencentcloudapi.com'
_service = 'tms'
def AccountTipoffAccess(self, request):
r"""举报恶意账号
:param request: Request instance for AccountTipoffAccess.
:type request: :class:`tencentcloud.tms.v20200713.models.AccountTipoffAccessRequest`
:rtype: :class:`tencentcloud.tms.v20200713.models.AccountTipoffAccessResponse`
"""
try:
params = request._serialize()
headers = request.headers
body = self.call("AccountTipoffAccess", params, headers=headers)
response = json.loads(body)
model = models.AccountTipoffAccessResponse()
model._deserialize(response["Response"])
return model
except Exception as e:
if isinstance(e, TencentCloudSDKException):
raise
else:
raise TencentCloudSDKException(type(e).__name__, str(e))
def DescribeTextLib(self, request):
r"""控制台获取用户词库列表
:param request: Request instance for DescribeTextLib.
:type request: :class:`tencentcloud.tms.v20200713.models.DescribeTextLibRequest`
:rtype: :class:`tencentcloud.tms.v20200713.models.DescribeTextLibResponse`
"""
try:
params = request._serialize()
headers = request.headers
body = self.call("DescribeTextLib", params, headers=headers)
response = json.loads(body)
model = models.DescribeTextLibResponse()
model._deserialize(response["Response"])
return model
except Exception as e:
if isinstance(e, TencentCloudSDKException):
raise
else:
raise TencentCloudSDKException(type(e).__name__, str(e))
def DescribeTextStat(self, request):
r"""控制台识别统计
:param request: Request instance for DescribeTextStat.
:type request: :class:`tencentcloud.tms.v20200713.models.DescribeTextStatRequest`
:rtype: :class:`tencentcloud.tms.v20200713.models.DescribeTextStatResponse`
"""
try:
params = request._serialize()
headers = request.headers
body = self.call("DescribeTextStat", params, headers=headers)
response = json.loads(body)
model = models.DescribeTextStatResponse()
model._deserialize(response["Response"])
return model
except Exception as e:
if isinstance(e, TencentCloudSDKException):
raise
else:
raise TencentCloudSDKException(type(e).__name__, str(e))
def TextModeration(self, request):
r"""文本内容检测Text Moderation服务使用了深度学习技术识别可能令人反感、不安全或不适宜的文本内容同时支持用户配置词库黑白名单打击自定义识别类型的图片。
:param request: Request instance for TextModeration.
:type request: :class:`tencentcloud.tms.v20200713.models.TextModerationRequest`
:rtype: :class:`tencentcloud.tms.v20200713.models.TextModerationResponse`
"""
try:
params = request._serialize()
headers = request.headers
body = self.call("TextModeration", params, headers=headers)
response = json.loads(body)
model = models.TextModerationResponse()
model._deserialize(response["Response"])
return model
except Exception as e:
if isinstance(e, TencentCloudSDKException):
raise
else:
raise TencentCloudSDKException(type(e).__name__, str(e))

View File

@@ -0,0 +1,98 @@
# -*- coding: utf8 -*-
# Copyright (c) 2017-2025 Tencent. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
from tencentcloud.common.abstract_client_async import AbstractClient
from tencentcloud.tms.v20200713 import models
from typing import Dict
class TmsClient(AbstractClient):
_apiVersion = '2020-07-13'
_endpoint = 'tms.tencentcloudapi.com'
_service = 'tms'
async def AccountTipoffAccess(
self,
request: models.AccountTipoffAccessRequest,
opts: Dict = None,
) -> models.AccountTipoffAccessResponse:
"""
举报恶意账号
"""
kwargs = {}
kwargs["action"] = "AccountTipoffAccess"
kwargs["params"] = request._serialize()
kwargs["resp_cls"] = models.AccountTipoffAccessResponse
kwargs["headers"] = request.headers
kwargs["opts"] = opts or {}
return await self.call_and_deserialize(**kwargs)
async def DescribeTextLib(
self,
request: models.DescribeTextLibRequest,
opts: Dict = None,
) -> models.DescribeTextLibResponse:
"""
控制台获取用户词库列表
"""
kwargs = {}
kwargs["action"] = "DescribeTextLib"
kwargs["params"] = request._serialize()
kwargs["resp_cls"] = models.DescribeTextLibResponse
kwargs["headers"] = request.headers
kwargs["opts"] = opts or {}
return await self.call_and_deserialize(**kwargs)
async def DescribeTextStat(
self,
request: models.DescribeTextStatRequest,
opts: Dict = None,
) -> models.DescribeTextStatResponse:
"""
控制台识别统计
"""
kwargs = {}
kwargs["action"] = "DescribeTextStat"
kwargs["params"] = request._serialize()
kwargs["resp_cls"] = models.DescribeTextStatResponse
kwargs["headers"] = request.headers
kwargs["opts"] = opts or {}
return await self.call_and_deserialize(**kwargs)
async def TextModeration(
self,
request: models.TextModerationRequest,
opts: Dict = None,
) -> models.TextModerationResponse:
"""
文本内容检测Text Moderation服务使用了深度学习技术识别可能令人反感、不安全或不适宜的文本内容同时支持用户配置词库黑白名单打击自定义识别类型的图片。
"""
kwargs = {}
kwargs["action"] = "TextModeration"
kwargs["params"] = request._serialize()
kwargs["resp_cls"] = models.TextModerationResponse
kwargs["headers"] = request.headers
kwargs["opts"] = opts or {}
return await self.call_and_deserialize(**kwargs)