第一次提交:阿龙电竞 Django 后端最新版本
This commit is contained in:
@@ -0,0 +1,233 @@
|
||||
# -*- 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.asw.v20200722 import models
|
||||
|
||||
|
||||
class AswClient(AbstractClient):
|
||||
_apiVersion = '2020-07-22'
|
||||
_endpoint = 'asw.tencentcloudapi.com'
|
||||
_service = 'asw'
|
||||
|
||||
|
||||
def CreateFlowService(self, request):
|
||||
r"""该接口用于生成状态机服务
|
||||
|
||||
:param request: Request instance for CreateFlowService.
|
||||
:type request: :class:`tencentcloud.asw.v20200722.models.CreateFlowServiceRequest`
|
||||
:rtype: :class:`tencentcloud.asw.v20200722.models.CreateFlowServiceResponse`
|
||||
|
||||
"""
|
||||
try:
|
||||
params = request._serialize()
|
||||
headers = request.headers
|
||||
body = self.call("CreateFlowService", params, headers=headers)
|
||||
response = json.loads(body)
|
||||
model = models.CreateFlowServiceResponse()
|
||||
model._deserialize(response["Response"])
|
||||
return model
|
||||
except Exception as e:
|
||||
if isinstance(e, TencentCloudSDKException):
|
||||
raise
|
||||
else:
|
||||
raise TencentCloudSDKException(type(e).__name__, str(e))
|
||||
|
||||
|
||||
def DescribeExecution(self, request):
|
||||
r"""查询执行详细信息
|
||||
|
||||
:param request: Request instance for DescribeExecution.
|
||||
:type request: :class:`tencentcloud.asw.v20200722.models.DescribeExecutionRequest`
|
||||
:rtype: :class:`tencentcloud.asw.v20200722.models.DescribeExecutionResponse`
|
||||
|
||||
"""
|
||||
try:
|
||||
params = request._serialize()
|
||||
headers = request.headers
|
||||
body = self.call("DescribeExecution", params, headers=headers)
|
||||
response = json.loads(body)
|
||||
model = models.DescribeExecutionResponse()
|
||||
model._deserialize(response["Response"])
|
||||
return model
|
||||
except Exception as e:
|
||||
if isinstance(e, TencentCloudSDKException):
|
||||
raise
|
||||
else:
|
||||
raise TencentCloudSDKException(type(e).__name__, str(e))
|
||||
|
||||
|
||||
def DescribeExecutionHistory(self, request):
|
||||
r"""一次执行会有很多步骤,经过很多节点,这个接口描述某一次执行的事件的历史
|
||||
|
||||
:param request: Request instance for DescribeExecutionHistory.
|
||||
:type request: :class:`tencentcloud.asw.v20200722.models.DescribeExecutionHistoryRequest`
|
||||
:rtype: :class:`tencentcloud.asw.v20200722.models.DescribeExecutionHistoryResponse`
|
||||
|
||||
"""
|
||||
try:
|
||||
params = request._serialize()
|
||||
headers = request.headers
|
||||
body = self.call("DescribeExecutionHistory", params, headers=headers)
|
||||
response = json.loads(body)
|
||||
model = models.DescribeExecutionHistoryResponse()
|
||||
model._deserialize(response["Response"])
|
||||
return model
|
||||
except Exception as e:
|
||||
if isinstance(e, TencentCloudSDKException):
|
||||
raise
|
||||
else:
|
||||
raise TencentCloudSDKException(type(e).__name__, str(e))
|
||||
|
||||
|
||||
def DescribeExecutions(self, request):
|
||||
r"""对状态机的执行历史进行描述.
|
||||
|
||||
:param request: Request instance for DescribeExecutions.
|
||||
:type request: :class:`tencentcloud.asw.v20200722.models.DescribeExecutionsRequest`
|
||||
:rtype: :class:`tencentcloud.asw.v20200722.models.DescribeExecutionsResponse`
|
||||
|
||||
"""
|
||||
try:
|
||||
params = request._serialize()
|
||||
headers = request.headers
|
||||
body = self.call("DescribeExecutions", params, headers=headers)
|
||||
response = json.loads(body)
|
||||
model = models.DescribeExecutionsResponse()
|
||||
model._deserialize(response["Response"])
|
||||
return model
|
||||
except Exception as e:
|
||||
if isinstance(e, TencentCloudSDKException):
|
||||
raise
|
||||
else:
|
||||
raise TencentCloudSDKException(type(e).__name__, str(e))
|
||||
|
||||
|
||||
def DescribeFlowServiceDetail(self, request):
|
||||
r"""查询该用户指定状态机下的详情数据。
|
||||
|
||||
:param request: Request instance for DescribeFlowServiceDetail.
|
||||
:type request: :class:`tencentcloud.asw.v20200722.models.DescribeFlowServiceDetailRequest`
|
||||
:rtype: :class:`tencentcloud.asw.v20200722.models.DescribeFlowServiceDetailResponse`
|
||||
|
||||
"""
|
||||
try:
|
||||
params = request._serialize()
|
||||
headers = request.headers
|
||||
body = self.call("DescribeFlowServiceDetail", params, headers=headers)
|
||||
response = json.loads(body)
|
||||
model = models.DescribeFlowServiceDetailResponse()
|
||||
model._deserialize(response["Response"])
|
||||
return model
|
||||
except Exception as e:
|
||||
if isinstance(e, TencentCloudSDKException):
|
||||
raise
|
||||
else:
|
||||
raise TencentCloudSDKException(type(e).__name__, str(e))
|
||||
|
||||
|
||||
def DescribeFlowServices(self, request):
|
||||
r"""查询指定用户下所有状态机,以列表形式返回
|
||||
|
||||
:param request: Request instance for DescribeFlowServices.
|
||||
:type request: :class:`tencentcloud.asw.v20200722.models.DescribeFlowServicesRequest`
|
||||
:rtype: :class:`tencentcloud.asw.v20200722.models.DescribeFlowServicesResponse`
|
||||
|
||||
"""
|
||||
try:
|
||||
params = request._serialize()
|
||||
headers = request.headers
|
||||
body = self.call("DescribeFlowServices", params, headers=headers)
|
||||
response = json.loads(body)
|
||||
model = models.DescribeFlowServicesResponse()
|
||||
model._deserialize(response["Response"])
|
||||
return model
|
||||
except Exception as e:
|
||||
if isinstance(e, TencentCloudSDKException):
|
||||
raise
|
||||
else:
|
||||
raise TencentCloudSDKException(type(e).__name__, str(e))
|
||||
|
||||
|
||||
def ModifyFlowService(self, request):
|
||||
r"""该接口用于修改状态机
|
||||
|
||||
:param request: Request instance for ModifyFlowService.
|
||||
:type request: :class:`tencentcloud.asw.v20200722.models.ModifyFlowServiceRequest`
|
||||
:rtype: :class:`tencentcloud.asw.v20200722.models.ModifyFlowServiceResponse`
|
||||
|
||||
"""
|
||||
try:
|
||||
params = request._serialize()
|
||||
headers = request.headers
|
||||
body = self.call("ModifyFlowService", params, headers=headers)
|
||||
response = json.loads(body)
|
||||
model = models.ModifyFlowServiceResponse()
|
||||
model._deserialize(response["Response"])
|
||||
return model
|
||||
except Exception as e:
|
||||
if isinstance(e, TencentCloudSDKException):
|
||||
raise
|
||||
else:
|
||||
raise TencentCloudSDKException(type(e).__name__, str(e))
|
||||
|
||||
|
||||
def StartExecution(self, request):
|
||||
r"""为指定的状态机启动一次执行
|
||||
|
||||
:param request: Request instance for StartExecution.
|
||||
:type request: :class:`tencentcloud.asw.v20200722.models.StartExecutionRequest`
|
||||
:rtype: :class:`tencentcloud.asw.v20200722.models.StartExecutionResponse`
|
||||
|
||||
"""
|
||||
try:
|
||||
params = request._serialize()
|
||||
headers = request.headers
|
||||
body = self.call("StartExecution", params, headers=headers)
|
||||
response = json.loads(body)
|
||||
model = models.StartExecutionResponse()
|
||||
model._deserialize(response["Response"])
|
||||
return model
|
||||
except Exception as e:
|
||||
if isinstance(e, TencentCloudSDKException):
|
||||
raise
|
||||
else:
|
||||
raise TencentCloudSDKException(type(e).__name__, str(e))
|
||||
|
||||
|
||||
def StopExecution(self, request):
|
||||
r"""终止某个状态机
|
||||
|
||||
:param request: Request instance for StopExecution.
|
||||
:type request: :class:`tencentcloud.asw.v20200722.models.StopExecutionRequest`
|
||||
:rtype: :class:`tencentcloud.asw.v20200722.models.StopExecutionResponse`
|
||||
|
||||
"""
|
||||
try:
|
||||
params = request._serialize()
|
||||
headers = request.headers
|
||||
body = self.call("StopExecution", params, headers=headers)
|
||||
response = json.loads(body)
|
||||
model = models.StopExecutionResponse()
|
||||
model._deserialize(response["Response"])
|
||||
return model
|
||||
except Exception as e:
|
||||
if isinstance(e, TencentCloudSDKException):
|
||||
raise
|
||||
else:
|
||||
raise TencentCloudSDKException(type(e).__name__, str(e))
|
||||
@@ -0,0 +1,188 @@
|
||||
# -*- 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.asw.v20200722 import models
|
||||
from typing import Dict
|
||||
|
||||
|
||||
class AswClient(AbstractClient):
|
||||
_apiVersion = '2020-07-22'
|
||||
_endpoint = 'asw.tencentcloudapi.com'
|
||||
_service = 'asw'
|
||||
|
||||
async def CreateFlowService(
|
||||
self,
|
||||
request: models.CreateFlowServiceRequest,
|
||||
opts: Dict = None,
|
||||
) -> models.CreateFlowServiceResponse:
|
||||
"""
|
||||
该接口用于生成状态机服务
|
||||
"""
|
||||
|
||||
kwargs = {}
|
||||
kwargs["action"] = "CreateFlowService"
|
||||
kwargs["params"] = request._serialize()
|
||||
kwargs["resp_cls"] = models.CreateFlowServiceResponse
|
||||
kwargs["headers"] = request.headers
|
||||
kwargs["opts"] = opts or {}
|
||||
|
||||
return await self.call_and_deserialize(**kwargs)
|
||||
|
||||
async def DescribeExecution(
|
||||
self,
|
||||
request: models.DescribeExecutionRequest,
|
||||
opts: Dict = None,
|
||||
) -> models.DescribeExecutionResponse:
|
||||
"""
|
||||
查询执行详细信息
|
||||
"""
|
||||
|
||||
kwargs = {}
|
||||
kwargs["action"] = "DescribeExecution"
|
||||
kwargs["params"] = request._serialize()
|
||||
kwargs["resp_cls"] = models.DescribeExecutionResponse
|
||||
kwargs["headers"] = request.headers
|
||||
kwargs["opts"] = opts or {}
|
||||
|
||||
return await self.call_and_deserialize(**kwargs)
|
||||
|
||||
async def DescribeExecutionHistory(
|
||||
self,
|
||||
request: models.DescribeExecutionHistoryRequest,
|
||||
opts: Dict = None,
|
||||
) -> models.DescribeExecutionHistoryResponse:
|
||||
"""
|
||||
一次执行会有很多步骤,经过很多节点,这个接口描述某一次执行的事件的历史
|
||||
"""
|
||||
|
||||
kwargs = {}
|
||||
kwargs["action"] = "DescribeExecutionHistory"
|
||||
kwargs["params"] = request._serialize()
|
||||
kwargs["resp_cls"] = models.DescribeExecutionHistoryResponse
|
||||
kwargs["headers"] = request.headers
|
||||
kwargs["opts"] = opts or {}
|
||||
|
||||
return await self.call_and_deserialize(**kwargs)
|
||||
|
||||
async def DescribeExecutions(
|
||||
self,
|
||||
request: models.DescribeExecutionsRequest,
|
||||
opts: Dict = None,
|
||||
) -> models.DescribeExecutionsResponse:
|
||||
"""
|
||||
对状态机的执行历史进行描述.
|
||||
"""
|
||||
|
||||
kwargs = {}
|
||||
kwargs["action"] = "DescribeExecutions"
|
||||
kwargs["params"] = request._serialize()
|
||||
kwargs["resp_cls"] = models.DescribeExecutionsResponse
|
||||
kwargs["headers"] = request.headers
|
||||
kwargs["opts"] = opts or {}
|
||||
|
||||
return await self.call_and_deserialize(**kwargs)
|
||||
|
||||
async def DescribeFlowServiceDetail(
|
||||
self,
|
||||
request: models.DescribeFlowServiceDetailRequest,
|
||||
opts: Dict = None,
|
||||
) -> models.DescribeFlowServiceDetailResponse:
|
||||
"""
|
||||
查询该用户指定状态机下的详情数据。
|
||||
"""
|
||||
|
||||
kwargs = {}
|
||||
kwargs["action"] = "DescribeFlowServiceDetail"
|
||||
kwargs["params"] = request._serialize()
|
||||
kwargs["resp_cls"] = models.DescribeFlowServiceDetailResponse
|
||||
kwargs["headers"] = request.headers
|
||||
kwargs["opts"] = opts or {}
|
||||
|
||||
return await self.call_and_deserialize(**kwargs)
|
||||
|
||||
async def DescribeFlowServices(
|
||||
self,
|
||||
request: models.DescribeFlowServicesRequest,
|
||||
opts: Dict = None,
|
||||
) -> models.DescribeFlowServicesResponse:
|
||||
"""
|
||||
查询指定用户下所有状态机,以列表形式返回
|
||||
"""
|
||||
|
||||
kwargs = {}
|
||||
kwargs["action"] = "DescribeFlowServices"
|
||||
kwargs["params"] = request._serialize()
|
||||
kwargs["resp_cls"] = models.DescribeFlowServicesResponse
|
||||
kwargs["headers"] = request.headers
|
||||
kwargs["opts"] = opts or {}
|
||||
|
||||
return await self.call_and_deserialize(**kwargs)
|
||||
|
||||
async def ModifyFlowService(
|
||||
self,
|
||||
request: models.ModifyFlowServiceRequest,
|
||||
opts: Dict = None,
|
||||
) -> models.ModifyFlowServiceResponse:
|
||||
"""
|
||||
该接口用于修改状态机
|
||||
"""
|
||||
|
||||
kwargs = {}
|
||||
kwargs["action"] = "ModifyFlowService"
|
||||
kwargs["params"] = request._serialize()
|
||||
kwargs["resp_cls"] = models.ModifyFlowServiceResponse
|
||||
kwargs["headers"] = request.headers
|
||||
kwargs["opts"] = opts or {}
|
||||
|
||||
return await self.call_and_deserialize(**kwargs)
|
||||
|
||||
async def StartExecution(
|
||||
self,
|
||||
request: models.StartExecutionRequest,
|
||||
opts: Dict = None,
|
||||
) -> models.StartExecutionResponse:
|
||||
"""
|
||||
为指定的状态机启动一次执行
|
||||
"""
|
||||
|
||||
kwargs = {}
|
||||
kwargs["action"] = "StartExecution"
|
||||
kwargs["params"] = request._serialize()
|
||||
kwargs["resp_cls"] = models.StartExecutionResponse
|
||||
kwargs["headers"] = request.headers
|
||||
kwargs["opts"] = opts or {}
|
||||
|
||||
return await self.call_and_deserialize(**kwargs)
|
||||
|
||||
async def StopExecution(
|
||||
self,
|
||||
request: models.StopExecutionRequest,
|
||||
opts: Dict = None,
|
||||
) -> models.StopExecutionResponse:
|
||||
"""
|
||||
终止某个状态机
|
||||
"""
|
||||
|
||||
kwargs = {}
|
||||
kwargs["action"] = "StopExecution"
|
||||
kwargs["params"] = request._serialize()
|
||||
kwargs["resp_cls"] = models.StopExecutionResponse
|
||||
kwargs["headers"] = request.headers
|
||||
kwargs["opts"] = opts or {}
|
||||
|
||||
return await self.call_and_deserialize(**kwargs)
|
||||
@@ -0,0 +1,30 @@
|
||||
# -*- 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'
|
||||
|
||||
# 参数错误。
|
||||
INVALIDPARAMETER = 'InvalidParameter'
|
||||
|
||||
# 参数取值错误。
|
||||
INVALIDPARAMETERVALUE = 'InvalidParameterValue'
|
||||
|
||||
# 资源不存在。
|
||||
RESOURCENOTFOUND = 'ResourceNotFound'
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user