tencentcloud-sdk-python-intl-en 3.0.1193__py2.py3-none-any.whl → 3.0.1195__py2.py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of tencentcloud-sdk-python-intl-en might be problematic. Click here for more details.

@@ -0,0 +1,118 @@
1
+ # -*- coding: utf8 -*-
2
+ # Copyright (c) 2017-2021 THL A29 Limited, a Tencent company. All Rights Reserved.
3
+ #
4
+ # Licensed under the Apache License, Version 2.0 (the "License");
5
+ # you may not use this file except in compliance with the License.
6
+ # You may obtain a copy of the License at
7
+ #
8
+ # http://www.apache.org/licenses/LICENSE-2.0
9
+ #
10
+ # Unless required by applicable law or agreed to in writing, software
11
+ # distributed under the License is distributed on an "AS IS" BASIS,
12
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ # See the License for the specific language governing permissions and
14
+ # limitations under the License.
15
+
16
+ import json
17
+
18
+ from tencentcloud.common.exception.tencent_cloud_sdk_exception import TencentCloudSDKException
19
+ from tencentcloud.common.abstract_client import AbstractClient
20
+ from tencentcloud.tbaas.v20180416 import models
21
+
22
+
23
+ class TbaasClient(AbstractClient):
24
+ _apiVersion = '2018-04-16'
25
+ _endpoint = 'tbaas.intl.tencentcloudapi.com'
26
+ _service = 'tbaas'
27
+
28
+
29
+ def DescribeFabricBlock(self, request):
30
+ """This API is used to retrieve the detailed information of a block in Fabric.
31
+
32
+ :param request: Request instance for DescribeFabricBlock.
33
+ :type request: :class:`tencentcloud.tbaas.v20180416.models.DescribeFabricBlockRequest`
34
+ :rtype: :class:`tencentcloud.tbaas.v20180416.models.DescribeFabricBlockResponse`
35
+
36
+ """
37
+ try:
38
+ params = request._serialize()
39
+ headers = request.headers
40
+ body = self.call("DescribeFabricBlock", params, headers=headers)
41
+ response = json.loads(body)
42
+ model = models.DescribeFabricBlockResponse()
43
+ model._deserialize(response["Response"])
44
+ return model
45
+ except Exception as e:
46
+ if isinstance(e, TencentCloudSDKException):
47
+ raise
48
+ else:
49
+ raise TencentCloudSDKException(type(e).__name__, str(e))
50
+
51
+
52
+ def DescribeFabricTransaction(self, request):
53
+ """This API is used to obtain detailed information of Fabric transactions.
54
+
55
+ :param request: Request instance for DescribeFabricTransaction.
56
+ :type request: :class:`tencentcloud.tbaas.v20180416.models.DescribeFabricTransactionRequest`
57
+ :rtype: :class:`tencentcloud.tbaas.v20180416.models.DescribeFabricTransactionResponse`
58
+
59
+ """
60
+ try:
61
+ params = request._serialize()
62
+ headers = request.headers
63
+ body = self.call("DescribeFabricTransaction", params, headers=headers)
64
+ response = json.loads(body)
65
+ model = models.DescribeFabricTransactionResponse()
66
+ model._deserialize(response["Response"])
67
+ return model
68
+ except Exception as e:
69
+ if isinstance(e, TencentCloudSDKException):
70
+ raise
71
+ else:
72
+ raise TencentCloudSDKException(type(e).__name__, str(e))
73
+
74
+
75
+ def InvokeFabricChaincode(self, request):
76
+ """This API is used to call a Fabric user contract to execute a transaction.
77
+
78
+ :param request: Request instance for InvokeFabricChaincode.
79
+ :type request: :class:`tencentcloud.tbaas.v20180416.models.InvokeFabricChaincodeRequest`
80
+ :rtype: :class:`tencentcloud.tbaas.v20180416.models.InvokeFabricChaincodeResponse`
81
+
82
+ """
83
+ try:
84
+ params = request._serialize()
85
+ headers = request.headers
86
+ body = self.call("InvokeFabricChaincode", params, headers=headers)
87
+ response = json.loads(body)
88
+ model = models.InvokeFabricChaincodeResponse()
89
+ model._deserialize(response["Response"])
90
+ return model
91
+ except Exception as e:
92
+ if isinstance(e, TencentCloudSDKException):
93
+ raise
94
+ else:
95
+ raise TencentCloudSDKException(type(e).__name__, str(e))
96
+
97
+
98
+ def QueryFabricChaincode(self, request):
99
+ """This API is used to make a user contract call in Fabric for querying.
100
+
101
+ :param request: Request instance for QueryFabricChaincode.
102
+ :type request: :class:`tencentcloud.tbaas.v20180416.models.QueryFabricChaincodeRequest`
103
+ :rtype: :class:`tencentcloud.tbaas.v20180416.models.QueryFabricChaincodeResponse`
104
+
105
+ """
106
+ try:
107
+ params = request._serialize()
108
+ headers = request.headers
109
+ body = self.call("QueryFabricChaincode", params, headers=headers)
110
+ response = json.loads(body)
111
+ model = models.QueryFabricChaincodeResponse()
112
+ model._deserialize(response["Response"])
113
+ return model
114
+ except Exception as e:
115
+ if isinstance(e, TencentCloudSDKException):
116
+ raise
117
+ else:
118
+ raise TencentCloudSDKException(type(e).__name__, str(e))