tencentcloud-sdk-live 1.0.200

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,2934 @@
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 Live
21
+ module V20180801
22
+ class Client < TencentCloud::Common::AbstractClient
23
+
24
+ def initialize(credential, region, profile = nil)
25
+ api_version = '2018-08-01'
26
+ api_endpoint = 'live.tencentcloudapi.com'
27
+ sdk_version = 'LIVE_' + File.read(File.expand_path('../VERSION', __dir__)).strip
28
+ super(credential, region, api_version, api_endpoint, sdk_version, profile)
29
+ end
30
+
31
+
32
+ # 针对大型活动直播,通过对直播流设置延时来控制现场与观众播放画面的时间间隔,避免突发状况造成影响。
33
+
34
+ # 注意:如果在推流前设置延播,需要提前5分钟设置,目前该接口只支持流粒度。
35
+
36
+ # @param request: Request instance for AddDelayLiveStream.
37
+ # @type request: :class:`Tencentcloud::live::V20180801::AddDelayLiveStreamRequest`
38
+ # @rtype: :class:`Tencentcloud::live::V20180801::AddDelayLiveStreamResponse`
39
+ def AddDelayLiveStream(request)
40
+ body = send_request('AddDelayLiveStream', request.serialize)
41
+ response = JSON.parse(body)
42
+ if response['Response'].key?('Error') == false
43
+ model = AddDelayLiveStreamResponse.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
+ # 添加域名,一次只能提交一个域名。域名必须已备案。
59
+
60
+ # @param request: Request instance for AddLiveDomain.
61
+ # @type request: :class:`Tencentcloud::live::V20180801::AddLiveDomainRequest`
62
+ # @rtype: :class:`Tencentcloud::live::V20180801::AddLiveDomainResponse`
63
+ def AddLiveDomain(request)
64
+ body = send_request('AddLiveDomain', request.serialize)
65
+ response = JSON.parse(body)
66
+ if response['Response'].key?('Error') == false
67
+ model = AddLiveDomainResponse.new
68
+ model.deserialize(response['Response'])
69
+ model
70
+ else
71
+ code = response['Response']['Error']['Code']
72
+ message = response['Response']['Error']['Message']
73
+ reqid = response['Response']['RequestId']
74
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
75
+ end
76
+ rescue TencentCloud::Common::TencentCloudSDKException => e
77
+ raise e
78
+ rescue StandardError => e
79
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
80
+ end
81
+
82
+ # 添加水印,成功返回水印 ID 后,需要调用[CreateLiveWatermarkRule](/document/product/267/32629)接口将水印 ID 绑定到流使用。
83
+ # 水印数量上限 100,超过后需要先删除,再添加。
84
+
85
+ # @param request: Request instance for AddLiveWatermark.
86
+ # @type request: :class:`Tencentcloud::live::V20180801::AddLiveWatermarkRequest`
87
+ # @rtype: :class:`Tencentcloud::live::V20180801::AddLiveWatermarkResponse`
88
+ def AddLiveWatermark(request)
89
+ body = send_request('AddLiveWatermark', request.serialize)
90
+ response = JSON.parse(body)
91
+ if response['Response'].key?('Error') == false
92
+ model = AddLiveWatermarkResponse.new
93
+ model.deserialize(response['Response'])
94
+ model
95
+ else
96
+ code = response['Response']['Error']['Code']
97
+ message = response['Response']['Error']['Message']
98
+ reqid = response['Response']['RequestId']
99
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
100
+ end
101
+ rescue TencentCloud::Common::TencentCloudSDKException => e
102
+ raise e
103
+ rescue StandardError => e
104
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
105
+ end
106
+
107
+ # 域名绑定证书。
108
+ # 注意:需先调用添加证书接口进行证书添加。获取到证书Id后再调用该接口进行绑定。
109
+
110
+ # @param request: Request instance for BindLiveDomainCert.
111
+ # @type request: :class:`Tencentcloud::live::V20180801::BindLiveDomainCertRequest`
112
+ # @rtype: :class:`Tencentcloud::live::V20180801::BindLiveDomainCertResponse`
113
+ def BindLiveDomainCert(request)
114
+ body = send_request('BindLiveDomainCert', request.serialize)
115
+ response = JSON.parse(body)
116
+ if response['Response'].key?('Error') == false
117
+ model = BindLiveDomainCertResponse.new
118
+ model.deserialize(response['Response'])
119
+ model
120
+ else
121
+ code = response['Response']['Error']['Code']
122
+ message = response['Response']['Error']['Message']
123
+ reqid = response['Response']['RequestId']
124
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
125
+ end
126
+ rescue TencentCloud::Common::TencentCloudSDKException => e
127
+ raise e
128
+ rescue StandardError => e
129
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
130
+ end
131
+
132
+ # 该接口用来取消混流。用法与 mix_streamv2.cancel_mix_stream 基本一致。
133
+
134
+ # @param request: Request instance for CancelCommonMixStream.
135
+ # @type request: :class:`Tencentcloud::live::V20180801::CancelCommonMixStreamRequest`
136
+ # @rtype: :class:`Tencentcloud::live::V20180801::CancelCommonMixStreamResponse`
137
+ def CancelCommonMixStream(request)
138
+ body = send_request('CancelCommonMixStream', request.serialize)
139
+ response = JSON.parse(body)
140
+ if response['Response'].key?('Error') == false
141
+ model = CancelCommonMixStreamResponse.new
142
+ model.deserialize(response['Response'])
143
+ model
144
+ else
145
+ code = response['Response']['Error']['Code']
146
+ message = response['Response']['Error']['Message']
147
+ reqid = response['Response']['RequestId']
148
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
149
+ end
150
+ rescue TencentCloud::Common::TencentCloudSDKException => e
151
+ raise e
152
+ rescue StandardError => e
153
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
154
+ end
155
+
156
+ # 该接口用来创建通用混流。用法与旧接口 mix_streamv2.start_mix_stream_advanced 基本一致。
157
+ # 注意:当前最多支持16路混流。
158
+ # 最佳实践:https://cloud.tencent.com/document/product/267/45566
159
+
160
+ # @param request: Request instance for CreateCommonMixStream.
161
+ # @type request: :class:`Tencentcloud::live::V20180801::CreateCommonMixStreamRequest`
162
+ # @rtype: :class:`Tencentcloud::live::V20180801::CreateCommonMixStreamResponse`
163
+ def CreateCommonMixStream(request)
164
+ body = send_request('CreateCommonMixStream', request.serialize)
165
+ response = JSON.parse(body)
166
+ if response['Response'].key?('Error') == false
167
+ model = CreateCommonMixStreamResponse.new
168
+ model.deserialize(response['Response'])
169
+ model
170
+ else
171
+ code = response['Response']['Error']['Code']
172
+ message = response['Response']['Error']['Message']
173
+ reqid = response['Response']['RequestId']
174
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
175
+ end
176
+ rescue TencentCloud::Common::TencentCloudSDKException => e
177
+ raise e
178
+ rescue StandardError => e
179
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
180
+ end
181
+
182
+ # 创建回调规则,需要先调用[CreateLiveCallbackTemplate](/document/product/267/32637)接口创建回调模板,将返回的模板id绑定到域名/路径进行使用。
183
+ # <br>回调协议相关文档:[事件消息通知](/document/product/267/32744)。
184
+
185
+ # @param request: Request instance for CreateLiveCallbackRule.
186
+ # @type request: :class:`Tencentcloud::live::V20180801::CreateLiveCallbackRuleRequest`
187
+ # @rtype: :class:`Tencentcloud::live::V20180801::CreateLiveCallbackRuleResponse`
188
+ def CreateLiveCallbackRule(request)
189
+ body = send_request('CreateLiveCallbackRule', request.serialize)
190
+ response = JSON.parse(body)
191
+ if response['Response'].key?('Error') == false
192
+ model = CreateLiveCallbackRuleResponse.new
193
+ model.deserialize(response['Response'])
194
+ model
195
+ else
196
+ code = response['Response']['Error']['Code']
197
+ message = response['Response']['Error']['Message']
198
+ reqid = response['Response']['RequestId']
199
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
200
+ end
201
+ rescue TencentCloud::Common::TencentCloudSDKException => e
202
+ raise e
203
+ rescue StandardError => e
204
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
205
+ end
206
+
207
+ # 创建回调模板,成功返回模板id后,需要调用[CreateLiveCallbackRule](/document/product/267/32638)接口将模板 ID 绑定到域名/路径使用。
208
+ # <br>回调协议相关文档:[事件消息通知](/document/product/267/32744)。
209
+ # 注意:至少填写一个回调 URL。
210
+
211
+ # @param request: Request instance for CreateLiveCallbackTemplate.
212
+ # @type request: :class:`Tencentcloud::live::V20180801::CreateLiveCallbackTemplateRequest`
213
+ # @rtype: :class:`Tencentcloud::live::V20180801::CreateLiveCallbackTemplateResponse`
214
+ def CreateLiveCallbackTemplate(request)
215
+ body = send_request('CreateLiveCallbackTemplate', request.serialize)
216
+ response = JSON.parse(body)
217
+ if response['Response'].key?('Error') == false
218
+ model = CreateLiveCallbackTemplateResponse.new
219
+ model.deserialize(response['Response'])
220
+ model
221
+ else
222
+ code = response['Response']['Error']['Code']
223
+ message = response['Response']['Error']['Message']
224
+ reqid = response['Response']['RequestId']
225
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
226
+ end
227
+ rescue TencentCloud::Common::TencentCloudSDKException => e
228
+ raise e
229
+ rescue StandardError => e
230
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
231
+ end
232
+
233
+ # 添加证书
234
+
235
+ # @param request: Request instance for CreateLiveCert.
236
+ # @type request: :class:`Tencentcloud::live::V20180801::CreateLiveCertRequest`
237
+ # @rtype: :class:`Tencentcloud::live::V20180801::CreateLiveCertResponse`
238
+ def CreateLiveCert(request)
239
+ body = send_request('CreateLiveCert', request.serialize)
240
+ response = JSON.parse(body)
241
+ if response['Response'].key?('Error') == false
242
+ model = CreateLiveCertResponse.new
243
+ model.deserialize(response['Response'])
244
+ model
245
+ else
246
+ code = response['Response']['Error']['Code']
247
+ message = response['Response']['Error']['Message']
248
+ reqid = response['Response']['RequestId']
249
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
250
+ end
251
+ rescue TencentCloud::Common::TencentCloudSDKException => e
252
+ raise e
253
+ rescue StandardError => e
254
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
255
+ end
256
+
257
+ # 创建直播拉流任务。支持将外部已有的点播文件,或者直播源拉取过来转推到直播系统。
258
+ # 注意:
259
+ # 1. 默认支持任务数上限20个,如有特殊需求,可通过提单到售后进行评估增加上限。
260
+ # 2. 目前仅支持推流到腾讯云直播,暂不支持推到第三方。
261
+ # 3. 源流视频编码目前只支持: H264, H265。其他编码格式建议先进行转码处理。
262
+ # 4. 源流音频编码目前只支持: AAC。其他编码格式建议先进行转码处理。
263
+ # 5. 过期不用的任务需自行清理,未清理的过期任务也会占用上限额度,如需要自动清理过期任务,可提单给售后进行配置。
264
+ # 6. 拉流转推功能为计费增值服务,计费规则详情可参见[计费文档](https://cloud.tencent.com/document/product/267/53308)。
265
+ # 7. 拉流转推功能仅提供内容拉取与推送服务,请确保内容已获得授权并符合内容传播相关的法律法规。若内容有侵权或违规相关问题,云直播会停止相关的功能服务并保留追究法律责任的权利。
266
+
267
+ # @param request: Request instance for CreateLivePullStreamTask.
268
+ # @type request: :class:`Tencentcloud::live::V20180801::CreateLivePullStreamTaskRequest`
269
+ # @rtype: :class:`Tencentcloud::live::V20180801::CreateLivePullStreamTaskResponse`
270
+ def CreateLivePullStreamTask(request)
271
+ body = send_request('CreateLivePullStreamTask', request.serialize)
272
+ response = JSON.parse(body)
273
+ if response['Response'].key?('Error') == false
274
+ model = CreateLivePullStreamTaskResponse.new
275
+ model.deserialize(response['Response'])
276
+ model
277
+ else
278
+ code = response['Response']['Error']['Code']
279
+ message = response['Response']['Error']['Message']
280
+ reqid = response['Response']['RequestId']
281
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
282
+ end
283
+ rescue TencentCloud::Common::TencentCloudSDKException => e
284
+ raise e
285
+ rescue StandardError => e
286
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
287
+ end
288
+
289
+ # - 使用前提
290
+ # 1. 录制文件存放于点播平台,所以用户如需使用录制功能,需首先自行开通点播服务。
291
+ # 2. 录制文件存放后相关费用(含存储以及下行播放流量)按照点播平台计费方式收取,具体请参考 [对应文档](https://cloud.tencent.com/document/product/266/2838)。
292
+
293
+ # - 模式说明
294
+ # 该接口支持两种录制模式:
295
+ # 1. 定时录制模式【默认模式】。
296
+ # 需要传入开始时间与结束时间,录制任务根据起止时间自动开始与结束。在所设置结束时间过期之前(且未调用StopLiveRecord提前终止任务),录制任务都是有效的,期间多次断流然后重推都会启动录制任务。
297
+ # 2. 实时视频录制模式。
298
+ # 忽略传入的开始时间,在录制任务创建后立即开始录制,录制时长支持最大为30分钟,如果传入的结束时间与当前时间差大于30分钟,则按30分钟计算,实时视频录制主要用于录制精彩视频场景,时长建议控制在5分钟以内。
299
+
300
+ # - 注意事项
301
+ # 1. 调用接口超时设置应大于3秒,小于3秒重试以及按不同起止时间调用都有可能产生重复录制任务,进而导致额外录制费用。
302
+ # 2. 受限于音视频文件格式(FLV/MP4/HLS)对编码类型的支持,视频编码类型支持 H.264,音频编码类型支持 AAC。
303
+ # 3. 为避免恶意或非主观的频繁 API 请求,对定时录制模式最大创建任务数做了限制:其中,当天可以创建的最大任务数不超过4000(不含已删除的任务);当前时刻并发运行的任务数不超过400。有超出此限制的需要提工单申请。
304
+ # 4. 此调用方式暂时不支持海外推流录制。
305
+
306
+ # @param request: Request instance for CreateLiveRecord.
307
+ # @type request: :class:`Tencentcloud::live::V20180801::CreateLiveRecordRequest`
308
+ # @rtype: :class:`Tencentcloud::live::V20180801::CreateLiveRecordResponse`
309
+ def CreateLiveRecord(request)
310
+ body = send_request('CreateLiveRecord', request.serialize)
311
+ response = JSON.parse(body)
312
+ if response['Response'].key?('Error') == false
313
+ model = CreateLiveRecordResponse.new
314
+ model.deserialize(response['Response'])
315
+ model
316
+ else
317
+ code = response['Response']['Error']['Code']
318
+ message = response['Response']['Error']['Message']
319
+ reqid = response['Response']['RequestId']
320
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
321
+ end
322
+ rescue TencentCloud::Common::TencentCloudSDKException => e
323
+ raise e
324
+ rescue StandardError => e
325
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
326
+ end
327
+
328
+ # 创建录制规则,需要先调用[CreateLiveRecordTemplate](/document/product/267/32614)接口创建录制模板,将返回的模板id绑定到流使用。
329
+ # <br>录制相关文档:[直播录制](/document/product/267/32739)。
330
+
331
+ # @param request: Request instance for CreateLiveRecordRule.
332
+ # @type request: :class:`Tencentcloud::live::V20180801::CreateLiveRecordRuleRequest`
333
+ # @rtype: :class:`Tencentcloud::live::V20180801::CreateLiveRecordRuleResponse`
334
+ def CreateLiveRecordRule(request)
335
+ body = send_request('CreateLiveRecordRule', request.serialize)
336
+ response = JSON.parse(body)
337
+ if response['Response'].key?('Error') == false
338
+ model = CreateLiveRecordRuleResponse.new
339
+ model.deserialize(response['Response'])
340
+ model
341
+ else
342
+ code = response['Response']['Error']['Code']
343
+ message = response['Response']['Error']['Message']
344
+ reqid = response['Response']['RequestId']
345
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
346
+ end
347
+ rescue TencentCloud::Common::TencentCloudSDKException => e
348
+ raise e
349
+ rescue StandardError => e
350
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
351
+ end
352
+
353
+ # 创建录制模板,数量上限:50,成功返回模板id后,需要调用[CreateLiveRecordRule](/document/product/267/32615)接口,将模板id绑定到流进行使用。
354
+ # <br>录制相关文档:[直播录制](/document/product/267/32739)。
355
+
356
+ # @param request: Request instance for CreateLiveRecordTemplate.
357
+ # @type request: :class:`Tencentcloud::live::V20180801::CreateLiveRecordTemplateRequest`
358
+ # @rtype: :class:`Tencentcloud::live::V20180801::CreateLiveRecordTemplateResponse`
359
+ def CreateLiveRecordTemplate(request)
360
+ body = send_request('CreateLiveRecordTemplate', request.serialize)
361
+ response = JSON.parse(body)
362
+ if response['Response'].key?('Error') == false
363
+ model = CreateLiveRecordTemplateResponse.new
364
+ model.deserialize(response['Response'])
365
+ model
366
+ else
367
+ code = response['Response']['Error']['Code']
368
+ message = response['Response']['Error']['Message']
369
+ reqid = response['Response']['RequestId']
370
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
371
+ end
372
+ rescue TencentCloud::Common::TencentCloudSDKException => e
373
+ raise e
374
+ rescue StandardError => e
375
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
376
+ end
377
+
378
+ # 创建截图规则,需要先调用[CreateLiveSnapshotTemplate](/document/product/267/32624)接口创建截图模板,然后将返回的模板 ID 绑定到流进行使用。
379
+ # <br>截图相关文档:[直播截图](/document/product/267/32737)。
380
+ # 注意:单个域名仅支持关联一个截图模板。
381
+
382
+ # @param request: Request instance for CreateLiveSnapshotRule.
383
+ # @type request: :class:`Tencentcloud::live::V20180801::CreateLiveSnapshotRuleRequest`
384
+ # @rtype: :class:`Tencentcloud::live::V20180801::CreateLiveSnapshotRuleResponse`
385
+ def CreateLiveSnapshotRule(request)
386
+ body = send_request('CreateLiveSnapshotRule', request.serialize)
387
+ response = JSON.parse(body)
388
+ if response['Response'].key?('Error') == false
389
+ model = CreateLiveSnapshotRuleResponse.new
390
+ model.deserialize(response['Response'])
391
+ model
392
+ else
393
+ code = response['Response']['Error']['Code']
394
+ message = response['Response']['Error']['Message']
395
+ reqid = response['Response']['RequestId']
396
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
397
+ end
398
+ rescue TencentCloud::Common::TencentCloudSDKException => e
399
+ raise e
400
+ rescue StandardError => e
401
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
402
+ end
403
+
404
+ # 创建截图模板,成功返回模板id后,需要调用[CreateLiveSnapshotRule](/document/product/267/32625)接口,将模板id绑定到流使用。
405
+ # <br>截图相关文档:[直播截图](/document/product/267/32737)。
406
+
407
+ # @param request: Request instance for CreateLiveSnapshotTemplate.
408
+ # @type request: :class:`Tencentcloud::live::V20180801::CreateLiveSnapshotTemplateRequest`
409
+ # @rtype: :class:`Tencentcloud::live::V20180801::CreateLiveSnapshotTemplateResponse`
410
+ def CreateLiveSnapshotTemplate(request)
411
+ body = send_request('CreateLiveSnapshotTemplate', request.serialize)
412
+ response = JSON.parse(body)
413
+ if response['Response'].key?('Error') == false
414
+ model = CreateLiveSnapshotTemplateResponse.new
415
+ model.deserialize(response['Response'])
416
+ model
417
+ else
418
+ code = response['Response']['Error']['Code']
419
+ message = response['Response']['Error']['Message']
420
+ reqid = response['Response']['RequestId']
421
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
422
+ end
423
+ rescue TencentCloud::Common::TencentCloudSDKException => e
424
+ raise e
425
+ rescue StandardError => e
426
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
427
+ end
428
+
429
+ # 创建转码规则,需要先调用[CreateLiveTranscodeTemplate](/document/product/267/32646)接口创建转码模板,将返回的模板id绑定到流使用。
430
+ # <br>转码相关文档:[直播转封装及转码](/document/product/267/32736)。
431
+
432
+ # @param request: Request instance for CreateLiveTranscodeRule.
433
+ # @type request: :class:`Tencentcloud::live::V20180801::CreateLiveTranscodeRuleRequest`
434
+ # @rtype: :class:`Tencentcloud::live::V20180801::CreateLiveTranscodeRuleResponse`
435
+ def CreateLiveTranscodeRule(request)
436
+ body = send_request('CreateLiveTranscodeRule', request.serialize)
437
+ response = JSON.parse(body)
438
+ if response['Response'].key?('Error') == false
439
+ model = CreateLiveTranscodeRuleResponse.new
440
+ model.deserialize(response['Response'])
441
+ model
442
+ else
443
+ code = response['Response']['Error']['Code']
444
+ message = response['Response']['Error']['Message']
445
+ reqid = response['Response']['RequestId']
446
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
447
+ end
448
+ rescue TencentCloud::Common::TencentCloudSDKException => e
449
+ raise e
450
+ rescue StandardError => e
451
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
452
+ end
453
+
454
+ # 创建转码模板,成功返回模板id后,需要调用[CreateLiveTranscodeRule](/document/product/267/32647)接口,将返回的模板id绑定到流使用。
455
+ # <br>转码相关文档:[直播转封装及转码](/document/product/267/32736)。
456
+
457
+ # @param request: Request instance for CreateLiveTranscodeTemplate.
458
+ # @type request: :class:`Tencentcloud::live::V20180801::CreateLiveTranscodeTemplateRequest`
459
+ # @rtype: :class:`Tencentcloud::live::V20180801::CreateLiveTranscodeTemplateResponse`
460
+ def CreateLiveTranscodeTemplate(request)
461
+ body = send_request('CreateLiveTranscodeTemplate', request.serialize)
462
+ response = JSON.parse(body)
463
+ if response['Response'].key?('Error') == false
464
+ model = CreateLiveTranscodeTemplateResponse.new
465
+ model.deserialize(response['Response'])
466
+ model
467
+ else
468
+ code = response['Response']['Error']['Code']
469
+ message = response['Response']['Error']['Message']
470
+ reqid = response['Response']['RequestId']
471
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
472
+ end
473
+ rescue TencentCloud::Common::TencentCloudSDKException => e
474
+ raise e
475
+ rescue StandardError => e
476
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
477
+ end
478
+
479
+ # 创建水印规则,需要先调用[AddLiveWatermark](/document/product/267/30154)接口添加水印,将返回的水印id绑定到流使用。
480
+
481
+ # @param request: Request instance for CreateLiveWatermarkRule.
482
+ # @type request: :class:`Tencentcloud::live::V20180801::CreateLiveWatermarkRuleRequest`
483
+ # @rtype: :class:`Tencentcloud::live::V20180801::CreateLiveWatermarkRuleResponse`
484
+ def CreateLiveWatermarkRule(request)
485
+ body = send_request('CreateLiveWatermarkRule', request.serialize)
486
+ response = JSON.parse(body)
487
+ if response['Response'].key?('Error') == false
488
+ model = CreateLiveWatermarkRuleResponse.new
489
+ model.deserialize(response['Response'])
490
+ model
491
+ else
492
+ code = response['Response']['Error']['Code']
493
+ message = response['Response']['Error']['Message']
494
+ reqid = response['Response']['RequestId']
495
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
496
+ end
497
+ rescue TencentCloud::Common::TencentCloudSDKException => e
498
+ raise e
499
+ rescue StandardError => e
500
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
501
+ end
502
+
503
+ # 创建临时拉流转推任务,目前限制添加10条任务。
504
+
505
+ # 注意:该接口用于创建临时拉流转推任务,
506
+ # 拉流源地址即 FromUrl 可以是腾讯或非腾讯数据源,
507
+ # 但转推目标地址即 ToUrl 目前限制为已注册的腾讯直播域名。
508
+
509
+ # @param request: Request instance for CreatePullStreamConfig.
510
+ # @type request: :class:`Tencentcloud::live::V20180801::CreatePullStreamConfigRequest`
511
+ # @rtype: :class:`Tencentcloud::live::V20180801::CreatePullStreamConfigResponse`
512
+ def CreatePullStreamConfig(request)
513
+ body = send_request('CreatePullStreamConfig', request.serialize)
514
+ response = JSON.parse(body)
515
+ if response['Response'].key?('Error') == false
516
+ model = CreatePullStreamConfigResponse.new
517
+ model.deserialize(response['Response'])
518
+ model
519
+ else
520
+ code = response['Response']['Error']['Code']
521
+ message = response['Response']['Error']['Message']
522
+ reqid = response['Response']['RequestId']
523
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
524
+ end
525
+ rescue TencentCloud::Common::TencentCloudSDKException => e
526
+ raise e
527
+ rescue StandardError => e
528
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
529
+ end
530
+
531
+ # 创建一个在指定时间启动、结束的录制任务,并使用指定录制模板ID对应的配置进行录制。
532
+ # - 使用前提
533
+ # 1. 录制文件存放于点播平台,所以用户如需使用录制功能,需首先自行开通点播服务。
534
+ # 2. 录制文件存放后相关费用(含存储以及下行播放流量)按照点播平台计费方式收取,具体请参考 [对应文档](https://cloud.tencent.com/document/product/266/2837)。
535
+ # - 注意事项
536
+ # 1. 断流会结束当前录制并生成录制文件。在结束时间到达之前任务仍然有效,期间只要正常推流都会正常录制,与是否多次推、断流无关。
537
+ # 2. 使用上避免创建时间段相互重叠的录制任务。若同一条流当前存在多个时段重叠的任务,为避免重复录制系统将启动最多3个录制任务。
538
+ # 3. 创建的录制任务记录在平台侧只保留3个月。
539
+ # 4. 当前录制任务管理API(CreateRecordTask/StopRecordTask/DeleteRecordTask)与旧API(CreateLiveRecord/StopLiveRecord/DeleteLiveRecord)不兼容,两套接口不能混用。
540
+ # 5. 避免 创建录制任务 与 推流 操作同时进行,可能导致因录制任务未生效而引起任务延迟启动问题,两者操作间隔建议大于3秒。
541
+
542
+ # @param request: Request instance for CreateRecordTask.
543
+ # @type request: :class:`Tencentcloud::live::V20180801::CreateRecordTaskRequest`
544
+ # @rtype: :class:`Tencentcloud::live::V20180801::CreateRecordTaskResponse`
545
+ def CreateRecordTask(request)
546
+ body = send_request('CreateRecordTask', request.serialize)
547
+ response = JSON.parse(body)
548
+ if response['Response'].key?('Error') == false
549
+ model = CreateRecordTaskResponse.new
550
+ model.deserialize(response['Response'])
551
+ model
552
+ else
553
+ code = response['Response']['Error']['Code']
554
+ message = response['Response']['Error']['Message']
555
+ reqid = response['Response']['RequestId']
556
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
557
+ end
558
+ rescue TencentCloud::Common::TencentCloudSDKException => e
559
+ raise e
560
+ rescue StandardError => e
561
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
562
+ end
563
+
564
+ # 删除回调规则。
565
+
566
+ # @param request: Request instance for DeleteLiveCallbackRule.
567
+ # @type request: :class:`Tencentcloud::live::V20180801::DeleteLiveCallbackRuleRequest`
568
+ # @rtype: :class:`Tencentcloud::live::V20180801::DeleteLiveCallbackRuleResponse`
569
+ def DeleteLiveCallbackRule(request)
570
+ body = send_request('DeleteLiveCallbackRule', request.serialize)
571
+ response = JSON.parse(body)
572
+ if response['Response'].key?('Error') == false
573
+ model = DeleteLiveCallbackRuleResponse.new
574
+ model.deserialize(response['Response'])
575
+ model
576
+ else
577
+ code = response['Response']['Error']['Code']
578
+ message = response['Response']['Error']['Message']
579
+ reqid = response['Response']['RequestId']
580
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
581
+ end
582
+ rescue TencentCloud::Common::TencentCloudSDKException => e
583
+ raise e
584
+ rescue StandardError => e
585
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
586
+ end
587
+
588
+ # 删除回调模板。
589
+
590
+ # @param request: Request instance for DeleteLiveCallbackTemplate.
591
+ # @type request: :class:`Tencentcloud::live::V20180801::DeleteLiveCallbackTemplateRequest`
592
+ # @rtype: :class:`Tencentcloud::live::V20180801::DeleteLiveCallbackTemplateResponse`
593
+ def DeleteLiveCallbackTemplate(request)
594
+ body = send_request('DeleteLiveCallbackTemplate', request.serialize)
595
+ response = JSON.parse(body)
596
+ if response['Response'].key?('Error') == false
597
+ model = DeleteLiveCallbackTemplateResponse.new
598
+ model.deserialize(response['Response'])
599
+ model
600
+ else
601
+ code = response['Response']['Error']['Code']
602
+ message = response['Response']['Error']['Message']
603
+ reqid = response['Response']['RequestId']
604
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
605
+ end
606
+ rescue TencentCloud::Common::TencentCloudSDKException => e
607
+ raise e
608
+ rescue StandardError => e
609
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
610
+ end
611
+
612
+ # 删除域名对应的证书
613
+
614
+ # @param request: Request instance for DeleteLiveCert.
615
+ # @type request: :class:`Tencentcloud::live::V20180801::DeleteLiveCertRequest`
616
+ # @rtype: :class:`Tencentcloud::live::V20180801::DeleteLiveCertResponse`
617
+ def DeleteLiveCert(request)
618
+ body = send_request('DeleteLiveCert', request.serialize)
619
+ response = JSON.parse(body)
620
+ if response['Response'].key?('Error') == false
621
+ model = DeleteLiveCertResponse.new
622
+ model.deserialize(response['Response'])
623
+ model
624
+ else
625
+ code = response['Response']['Error']['Code']
626
+ message = response['Response']['Error']['Message']
627
+ reqid = response['Response']['RequestId']
628
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
629
+ end
630
+ rescue TencentCloud::Common::TencentCloudSDKException => e
631
+ raise e
632
+ rescue StandardError => e
633
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
634
+ end
635
+
636
+ # 删除已添加的直播域名
637
+
638
+ # @param request: Request instance for DeleteLiveDomain.
639
+ # @type request: :class:`Tencentcloud::live::V20180801::DeleteLiveDomainRequest`
640
+ # @rtype: :class:`Tencentcloud::live::V20180801::DeleteLiveDomainResponse`
641
+ def DeleteLiveDomain(request)
642
+ body = send_request('DeleteLiveDomain', request.serialize)
643
+ response = JSON.parse(body)
644
+ if response['Response'].key?('Error') == false
645
+ model = DeleteLiveDomainResponse.new
646
+ model.deserialize(response['Response'])
647
+ model
648
+ else
649
+ code = response['Response']['Error']['Code']
650
+ message = response['Response']['Error']['Message']
651
+ reqid = response['Response']['RequestId']
652
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
653
+ end
654
+ rescue TencentCloud::Common::TencentCloudSDKException => e
655
+ raise e
656
+ rescue StandardError => e
657
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
658
+ end
659
+
660
+ # 删除接口 CreateLivePullStreamTask 创建的拉流任务。
661
+ # 注意:
662
+ # 1. 入参中的 TaskId 为 CreateLivePullStreamTask 接口创建时返回的TaskId。
663
+ # 2. 也可通过 DescribeLivePullStreamTasks 进行查询创建的任务。
664
+
665
+ # @param request: Request instance for DeleteLivePullStreamTask.
666
+ # @type request: :class:`Tencentcloud::live::V20180801::DeleteLivePullStreamTaskRequest`
667
+ # @rtype: :class:`Tencentcloud::live::V20180801::DeleteLivePullStreamTaskResponse`
668
+ def DeleteLivePullStreamTask(request)
669
+ body = send_request('DeleteLivePullStreamTask', request.serialize)
670
+ response = JSON.parse(body)
671
+ if response['Response'].key?('Error') == false
672
+ model = DeleteLivePullStreamTaskResponse.new
673
+ model.deserialize(response['Response'])
674
+ model
675
+ else
676
+ code = response['Response']['Error']['Code']
677
+ message = response['Response']['Error']['Message']
678
+ reqid = response['Response']['RequestId']
679
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
680
+ end
681
+ rescue TencentCloud::Common::TencentCloudSDKException => e
682
+ raise e
683
+ rescue StandardError => e
684
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
685
+ end
686
+
687
+ # 注:DeleteLiveRecord 接口仅用于删除录制任务记录,不具备停止录制的功能,也不能删除正在进行中的录制。如果需要停止录制任务,请使用终止录制[StopLiveRecord](/document/product/267/30146) 接口。
688
+
689
+ # @param request: Request instance for DeleteLiveRecord.
690
+ # @type request: :class:`Tencentcloud::live::V20180801::DeleteLiveRecordRequest`
691
+ # @rtype: :class:`Tencentcloud::live::V20180801::DeleteLiveRecordResponse`
692
+ def DeleteLiveRecord(request)
693
+ body = send_request('DeleteLiveRecord', request.serialize)
694
+ response = JSON.parse(body)
695
+ if response['Response'].key?('Error') == false
696
+ model = DeleteLiveRecordResponse.new
697
+ model.deserialize(response['Response'])
698
+ model
699
+ else
700
+ code = response['Response']['Error']['Code']
701
+ message = response['Response']['Error']['Message']
702
+ reqid = response['Response']['RequestId']
703
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
704
+ end
705
+ rescue TencentCloud::Common::TencentCloudSDKException => e
706
+ raise e
707
+ rescue StandardError => e
708
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
709
+ end
710
+
711
+ # 删除录制规则。
712
+
713
+ # @param request: Request instance for DeleteLiveRecordRule.
714
+ # @type request: :class:`Tencentcloud::live::V20180801::DeleteLiveRecordRuleRequest`
715
+ # @rtype: :class:`Tencentcloud::live::V20180801::DeleteLiveRecordRuleResponse`
716
+ def DeleteLiveRecordRule(request)
717
+ body = send_request('DeleteLiveRecordRule', request.serialize)
718
+ response = JSON.parse(body)
719
+ if response['Response'].key?('Error') == false
720
+ model = DeleteLiveRecordRuleResponse.new
721
+ model.deserialize(response['Response'])
722
+ model
723
+ else
724
+ code = response['Response']['Error']['Code']
725
+ message = response['Response']['Error']['Message']
726
+ reqid = response['Response']['RequestId']
727
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
728
+ end
729
+ rescue TencentCloud::Common::TencentCloudSDKException => e
730
+ raise e
731
+ rescue StandardError => e
732
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
733
+ end
734
+
735
+ # 删除录制模板。
736
+
737
+ # @param request: Request instance for DeleteLiveRecordTemplate.
738
+ # @type request: :class:`Tencentcloud::live::V20180801::DeleteLiveRecordTemplateRequest`
739
+ # @rtype: :class:`Tencentcloud::live::V20180801::DeleteLiveRecordTemplateResponse`
740
+ def DeleteLiveRecordTemplate(request)
741
+ body = send_request('DeleteLiveRecordTemplate', request.serialize)
742
+ response = JSON.parse(body)
743
+ if response['Response'].key?('Error') == false
744
+ model = DeleteLiveRecordTemplateResponse.new
745
+ model.deserialize(response['Response'])
746
+ model
747
+ else
748
+ code = response['Response']['Error']['Code']
749
+ message = response['Response']['Error']['Message']
750
+ reqid = response['Response']['RequestId']
751
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
752
+ end
753
+ rescue TencentCloud::Common::TencentCloudSDKException => e
754
+ raise e
755
+ rescue StandardError => e
756
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
757
+ end
758
+
759
+ # 删除截图规则。
760
+
761
+ # @param request: Request instance for DeleteLiveSnapshotRule.
762
+ # @type request: :class:`Tencentcloud::live::V20180801::DeleteLiveSnapshotRuleRequest`
763
+ # @rtype: :class:`Tencentcloud::live::V20180801::DeleteLiveSnapshotRuleResponse`
764
+ def DeleteLiveSnapshotRule(request)
765
+ body = send_request('DeleteLiveSnapshotRule', request.serialize)
766
+ response = JSON.parse(body)
767
+ if response['Response'].key?('Error') == false
768
+ model = DeleteLiveSnapshotRuleResponse.new
769
+ model.deserialize(response['Response'])
770
+ model
771
+ else
772
+ code = response['Response']['Error']['Code']
773
+ message = response['Response']['Error']['Message']
774
+ reqid = response['Response']['RequestId']
775
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
776
+ end
777
+ rescue TencentCloud::Common::TencentCloudSDKException => e
778
+ raise e
779
+ rescue StandardError => e
780
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
781
+ end
782
+
783
+ # 删除截图模板
784
+
785
+ # @param request: Request instance for DeleteLiveSnapshotTemplate.
786
+ # @type request: :class:`Tencentcloud::live::V20180801::DeleteLiveSnapshotTemplateRequest`
787
+ # @rtype: :class:`Tencentcloud::live::V20180801::DeleteLiveSnapshotTemplateResponse`
788
+ def DeleteLiveSnapshotTemplate(request)
789
+ body = send_request('DeleteLiveSnapshotTemplate', request.serialize)
790
+ response = JSON.parse(body)
791
+ if response['Response'].key?('Error') == false
792
+ model = DeleteLiveSnapshotTemplateResponse.new
793
+ model.deserialize(response['Response'])
794
+ model
795
+ else
796
+ code = response['Response']['Error']['Code']
797
+ message = response['Response']['Error']['Message']
798
+ reqid = response['Response']['RequestId']
799
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
800
+ end
801
+ rescue TencentCloud::Common::TencentCloudSDKException => e
802
+ raise e
803
+ rescue StandardError => e
804
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
805
+ end
806
+
807
+ # 删除转码规则。
808
+ # DomainName+AppName+StreamName+TemplateId唯一标识单个转码规则,如需删除需要强匹配。其中TemplateId必填,其余参数为空时也需要传空字符串进行强匹配。
809
+
810
+ # @param request: Request instance for DeleteLiveTranscodeRule.
811
+ # @type request: :class:`Tencentcloud::live::V20180801::DeleteLiveTranscodeRuleRequest`
812
+ # @rtype: :class:`Tencentcloud::live::V20180801::DeleteLiveTranscodeRuleResponse`
813
+ def DeleteLiveTranscodeRule(request)
814
+ body = send_request('DeleteLiveTranscodeRule', request.serialize)
815
+ response = JSON.parse(body)
816
+ if response['Response'].key?('Error') == false
817
+ model = DeleteLiveTranscodeRuleResponse.new
818
+ model.deserialize(response['Response'])
819
+ model
820
+ else
821
+ code = response['Response']['Error']['Code']
822
+ message = response['Response']['Error']['Message']
823
+ reqid = response['Response']['RequestId']
824
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
825
+ end
826
+ rescue TencentCloud::Common::TencentCloudSDKException => e
827
+ raise e
828
+ rescue StandardError => e
829
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
830
+ end
831
+
832
+ # 删除转码模板。
833
+
834
+ # @param request: Request instance for DeleteLiveTranscodeTemplate.
835
+ # @type request: :class:`Tencentcloud::live::V20180801::DeleteLiveTranscodeTemplateRequest`
836
+ # @rtype: :class:`Tencentcloud::live::V20180801::DeleteLiveTranscodeTemplateResponse`
837
+ def DeleteLiveTranscodeTemplate(request)
838
+ body = send_request('DeleteLiveTranscodeTemplate', request.serialize)
839
+ response = JSON.parse(body)
840
+ if response['Response'].key?('Error') == false
841
+ model = DeleteLiveTranscodeTemplateResponse.new
842
+ model.deserialize(response['Response'])
843
+ model
844
+ else
845
+ code = response['Response']['Error']['Code']
846
+ message = response['Response']['Error']['Message']
847
+ reqid = response['Response']['RequestId']
848
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
849
+ end
850
+ rescue TencentCloud::Common::TencentCloudSDKException => e
851
+ raise e
852
+ rescue StandardError => e
853
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
854
+ end
855
+
856
+ # 删除水印。
857
+
858
+ # @param request: Request instance for DeleteLiveWatermark.
859
+ # @type request: :class:`Tencentcloud::live::V20180801::DeleteLiveWatermarkRequest`
860
+ # @rtype: :class:`Tencentcloud::live::V20180801::DeleteLiveWatermarkResponse`
861
+ def DeleteLiveWatermark(request)
862
+ body = send_request('DeleteLiveWatermark', request.serialize)
863
+ response = JSON.parse(body)
864
+ if response['Response'].key?('Error') == false
865
+ model = DeleteLiveWatermarkResponse.new
866
+ model.deserialize(response['Response'])
867
+ model
868
+ else
869
+ code = response['Response']['Error']['Code']
870
+ message = response['Response']['Error']['Message']
871
+ reqid = response['Response']['RequestId']
872
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
873
+ end
874
+ rescue TencentCloud::Common::TencentCloudSDKException => e
875
+ raise e
876
+ rescue StandardError => e
877
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
878
+ end
879
+
880
+ # 删除水印规则
881
+
882
+ # @param request: Request instance for DeleteLiveWatermarkRule.
883
+ # @type request: :class:`Tencentcloud::live::V20180801::DeleteLiveWatermarkRuleRequest`
884
+ # @rtype: :class:`Tencentcloud::live::V20180801::DeleteLiveWatermarkRuleResponse`
885
+ def DeleteLiveWatermarkRule(request)
886
+ body = send_request('DeleteLiveWatermarkRule', request.serialize)
887
+ response = JSON.parse(body)
888
+ if response['Response'].key?('Error') == false
889
+ model = DeleteLiveWatermarkRuleResponse.new
890
+ model.deserialize(response['Response'])
891
+ model
892
+ else
893
+ code = response['Response']['Error']['Code']
894
+ message = response['Response']['Error']['Message']
895
+ reqid = response['Response']['RequestId']
896
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
897
+ end
898
+ rescue TencentCloud::Common::TencentCloudSDKException => e
899
+ raise e
900
+ rescue StandardError => e
901
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
902
+ end
903
+
904
+ # 删除直播拉流配置。
905
+
906
+ # @param request: Request instance for DeletePullStreamConfig.
907
+ # @type request: :class:`Tencentcloud::live::V20180801::DeletePullStreamConfigRequest`
908
+ # @rtype: :class:`Tencentcloud::live::V20180801::DeletePullStreamConfigResponse`
909
+ def DeletePullStreamConfig(request)
910
+ body = send_request('DeletePullStreamConfig', request.serialize)
911
+ response = JSON.parse(body)
912
+ if response['Response'].key?('Error') == false
913
+ model = DeletePullStreamConfigResponse.new
914
+ model.deserialize(response['Response'])
915
+ model
916
+ else
917
+ code = response['Response']['Error']['Code']
918
+ message = response['Response']['Error']['Message']
919
+ reqid = response['Response']['RequestId']
920
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
921
+ end
922
+ rescue TencentCloud::Common::TencentCloudSDKException => e
923
+ raise e
924
+ rescue StandardError => e
925
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
926
+ end
927
+
928
+ # 删除录制任务配置。删除操作不影响正在运行当中的任务,仅对删除之后新的推流有效。
929
+
930
+ # @param request: Request instance for DeleteRecordTask.
931
+ # @type request: :class:`Tencentcloud::live::V20180801::DeleteRecordTaskRequest`
932
+ # @rtype: :class:`Tencentcloud::live::V20180801::DeleteRecordTaskResponse`
933
+ def DeleteRecordTask(request)
934
+ body = send_request('DeleteRecordTask', request.serialize)
935
+ response = JSON.parse(body)
936
+ if response['Response'].key?('Error') == false
937
+ model = DeleteRecordTaskResponse.new
938
+ model.deserialize(response['Response'])
939
+ model
940
+ else
941
+ code = response['Response']['Error']['Code']
942
+ message = response['Response']['Error']['Message']
943
+ reqid = response['Response']['RequestId']
944
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
945
+ end
946
+ rescue TencentCloud::Common::TencentCloudSDKException => e
947
+ raise e
948
+ rescue StandardError => e
949
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
950
+ end
951
+
952
+ # 输入某个时间点(1分钟维度),查询该时间点所有流的下行信息。
953
+
954
+ # @param request: Request instance for DescribeAllStreamPlayInfoList.
955
+ # @type request: :class:`Tencentcloud::live::V20180801::DescribeAllStreamPlayInfoListRequest`
956
+ # @rtype: :class:`Tencentcloud::live::V20180801::DescribeAllStreamPlayInfoListResponse`
957
+ def DescribeAllStreamPlayInfoList(request)
958
+ body = send_request('DescribeAllStreamPlayInfoList', request.serialize)
959
+ response = JSON.parse(body)
960
+ if response['Response'].key?('Error') == false
961
+ model = DescribeAllStreamPlayInfoListResponse.new
962
+ model.deserialize(response['Response'])
963
+ model
964
+ else
965
+ code = response['Response']['Error']['Code']
966
+ message = response['Response']['Error']['Message']
967
+ reqid = response['Response']['RequestId']
968
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
969
+ end
970
+ rescue TencentCloud::Common::TencentCloudSDKException => e
971
+ raise e
972
+ rescue StandardError => e
973
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
974
+ end
975
+
976
+ # 海外分区直播计费带宽和流量数据查询。
977
+
978
+ # @param request: Request instance for DescribeAreaBillBandwidthAndFluxList.
979
+ # @type request: :class:`Tencentcloud::live::V20180801::DescribeAreaBillBandwidthAndFluxListRequest`
980
+ # @rtype: :class:`Tencentcloud::live::V20180801::DescribeAreaBillBandwidthAndFluxListResponse`
981
+ def DescribeAreaBillBandwidthAndFluxList(request)
982
+ body = send_request('DescribeAreaBillBandwidthAndFluxList', request.serialize)
983
+ response = JSON.parse(body)
984
+ if response['Response'].key?('Error') == false
985
+ model = DescribeAreaBillBandwidthAndFluxListResponse.new
986
+ model.deserialize(response['Response'])
987
+ model
988
+ else
989
+ code = response['Response']['Error']['Code']
990
+ message = response['Response']['Error']['Message']
991
+ reqid = response['Response']['RequestId']
992
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
993
+ end
994
+ rescue TencentCloud::Common::TencentCloudSDKException => e
995
+ raise e
996
+ rescue StandardError => e
997
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
998
+ end
999
+
1000
+ # 直播计费带宽和流量数据查询。
1001
+
1002
+ # @param request: Request instance for DescribeBillBandwidthAndFluxList.
1003
+ # @type request: :class:`Tencentcloud::live::V20180801::DescribeBillBandwidthAndFluxListRequest`
1004
+ # @rtype: :class:`Tencentcloud::live::V20180801::DescribeBillBandwidthAndFluxListResponse`
1005
+ def DescribeBillBandwidthAndFluxList(request)
1006
+ body = send_request('DescribeBillBandwidthAndFluxList', request.serialize)
1007
+ response = JSON.parse(body)
1008
+ if response['Response'].key?('Error') == false
1009
+ model = DescribeBillBandwidthAndFluxListResponse.new
1010
+ model.deserialize(response['Response'])
1011
+ model
1012
+ else
1013
+ code = response['Response']['Error']['Code']
1014
+ message = response['Response']['Error']['Message']
1015
+ reqid = response['Response']['RequestId']
1016
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
1017
+ end
1018
+ rescue TencentCloud::Common::TencentCloudSDKException => e
1019
+ raise e
1020
+ rescue StandardError => e
1021
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
1022
+ end
1023
+
1024
+ # 用于查询回调事件。
1025
+
1026
+ # @param request: Request instance for DescribeCallbackRecordsList.
1027
+ # @type request: :class:`Tencentcloud::live::V20180801::DescribeCallbackRecordsListRequest`
1028
+ # @rtype: :class:`Tencentcloud::live::V20180801::DescribeCallbackRecordsListResponse`
1029
+ def DescribeCallbackRecordsList(request)
1030
+ body = send_request('DescribeCallbackRecordsList', request.serialize)
1031
+ response = JSON.parse(body)
1032
+ if response['Response'].key?('Error') == false
1033
+ model = DescribeCallbackRecordsListResponse.new
1034
+ model.deserialize(response['Response'])
1035
+ model
1036
+ else
1037
+ code = response['Response']['Error']['Code']
1038
+ message = response['Response']['Error']['Message']
1039
+ reqid = response['Response']['RequestId']
1040
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
1041
+ end
1042
+ rescue TencentCloud::Common::TencentCloudSDKException => e
1043
+ raise e
1044
+ rescue StandardError => e
1045
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
1046
+ end
1047
+
1048
+ # 查询并发录制路数,对慢直播和普通直播适用。
1049
+
1050
+ # @param request: Request instance for DescribeConcurrentRecordStreamNum.
1051
+ # @type request: :class:`Tencentcloud::live::V20180801::DescribeConcurrentRecordStreamNumRequest`
1052
+ # @rtype: :class:`Tencentcloud::live::V20180801::DescribeConcurrentRecordStreamNumResponse`
1053
+ def DescribeConcurrentRecordStreamNum(request)
1054
+ body = send_request('DescribeConcurrentRecordStreamNum', request.serialize)
1055
+ response = JSON.parse(body)
1056
+ if response['Response'].key?('Error') == false
1057
+ model = DescribeConcurrentRecordStreamNumResponse.new
1058
+ model.deserialize(response['Response'])
1059
+ model
1060
+ else
1061
+ code = response['Response']['Error']['Code']
1062
+ message = response['Response']['Error']['Message']
1063
+ reqid = response['Response']['RequestId']
1064
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
1065
+ end
1066
+ rescue TencentCloud::Common::TencentCloudSDKException => e
1067
+ raise e
1068
+ rescue StandardError => e
1069
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
1070
+ end
1071
+
1072
+ # 查询直播转推计费带宽,查询时间范围最大支持3个月内的数据,时间跨度最长31天。
1073
+
1074
+ # @param request: Request instance for DescribeDeliverBandwidthList.
1075
+ # @type request: :class:`Tencentcloud::live::V20180801::DescribeDeliverBandwidthListRequest`
1076
+ # @rtype: :class:`Tencentcloud::live::V20180801::DescribeDeliverBandwidthListResponse`
1077
+ def DescribeDeliverBandwidthList(request)
1078
+ body = send_request('DescribeDeliverBandwidthList', request.serialize)
1079
+ response = JSON.parse(body)
1080
+ if response['Response'].key?('Error') == false
1081
+ model = DescribeDeliverBandwidthListResponse.new
1082
+ model.deserialize(response['Response'])
1083
+ model
1084
+ else
1085
+ code = response['Response']['Error']['Code']
1086
+ message = response['Response']['Error']['Message']
1087
+ reqid = response['Response']['RequestId']
1088
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
1089
+ end
1090
+ rescue TencentCloud::Common::TencentCloudSDKException => e
1091
+ raise e
1092
+ rescue StandardError => e
1093
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
1094
+ end
1095
+
1096
+ # 查询按省份和运营商分组的下行播放数据。
1097
+
1098
+ # @param request: Request instance for DescribeGroupProIspPlayInfoList.
1099
+ # @type request: :class:`Tencentcloud::live::V20180801::DescribeGroupProIspPlayInfoListRequest`
1100
+ # @rtype: :class:`Tencentcloud::live::V20180801::DescribeGroupProIspPlayInfoListResponse`
1101
+ def DescribeGroupProIspPlayInfoList(request)
1102
+ body = send_request('DescribeGroupProIspPlayInfoList', request.serialize)
1103
+ response = JSON.parse(body)
1104
+ if response['Response'].key?('Error') == false
1105
+ model = DescribeGroupProIspPlayInfoListResponse.new
1106
+ model.deserialize(response['Response'])
1107
+ model
1108
+ else
1109
+ code = response['Response']['Error']['Code']
1110
+ message = response['Response']['Error']['Message']
1111
+ reqid = response['Response']['RequestId']
1112
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
1113
+ end
1114
+ rescue TencentCloud::Common::TencentCloudSDKException => e
1115
+ raise e
1116
+ rescue StandardError => e
1117
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
1118
+ end
1119
+
1120
+ # 查询某段时间内5分钟粒度的各播放http状态码的个数。
1121
+ # 备注:数据延迟1小时,如10:00-10:59点的数据12点才能查到。
1122
+
1123
+ # @param request: Request instance for DescribeHttpStatusInfoList.
1124
+ # @type request: :class:`Tencentcloud::live::V20180801::DescribeHttpStatusInfoListRequest`
1125
+ # @rtype: :class:`Tencentcloud::live::V20180801::DescribeHttpStatusInfoListResponse`
1126
+ def DescribeHttpStatusInfoList(request)
1127
+ body = send_request('DescribeHttpStatusInfoList', request.serialize)
1128
+ response = JSON.parse(body)
1129
+ if response['Response'].key?('Error') == false
1130
+ model = DescribeHttpStatusInfoListResponse.new
1131
+ model.deserialize(response['Response'])
1132
+ model
1133
+ else
1134
+ code = response['Response']['Error']['Code']
1135
+ message = response['Response']['Error']['Message']
1136
+ reqid = response['Response']['RequestId']
1137
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
1138
+ end
1139
+ rescue TencentCloud::Common::TencentCloudSDKException => e
1140
+ raise e
1141
+ rescue StandardError => e
1142
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
1143
+ end
1144
+
1145
+ # 获取回调规则列表
1146
+
1147
+ # @param request: Request instance for DescribeLiveCallbackRules.
1148
+ # @type request: :class:`Tencentcloud::live::V20180801::DescribeLiveCallbackRulesRequest`
1149
+ # @rtype: :class:`Tencentcloud::live::V20180801::DescribeLiveCallbackRulesResponse`
1150
+ def DescribeLiveCallbackRules(request)
1151
+ body = send_request('DescribeLiveCallbackRules', request.serialize)
1152
+ response = JSON.parse(body)
1153
+ if response['Response'].key?('Error') == false
1154
+ model = DescribeLiveCallbackRulesResponse.new
1155
+ model.deserialize(response['Response'])
1156
+ model
1157
+ else
1158
+ code = response['Response']['Error']['Code']
1159
+ message = response['Response']['Error']['Message']
1160
+ reqid = response['Response']['RequestId']
1161
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
1162
+ end
1163
+ rescue TencentCloud::Common::TencentCloudSDKException => e
1164
+ raise e
1165
+ rescue StandardError => e
1166
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
1167
+ end
1168
+
1169
+ # 获取单个回调模板。
1170
+
1171
+ # @param request: Request instance for DescribeLiveCallbackTemplate.
1172
+ # @type request: :class:`Tencentcloud::live::V20180801::DescribeLiveCallbackTemplateRequest`
1173
+ # @rtype: :class:`Tencentcloud::live::V20180801::DescribeLiveCallbackTemplateResponse`
1174
+ def DescribeLiveCallbackTemplate(request)
1175
+ body = send_request('DescribeLiveCallbackTemplate', request.serialize)
1176
+ response = JSON.parse(body)
1177
+ if response['Response'].key?('Error') == false
1178
+ model = DescribeLiveCallbackTemplateResponse.new
1179
+ model.deserialize(response['Response'])
1180
+ model
1181
+ else
1182
+ code = response['Response']['Error']['Code']
1183
+ message = response['Response']['Error']['Message']
1184
+ reqid = response['Response']['RequestId']
1185
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
1186
+ end
1187
+ rescue TencentCloud::Common::TencentCloudSDKException => e
1188
+ raise e
1189
+ rescue StandardError => e
1190
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
1191
+ end
1192
+
1193
+ # 获取回调模板列表
1194
+
1195
+ # @param request: Request instance for DescribeLiveCallbackTemplates.
1196
+ # @type request: :class:`Tencentcloud::live::V20180801::DescribeLiveCallbackTemplatesRequest`
1197
+ # @rtype: :class:`Tencentcloud::live::V20180801::DescribeLiveCallbackTemplatesResponse`
1198
+ def DescribeLiveCallbackTemplates(request)
1199
+ body = send_request('DescribeLiveCallbackTemplates', request.serialize)
1200
+ response = JSON.parse(body)
1201
+ if response['Response'].key?('Error') == false
1202
+ model = DescribeLiveCallbackTemplatesResponse.new
1203
+ model.deserialize(response['Response'])
1204
+ model
1205
+ else
1206
+ code = response['Response']['Error']['Code']
1207
+ message = response['Response']['Error']['Message']
1208
+ reqid = response['Response']['RequestId']
1209
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
1210
+ end
1211
+ rescue TencentCloud::Common::TencentCloudSDKException => e
1212
+ raise e
1213
+ rescue StandardError => e
1214
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
1215
+ end
1216
+
1217
+ # 获取证书信息
1218
+
1219
+ # @param request: Request instance for DescribeLiveCert.
1220
+ # @type request: :class:`Tencentcloud::live::V20180801::DescribeLiveCertRequest`
1221
+ # @rtype: :class:`Tencentcloud::live::V20180801::DescribeLiveCertResponse`
1222
+ def DescribeLiveCert(request)
1223
+ body = send_request('DescribeLiveCert', request.serialize)
1224
+ response = JSON.parse(body)
1225
+ if response['Response'].key?('Error') == false
1226
+ model = DescribeLiveCertResponse.new
1227
+ model.deserialize(response['Response'])
1228
+ model
1229
+ else
1230
+ code = response['Response']['Error']['Code']
1231
+ message = response['Response']['Error']['Message']
1232
+ reqid = response['Response']['RequestId']
1233
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
1234
+ end
1235
+ rescue TencentCloud::Common::TencentCloudSDKException => e
1236
+ raise e
1237
+ rescue StandardError => e
1238
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
1239
+ end
1240
+
1241
+ # 获取证书信息列表
1242
+
1243
+ # @param request: Request instance for DescribeLiveCerts.
1244
+ # @type request: :class:`Tencentcloud::live::V20180801::DescribeLiveCertsRequest`
1245
+ # @rtype: :class:`Tencentcloud::live::V20180801::DescribeLiveCertsResponse`
1246
+ def DescribeLiveCerts(request)
1247
+ body = send_request('DescribeLiveCerts', request.serialize)
1248
+ response = JSON.parse(body)
1249
+ if response['Response'].key?('Error') == false
1250
+ model = DescribeLiveCertsResponse.new
1251
+ model.deserialize(response['Response'])
1252
+ model
1253
+ else
1254
+ code = response['Response']['Error']['Code']
1255
+ message = response['Response']['Error']['Message']
1256
+ reqid = response['Response']['RequestId']
1257
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
1258
+ end
1259
+ rescue TencentCloud::Common::TencentCloudSDKException => e
1260
+ raise e
1261
+ rescue StandardError => e
1262
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
1263
+ end
1264
+
1265
+ # 获取直播延播列表。
1266
+
1267
+ # @param request: Request instance for DescribeLiveDelayInfoList.
1268
+ # @type request: :class:`Tencentcloud::live::V20180801::DescribeLiveDelayInfoListRequest`
1269
+ # @rtype: :class:`Tencentcloud::live::V20180801::DescribeLiveDelayInfoListResponse`
1270
+ def DescribeLiveDelayInfoList(request)
1271
+ body = send_request('DescribeLiveDelayInfoList', request.serialize)
1272
+ response = JSON.parse(body)
1273
+ if response['Response'].key?('Error') == false
1274
+ model = DescribeLiveDelayInfoListResponse.new
1275
+ model.deserialize(response['Response'])
1276
+ model
1277
+ else
1278
+ code = response['Response']['Error']['Code']
1279
+ message = response['Response']['Error']['Message']
1280
+ reqid = response['Response']['RequestId']
1281
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
1282
+ end
1283
+ rescue TencentCloud::Common::TencentCloudSDKException => e
1284
+ raise e
1285
+ rescue StandardError => e
1286
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
1287
+ end
1288
+
1289
+ # 查询直播域名信息。
1290
+
1291
+ # @param request: Request instance for DescribeLiveDomain.
1292
+ # @type request: :class:`Tencentcloud::live::V20180801::DescribeLiveDomainRequest`
1293
+ # @rtype: :class:`Tencentcloud::live::V20180801::DescribeLiveDomainResponse`
1294
+ def DescribeLiveDomain(request)
1295
+ body = send_request('DescribeLiveDomain', request.serialize)
1296
+ response = JSON.parse(body)
1297
+ if response['Response'].key?('Error') == false
1298
+ model = DescribeLiveDomainResponse.new
1299
+ model.deserialize(response['Response'])
1300
+ model
1301
+ else
1302
+ code = response['Response']['Error']['Code']
1303
+ message = response['Response']['Error']['Message']
1304
+ reqid = response['Response']['RequestId']
1305
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
1306
+ end
1307
+ rescue TencentCloud::Common::TencentCloudSDKException => e
1308
+ raise e
1309
+ rescue StandardError => e
1310
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
1311
+ end
1312
+
1313
+ # 获取域名证书信息。
1314
+
1315
+ # @param request: Request instance for DescribeLiveDomainCert.
1316
+ # @type request: :class:`Tencentcloud::live::V20180801::DescribeLiveDomainCertRequest`
1317
+ # @rtype: :class:`Tencentcloud::live::V20180801::DescribeLiveDomainCertResponse`
1318
+ def DescribeLiveDomainCert(request)
1319
+ body = send_request('DescribeLiveDomainCert', request.serialize)
1320
+ response = JSON.parse(body)
1321
+ if response['Response'].key?('Error') == false
1322
+ model = DescribeLiveDomainCertResponse.new
1323
+ model.deserialize(response['Response'])
1324
+ model
1325
+ else
1326
+ code = response['Response']['Error']['Code']
1327
+ message = response['Response']['Error']['Message']
1328
+ reqid = response['Response']['RequestId']
1329
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
1330
+ end
1331
+ rescue TencentCloud::Common::TencentCloudSDKException => e
1332
+ raise e
1333
+ rescue StandardError => e
1334
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
1335
+ end
1336
+
1337
+ # 查询实时的域名维度下行播放数据,由于数据处理有耗时,接口默认查询4分钟前的准实时数据。
1338
+
1339
+ # @param request: Request instance for DescribeLiveDomainPlayInfoList.
1340
+ # @type request: :class:`Tencentcloud::live::V20180801::DescribeLiveDomainPlayInfoListRequest`
1341
+ # @rtype: :class:`Tencentcloud::live::V20180801::DescribeLiveDomainPlayInfoListResponse`
1342
+ def DescribeLiveDomainPlayInfoList(request)
1343
+ body = send_request('DescribeLiveDomainPlayInfoList', request.serialize)
1344
+ response = JSON.parse(body)
1345
+ if response['Response'].key?('Error') == false
1346
+ model = DescribeLiveDomainPlayInfoListResponse.new
1347
+ model.deserialize(response['Response'])
1348
+ model
1349
+ else
1350
+ code = response['Response']['Error']['Code']
1351
+ message = response['Response']['Error']['Message']
1352
+ reqid = response['Response']['RequestId']
1353
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
1354
+ end
1355
+ rescue TencentCloud::Common::TencentCloudSDKException => e
1356
+ raise e
1357
+ rescue StandardError => e
1358
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
1359
+ end
1360
+
1361
+ # 查询直播域名 Referer 黑白名单配置。
1362
+ # 由于 Referer 信息包含在 http 协议中,在开启配置后,播放协议为 rtmp 或 WebRTC 不会校验 Referer 配置,仍可正常播放。如需配置 Referer 鉴权建议使用 http-flv 或 http-hls 协议播放。
1363
+
1364
+ # @param request: Request instance for DescribeLiveDomainReferer.
1365
+ # @type request: :class:`Tencentcloud::live::V20180801::DescribeLiveDomainRefererRequest`
1366
+ # @rtype: :class:`Tencentcloud::live::V20180801::DescribeLiveDomainRefererResponse`
1367
+ def DescribeLiveDomainReferer(request)
1368
+ body = send_request('DescribeLiveDomainReferer', request.serialize)
1369
+ response = JSON.parse(body)
1370
+ if response['Response'].key?('Error') == false
1371
+ model = DescribeLiveDomainRefererResponse.new
1372
+ model.deserialize(response['Response'])
1373
+ model
1374
+ else
1375
+ code = response['Response']['Error']['Code']
1376
+ message = response['Response']['Error']['Message']
1377
+ reqid = response['Response']['RequestId']
1378
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
1379
+ end
1380
+ rescue TencentCloud::Common::TencentCloudSDKException => e
1381
+ raise e
1382
+ rescue StandardError => e
1383
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
1384
+ end
1385
+
1386
+ # 根据域名状态、类型等信息查询用户的域名信息。
1387
+
1388
+ # @param request: Request instance for DescribeLiveDomains.
1389
+ # @type request: :class:`Tencentcloud::live::V20180801::DescribeLiveDomainsRequest`
1390
+ # @rtype: :class:`Tencentcloud::live::V20180801::DescribeLiveDomainsResponse`
1391
+ def DescribeLiveDomains(request)
1392
+ body = send_request('DescribeLiveDomains', request.serialize)
1393
+ response = JSON.parse(body)
1394
+ if response['Response'].key?('Error') == false
1395
+ model = DescribeLiveDomainsResponse.new
1396
+ model.deserialize(response['Response'])
1397
+ model
1398
+ else
1399
+ code = response['Response']['Error']['Code']
1400
+ message = response['Response']['Error']['Message']
1401
+ reqid = response['Response']['RequestId']
1402
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
1403
+ end
1404
+ rescue TencentCloud::Common::TencentCloudSDKException => e
1405
+ raise e
1406
+ rescue StandardError => e
1407
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
1408
+ end
1409
+
1410
+ # 获取禁推流列表。
1411
+
1412
+ # 注意:该接口仅作为直播辅助查询接口,重要业务场景不可强依赖该接口。
1413
+
1414
+ # @param request: Request instance for DescribeLiveForbidStreamList.
1415
+ # @type request: :class:`Tencentcloud::live::V20180801::DescribeLiveForbidStreamListRequest`
1416
+ # @rtype: :class:`Tencentcloud::live::V20180801::DescribeLiveForbidStreamListResponse`
1417
+ def DescribeLiveForbidStreamList(request)
1418
+ body = send_request('DescribeLiveForbidStreamList', request.serialize)
1419
+ response = JSON.parse(body)
1420
+ if response['Response'].key?('Error') == false
1421
+ model = DescribeLiveForbidStreamListResponse.new
1422
+ model.deserialize(response['Response'])
1423
+ model
1424
+ else
1425
+ code = response['Response']['Error']['Code']
1426
+ message = response['Response']['Error']['Message']
1427
+ reqid = response['Response']['RequestId']
1428
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
1429
+ end
1430
+ rescue TencentCloud::Common::TencentCloudSDKException => e
1431
+ raise e
1432
+ rescue StandardError => e
1433
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
1434
+ end
1435
+
1436
+ # 查询用户套餐包总量、使用量、剩余量、包状态、购买时间和过期时间等。
1437
+
1438
+ # @param request: Request instance for DescribeLivePackageInfo.
1439
+ # @type request: :class:`Tencentcloud::live::V20180801::DescribeLivePackageInfoRequest`
1440
+ # @rtype: :class:`Tencentcloud::live::V20180801::DescribeLivePackageInfoResponse`
1441
+ def DescribeLivePackageInfo(request)
1442
+ body = send_request('DescribeLivePackageInfo', request.serialize)
1443
+ response = JSON.parse(body)
1444
+ if response['Response'].key?('Error') == false
1445
+ model = DescribeLivePackageInfoResponse.new
1446
+ model.deserialize(response['Response'])
1447
+ model
1448
+ else
1449
+ code = response['Response']['Error']['Code']
1450
+ message = response['Response']['Error']['Message']
1451
+ reqid = response['Response']['RequestId']
1452
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
1453
+ end
1454
+ rescue TencentCloud::Common::TencentCloudSDKException => e
1455
+ raise e
1456
+ rescue StandardError => e
1457
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
1458
+ end
1459
+
1460
+ # 查询播放鉴权key。
1461
+
1462
+ # @param request: Request instance for DescribeLivePlayAuthKey.
1463
+ # @type request: :class:`Tencentcloud::live::V20180801::DescribeLivePlayAuthKeyRequest`
1464
+ # @rtype: :class:`Tencentcloud::live::V20180801::DescribeLivePlayAuthKeyResponse`
1465
+ def DescribeLivePlayAuthKey(request)
1466
+ body = send_request('DescribeLivePlayAuthKey', request.serialize)
1467
+ response = JSON.parse(body)
1468
+ if response['Response'].key?('Error') == false
1469
+ model = DescribeLivePlayAuthKeyResponse.new
1470
+ model.deserialize(response['Response'])
1471
+ model
1472
+ else
1473
+ code = response['Response']['Error']['Code']
1474
+ message = response['Response']['Error']['Message']
1475
+ reqid = response['Response']['RequestId']
1476
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
1477
+ end
1478
+ rescue TencentCloud::Common::TencentCloudSDKException => e
1479
+ raise e
1480
+ rescue StandardError => e
1481
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
1482
+ end
1483
+
1484
+ # 查询使用 CreateLivePullStreamTask 接口创建的直播拉流任务。
1485
+ # 排序方式:默认按更新时间 倒序排列。
1486
+
1487
+ # @param request: Request instance for DescribeLivePullStreamTasks.
1488
+ # @type request: :class:`Tencentcloud::live::V20180801::DescribeLivePullStreamTasksRequest`
1489
+ # @rtype: :class:`Tencentcloud::live::V20180801::DescribeLivePullStreamTasksResponse`
1490
+ def DescribeLivePullStreamTasks(request)
1491
+ body = send_request('DescribeLivePullStreamTasks', request.serialize)
1492
+ response = JSON.parse(body)
1493
+ if response['Response'].key?('Error') == false
1494
+ model = DescribeLivePullStreamTasksResponse.new
1495
+ model.deserialize(response['Response'])
1496
+ model
1497
+ else
1498
+ code = response['Response']['Error']['Code']
1499
+ message = response['Response']['Error']['Message']
1500
+ reqid = response['Response']['RequestId']
1501
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
1502
+ end
1503
+ rescue TencentCloud::Common::TencentCloudSDKException => e
1504
+ raise e
1505
+ rescue StandardError => e
1506
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
1507
+ end
1508
+
1509
+ # 查询直播推流鉴权key
1510
+
1511
+ # @param request: Request instance for DescribeLivePushAuthKey.
1512
+ # @type request: :class:`Tencentcloud::live::V20180801::DescribeLivePushAuthKeyRequest`
1513
+ # @rtype: :class:`Tencentcloud::live::V20180801::DescribeLivePushAuthKeyResponse`
1514
+ def DescribeLivePushAuthKey(request)
1515
+ body = send_request('DescribeLivePushAuthKey', request.serialize)
1516
+ response = JSON.parse(body)
1517
+ if response['Response'].key?('Error') == false
1518
+ model = DescribeLivePushAuthKeyResponse.new
1519
+ model.deserialize(response['Response'])
1520
+ model
1521
+ else
1522
+ code = response['Response']['Error']['Code']
1523
+ message = response['Response']['Error']['Message']
1524
+ reqid = response['Response']['RequestId']
1525
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
1526
+ end
1527
+ rescue TencentCloud::Common::TencentCloudSDKException => e
1528
+ raise e
1529
+ rescue StandardError => e
1530
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
1531
+ end
1532
+
1533
+ # 获取录制规则列表
1534
+
1535
+ # @param request: Request instance for DescribeLiveRecordRules.
1536
+ # @type request: :class:`Tencentcloud::live::V20180801::DescribeLiveRecordRulesRequest`
1537
+ # @rtype: :class:`Tencentcloud::live::V20180801::DescribeLiveRecordRulesResponse`
1538
+ def DescribeLiveRecordRules(request)
1539
+ body = send_request('DescribeLiveRecordRules', request.serialize)
1540
+ response = JSON.parse(body)
1541
+ if response['Response'].key?('Error') == false
1542
+ model = DescribeLiveRecordRulesResponse.new
1543
+ model.deserialize(response['Response'])
1544
+ model
1545
+ else
1546
+ code = response['Response']['Error']['Code']
1547
+ message = response['Response']['Error']['Message']
1548
+ reqid = response['Response']['RequestId']
1549
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
1550
+ end
1551
+ rescue TencentCloud::Common::TencentCloudSDKException => e
1552
+ raise e
1553
+ rescue StandardError => e
1554
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
1555
+ end
1556
+
1557
+ # 获取单个录制模板。
1558
+
1559
+ # @param request: Request instance for DescribeLiveRecordTemplate.
1560
+ # @type request: :class:`Tencentcloud::live::V20180801::DescribeLiveRecordTemplateRequest`
1561
+ # @rtype: :class:`Tencentcloud::live::V20180801::DescribeLiveRecordTemplateResponse`
1562
+ def DescribeLiveRecordTemplate(request)
1563
+ body = send_request('DescribeLiveRecordTemplate', request.serialize)
1564
+ response = JSON.parse(body)
1565
+ if response['Response'].key?('Error') == false
1566
+ model = DescribeLiveRecordTemplateResponse.new
1567
+ model.deserialize(response['Response'])
1568
+ model
1569
+ else
1570
+ code = response['Response']['Error']['Code']
1571
+ message = response['Response']['Error']['Message']
1572
+ reqid = response['Response']['RequestId']
1573
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
1574
+ end
1575
+ rescue TencentCloud::Common::TencentCloudSDKException => e
1576
+ raise e
1577
+ rescue StandardError => e
1578
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
1579
+ end
1580
+
1581
+ # 获取录制模板列表。
1582
+
1583
+ # @param request: Request instance for DescribeLiveRecordTemplates.
1584
+ # @type request: :class:`Tencentcloud::live::V20180801::DescribeLiveRecordTemplatesRequest`
1585
+ # @rtype: :class:`Tencentcloud::live::V20180801::DescribeLiveRecordTemplatesResponse`
1586
+ def DescribeLiveRecordTemplates(request)
1587
+ body = send_request('DescribeLiveRecordTemplates', request.serialize)
1588
+ response = JSON.parse(body)
1589
+ if response['Response'].key?('Error') == false
1590
+ model = DescribeLiveRecordTemplatesResponse.new
1591
+ model.deserialize(response['Response'])
1592
+ model
1593
+ else
1594
+ code = response['Response']['Error']['Code']
1595
+ message = response['Response']['Error']['Message']
1596
+ reqid = response['Response']['RequestId']
1597
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
1598
+ end
1599
+ rescue TencentCloud::Common::TencentCloudSDKException => e
1600
+ raise e
1601
+ rescue StandardError => e
1602
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
1603
+ end
1604
+
1605
+ # 获取截图规则列表
1606
+
1607
+ # @param request: Request instance for DescribeLiveSnapshotRules.
1608
+ # @type request: :class:`Tencentcloud::live::V20180801::DescribeLiveSnapshotRulesRequest`
1609
+ # @rtype: :class:`Tencentcloud::live::V20180801::DescribeLiveSnapshotRulesResponse`
1610
+ def DescribeLiveSnapshotRules(request)
1611
+ body = send_request('DescribeLiveSnapshotRules', request.serialize)
1612
+ response = JSON.parse(body)
1613
+ if response['Response'].key?('Error') == false
1614
+ model = DescribeLiveSnapshotRulesResponse.new
1615
+ model.deserialize(response['Response'])
1616
+ model
1617
+ else
1618
+ code = response['Response']['Error']['Code']
1619
+ message = response['Response']['Error']['Message']
1620
+ reqid = response['Response']['RequestId']
1621
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
1622
+ end
1623
+ rescue TencentCloud::Common::TencentCloudSDKException => e
1624
+ raise e
1625
+ rescue StandardError => e
1626
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
1627
+ end
1628
+
1629
+ # 获取单个截图模板。
1630
+
1631
+ # @param request: Request instance for DescribeLiveSnapshotTemplate.
1632
+ # @type request: :class:`Tencentcloud::live::V20180801::DescribeLiveSnapshotTemplateRequest`
1633
+ # @rtype: :class:`Tencentcloud::live::V20180801::DescribeLiveSnapshotTemplateResponse`
1634
+ def DescribeLiveSnapshotTemplate(request)
1635
+ body = send_request('DescribeLiveSnapshotTemplate', request.serialize)
1636
+ response = JSON.parse(body)
1637
+ if response['Response'].key?('Error') == false
1638
+ model = DescribeLiveSnapshotTemplateResponse.new
1639
+ model.deserialize(response['Response'])
1640
+ model
1641
+ else
1642
+ code = response['Response']['Error']['Code']
1643
+ message = response['Response']['Error']['Message']
1644
+ reqid = response['Response']['RequestId']
1645
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
1646
+ end
1647
+ rescue TencentCloud::Common::TencentCloudSDKException => e
1648
+ raise e
1649
+ rescue StandardError => e
1650
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
1651
+ end
1652
+
1653
+ # 获取截图模板列表。
1654
+
1655
+ # @param request: Request instance for DescribeLiveSnapshotTemplates.
1656
+ # @type request: :class:`Tencentcloud::live::V20180801::DescribeLiveSnapshotTemplatesRequest`
1657
+ # @rtype: :class:`Tencentcloud::live::V20180801::DescribeLiveSnapshotTemplatesResponse`
1658
+ def DescribeLiveSnapshotTemplates(request)
1659
+ body = send_request('DescribeLiveSnapshotTemplates', request.serialize)
1660
+ response = JSON.parse(body)
1661
+ if response['Response'].key?('Error') == false
1662
+ model = DescribeLiveSnapshotTemplatesResponse.new
1663
+ model.deserialize(response['Response'])
1664
+ model
1665
+ else
1666
+ code = response['Response']['Error']['Code']
1667
+ message = response['Response']['Error']['Message']
1668
+ reqid = response['Response']['RequestId']
1669
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
1670
+ end
1671
+ rescue TencentCloud::Common::TencentCloudSDKException => e
1672
+ raise e
1673
+ rescue StandardError => e
1674
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
1675
+ end
1676
+
1677
+ # 用于查询推断流事件。<br>
1678
+
1679
+ # 注意:
1680
+ # 1. 该接口提供离线推断流记录查询功能,不可作为重要业务场景强依赖接口。
1681
+ # 2. 该接口可通过使用IsFilter进行过滤,返回推流历史记录。
1682
+
1683
+ # @param request: Request instance for DescribeLiveStreamEventList.
1684
+ # @type request: :class:`Tencentcloud::live::V20180801::DescribeLiveStreamEventListRequest`
1685
+ # @rtype: :class:`Tencentcloud::live::V20180801::DescribeLiveStreamEventListResponse`
1686
+ def DescribeLiveStreamEventList(request)
1687
+ body = send_request('DescribeLiveStreamEventList', request.serialize)
1688
+ response = JSON.parse(body)
1689
+ if response['Response'].key?('Error') == false
1690
+ model = DescribeLiveStreamEventListResponse.new
1691
+ model.deserialize(response['Response'])
1692
+ model
1693
+ else
1694
+ code = response['Response']['Error']['Code']
1695
+ message = response['Response']['Error']['Message']
1696
+ reqid = response['Response']['RequestId']
1697
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
1698
+ end
1699
+ rescue TencentCloud::Common::TencentCloudSDKException => e
1700
+ raise e
1701
+ rescue StandardError => e
1702
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
1703
+ end
1704
+
1705
+ # 返回正在直播中的流列表。适用于推流成功后查询在线流信息。
1706
+
1707
+ # 注意:
1708
+ # 1. 该接口仅提供辅助查询在线流列表功能,业务重要场景不可强依赖该接口。
1709
+ # 2. 该接口仅适用于流数少于2万路的情况,对于流数较大用户请联系售后。
1710
+
1711
+ # @param request: Request instance for DescribeLiveStreamOnlineList.
1712
+ # @type request: :class:`Tencentcloud::live::V20180801::DescribeLiveStreamOnlineListRequest`
1713
+ # @rtype: :class:`Tencentcloud::live::V20180801::DescribeLiveStreamOnlineListResponse`
1714
+ def DescribeLiveStreamOnlineList(request)
1715
+ body = send_request('DescribeLiveStreamOnlineList', request.serialize)
1716
+ response = JSON.parse(body)
1717
+ if response['Response'].key?('Error') == false
1718
+ model = DescribeLiveStreamOnlineListResponse.new
1719
+ model.deserialize(response['Response'])
1720
+ model
1721
+ else
1722
+ code = response['Response']['Error']['Code']
1723
+ message = response['Response']['Error']['Message']
1724
+ reqid = response['Response']['RequestId']
1725
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
1726
+ end
1727
+ rescue TencentCloud::Common::TencentCloudSDKException => e
1728
+ raise e
1729
+ rescue StandardError => e
1730
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
1731
+ end
1732
+
1733
+ # 返回已经推过流的流列表。<br>
1734
+ # 注意:分页最多支持查询1万条记录,可通过调整查询时间范围来获取更多数据。
1735
+
1736
+ # @param request: Request instance for DescribeLiveStreamPublishedList.
1737
+ # @type request: :class:`Tencentcloud::live::V20180801::DescribeLiveStreamPublishedListRequest`
1738
+ # @rtype: :class:`Tencentcloud::live::V20180801::DescribeLiveStreamPublishedListResponse`
1739
+ def DescribeLiveStreamPublishedList(request)
1740
+ body = send_request('DescribeLiveStreamPublishedList', request.serialize)
1741
+ response = JSON.parse(body)
1742
+ if response['Response'].key?('Error') == false
1743
+ model = DescribeLiveStreamPublishedListResponse.new
1744
+ model.deserialize(response['Response'])
1745
+ model
1746
+ else
1747
+ code = response['Response']['Error']['Code']
1748
+ message = response['Response']['Error']['Message']
1749
+ reqid = response['Response']['RequestId']
1750
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
1751
+ end
1752
+ rescue TencentCloud::Common::TencentCloudSDKException => e
1753
+ raise e
1754
+ rescue StandardError => e
1755
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
1756
+ end
1757
+
1758
+ # 查询所有实时流的推流信息,包括客户端IP,服务端IP,帧率,码率,域名,开始推流时间。
1759
+
1760
+ # @param request: Request instance for DescribeLiveStreamPushInfoList.
1761
+ # @type request: :class:`Tencentcloud::live::V20180801::DescribeLiveStreamPushInfoListRequest`
1762
+ # @rtype: :class:`Tencentcloud::live::V20180801::DescribeLiveStreamPushInfoListResponse`
1763
+ def DescribeLiveStreamPushInfoList(request)
1764
+ body = send_request('DescribeLiveStreamPushInfoList', request.serialize)
1765
+ response = JSON.parse(body)
1766
+ if response['Response'].key?('Error') == false
1767
+ model = DescribeLiveStreamPushInfoListResponse.new
1768
+ model.deserialize(response['Response'])
1769
+ model
1770
+ else
1771
+ code = response['Response']['Error']['Code']
1772
+ message = response['Response']['Error']['Message']
1773
+ reqid = response['Response']['RequestId']
1774
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
1775
+ end
1776
+ rescue TencentCloud::Common::TencentCloudSDKException => e
1777
+ raise e
1778
+ rescue StandardError => e
1779
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
1780
+ end
1781
+
1782
+ # 返回直播中、无推流或者禁播等状态。
1783
+ # 注意:该接口仅提供辅助查询流状态功能,业务重要场景不要强依赖该接口!
1784
+
1785
+ # 使用建议:
1786
+ # 1. 去除将该接口的返回结果作为开播、关播等重要业务场景的依赖。
1787
+ # 2. 如业务需要该状态,可通过[推断流事件通知](/document/product/267/47025)进行存储维护直播间状态。
1788
+ # 3. 自行维护的直播间状态,可通过定时(>1 min)[查询直播中的流接口](/document/product/267/20472),进行状态校准。
1789
+ # 4. 如使用了流状态查询接口查询到流不活跃,可通过上述多种方案综合判定流状态。
1790
+ # 5. 接口查询时,如发生访问异常或解析异常等,可默认为活跃,减少对业务影响。
1791
+
1792
+ # @param request: Request instance for DescribeLiveStreamState.
1793
+ # @type request: :class:`Tencentcloud::live::V20180801::DescribeLiveStreamStateRequest`
1794
+ # @rtype: :class:`Tencentcloud::live::V20180801::DescribeLiveStreamStateResponse`
1795
+ def DescribeLiveStreamState(request)
1796
+ body = send_request('DescribeLiveStreamState', request.serialize)
1797
+ response = JSON.parse(body)
1798
+ if response['Response'].key?('Error') == false
1799
+ model = DescribeLiveStreamStateResponse.new
1800
+ model.deserialize(response['Response'])
1801
+ model
1802
+ else
1803
+ code = response['Response']['Error']['Code']
1804
+ message = response['Response']['Error']['Message']
1805
+ reqid = response['Response']['RequestId']
1806
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
1807
+ end
1808
+ rescue TencentCloud::Common::TencentCloudSDKException => e
1809
+ raise e
1810
+ rescue StandardError => e
1811
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
1812
+ end
1813
+
1814
+ # 支持查询某天或某段时间的转码详细信息。
1815
+
1816
+ # @param request: Request instance for DescribeLiveTranscodeDetailInfo.
1817
+ # @type request: :class:`Tencentcloud::live::V20180801::DescribeLiveTranscodeDetailInfoRequest`
1818
+ # @rtype: :class:`Tencentcloud::live::V20180801::DescribeLiveTranscodeDetailInfoResponse`
1819
+ def DescribeLiveTranscodeDetailInfo(request)
1820
+ body = send_request('DescribeLiveTranscodeDetailInfo', request.serialize)
1821
+ response = JSON.parse(body)
1822
+ if response['Response'].key?('Error') == false
1823
+ model = DescribeLiveTranscodeDetailInfoResponse.new
1824
+ model.deserialize(response['Response'])
1825
+ model
1826
+ else
1827
+ code = response['Response']['Error']['Code']
1828
+ message = response['Response']['Error']['Message']
1829
+ reqid = response['Response']['RequestId']
1830
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
1831
+ end
1832
+ rescue TencentCloud::Common::TencentCloudSDKException => e
1833
+ raise e
1834
+ rescue StandardError => e
1835
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
1836
+ end
1837
+
1838
+ # 获取转码规则列表
1839
+
1840
+ # @param request: Request instance for DescribeLiveTranscodeRules.
1841
+ # @type request: :class:`Tencentcloud::live::V20180801::DescribeLiveTranscodeRulesRequest`
1842
+ # @rtype: :class:`Tencentcloud::live::V20180801::DescribeLiveTranscodeRulesResponse`
1843
+ def DescribeLiveTranscodeRules(request)
1844
+ body = send_request('DescribeLiveTranscodeRules', request.serialize)
1845
+ response = JSON.parse(body)
1846
+ if response['Response'].key?('Error') == false
1847
+ model = DescribeLiveTranscodeRulesResponse.new
1848
+ model.deserialize(response['Response'])
1849
+ model
1850
+ else
1851
+ code = response['Response']['Error']['Code']
1852
+ message = response['Response']['Error']['Message']
1853
+ reqid = response['Response']['RequestId']
1854
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
1855
+ end
1856
+ rescue TencentCloud::Common::TencentCloudSDKException => e
1857
+ raise e
1858
+ rescue StandardError => e
1859
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
1860
+ end
1861
+
1862
+ # 获取单个转码模板。
1863
+
1864
+ # @param request: Request instance for DescribeLiveTranscodeTemplate.
1865
+ # @type request: :class:`Tencentcloud::live::V20180801::DescribeLiveTranscodeTemplateRequest`
1866
+ # @rtype: :class:`Tencentcloud::live::V20180801::DescribeLiveTranscodeTemplateResponse`
1867
+ def DescribeLiveTranscodeTemplate(request)
1868
+ body = send_request('DescribeLiveTranscodeTemplate', request.serialize)
1869
+ response = JSON.parse(body)
1870
+ if response['Response'].key?('Error') == false
1871
+ model = DescribeLiveTranscodeTemplateResponse.new
1872
+ model.deserialize(response['Response'])
1873
+ model
1874
+ else
1875
+ code = response['Response']['Error']['Code']
1876
+ message = response['Response']['Error']['Message']
1877
+ reqid = response['Response']['RequestId']
1878
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
1879
+ end
1880
+ rescue TencentCloud::Common::TencentCloudSDKException => e
1881
+ raise e
1882
+ rescue StandardError => e
1883
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
1884
+ end
1885
+
1886
+ # 获取转码模板列表。
1887
+
1888
+ # @param request: Request instance for DescribeLiveTranscodeTemplates.
1889
+ # @type request: :class:`Tencentcloud::live::V20180801::DescribeLiveTranscodeTemplatesRequest`
1890
+ # @rtype: :class:`Tencentcloud::live::V20180801::DescribeLiveTranscodeTemplatesResponse`
1891
+ def DescribeLiveTranscodeTemplates(request)
1892
+ body = send_request('DescribeLiveTranscodeTemplates', request.serialize)
1893
+ response = JSON.parse(body)
1894
+ if response['Response'].key?('Error') == false
1895
+ model = DescribeLiveTranscodeTemplatesResponse.new
1896
+ model.deserialize(response['Response'])
1897
+ model
1898
+ else
1899
+ code = response['Response']['Error']['Code']
1900
+ message = response['Response']['Error']['Message']
1901
+ reqid = response['Response']['RequestId']
1902
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
1903
+ end
1904
+ rescue TencentCloud::Common::TencentCloudSDKException => e
1905
+ raise e
1906
+ rescue StandardError => e
1907
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
1908
+ end
1909
+
1910
+ # 查询转码总量数据,可查询近30天内数据。
1911
+ # 注意:
1912
+ # 如果是查询某一天内,则返回5分钟粒度数据;
1913
+ # 如果是查询跨天或指定域名, 则返回1小时粒度数据。
1914
+
1915
+ # @param request: Request instance for DescribeLiveTranscodeTotalInfo.
1916
+ # @type request: :class:`Tencentcloud::live::V20180801::DescribeLiveTranscodeTotalInfoRequest`
1917
+ # @rtype: :class:`Tencentcloud::live::V20180801::DescribeLiveTranscodeTotalInfoResponse`
1918
+ def DescribeLiveTranscodeTotalInfo(request)
1919
+ body = send_request('DescribeLiveTranscodeTotalInfo', request.serialize)
1920
+ response = JSON.parse(body)
1921
+ if response['Response'].key?('Error') == false
1922
+ model = DescribeLiveTranscodeTotalInfoResponse.new
1923
+ model.deserialize(response['Response'])
1924
+ model
1925
+ else
1926
+ code = response['Response']['Error']['Code']
1927
+ message = response['Response']['Error']['Message']
1928
+ reqid = response['Response']['RequestId']
1929
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
1930
+ end
1931
+ rescue TencentCloud::Common::TencentCloudSDKException => e
1932
+ raise e
1933
+ rescue StandardError => e
1934
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
1935
+ end
1936
+
1937
+ # 获取单个水印信息。
1938
+
1939
+ # @param request: Request instance for DescribeLiveWatermark.
1940
+ # @type request: :class:`Tencentcloud::live::V20180801::DescribeLiveWatermarkRequest`
1941
+ # @rtype: :class:`Tencentcloud::live::V20180801::DescribeLiveWatermarkResponse`
1942
+ def DescribeLiveWatermark(request)
1943
+ body = send_request('DescribeLiveWatermark', request.serialize)
1944
+ response = JSON.parse(body)
1945
+ if response['Response'].key?('Error') == false
1946
+ model = DescribeLiveWatermarkResponse.new
1947
+ model.deserialize(response['Response'])
1948
+ model
1949
+ else
1950
+ code = response['Response']['Error']['Code']
1951
+ message = response['Response']['Error']['Message']
1952
+ reqid = response['Response']['RequestId']
1953
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
1954
+ end
1955
+ rescue TencentCloud::Common::TencentCloudSDKException => e
1956
+ raise e
1957
+ rescue StandardError => e
1958
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
1959
+ end
1960
+
1961
+ # 获取水印规则列表。
1962
+
1963
+ # @param request: Request instance for DescribeLiveWatermarkRules.
1964
+ # @type request: :class:`Tencentcloud::live::V20180801::DescribeLiveWatermarkRulesRequest`
1965
+ # @rtype: :class:`Tencentcloud::live::V20180801::DescribeLiveWatermarkRulesResponse`
1966
+ def DescribeLiveWatermarkRules(request)
1967
+ body = send_request('DescribeLiveWatermarkRules', request.serialize)
1968
+ response = JSON.parse(body)
1969
+ if response['Response'].key?('Error') == false
1970
+ model = DescribeLiveWatermarkRulesResponse.new
1971
+ model.deserialize(response['Response'])
1972
+ model
1973
+ else
1974
+ code = response['Response']['Error']['Code']
1975
+ message = response['Response']['Error']['Message']
1976
+ reqid = response['Response']['RequestId']
1977
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
1978
+ end
1979
+ rescue TencentCloud::Common::TencentCloudSDKException => e
1980
+ raise e
1981
+ rescue StandardError => e
1982
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
1983
+ end
1984
+
1985
+ # 查询水印列表。
1986
+
1987
+ # @param request: Request instance for DescribeLiveWatermarks.
1988
+ # @type request: :class:`Tencentcloud::live::V20180801::DescribeLiveWatermarksRequest`
1989
+ # @rtype: :class:`Tencentcloud::live::V20180801::DescribeLiveWatermarksResponse`
1990
+ def DescribeLiveWatermarks(request)
1991
+ body = send_request('DescribeLiveWatermarks', request.serialize)
1992
+ response = JSON.parse(body)
1993
+ if response['Response'].key?('Error') == false
1994
+ model = DescribeLiveWatermarksResponse.new
1995
+ model.deserialize(response['Response'])
1996
+ model
1997
+ else
1998
+ code = response['Response']['Error']['Code']
1999
+ message = response['Response']['Error']['Message']
2000
+ reqid = response['Response']['RequestId']
2001
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
2002
+ end
2003
+ rescue TencentCloud::Common::TencentCloudSDKException => e
2004
+ raise e
2005
+ rescue StandardError => e
2006
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
2007
+ end
2008
+
2009
+ # 批量获取日志URL。
2010
+
2011
+ # @param request: Request instance for DescribeLogDownloadList.
2012
+ # @type request: :class:`Tencentcloud::live::V20180801::DescribeLogDownloadListRequest`
2013
+ # @rtype: :class:`Tencentcloud::live::V20180801::DescribeLogDownloadListResponse`
2014
+ def DescribeLogDownloadList(request)
2015
+ body = send_request('DescribeLogDownloadList', request.serialize)
2016
+ response = JSON.parse(body)
2017
+ if response['Response'].key?('Error') == false
2018
+ model = DescribeLogDownloadListResponse.new
2019
+ model.deserialize(response['Response'])
2020
+ model
2021
+ else
2022
+ code = response['Response']['Error']['Code']
2023
+ message = response['Response']['Error']['Message']
2024
+ reqid = response['Response']['RequestId']
2025
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
2026
+ end
2027
+ rescue TencentCloud::Common::TencentCloudSDKException => e
2028
+ raise e
2029
+ rescue StandardError => e
2030
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
2031
+ end
2032
+
2033
+ # 查询下行播放错误码信息,某段时间内1分钟粒度的各http错误码出现的次数,包括4xx,5xx。
2034
+
2035
+
2036
+ # @param request: Request instance for DescribePlayErrorCodeDetailInfoList.
2037
+ # @type request: :class:`Tencentcloud::live::V20180801::DescribePlayErrorCodeDetailInfoListRequest`
2038
+ # @rtype: :class:`Tencentcloud::live::V20180801::DescribePlayErrorCodeDetailInfoListResponse`
2039
+ def DescribePlayErrorCodeDetailInfoList(request)
2040
+ body = send_request('DescribePlayErrorCodeDetailInfoList', request.serialize)
2041
+ response = JSON.parse(body)
2042
+ if response['Response'].key?('Error') == false
2043
+ model = DescribePlayErrorCodeDetailInfoListResponse.new
2044
+ model.deserialize(response['Response'])
2045
+ model
2046
+ else
2047
+ code = response['Response']['Error']['Code']
2048
+ message = response['Response']['Error']['Message']
2049
+ reqid = response['Response']['RequestId']
2050
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
2051
+ end
2052
+ rescue TencentCloud::Common::TencentCloudSDKException => e
2053
+ raise e
2054
+ rescue StandardError => e
2055
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
2056
+ end
2057
+
2058
+ # 查询下行播放错误码信息。
2059
+
2060
+ # @param request: Request instance for DescribePlayErrorCodeSumInfoList.
2061
+ # @type request: :class:`Tencentcloud::live::V20180801::DescribePlayErrorCodeSumInfoListRequest`
2062
+ # @rtype: :class:`Tencentcloud::live::V20180801::DescribePlayErrorCodeSumInfoListResponse`
2063
+ def DescribePlayErrorCodeSumInfoList(request)
2064
+ body = send_request('DescribePlayErrorCodeSumInfoList', request.serialize)
2065
+ response = JSON.parse(body)
2066
+ if response['Response'].key?('Error') == false
2067
+ model = DescribePlayErrorCodeSumInfoListResponse.new
2068
+ model.deserialize(response['Response'])
2069
+ model
2070
+ else
2071
+ code = response['Response']['Error']['Code']
2072
+ message = response['Response']['Error']['Message']
2073
+ reqid = response['Response']['RequestId']
2074
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
2075
+ end
2076
+ rescue TencentCloud::Common::TencentCloudSDKException => e
2077
+ raise e
2078
+ rescue StandardError => e
2079
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
2080
+ end
2081
+
2082
+ # 查询某段时间内每个国家地区每个省份每个运营商的平均每秒流量,总流量,总请求数信息。
2083
+
2084
+ # @param request: Request instance for DescribeProIspPlaySumInfoList.
2085
+ # @type request: :class:`Tencentcloud::live::V20180801::DescribeProIspPlaySumInfoListRequest`
2086
+ # @rtype: :class:`Tencentcloud::live::V20180801::DescribeProIspPlaySumInfoListResponse`
2087
+ def DescribeProIspPlaySumInfoList(request)
2088
+ body = send_request('DescribeProIspPlaySumInfoList', request.serialize)
2089
+ response = JSON.parse(body)
2090
+ if response['Response'].key?('Error') == false
2091
+ model = DescribeProIspPlaySumInfoListResponse.new
2092
+ model.deserialize(response['Response'])
2093
+ model
2094
+ else
2095
+ code = response['Response']['Error']['Code']
2096
+ message = response['Response']['Error']['Message']
2097
+ reqid = response['Response']['RequestId']
2098
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
2099
+ end
2100
+ rescue TencentCloud::Common::TencentCloudSDKException => e
2101
+ raise e
2102
+ rescue StandardError => e
2103
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
2104
+ end
2105
+
2106
+ # 查询某省份某运营商下行播放数据,包括带宽,流量,请求数,并发连接数信息。
2107
+
2108
+ # @param request: Request instance for DescribeProvinceIspPlayInfoList.
2109
+ # @type request: :class:`Tencentcloud::live::V20180801::DescribeProvinceIspPlayInfoListRequest`
2110
+ # @rtype: :class:`Tencentcloud::live::V20180801::DescribeProvinceIspPlayInfoListResponse`
2111
+ def DescribeProvinceIspPlayInfoList(request)
2112
+ body = send_request('DescribeProvinceIspPlayInfoList', request.serialize)
2113
+ response = JSON.parse(body)
2114
+ if response['Response'].key?('Error') == false
2115
+ model = DescribeProvinceIspPlayInfoListResponse.new
2116
+ model.deserialize(response['Response'])
2117
+ model
2118
+ else
2119
+ code = response['Response']['Error']['Code']
2120
+ message = response['Response']['Error']['Message']
2121
+ reqid = response['Response']['RequestId']
2122
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
2123
+ end
2124
+ rescue TencentCloud::Common::TencentCloudSDKException => e
2125
+ raise e
2126
+ rescue StandardError => e
2127
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
2128
+ end
2129
+
2130
+ # 查询直播拉流配置。
2131
+
2132
+ # @param request: Request instance for DescribePullStreamConfigs.
2133
+ # @type request: :class:`Tencentcloud::live::V20180801::DescribePullStreamConfigsRequest`
2134
+ # @rtype: :class:`Tencentcloud::live::V20180801::DescribePullStreamConfigsResponse`
2135
+ def DescribePullStreamConfigs(request)
2136
+ body = send_request('DescribePullStreamConfigs', request.serialize)
2137
+ response = JSON.parse(body)
2138
+ if response['Response'].key?('Error') == false
2139
+ model = DescribePullStreamConfigsResponse.new
2140
+ model.deserialize(response['Response'])
2141
+ model
2142
+ else
2143
+ code = response['Response']['Error']['Code']
2144
+ message = response['Response']['Error']['Message']
2145
+ reqid = response['Response']['RequestId']
2146
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
2147
+ end
2148
+ rescue TencentCloud::Common::TencentCloudSDKException => e
2149
+ raise e
2150
+ rescue StandardError => e
2151
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
2152
+ end
2153
+
2154
+ # 直播推流带宽和流量数据查询。
2155
+ # 推流计费会先取全球推流用量和全球播放用量进行比较,满足计费条件后再按各地区用量出账。详情参见[计费文档](https://cloud.tencent.com/document/product/267/34175)。
2156
+
2157
+ # @param request: Request instance for DescribePushBandwidthAndFluxList.
2158
+ # @type request: :class:`Tencentcloud::live::V20180801::DescribePushBandwidthAndFluxListRequest`
2159
+ # @rtype: :class:`Tencentcloud::live::V20180801::DescribePushBandwidthAndFluxListResponse`
2160
+ def DescribePushBandwidthAndFluxList(request)
2161
+ body = send_request('DescribePushBandwidthAndFluxList', request.serialize)
2162
+ response = JSON.parse(body)
2163
+ if response['Response'].key?('Error') == false
2164
+ model = DescribePushBandwidthAndFluxListResponse.new
2165
+ model.deserialize(response['Response'])
2166
+ model
2167
+ else
2168
+ code = response['Response']['Error']['Code']
2169
+ message = response['Response']['Error']['Message']
2170
+ reqid = response['Response']['RequestId']
2171
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
2172
+ end
2173
+ rescue TencentCloud::Common::TencentCloudSDKException => e
2174
+ raise e
2175
+ rescue StandardError => e
2176
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
2177
+ end
2178
+
2179
+ # 查询指定时间段范围内启动和结束的录制任务列表。
2180
+ # - 使用前提
2181
+ # 1. 仅用于查询由 CreateRecordTask 接口创建的录制任务。
2182
+ # 2. 不能查询被 DeleteRecordTask 接口删除以及已过期(平台侧保留3个月)的录制任务。
2183
+
2184
+ # @param request: Request instance for DescribeRecordTask.
2185
+ # @type request: :class:`Tencentcloud::live::V20180801::DescribeRecordTaskRequest`
2186
+ # @rtype: :class:`Tencentcloud::live::V20180801::DescribeRecordTaskResponse`
2187
+ def DescribeRecordTask(request)
2188
+ body = send_request('DescribeRecordTask', request.serialize)
2189
+ response = JSON.parse(body)
2190
+ if response['Response'].key?('Error') == false
2191
+ model = DescribeRecordTaskResponse.new
2192
+ model.deserialize(response['Response'])
2193
+ model
2194
+ else
2195
+ code = response['Response']['Error']['Code']
2196
+ message = response['Response']['Error']['Message']
2197
+ reqid = response['Response']['RequestId']
2198
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
2199
+ end
2200
+ rescue TencentCloud::Common::TencentCloudSDKException => e
2201
+ raise e
2202
+ rescue StandardError => e
2203
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
2204
+ end
2205
+
2206
+ # 接口用来查询直播增值业务--截图的张数
2207
+
2208
+ # @param request: Request instance for DescribeScreenShotSheetNumList.
2209
+ # @type request: :class:`Tencentcloud::live::V20180801::DescribeScreenShotSheetNumListRequest`
2210
+ # @rtype: :class:`Tencentcloud::live::V20180801::DescribeScreenShotSheetNumListResponse`
2211
+ def DescribeScreenShotSheetNumList(request)
2212
+ body = send_request('DescribeScreenShotSheetNumList', request.serialize)
2213
+ response = JSON.parse(body)
2214
+ if response['Response'].key?('Error') == false
2215
+ model = DescribeScreenShotSheetNumListResponse.new
2216
+ model.deserialize(response['Response'])
2217
+ model
2218
+ else
2219
+ code = response['Response']['Error']['Code']
2220
+ message = response['Response']['Error']['Message']
2221
+ reqid = response['Response']['RequestId']
2222
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
2223
+ end
2224
+ rescue TencentCloud::Common::TencentCloudSDKException => e
2225
+ raise e
2226
+ rescue StandardError => e
2227
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
2228
+ end
2229
+
2230
+ # 查询天维度每条流的播放数据,包括总流量等。
2231
+
2232
+ # @param request: Request instance for DescribeStreamDayPlayInfoList.
2233
+ # @type request: :class:`Tencentcloud::live::V20180801::DescribeStreamDayPlayInfoListRequest`
2234
+ # @rtype: :class:`Tencentcloud::live::V20180801::DescribeStreamDayPlayInfoListResponse`
2235
+ def DescribeStreamDayPlayInfoList(request)
2236
+ body = send_request('DescribeStreamDayPlayInfoList', request.serialize)
2237
+ response = JSON.parse(body)
2238
+ if response['Response'].key?('Error') == false
2239
+ model = DescribeStreamDayPlayInfoListResponse.new
2240
+ model.deserialize(response['Response'])
2241
+ model
2242
+ else
2243
+ code = response['Response']['Error']['Code']
2244
+ message = response['Response']['Error']['Message']
2245
+ reqid = response['Response']['RequestId']
2246
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
2247
+ end
2248
+ rescue TencentCloud::Common::TencentCloudSDKException => e
2249
+ raise e
2250
+ rescue StandardError => e
2251
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
2252
+ end
2253
+
2254
+ # 查询播放数据,支持按流名称查询详细播放数据,也可按播放域名查询详细总数据,数据延迟4分钟左右。
2255
+ # 注意:按AppName查询请先联系工单申请,开通后配置生效预计需要5个工作日左右,具体时间以最终回复为准。
2256
+
2257
+ # @param request: Request instance for DescribeStreamPlayInfoList.
2258
+ # @type request: :class:`Tencentcloud::live::V20180801::DescribeStreamPlayInfoListRequest`
2259
+ # @rtype: :class:`Tencentcloud::live::V20180801::DescribeStreamPlayInfoListResponse`
2260
+ def DescribeStreamPlayInfoList(request)
2261
+ body = send_request('DescribeStreamPlayInfoList', request.serialize)
2262
+ response = JSON.parse(body)
2263
+ if response['Response'].key?('Error') == false
2264
+ model = DescribeStreamPlayInfoListResponse.new
2265
+ model.deserialize(response['Response'])
2266
+ model
2267
+ else
2268
+ code = response['Response']['Error']['Code']
2269
+ message = response['Response']['Error']['Message']
2270
+ reqid = response['Response']['RequestId']
2271
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
2272
+ end
2273
+ rescue TencentCloud::Common::TencentCloudSDKException => e
2274
+ raise e
2275
+ rescue StandardError => e
2276
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
2277
+ end
2278
+
2279
+ # 查询流id的上行推流质量数据,包括音视频的帧率,码率,流逝时间,编码格式等。
2280
+
2281
+ # @param request: Request instance for DescribeStreamPushInfoList.
2282
+ # @type request: :class:`Tencentcloud::live::V20180801::DescribeStreamPushInfoListRequest`
2283
+ # @rtype: :class:`Tencentcloud::live::V20180801::DescribeStreamPushInfoListResponse`
2284
+ def DescribeStreamPushInfoList(request)
2285
+ body = send_request('DescribeStreamPushInfoList', request.serialize)
2286
+ response = JSON.parse(body)
2287
+ if response['Response'].key?('Error') == false
2288
+ model = DescribeStreamPushInfoListResponse.new
2289
+ model.deserialize(response['Response'])
2290
+ model
2291
+ else
2292
+ code = response['Response']['Error']['Code']
2293
+ message = response['Response']['Error']['Message']
2294
+ reqid = response['Response']['RequestId']
2295
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
2296
+ end
2297
+ rescue TencentCloud::Common::TencentCloudSDKException => e
2298
+ raise e
2299
+ rescue StandardError => e
2300
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
2301
+ end
2302
+
2303
+ # 查询某段时间top n客户端ip汇总信息(暂支持top 1000)
2304
+
2305
+ # @param request: Request instance for DescribeTopClientIpSumInfoList.
2306
+ # @type request: :class:`Tencentcloud::live::V20180801::DescribeTopClientIpSumInfoListRequest`
2307
+ # @rtype: :class:`Tencentcloud::live::V20180801::DescribeTopClientIpSumInfoListResponse`
2308
+ def DescribeTopClientIpSumInfoList(request)
2309
+ body = send_request('DescribeTopClientIpSumInfoList', request.serialize)
2310
+ response = JSON.parse(body)
2311
+ if response['Response'].key?('Error') == false
2312
+ model = DescribeTopClientIpSumInfoListResponse.new
2313
+ model.deserialize(response['Response'])
2314
+ model
2315
+ else
2316
+ code = response['Response']['Error']['Code']
2317
+ message = response['Response']['Error']['Message']
2318
+ reqid = response['Response']['RequestId']
2319
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
2320
+ end
2321
+ rescue TencentCloud::Common::TencentCloudSDKException => e
2322
+ raise e
2323
+ rescue StandardError => e
2324
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
2325
+ end
2326
+
2327
+ # 直播上行路数查询
2328
+
2329
+ # @param request: Request instance for DescribeUploadStreamNums.
2330
+ # @type request: :class:`Tencentcloud::live::V20180801::DescribeUploadStreamNumsRequest`
2331
+ # @rtype: :class:`Tencentcloud::live::V20180801::DescribeUploadStreamNumsResponse`
2332
+ def DescribeUploadStreamNums(request)
2333
+ body = send_request('DescribeUploadStreamNums', request.serialize)
2334
+ response = JSON.parse(body)
2335
+ if response['Response'].key?('Error') == false
2336
+ model = DescribeUploadStreamNumsResponse.new
2337
+ model.deserialize(response['Response'])
2338
+ model
2339
+ else
2340
+ code = response['Response']['Error']['Code']
2341
+ message = response['Response']['Error']['Message']
2342
+ reqid = response['Response']['RequestId']
2343
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
2344
+ end
2345
+ rescue TencentCloud::Common::TencentCloudSDKException => e
2346
+ raise e
2347
+ rescue StandardError => e
2348
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
2349
+ end
2350
+
2351
+ # 查询某时间段top n的域名或流id信息(暂支持top 1000)。
2352
+
2353
+ # @param request: Request instance for DescribeVisitTopSumInfoList.
2354
+ # @type request: :class:`Tencentcloud::live::V20180801::DescribeVisitTopSumInfoListRequest`
2355
+ # @rtype: :class:`Tencentcloud::live::V20180801::DescribeVisitTopSumInfoListResponse`
2356
+ def DescribeVisitTopSumInfoList(request)
2357
+ body = send_request('DescribeVisitTopSumInfoList', request.serialize)
2358
+ response = JSON.parse(body)
2359
+ if response['Response'].key?('Error') == false
2360
+ model = DescribeVisitTopSumInfoListResponse.new
2361
+ model.deserialize(response['Response'])
2362
+ model
2363
+ else
2364
+ code = response['Response']['Error']['Code']
2365
+ message = response['Response']['Error']['Message']
2366
+ reqid = response['Response']['RequestId']
2367
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
2368
+ end
2369
+ rescue TencentCloud::Common::TencentCloudSDKException => e
2370
+ raise e
2371
+ rescue StandardError => e
2372
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
2373
+ end
2374
+
2375
+ # 断开推流连接,但可以重新推流。
2376
+
2377
+ # @param request: Request instance for DropLiveStream.
2378
+ # @type request: :class:`Tencentcloud::live::V20180801::DropLiveStreamRequest`
2379
+ # @rtype: :class:`Tencentcloud::live::V20180801::DropLiveStreamResponse`
2380
+ def DropLiveStream(request)
2381
+ body = send_request('DropLiveStream', request.serialize)
2382
+ response = JSON.parse(body)
2383
+ if response['Response'].key?('Error') == false
2384
+ model = DropLiveStreamResponse.new
2385
+ model.deserialize(response['Response'])
2386
+ model
2387
+ else
2388
+ code = response['Response']['Error']['Code']
2389
+ message = response['Response']['Error']['Message']
2390
+ reqid = response['Response']['RequestId']
2391
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
2392
+ end
2393
+ rescue TencentCloud::Common::TencentCloudSDKException => e
2394
+ raise e
2395
+ rescue StandardError => e
2396
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
2397
+ end
2398
+
2399
+ # 启用状态为停用的直播域名。
2400
+
2401
+ # @param request: Request instance for EnableLiveDomain.
2402
+ # @type request: :class:`Tencentcloud::live::V20180801::EnableLiveDomainRequest`
2403
+ # @rtype: :class:`Tencentcloud::live::V20180801::EnableLiveDomainResponse`
2404
+ def EnableLiveDomain(request)
2405
+ body = send_request('EnableLiveDomain', request.serialize)
2406
+ response = JSON.parse(body)
2407
+ if response['Response'].key?('Error') == false
2408
+ model = EnableLiveDomainResponse.new
2409
+ model.deserialize(response['Response'])
2410
+ model
2411
+ else
2412
+ code = response['Response']['Error']['Code']
2413
+ message = response['Response']['Error']['Message']
2414
+ reqid = response['Response']['RequestId']
2415
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
2416
+ end
2417
+ rescue TencentCloud::Common::TencentCloudSDKException => e
2418
+ raise e
2419
+ rescue StandardError => e
2420
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
2421
+ end
2422
+
2423
+ # 停止使用某个直播域名。
2424
+
2425
+ # @param request: Request instance for ForbidLiveDomain.
2426
+ # @type request: :class:`Tencentcloud::live::V20180801::ForbidLiveDomainRequest`
2427
+ # @rtype: :class:`Tencentcloud::live::V20180801::ForbidLiveDomainResponse`
2428
+ def ForbidLiveDomain(request)
2429
+ body = send_request('ForbidLiveDomain', request.serialize)
2430
+ response = JSON.parse(body)
2431
+ if response['Response'].key?('Error') == false
2432
+ model = ForbidLiveDomainResponse.new
2433
+ model.deserialize(response['Response'])
2434
+ model
2435
+ else
2436
+ code = response['Response']['Error']['Code']
2437
+ message = response['Response']['Error']['Message']
2438
+ reqid = response['Response']['RequestId']
2439
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
2440
+ end
2441
+ rescue TencentCloud::Common::TencentCloudSDKException => e
2442
+ raise e
2443
+ rescue StandardError => e
2444
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
2445
+ end
2446
+
2447
+ # 禁止某条流的推送,可以预设某个时刻将流恢复。
2448
+
2449
+ # @param request: Request instance for ForbidLiveStream.
2450
+ # @type request: :class:`Tencentcloud::live::V20180801::ForbidLiveStreamRequest`
2451
+ # @rtype: :class:`Tencentcloud::live::V20180801::ForbidLiveStreamResponse`
2452
+ def ForbidLiveStream(request)
2453
+ body = send_request('ForbidLiveStream', request.serialize)
2454
+ response = JSON.parse(body)
2455
+ if response['Response'].key?('Error') == false
2456
+ model = ForbidLiveStreamResponse.new
2457
+ model.deserialize(response['Response'])
2458
+ model
2459
+ else
2460
+ code = response['Response']['Error']['Code']
2461
+ message = response['Response']['Error']['Message']
2462
+ reqid = response['Response']['RequestId']
2463
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
2464
+ end
2465
+ rescue TencentCloud::Common::TencentCloudSDKException => e
2466
+ raise e
2467
+ rescue StandardError => e
2468
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
2469
+ end
2470
+
2471
+ # 修改回调模板。
2472
+
2473
+ # @param request: Request instance for ModifyLiveCallbackTemplate.
2474
+ # @type request: :class:`Tencentcloud::live::V20180801::ModifyLiveCallbackTemplateRequest`
2475
+ # @rtype: :class:`Tencentcloud::live::V20180801::ModifyLiveCallbackTemplateResponse`
2476
+ def ModifyLiveCallbackTemplate(request)
2477
+ body = send_request('ModifyLiveCallbackTemplate', request.serialize)
2478
+ response = JSON.parse(body)
2479
+ if response['Response'].key?('Error') == false
2480
+ model = ModifyLiveCallbackTemplateResponse.new
2481
+ model.deserialize(response['Response'])
2482
+ model
2483
+ else
2484
+ code = response['Response']['Error']['Code']
2485
+ message = response['Response']['Error']['Message']
2486
+ reqid = response['Response']['RequestId']
2487
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
2488
+ end
2489
+ rescue TencentCloud::Common::TencentCloudSDKException => e
2490
+ raise e
2491
+ rescue StandardError => e
2492
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
2493
+ end
2494
+
2495
+ # 修改证书
2496
+
2497
+ # @param request: Request instance for ModifyLiveCert.
2498
+ # @type request: :class:`Tencentcloud::live::V20180801::ModifyLiveCertRequest`
2499
+ # @rtype: :class:`Tencentcloud::live::V20180801::ModifyLiveCertResponse`
2500
+ def ModifyLiveCert(request)
2501
+ body = send_request('ModifyLiveCert', request.serialize)
2502
+ response = JSON.parse(body)
2503
+ if response['Response'].key?('Error') == false
2504
+ model = ModifyLiveCertResponse.new
2505
+ model.deserialize(response['Response'])
2506
+ model
2507
+ else
2508
+ code = response['Response']['Error']['Code']
2509
+ message = response['Response']['Error']['Message']
2510
+ reqid = response['Response']['RequestId']
2511
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
2512
+ end
2513
+ rescue TencentCloud::Common::TencentCloudSDKException => e
2514
+ raise e
2515
+ rescue StandardError => e
2516
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
2517
+ end
2518
+
2519
+ # 修改域名和证书绑定信息
2520
+
2521
+ # @param request: Request instance for ModifyLiveDomainCert.
2522
+ # @type request: :class:`Tencentcloud::live::V20180801::ModifyLiveDomainCertRequest`
2523
+ # @rtype: :class:`Tencentcloud::live::V20180801::ModifyLiveDomainCertResponse`
2524
+ def ModifyLiveDomainCert(request)
2525
+ body = send_request('ModifyLiveDomainCert', request.serialize)
2526
+ response = JSON.parse(body)
2527
+ if response['Response'].key?('Error') == false
2528
+ model = ModifyLiveDomainCertResponse.new
2529
+ model.deserialize(response['Response'])
2530
+ model
2531
+ else
2532
+ code = response['Response']['Error']['Code']
2533
+ message = response['Response']['Error']['Message']
2534
+ reqid = response['Response']['RequestId']
2535
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
2536
+ end
2537
+ rescue TencentCloud::Common::TencentCloudSDKException => e
2538
+ raise e
2539
+ rescue StandardError => e
2540
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
2541
+ end
2542
+
2543
+ # 设置直播域名 Referer 黑白名单。
2544
+ # 由于 Referer 信息包含在 http 协议中,在开启配置后,播放协议为 rtmp 或 WebRTC 不会校验 Referer 配置,仍可正常播放。如需配置 Referer 鉴权建议使用 http-flv 或 http-hls 协议播放。
2545
+
2546
+ # @param request: Request instance for ModifyLiveDomainReferer.
2547
+ # @type request: :class:`Tencentcloud::live::V20180801::ModifyLiveDomainRefererRequest`
2548
+ # @rtype: :class:`Tencentcloud::live::V20180801::ModifyLiveDomainRefererResponse`
2549
+ def ModifyLiveDomainReferer(request)
2550
+ body = send_request('ModifyLiveDomainReferer', request.serialize)
2551
+ response = JSON.parse(body)
2552
+ if response['Response'].key?('Error') == false
2553
+ model = ModifyLiveDomainRefererResponse.new
2554
+ model.deserialize(response['Response'])
2555
+ model
2556
+ else
2557
+ code = response['Response']['Error']['Code']
2558
+ message = response['Response']['Error']['Message']
2559
+ reqid = response['Response']['RequestId']
2560
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
2561
+ end
2562
+ rescue TencentCloud::Common::TencentCloudSDKException => e
2563
+ raise e
2564
+ rescue StandardError => e
2565
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
2566
+ end
2567
+
2568
+ # 修改播放鉴权key
2569
+
2570
+ # @param request: Request instance for ModifyLivePlayAuthKey.
2571
+ # @type request: :class:`Tencentcloud::live::V20180801::ModifyLivePlayAuthKeyRequest`
2572
+ # @rtype: :class:`Tencentcloud::live::V20180801::ModifyLivePlayAuthKeyResponse`
2573
+ def ModifyLivePlayAuthKey(request)
2574
+ body = send_request('ModifyLivePlayAuthKey', request.serialize)
2575
+ response = JSON.parse(body)
2576
+ if response['Response'].key?('Error') == false
2577
+ model = ModifyLivePlayAuthKeyResponse.new
2578
+ model.deserialize(response['Response'])
2579
+ model
2580
+ else
2581
+ code = response['Response']['Error']['Code']
2582
+ message = response['Response']['Error']['Message']
2583
+ reqid = response['Response']['RequestId']
2584
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
2585
+ end
2586
+ rescue TencentCloud::Common::TencentCloudSDKException => e
2587
+ raise e
2588
+ rescue StandardError => e
2589
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
2590
+ end
2591
+
2592
+ # 修改播放域名信息。
2593
+
2594
+ # @param request: Request instance for ModifyLivePlayDomain.
2595
+ # @type request: :class:`Tencentcloud::live::V20180801::ModifyLivePlayDomainRequest`
2596
+ # @rtype: :class:`Tencentcloud::live::V20180801::ModifyLivePlayDomainResponse`
2597
+ def ModifyLivePlayDomain(request)
2598
+ body = send_request('ModifyLivePlayDomain', request.serialize)
2599
+ response = JSON.parse(body)
2600
+ if response['Response'].key?('Error') == false
2601
+ model = ModifyLivePlayDomainResponse.new
2602
+ model.deserialize(response['Response'])
2603
+ model
2604
+ else
2605
+ code = response['Response']['Error']['Code']
2606
+ message = response['Response']['Error']['Message']
2607
+ reqid = response['Response']['RequestId']
2608
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
2609
+ end
2610
+ rescue TencentCloud::Common::TencentCloudSDKException => e
2611
+ raise e
2612
+ rescue StandardError => e
2613
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
2614
+ end
2615
+
2616
+ # 更新直播拉流任务。
2617
+ # 1. 不支持修改目标地址,如需推到新地址,请创建新任务。
2618
+ # 2. 不支持修改任务类型,如需更换,请创建新任务。
2619
+
2620
+ # @param request: Request instance for ModifyLivePullStreamTask.
2621
+ # @type request: :class:`Tencentcloud::live::V20180801::ModifyLivePullStreamTaskRequest`
2622
+ # @rtype: :class:`Tencentcloud::live::V20180801::ModifyLivePullStreamTaskResponse`
2623
+ def ModifyLivePullStreamTask(request)
2624
+ body = send_request('ModifyLivePullStreamTask', request.serialize)
2625
+ response = JSON.parse(body)
2626
+ if response['Response'].key?('Error') == false
2627
+ model = ModifyLivePullStreamTaskResponse.new
2628
+ model.deserialize(response['Response'])
2629
+ model
2630
+ else
2631
+ code = response['Response']['Error']['Code']
2632
+ message = response['Response']['Error']['Message']
2633
+ reqid = response['Response']['RequestId']
2634
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
2635
+ end
2636
+ rescue TencentCloud::Common::TencentCloudSDKException => e
2637
+ raise e
2638
+ rescue StandardError => e
2639
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
2640
+ end
2641
+
2642
+ # 修改直播推流鉴权key
2643
+
2644
+ # @param request: Request instance for ModifyLivePushAuthKey.
2645
+ # @type request: :class:`Tencentcloud::live::V20180801::ModifyLivePushAuthKeyRequest`
2646
+ # @rtype: :class:`Tencentcloud::live::V20180801::ModifyLivePushAuthKeyResponse`
2647
+ def ModifyLivePushAuthKey(request)
2648
+ body = send_request('ModifyLivePushAuthKey', request.serialize)
2649
+ response = JSON.parse(body)
2650
+ if response['Response'].key?('Error') == false
2651
+ model = ModifyLivePushAuthKeyResponse.new
2652
+ model.deserialize(response['Response'])
2653
+ model
2654
+ else
2655
+ code = response['Response']['Error']['Code']
2656
+ message = response['Response']['Error']['Message']
2657
+ reqid = response['Response']['RequestId']
2658
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
2659
+ end
2660
+ rescue TencentCloud::Common::TencentCloudSDKException => e
2661
+ raise e
2662
+ rescue StandardError => e
2663
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
2664
+ end
2665
+
2666
+ # 修改录制模板配置。
2667
+
2668
+ # @param request: Request instance for ModifyLiveRecordTemplate.
2669
+ # @type request: :class:`Tencentcloud::live::V20180801::ModifyLiveRecordTemplateRequest`
2670
+ # @rtype: :class:`Tencentcloud::live::V20180801::ModifyLiveRecordTemplateResponse`
2671
+ def ModifyLiveRecordTemplate(request)
2672
+ body = send_request('ModifyLiveRecordTemplate', request.serialize)
2673
+ response = JSON.parse(body)
2674
+ if response['Response'].key?('Error') == false
2675
+ model = ModifyLiveRecordTemplateResponse.new
2676
+ model.deserialize(response['Response'])
2677
+ model
2678
+ else
2679
+ code = response['Response']['Error']['Code']
2680
+ message = response['Response']['Error']['Message']
2681
+ reqid = response['Response']['RequestId']
2682
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
2683
+ end
2684
+ rescue TencentCloud::Common::TencentCloudSDKException => e
2685
+ raise e
2686
+ rescue StandardError => e
2687
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
2688
+ end
2689
+
2690
+ # 修改截图模板配置。
2691
+
2692
+ # @param request: Request instance for ModifyLiveSnapshotTemplate.
2693
+ # @type request: :class:`Tencentcloud::live::V20180801::ModifyLiveSnapshotTemplateRequest`
2694
+ # @rtype: :class:`Tencentcloud::live::V20180801::ModifyLiveSnapshotTemplateResponse`
2695
+ def ModifyLiveSnapshotTemplate(request)
2696
+ body = send_request('ModifyLiveSnapshotTemplate', request.serialize)
2697
+ response = JSON.parse(body)
2698
+ if response['Response'].key?('Error') == false
2699
+ model = ModifyLiveSnapshotTemplateResponse.new
2700
+ model.deserialize(response['Response'])
2701
+ model
2702
+ else
2703
+ code = response['Response']['Error']['Code']
2704
+ message = response['Response']['Error']['Message']
2705
+ reqid = response['Response']['RequestId']
2706
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
2707
+ end
2708
+ rescue TencentCloud::Common::TencentCloudSDKException => e
2709
+ raise e
2710
+ rescue StandardError => e
2711
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
2712
+ end
2713
+
2714
+ # 修改转码模板配置。
2715
+
2716
+ # @param request: Request instance for ModifyLiveTranscodeTemplate.
2717
+ # @type request: :class:`Tencentcloud::live::V20180801::ModifyLiveTranscodeTemplateRequest`
2718
+ # @rtype: :class:`Tencentcloud::live::V20180801::ModifyLiveTranscodeTemplateResponse`
2719
+ def ModifyLiveTranscodeTemplate(request)
2720
+ body = send_request('ModifyLiveTranscodeTemplate', request.serialize)
2721
+ response = JSON.parse(body)
2722
+ if response['Response'].key?('Error') == false
2723
+ model = ModifyLiveTranscodeTemplateResponse.new
2724
+ model.deserialize(response['Response'])
2725
+ model
2726
+ else
2727
+ code = response['Response']['Error']['Code']
2728
+ message = response['Response']['Error']['Message']
2729
+ reqid = response['Response']['RequestId']
2730
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
2731
+ end
2732
+ rescue TencentCloud::Common::TencentCloudSDKException => e
2733
+ raise e
2734
+ rescue StandardError => e
2735
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
2736
+ end
2737
+
2738
+ # 更新拉流配置。
2739
+
2740
+ # @param request: Request instance for ModifyPullStreamConfig.
2741
+ # @type request: :class:`Tencentcloud::live::V20180801::ModifyPullStreamConfigRequest`
2742
+ # @rtype: :class:`Tencentcloud::live::V20180801::ModifyPullStreamConfigResponse`
2743
+ def ModifyPullStreamConfig(request)
2744
+ body = send_request('ModifyPullStreamConfig', request.serialize)
2745
+ response = JSON.parse(body)
2746
+ if response['Response'].key?('Error') == false
2747
+ model = ModifyPullStreamConfigResponse.new
2748
+ model.deserialize(response['Response'])
2749
+ model
2750
+ else
2751
+ code = response['Response']['Error']['Code']
2752
+ message = response['Response']['Error']['Message']
2753
+ reqid = response['Response']['RequestId']
2754
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
2755
+ end
2756
+ rescue TencentCloud::Common::TencentCloudSDKException => e
2757
+ raise e
2758
+ rescue StandardError => e
2759
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
2760
+ end
2761
+
2762
+ # 修改直播拉流配置的状态。
2763
+
2764
+ # @param request: Request instance for ModifyPullStreamStatus.
2765
+ # @type request: :class:`Tencentcloud::live::V20180801::ModifyPullStreamStatusRequest`
2766
+ # @rtype: :class:`Tencentcloud::live::V20180801::ModifyPullStreamStatusResponse`
2767
+ def ModifyPullStreamStatus(request)
2768
+ body = send_request('ModifyPullStreamStatus', request.serialize)
2769
+ response = JSON.parse(body)
2770
+ if response['Response'].key?('Error') == false
2771
+ model = ModifyPullStreamStatusResponse.new
2772
+ model.deserialize(response['Response'])
2773
+ model
2774
+ else
2775
+ code = response['Response']['Error']['Code']
2776
+ message = response['Response']['Error']['Message']
2777
+ reqid = response['Response']['RequestId']
2778
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
2779
+ end
2780
+ rescue TencentCloud::Common::TencentCloudSDKException => e
2781
+ raise e
2782
+ rescue StandardError => e
2783
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
2784
+ end
2785
+
2786
+ # 取消直播流设置的延时配置,恢复实时直播画面。
2787
+
2788
+ # @param request: Request instance for ResumeDelayLiveStream.
2789
+ # @type request: :class:`Tencentcloud::live::V20180801::ResumeDelayLiveStreamRequest`
2790
+ # @rtype: :class:`Tencentcloud::live::V20180801::ResumeDelayLiveStreamResponse`
2791
+ def ResumeDelayLiveStream(request)
2792
+ body = send_request('ResumeDelayLiveStream', request.serialize)
2793
+ response = JSON.parse(body)
2794
+ if response['Response'].key?('Error') == false
2795
+ model = ResumeDelayLiveStreamResponse.new
2796
+ model.deserialize(response['Response'])
2797
+ model
2798
+ else
2799
+ code = response['Response']['Error']['Code']
2800
+ message = response['Response']['Error']['Message']
2801
+ reqid = response['Response']['RequestId']
2802
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
2803
+ end
2804
+ rescue TencentCloud::Common::TencentCloudSDKException => e
2805
+ raise e
2806
+ rescue StandardError => e
2807
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
2808
+ end
2809
+
2810
+ # 恢复某条流的推流。
2811
+
2812
+ # @param request: Request instance for ResumeLiveStream.
2813
+ # @type request: :class:`Tencentcloud::live::V20180801::ResumeLiveStreamRequest`
2814
+ # @rtype: :class:`Tencentcloud::live::V20180801::ResumeLiveStreamResponse`
2815
+ def ResumeLiveStream(request)
2816
+ body = send_request('ResumeLiveStream', request.serialize)
2817
+ response = JSON.parse(body)
2818
+ if response['Response'].key?('Error') == false
2819
+ model = ResumeLiveStreamResponse.new
2820
+ model.deserialize(response['Response'])
2821
+ model
2822
+ else
2823
+ code = response['Response']['Error']['Code']
2824
+ message = response['Response']['Error']['Message']
2825
+ reqid = response['Response']['RequestId']
2826
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
2827
+ end
2828
+ rescue TencentCloud::Common::TencentCloudSDKException => e
2829
+ raise e
2830
+ rescue StandardError => e
2831
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
2832
+ end
2833
+
2834
+ # 说明:录制后的文件存放于点播平台。用户如需使用录制功能,需首先自行开通点播账号并确保账号可用。录制文件存放后,相关费用(含存储以及下行播放流量)按照点播平台计费方式收取,请参考对应文档。
2835
+
2836
+ # @param request: Request instance for StopLiveRecord.
2837
+ # @type request: :class:`Tencentcloud::live::V20180801::StopLiveRecordRequest`
2838
+ # @rtype: :class:`Tencentcloud::live::V20180801::StopLiveRecordResponse`
2839
+ def StopLiveRecord(request)
2840
+ body = send_request('StopLiveRecord', request.serialize)
2841
+ response = JSON.parse(body)
2842
+ if response['Response'].key?('Error') == false
2843
+ model = StopLiveRecordResponse.new
2844
+ model.deserialize(response['Response'])
2845
+ model
2846
+ else
2847
+ code = response['Response']['Error']['Code']
2848
+ message = response['Response']['Error']['Message']
2849
+ reqid = response['Response']['RequestId']
2850
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
2851
+ end
2852
+ rescue TencentCloud::Common::TencentCloudSDKException => e
2853
+ raise e
2854
+ rescue StandardError => e
2855
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
2856
+ end
2857
+
2858
+ # 提前结束录制,并中止运行中的录制任务。任务被成功终止后,本次任务将不再启动。
2859
+
2860
+ # @param request: Request instance for StopRecordTask.
2861
+ # @type request: :class:`Tencentcloud::live::V20180801::StopRecordTaskRequest`
2862
+ # @rtype: :class:`Tencentcloud::live::V20180801::StopRecordTaskResponse`
2863
+ def StopRecordTask(request)
2864
+ body = send_request('StopRecordTask', request.serialize)
2865
+ response = JSON.parse(body)
2866
+ if response['Response'].key?('Error') == false
2867
+ model = StopRecordTaskResponse.new
2868
+ model.deserialize(response['Response'])
2869
+ model
2870
+ else
2871
+ code = response['Response']['Error']['Code']
2872
+ message = response['Response']['Error']['Message']
2873
+ reqid = response['Response']['RequestId']
2874
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
2875
+ end
2876
+ rescue TencentCloud::Common::TencentCloudSDKException => e
2877
+ raise e
2878
+ rescue StandardError => e
2879
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
2880
+ end
2881
+
2882
+ # 解绑域名证书
2883
+
2884
+ # @param request: Request instance for UnBindLiveDomainCert.
2885
+ # @type request: :class:`Tencentcloud::live::V20180801::UnBindLiveDomainCertRequest`
2886
+ # @rtype: :class:`Tencentcloud::live::V20180801::UnBindLiveDomainCertResponse`
2887
+ def UnBindLiveDomainCert(request)
2888
+ body = send_request('UnBindLiveDomainCert', request.serialize)
2889
+ response = JSON.parse(body)
2890
+ if response['Response'].key?('Error') == false
2891
+ model = UnBindLiveDomainCertResponse.new
2892
+ model.deserialize(response['Response'])
2893
+ model
2894
+ else
2895
+ code = response['Response']['Error']['Code']
2896
+ message = response['Response']['Error']['Message']
2897
+ reqid = response['Response']['RequestId']
2898
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
2899
+ end
2900
+ rescue TencentCloud::Common::TencentCloudSDKException => e
2901
+ raise e
2902
+ rescue StandardError => e
2903
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
2904
+ end
2905
+
2906
+ # 更新水印。
2907
+
2908
+ # @param request: Request instance for UpdateLiveWatermark.
2909
+ # @type request: :class:`Tencentcloud::live::V20180801::UpdateLiveWatermarkRequest`
2910
+ # @rtype: :class:`Tencentcloud::live::V20180801::UpdateLiveWatermarkResponse`
2911
+ def UpdateLiveWatermark(request)
2912
+ body = send_request('UpdateLiveWatermark', request.serialize)
2913
+ response = JSON.parse(body)
2914
+ if response['Response'].key?('Error') == false
2915
+ model = UpdateLiveWatermarkResponse.new
2916
+ model.deserialize(response['Response'])
2917
+ model
2918
+ else
2919
+ code = response['Response']['Error']['Code']
2920
+ message = response['Response']['Error']['Message']
2921
+ reqid = response['Response']['RequestId']
2922
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
2923
+ end
2924
+ rescue TencentCloud::Common::TencentCloudSDKException => e
2925
+ raise e
2926
+ rescue StandardError => e
2927
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
2928
+ end
2929
+
2930
+
2931
+ end
2932
+ end
2933
+ end
2934
+ end