tencentcloud-sdk-btoe 1.0.200
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/lib/VERSION +1 -0
- data/lib/tencentcloud-sdk-btoe.rb +14 -0
- data/lib/v20210303/client.rb +349 -0
- data/lib/v20210303/models.rb +732 -0
- data/lib/v20210514/client.rb +349 -0
- data/lib/v20210514/models.rb +697 -0
- metadata +68 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 4d67b7b6fe106ee95eb6c72c3b8d4f13fe22cd5d
|
4
|
+
data.tar.gz: d6bf8f5d8f3c3e073b40143a02ad5f5072e622d7
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: ee68c9cecfb756e7c65653e919877fa6883db75e8f1c4b24ac331c8aa32770839cdf15b325f441ba347efe15ffa77a42c709d72c558e7083ec89c698c4aa0982
|
7
|
+
data.tar.gz: d8e5cbf6426dcf06f860cd00ae3408d88b0a006cde429b5622e100d9b9b7dd3573b9a09e90b5dbd7828817a2eec2f4daaca61d436f589de0f1f938fc71ac4c3f
|
data/lib/VERSION
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
1.0.200
|
@@ -0,0 +1,14 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'tencentcloud-sdk-common'
|
4
|
+
|
5
|
+
require_relative 'v20210303/client'
|
6
|
+
require_relative 'v20210303/models'
|
7
|
+
|
8
|
+
require_relative 'v20210514/client'
|
9
|
+
require_relative 'v20210514/models'
|
10
|
+
|
11
|
+
module TencentCloud
|
12
|
+
module Btoe
|
13
|
+
end
|
14
|
+
end
|
@@ -0,0 +1,349 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright (c) 2017-2018 THL A29 Limited, a Tencent company. All Rights Reserved.
|
4
|
+
#
|
5
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
6
|
+
# you may not use this file except in compliance with the License.
|
7
|
+
# You may obtain a copy of the License at
|
8
|
+
#
|
9
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
#
|
11
|
+
# Unless required by applicable law or agreed to in writing, software
|
12
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
13
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
|
+
# See the License for the specific language governing permissions and
|
15
|
+
# limitations under the License.
|
16
|
+
|
17
|
+
require 'json'
|
18
|
+
|
19
|
+
module TencentCloud
|
20
|
+
module Btoe
|
21
|
+
module V20210303
|
22
|
+
class Client < TencentCloud::Common::AbstractClient
|
23
|
+
|
24
|
+
def initialize(credential, region, profile = nil)
|
25
|
+
api_version = '2021-03-03'
|
26
|
+
api_endpoint = 'btoe.tencentcloudapi.com'
|
27
|
+
sdk_version = 'BTOE_' + File.read(File.expand_path('../VERSION', __dir__)).strip
|
28
|
+
super(credential, region, api_version, api_endpoint, sdk_version, profile)
|
29
|
+
end
|
30
|
+
|
31
|
+
|
32
|
+
# 功能迭代,已上线更高版本的接口2021-05-14
|
33
|
+
|
34
|
+
# 用户通过本接口向BTOE写入待存证的音频原文件或下载URL,BTOE对音频原文件存储后,将其Hash值存证上链,并生成含有电子签章的区块链存证电子凭证。音频类型支持格式:mp3、wav、wma、midi、flac;原文件上传大小不超过5 MB,下载URL文件大小不超过25 MB。
|
35
|
+
|
36
|
+
# @param request: Request instance for CreateAudioDeposit.
|
37
|
+
# @type request: :class:`Tencentcloud::btoe::V20210303::CreateAudioDepositRequest`
|
38
|
+
# @rtype: :class:`Tencentcloud::btoe::V20210303::CreateAudioDepositResponse`
|
39
|
+
def CreateAudioDeposit(request)
|
40
|
+
body = send_request('CreateAudioDeposit', request.serialize)
|
41
|
+
response = JSON.parse(body)
|
42
|
+
if response['Response'].key?('Error') == false
|
43
|
+
model = CreateAudioDepositResponse.new
|
44
|
+
model.deserialize(response['Response'])
|
45
|
+
model
|
46
|
+
else
|
47
|
+
code = response['Response']['Error']['Code']
|
48
|
+
message = response['Response']['Error']['Message']
|
49
|
+
reqid = response['Response']['RequestId']
|
50
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
51
|
+
end
|
52
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
53
|
+
raise e
|
54
|
+
rescue StandardError => e
|
55
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
56
|
+
end
|
57
|
+
|
58
|
+
# 功能迭代,已上线更高版本的接口2021-05-14
|
59
|
+
|
60
|
+
# 用户通过本接口向BTOE写入待存证的业务数据明文,业务数据明文存证写入后不可修改,BTOE对业务数据明文存证生成含有电子签章的区块链存证电子凭证。
|
61
|
+
|
62
|
+
# @param request: Request instance for CreateDataDeposit.
|
63
|
+
# @type request: :class:`Tencentcloud::btoe::V20210303::CreateDataDepositRequest`
|
64
|
+
# @rtype: :class:`Tencentcloud::btoe::V20210303::CreateDataDepositResponse`
|
65
|
+
def CreateDataDeposit(request)
|
66
|
+
body = send_request('CreateDataDeposit', request.serialize)
|
67
|
+
response = JSON.parse(body)
|
68
|
+
if response['Response'].key?('Error') == false
|
69
|
+
model = CreateDataDepositResponse.new
|
70
|
+
model.deserialize(response['Response'])
|
71
|
+
model
|
72
|
+
else
|
73
|
+
code = response['Response']['Error']['Code']
|
74
|
+
message = response['Response']['Error']['Message']
|
75
|
+
reqid = response['Response']['RequestId']
|
76
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
77
|
+
end
|
78
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
79
|
+
raise e
|
80
|
+
rescue StandardError => e
|
81
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
82
|
+
end
|
83
|
+
|
84
|
+
# 功能迭代,已上线更高版本的接口2021-05-14
|
85
|
+
|
86
|
+
# 用户通过本接口向BTOE写入待存证的文档原文件或下载URL,BTOE对文档原文件存储后,将其Hash值存证上链,并生成含有电子签章的区块链存证电子凭证。文档类型支持格式:doc、docx、xls、xlsx、ppt、pptx、 pdf、html、txt、md、csv;原文件上传大小不超过5 MB,下载URL文件大小不超过10 MB。
|
87
|
+
|
88
|
+
# @param request: Request instance for CreateDocDeposit.
|
89
|
+
# @type request: :class:`Tencentcloud::btoe::V20210303::CreateDocDepositRequest`
|
90
|
+
# @rtype: :class:`Tencentcloud::btoe::V20210303::CreateDocDepositResponse`
|
91
|
+
def CreateDocDeposit(request)
|
92
|
+
body = send_request('CreateDocDeposit', request.serialize)
|
93
|
+
response = JSON.parse(body)
|
94
|
+
if response['Response'].key?('Error') == false
|
95
|
+
model = CreateDocDepositResponse.new
|
96
|
+
model.deserialize(response['Response'])
|
97
|
+
model
|
98
|
+
else
|
99
|
+
code = response['Response']['Error']['Code']
|
100
|
+
message = response['Response']['Error']['Message']
|
101
|
+
reqid = response['Response']['RequestId']
|
102
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
103
|
+
end
|
104
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
105
|
+
raise e
|
106
|
+
rescue StandardError => e
|
107
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
108
|
+
end
|
109
|
+
|
110
|
+
# 功能迭代,已上线更高版本的接口2021-05-14
|
111
|
+
|
112
|
+
# 用户通过本接口向BTOE写入待存证的原文数据Hash值,BTOE对业务数据Hash值存证上链,并生成含有电子签章的区块链存证电子凭证。
|
113
|
+
|
114
|
+
# @param request: Request instance for CreateHashDeposit.
|
115
|
+
# @type request: :class:`Tencentcloud::btoe::V20210303::CreateHashDepositRequest`
|
116
|
+
# @rtype: :class:`Tencentcloud::btoe::V20210303::CreateHashDepositResponse`
|
117
|
+
def CreateHashDeposit(request)
|
118
|
+
body = send_request('CreateHashDeposit', request.serialize)
|
119
|
+
response = JSON.parse(body)
|
120
|
+
if response['Response'].key?('Error') == false
|
121
|
+
model = CreateHashDepositResponse.new
|
122
|
+
model.deserialize(response['Response'])
|
123
|
+
model
|
124
|
+
else
|
125
|
+
code = response['Response']['Error']['Code']
|
126
|
+
message = response['Response']['Error']['Message']
|
127
|
+
reqid = response['Response']['RequestId']
|
128
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
129
|
+
end
|
130
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
131
|
+
raise e
|
132
|
+
rescue StandardError => e
|
133
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
134
|
+
end
|
135
|
+
|
136
|
+
# 功能迭代,已上线更高版本的接口2021-05-14
|
137
|
+
|
138
|
+
# 用户通过本接口向BTOE写入待存证的原文数据Hash值,BTOE对业务数据Hash值存证上链,本接口不生成区块链存证电子凭证。
|
139
|
+
|
140
|
+
# @param request: Request instance for CreateHashDepositNoCert.
|
141
|
+
# @type request: :class:`Tencentcloud::btoe::V20210303::CreateHashDepositNoCertRequest`
|
142
|
+
# @rtype: :class:`Tencentcloud::btoe::V20210303::CreateHashDepositNoCertResponse`
|
143
|
+
def CreateHashDepositNoCert(request)
|
144
|
+
body = send_request('CreateHashDepositNoCert', request.serialize)
|
145
|
+
response = JSON.parse(body)
|
146
|
+
if response['Response'].key?('Error') == false
|
147
|
+
model = CreateHashDepositNoCertResponse.new
|
148
|
+
model.deserialize(response['Response'])
|
149
|
+
model
|
150
|
+
else
|
151
|
+
code = response['Response']['Error']['Code']
|
152
|
+
message = response['Response']['Error']['Message']
|
153
|
+
reqid = response['Response']['RequestId']
|
154
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
155
|
+
end
|
156
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
157
|
+
raise e
|
158
|
+
rescue StandardError => e
|
159
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
160
|
+
end
|
161
|
+
|
162
|
+
# 功能迭代,已上线更高版本的接口2021-05-14
|
163
|
+
|
164
|
+
# 用户通过本接口向BTOE写入待存证的原文数据Hash值,BTOE对业务数据Hash值存证上链,并生成无电子签章的区块链存证电子凭证。
|
165
|
+
|
166
|
+
# @param request: Request instance for CreateHashDepositNoSeal.
|
167
|
+
# @type request: :class:`Tencentcloud::btoe::V20210303::CreateHashDepositNoSealRequest`
|
168
|
+
# @rtype: :class:`Tencentcloud::btoe::V20210303::CreateHashDepositNoSealResponse`
|
169
|
+
def CreateHashDepositNoSeal(request)
|
170
|
+
body = send_request('CreateHashDepositNoSeal', request.serialize)
|
171
|
+
response = JSON.parse(body)
|
172
|
+
if response['Response'].key?('Error') == false
|
173
|
+
model = CreateHashDepositNoSealResponse.new
|
174
|
+
model.deserialize(response['Response'])
|
175
|
+
model
|
176
|
+
else
|
177
|
+
code = response['Response']['Error']['Code']
|
178
|
+
message = response['Response']['Error']['Message']
|
179
|
+
reqid = response['Response']['RequestId']
|
180
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
181
|
+
end
|
182
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
183
|
+
raise e
|
184
|
+
rescue StandardError => e
|
185
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
186
|
+
end
|
187
|
+
|
188
|
+
# 功能迭代,已上线更高版本的接口2021-05-14
|
189
|
+
|
190
|
+
# 用户通过本接口向BTOE写入待存证的图片原文件或下载URL,BTOE对图片原文件存储后,将其Hash值存证上链,并生成含有电子签章的区块链存证电子凭证。图片类型支持格式:png、jpg、jpeg、bmp、gif、svg;原文件上传大小不超过5 MB,下载URL文件大小不超过10 MB。
|
191
|
+
|
192
|
+
# @param request: Request instance for CreateImageDeposit.
|
193
|
+
# @type request: :class:`Tencentcloud::btoe::V20210303::CreateImageDepositRequest`
|
194
|
+
# @rtype: :class:`Tencentcloud::btoe::V20210303::CreateImageDepositResponse`
|
195
|
+
def CreateImageDeposit(request)
|
196
|
+
body = send_request('CreateImageDeposit', request.serialize)
|
197
|
+
response = JSON.parse(body)
|
198
|
+
if response['Response'].key?('Error') == false
|
199
|
+
model = CreateImageDepositResponse.new
|
200
|
+
model.deserialize(response['Response'])
|
201
|
+
model
|
202
|
+
else
|
203
|
+
code = response['Response']['Error']['Code']
|
204
|
+
message = response['Response']['Error']['Message']
|
205
|
+
reqid = response['Response']['RequestId']
|
206
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
207
|
+
end
|
208
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
209
|
+
raise e
|
210
|
+
rescue StandardError => e
|
211
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
212
|
+
end
|
213
|
+
|
214
|
+
# 功能迭代,已上线更高版本的接口2021-05-14
|
215
|
+
|
216
|
+
# 用户通过本接口向BTOE写入待存证的视频的原文件或下载URL,BTOE对视频原文件存储后,将其Hash值存证上链,并生成含有电子签章的区块链存证电子凭证。视频文件支持格式:mp4、avi、mkv、mov、flv,wmv,rmvb,3gp;文件大小限制:直接上传原文件不大于5MB,下载URL文件大小不大于200 MB。
|
217
|
+
|
218
|
+
# @param request: Request instance for CreateVideoDeposit.
|
219
|
+
# @type request: :class:`Tencentcloud::btoe::V20210303::CreateVideoDepositRequest`
|
220
|
+
# @rtype: :class:`Tencentcloud::btoe::V20210303::CreateVideoDepositResponse`
|
221
|
+
def CreateVideoDeposit(request)
|
222
|
+
body = send_request('CreateVideoDeposit', request.serialize)
|
223
|
+
response = JSON.parse(body)
|
224
|
+
if response['Response'].key?('Error') == false
|
225
|
+
model = CreateVideoDepositResponse.new
|
226
|
+
model.deserialize(response['Response'])
|
227
|
+
model
|
228
|
+
else
|
229
|
+
code = response['Response']['Error']['Code']
|
230
|
+
message = response['Response']['Error']['Message']
|
231
|
+
reqid = response['Response']['RequestId']
|
232
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
233
|
+
end
|
234
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
235
|
+
raise e
|
236
|
+
rescue StandardError => e
|
237
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
238
|
+
end
|
239
|
+
|
240
|
+
# 功能迭代,已上线更高版本的接口2021-05-14
|
241
|
+
|
242
|
+
# 用户通过本接口向BTOE提交待存证网页的URL,BTOE对URL进行网页快照,并将快照图片存储,将网页快照Hash值存证上链,并生成含有电子签章的区块链存证电子凭证。URL格式必须以http、https开头。
|
243
|
+
|
244
|
+
# @param request: Request instance for CreateWebpageDeposit.
|
245
|
+
# @type request: :class:`Tencentcloud::btoe::V20210303::CreateWebpageDepositRequest`
|
246
|
+
# @rtype: :class:`Tencentcloud::btoe::V20210303::CreateWebpageDepositResponse`
|
247
|
+
def CreateWebpageDeposit(request)
|
248
|
+
body = send_request('CreateWebpageDeposit', request.serialize)
|
249
|
+
response = JSON.parse(body)
|
250
|
+
if response['Response'].key?('Error') == false
|
251
|
+
model = CreateWebpageDepositResponse.new
|
252
|
+
model.deserialize(response['Response'])
|
253
|
+
model
|
254
|
+
else
|
255
|
+
code = response['Response']['Error']['Code']
|
256
|
+
message = response['Response']['Error']['Message']
|
257
|
+
reqid = response['Response']['RequestId']
|
258
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
259
|
+
end
|
260
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
261
|
+
raise e
|
262
|
+
rescue StandardError => e
|
263
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
264
|
+
end
|
265
|
+
|
266
|
+
# 功能迭代,已上线更高版本的接口2021-05-14
|
267
|
+
|
268
|
+
# 用户通过存证编码向BTOE查询存证电子凭证信息。
|
269
|
+
|
270
|
+
# @param request: Request instance for GetDepositCert.
|
271
|
+
# @type request: :class:`Tencentcloud::btoe::V20210303::GetDepositCertRequest`
|
272
|
+
# @rtype: :class:`Tencentcloud::btoe::V20210303::GetDepositCertResponse`
|
273
|
+
def GetDepositCert(request)
|
274
|
+
body = send_request('GetDepositCert', request.serialize)
|
275
|
+
response = JSON.parse(body)
|
276
|
+
if response['Response'].key?('Error') == false
|
277
|
+
model = GetDepositCertResponse.new
|
278
|
+
model.deserialize(response['Response'])
|
279
|
+
model
|
280
|
+
else
|
281
|
+
code = response['Response']['Error']['Code']
|
282
|
+
message = response['Response']['Error']['Message']
|
283
|
+
reqid = response['Response']['RequestId']
|
284
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
285
|
+
end
|
286
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
287
|
+
raise e
|
288
|
+
rescue StandardError => e
|
289
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
290
|
+
end
|
291
|
+
|
292
|
+
# 功能迭代,已上线更高版本的接口2021-05-14
|
293
|
+
|
294
|
+
# 用户通过存证编码向BTOE获取存证文件的下载URL。
|
295
|
+
# -注:Hash类存证、业务数据明文存证不产生存证文件。
|
296
|
+
|
297
|
+
# @param request: Request instance for GetDepositFile.
|
298
|
+
# @type request: :class:`Tencentcloud::btoe::V20210303::GetDepositFileRequest`
|
299
|
+
# @rtype: :class:`Tencentcloud::btoe::V20210303::GetDepositFileResponse`
|
300
|
+
def GetDepositFile(request)
|
301
|
+
body = send_request('GetDepositFile', request.serialize)
|
302
|
+
response = JSON.parse(body)
|
303
|
+
if response['Response'].key?('Error') == false
|
304
|
+
model = GetDepositFileResponse.new
|
305
|
+
model.deserialize(response['Response'])
|
306
|
+
model
|
307
|
+
else
|
308
|
+
code = response['Response']['Error']['Code']
|
309
|
+
message = response['Response']['Error']['Message']
|
310
|
+
reqid = response['Response']['RequestId']
|
311
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
312
|
+
end
|
313
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
314
|
+
raise e
|
315
|
+
rescue StandardError => e
|
316
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
317
|
+
end
|
318
|
+
|
319
|
+
# 功能迭代,已上线更高版本的接口2021-05-14
|
320
|
+
|
321
|
+
# 用户通过存证编码向BTOE查询存证基本信息。
|
322
|
+
|
323
|
+
# @param request: Request instance for GetDepositInfo.
|
324
|
+
# @type request: :class:`Tencentcloud::btoe::V20210303::GetDepositInfoRequest`
|
325
|
+
# @rtype: :class:`Tencentcloud::btoe::V20210303::GetDepositInfoResponse`
|
326
|
+
def GetDepositInfo(request)
|
327
|
+
body = send_request('GetDepositInfo', request.serialize)
|
328
|
+
response = JSON.parse(body)
|
329
|
+
if response['Response'].key?('Error') == false
|
330
|
+
model = GetDepositInfoResponse.new
|
331
|
+
model.deserialize(response['Response'])
|
332
|
+
model
|
333
|
+
else
|
334
|
+
code = response['Response']['Error']['Code']
|
335
|
+
message = response['Response']['Error']['Message']
|
336
|
+
reqid = response['Response']['RequestId']
|
337
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
338
|
+
end
|
339
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
340
|
+
raise e
|
341
|
+
rescue StandardError => e
|
342
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
343
|
+
end
|
344
|
+
|
345
|
+
|
346
|
+
end
|
347
|
+
end
|
348
|
+
end
|
349
|
+
end
|