tencentcloud-sdk-vod 1.0.200

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,3043 @@
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 Vod
21
+ module V20180717
22
+ class Client < TencentCloud::Common::AbstractClient
23
+
24
+ def initialize(credential, region, profile = nil)
25
+ api_version = '2018-07-17'
26
+ api_endpoint = 'vod.tencentcloudapi.com'
27
+ sdk_version = 'VOD_' + File.read(File.expand_path('../VERSION', __dir__)).strip
28
+ super(credential, region, api_version, api_endpoint, sdk_version, profile)
29
+ end
30
+
31
+
32
+ # * 我们强烈建议您使用云点播提供的 [服务端上传 SDK](/document/product/266/9759#1.-.E5.8F.91.E8.B5.B7.E4.B8.8A.E4.BC.A0) 来上传文件。直接调用 API 进行上传的难度和工作量都显著大于使用 SDK。
33
+ # * 该接口用于申请媒体文件(和封面文件)的上传,获取文件上传到云点播的元信息(包括上传路径、上传签名等),用于后续上传接口。
34
+ # * 上传流程请参考 [服务端上传综述](/document/product/266/9759)。
35
+
36
+ # @param request: Request instance for ApplyUpload.
37
+ # @type request: :class:`Tencentcloud::vod::V20180717::ApplyUploadRequest`
38
+ # @rtype: :class:`Tencentcloud::vod::V20180717::ApplyUploadResponse`
39
+ def ApplyUpload(request)
40
+ body = send_request('ApplyUpload', request.serialize)
41
+ response = JSON.parse(body)
42
+ if response['Response'].key?('Error') == false
43
+ model = ApplyUploadResponse.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 AttachMediaSubtitles.
61
+ # @type request: :class:`Tencentcloud::vod::V20180717::AttachMediaSubtitlesRequest`
62
+ # @rtype: :class:`Tencentcloud::vod::V20180717::AttachMediaSubtitlesResponse`
63
+ def AttachMediaSubtitles(request)
64
+ body = send_request('AttachMediaSubtitles', request.serialize)
65
+ response = JSON.parse(body)
66
+ if response['Response'].key?('Error') == false
67
+ model = AttachMediaSubtitlesResponse.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。
83
+
84
+ # @param request: Request instance for CommitUpload.
85
+ # @type request: :class:`Tencentcloud::vod::V20180717::CommitUploadRequest`
86
+ # @rtype: :class:`Tencentcloud::vod::V20180717::CommitUploadResponse`
87
+ def CommitUpload(request)
88
+ body = send_request('CommitUpload', request.serialize)
89
+ response = JSON.parse(body)
90
+ if response['Response'].key?('Error') == false
91
+ model = CommitUploadResponse.new
92
+ model.deserialize(response['Response'])
93
+ model
94
+ else
95
+ code = response['Response']['Error']['Code']
96
+ message = response['Response']['Error']['Message']
97
+ reqid = response['Response']['RequestId']
98
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
99
+ end
100
+ rescue TencentCloud::Common::TencentCloudSDKException => e
101
+ raise e
102
+ rescue StandardError => e
103
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
104
+ end
105
+
106
+ # 该接口用于制作媒体文件,可以
107
+
108
+ # 1. 对一个媒体文件进行剪辑,生成一个新的媒体文件;
109
+ # 2. 对多个媒体文件进行裁剪拼接,生成一个新的媒体文件;
110
+ # 3. 对多个媒体文件的媒体流进行裁剪拼接,生成一个新的媒体文件。
111
+
112
+ # 如使用事件通知,事件通知的类型为 [视频合成完成](https://cloud.tencent.com/document/product/266/43000)。
113
+
114
+ # @param request: Request instance for ComposeMedia.
115
+ # @type request: :class:`Tencentcloud::vod::V20180717::ComposeMediaRequest`
116
+ # @rtype: :class:`Tencentcloud::vod::V20180717::ComposeMediaResponse`
117
+ def ComposeMedia(request)
118
+ body = send_request('ComposeMedia', request.serialize)
119
+ response = JSON.parse(body)
120
+ if response['Response'].key?('Error') == false
121
+ model = ComposeMediaResponse.new
122
+ model.deserialize(response['Response'])
123
+ model
124
+ else
125
+ code = response['Response']['Error']['Code']
126
+ message = response['Response']['Error']['Message']
127
+ reqid = response['Response']['RequestId']
128
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
129
+ end
130
+ rescue TencentCloud::Common::TencentCloudSDKException => e
131
+ raise e
132
+ rescue StandardError => e
133
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
134
+ end
135
+
136
+ # * 开发者调用拉取事件通知,获取到事件后,必须调用该接口来确认消息已经收到;
137
+ # * 开发者获取到事件句柄后,等待确认的有效时间为 30 秒,超出 30 秒会报参数错误(4000);
138
+ # * 更多参考事件通知的[可靠回调](https://cloud.tencent.com/document/product/266/33779#.E5.8F.AF.E9.9D.A0.E5.9B.9E.E8.B0.83)。
139
+
140
+ # @param request: Request instance for ConfirmEvents.
141
+ # @type request: :class:`Tencentcloud::vod::V20180717::ConfirmEventsRequest`
142
+ # @rtype: :class:`Tencentcloud::vod::V20180717::ConfirmEventsResponse`
143
+ def ConfirmEvents(request)
144
+ body = send_request('ConfirmEvents', request.serialize)
145
+ response = JSON.parse(body)
146
+ if response['Response'].key?('Error') == false
147
+ model = ConfirmEventsResponse.new
148
+ model.deserialize(response['Response'])
149
+ model
150
+ else
151
+ code = response['Response']['Error']['Code']
152
+ message = response['Response']['Error']['Message']
153
+ reqid = response['Response']['RequestId']
154
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
155
+ end
156
+ rescue TencentCloud::Common::TencentCloudSDKException => e
157
+ raise e
158
+ rescue StandardError => e
159
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
160
+ end
161
+
162
+ # 创建用户自定义视频内容分析模板,数量上限:50。
163
+
164
+ # @param request: Request instance for CreateAIAnalysisTemplate.
165
+ # @type request: :class:`Tencentcloud::vod::V20180717::CreateAIAnalysisTemplateRequest`
166
+ # @rtype: :class:`Tencentcloud::vod::V20180717::CreateAIAnalysisTemplateResponse`
167
+ def CreateAIAnalysisTemplate(request)
168
+ body = send_request('CreateAIAnalysisTemplate', request.serialize)
169
+ response = JSON.parse(body)
170
+ if response['Response'].key?('Error') == false
171
+ model = CreateAIAnalysisTemplateResponse.new
172
+ model.deserialize(response['Response'])
173
+ model
174
+ else
175
+ code = response['Response']['Error']['Code']
176
+ message = response['Response']['Error']['Message']
177
+ reqid = response['Response']['RequestId']
178
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
179
+ end
180
+ rescue TencentCloud::Common::TencentCloudSDKException => e
181
+ raise e
182
+ rescue StandardError => e
183
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
184
+ end
185
+
186
+ # 创建用户自定义视频内容识别模板,数量上限:50。
187
+
188
+ # @param request: Request instance for CreateAIRecognitionTemplate.
189
+ # @type request: :class:`Tencentcloud::vod::V20180717::CreateAIRecognitionTemplateRequest`
190
+ # @rtype: :class:`Tencentcloud::vod::V20180717::CreateAIRecognitionTemplateResponse`
191
+ def CreateAIRecognitionTemplate(request)
192
+ body = send_request('CreateAIRecognitionTemplate', request.serialize)
193
+ response = JSON.parse(body)
194
+ if response['Response'].key?('Error') == false
195
+ model = CreateAIRecognitionTemplateResponse.new
196
+ model.deserialize(response['Response'])
197
+ model
198
+ else
199
+ code = response['Response']['Error']['Code']
200
+ message = response['Response']['Error']['Message']
201
+ reqid = response['Response']['RequestId']
202
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
203
+ end
204
+ rescue TencentCloud::Common::TencentCloudSDKException => e
205
+ raise e
206
+ rescue StandardError => e
207
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
208
+ end
209
+
210
+ # 创建转自适应码流模板,数量上限:100。
211
+
212
+ # @param request: Request instance for CreateAdaptiveDynamicStreamingTemplate.
213
+ # @type request: :class:`Tencentcloud::vod::V20180717::CreateAdaptiveDynamicStreamingTemplateRequest`
214
+ # @rtype: :class:`Tencentcloud::vod::V20180717::CreateAdaptiveDynamicStreamingTemplateResponse`
215
+ def CreateAdaptiveDynamicStreamingTemplate(request)
216
+ body = send_request('CreateAdaptiveDynamicStreamingTemplate', request.serialize)
217
+ response = JSON.parse(body)
218
+ if response['Response'].key?('Error') == false
219
+ model = CreateAdaptiveDynamicStreamingTemplateResponse.new
220
+ model.deserialize(response['Response'])
221
+ model
222
+ else
223
+ code = response['Response']['Error']['Code']
224
+ message = response['Response']['Error']['Message']
225
+ reqid = response['Response']['RequestId']
226
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
227
+ end
228
+ rescue TencentCloud::Common::TencentCloudSDKException => e
229
+ raise e
230
+ rescue StandardError => e
231
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
232
+ end
233
+
234
+ # 创建用户自定义转动图模板,数量上限:16。
235
+
236
+ # @param request: Request instance for CreateAnimatedGraphicsTemplate.
237
+ # @type request: :class:`Tencentcloud::vod::V20180717::CreateAnimatedGraphicsTemplateRequest`
238
+ # @rtype: :class:`Tencentcloud::vod::V20180717::CreateAnimatedGraphicsTemplateResponse`
239
+ def CreateAnimatedGraphicsTemplate(request)
240
+ body = send_request('CreateAnimatedGraphicsTemplate', request.serialize)
241
+ response = JSON.parse(body)
242
+ if response['Response'].key?('Error') == false
243
+ model = CreateAnimatedGraphicsTemplateResponse.new
244
+ model.deserialize(response['Response'])
245
+ model
246
+ else
247
+ code = response['Response']['Error']['Code']
248
+ message = response['Response']['Error']['Message']
249
+ reqid = response['Response']['RequestId']
250
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
251
+ end
252
+ rescue TencentCloud::Common::TencentCloudSDKException => e
253
+ raise e
254
+ rescue StandardError => e
255
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
256
+ end
257
+
258
+ # * 用于对媒体进行分类管理;
259
+ # * 该接口不影响既有媒体的分类,如需修改媒体分类,请调用[修改媒体文件属性](/document/product/266/31762)接口。
260
+ # * 分类层次不可超过 4 层。
261
+ # * 每个分类的子类数量不可超过 500 个。
262
+
263
+ # @param request: Request instance for CreateClass.
264
+ # @type request: :class:`Tencentcloud::vod::V20180717::CreateClassRequest`
265
+ # @rtype: :class:`Tencentcloud::vod::V20180717::CreateClassResponse`
266
+ def CreateClass(request)
267
+ body = send_request('CreateClass', request.serialize)
268
+ response = JSON.parse(body)
269
+ if response['Response'].key?('Error') == false
270
+ model = CreateClassResponse.new
271
+ model.deserialize(response['Response'])
272
+ model
273
+ else
274
+ code = response['Response']['Error']['Code']
275
+ message = response['Response']['Error']['Message']
276
+ reqid = response['Response']['RequestId']
277
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
278
+ end
279
+ rescue TencentCloud::Common::TencentCloudSDKException => e
280
+ raise e
281
+ rescue StandardError => e
282
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
283
+ end
284
+
285
+ # 创建用户自定义视频内容智能识别模板,数量上限:50。
286
+
287
+ # @param request: Request instance for CreateContentReviewTemplate.
288
+ # @type request: :class:`Tencentcloud::vod::V20180717::CreateContentReviewTemplateRequest`
289
+ # @rtype: :class:`Tencentcloud::vod::V20180717::CreateContentReviewTemplateResponse`
290
+ def CreateContentReviewTemplate(request)
291
+ body = send_request('CreateContentReviewTemplate', request.serialize)
292
+ response = JSON.parse(body)
293
+ if response['Response'].key?('Error') == false
294
+ model = CreateContentReviewTemplateResponse.new
295
+ model.deserialize(response['Response'])
296
+ model
297
+ else
298
+ code = response['Response']['Error']['Code']
299
+ message = response['Response']['Error']['Message']
300
+ reqid = response['Response']['RequestId']
301
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
302
+ end
303
+ rescue TencentCloud::Common::TencentCloudSDKException => e
304
+ raise e
305
+ rescue StandardError => e
306
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
307
+ end
308
+
309
+ # 创建片头片尾模板。
310
+
311
+ # @param request: Request instance for CreateHeadTailTemplate.
312
+ # @type request: :class:`Tencentcloud::vod::V20180717::CreateHeadTailTemplateRequest`
313
+ # @rtype: :class:`Tencentcloud::vod::V20180717::CreateHeadTailTemplateResponse`
314
+ def CreateHeadTailTemplate(request)
315
+ body = send_request('CreateHeadTailTemplate', request.serialize)
316
+ response = JSON.parse(body)
317
+ if response['Response'].key?('Error') == false
318
+ model = CreateHeadTailTemplateResponse.new
319
+ model.deserialize(response['Response'])
320
+ model
321
+ else
322
+ code = response['Response']['Error']['Code']
323
+ message = response['Response']['Error']['Message']
324
+ reqid = response['Response']['RequestId']
325
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
326
+ end
327
+ rescue TencentCloud::Common::TencentCloudSDKException => e
328
+ raise e
329
+ rescue StandardError => e
330
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
331
+ end
332
+
333
+ # 创建一个用户自定义的图片处理模板,数量上限:16。最多支持三次操作,例如:裁剪-缩略-裁剪。
334
+
335
+ # @param request: Request instance for CreateImageProcessingTemplate.
336
+ # @type request: :class:`Tencentcloud::vod::V20180717::CreateImageProcessingTemplateRequest`
337
+ # @rtype: :class:`Tencentcloud::vod::V20180717::CreateImageProcessingTemplateResponse`
338
+ def CreateImageProcessingTemplate(request)
339
+ body = send_request('CreateImageProcessingTemplate', request.serialize)
340
+ response = JSON.parse(body)
341
+ if response['Response'].key?('Error') == false
342
+ model = CreateImageProcessingTemplateResponse.new
343
+ model.deserialize(response['Response'])
344
+ model
345
+ else
346
+ code = response['Response']['Error']['Code']
347
+ message = response['Response']['Error']['Message']
348
+ reqid = response['Response']['RequestId']
349
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
350
+ end
351
+ rescue TencentCloud::Common::TencentCloudSDKException => e
352
+ raise e
353
+ rescue StandardError => e
354
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
355
+ end
356
+
357
+ # 创建用户自定义雪碧图模板,数量上限:16。
358
+
359
+ # @param request: Request instance for CreateImageSpriteTemplate.
360
+ # @type request: :class:`Tencentcloud::vod::V20180717::CreateImageSpriteTemplateRequest`
361
+ # @rtype: :class:`Tencentcloud::vod::V20180717::CreateImageSpriteTemplateResponse`
362
+ def CreateImageSpriteTemplate(request)
363
+ body = send_request('CreateImageSpriteTemplate', request.serialize)
364
+ response = JSON.parse(body)
365
+ if response['Response'].key?('Error') == false
366
+ model = CreateImageSpriteTemplateResponse.new
367
+ model.deserialize(response['Response'])
368
+ model
369
+ else
370
+ code = response['Response']['Error']['Code']
371
+ message = response['Response']['Error']['Message']
372
+ reqid = response['Response']['RequestId']
373
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
374
+ end
375
+ rescue TencentCloud::Common::TencentCloudSDKException => e
376
+ raise e
377
+ rescue StandardError => e
378
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
379
+ end
380
+
381
+ # 该接口用于创建素材样本,用于通过五官定位等技术,进行内容识别、不适宜视频识别等视频处理。
382
+
383
+ # @param request: Request instance for CreatePersonSample.
384
+ # @type request: :class:`Tencentcloud::vod::V20180717::CreatePersonSampleRequest`
385
+ # @rtype: :class:`Tencentcloud::vod::V20180717::CreatePersonSampleResponse`
386
+ def CreatePersonSample(request)
387
+ body = send_request('CreatePersonSample', request.serialize)
388
+ response = JSON.parse(body)
389
+ if response['Response'].key?('Error') == false
390
+ model = CreatePersonSampleResponse.new
391
+ model.deserialize(response['Response'])
392
+ model
393
+ else
394
+ code = response['Response']['Error']['Code']
395
+ message = response['Response']['Error']['Message']
396
+ reqid = response['Response']['RequestId']
397
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
398
+ end
399
+ rescue TencentCloud::Common::TencentCloudSDKException => e
400
+ raise e
401
+ rescue StandardError => e
402
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
403
+ end
404
+
405
+ # 创建用户自定义的任务流模板,模板上限:50。
406
+
407
+ # @param request: Request instance for CreateProcedureTemplate.
408
+ # @type request: :class:`Tencentcloud::vod::V20180717::CreateProcedureTemplateRequest`
409
+ # @rtype: :class:`Tencentcloud::vod::V20180717::CreateProcedureTemplateResponse`
410
+ def CreateProcedureTemplate(request)
411
+ body = send_request('CreateProcedureTemplate', request.serialize)
412
+ response = JSON.parse(body)
413
+ if response['Response'].key?('Error') == false
414
+ model = CreateProcedureTemplateResponse.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
+ # 创建用户自定义采样截图模板,数量上限:16。
430
+
431
+ # @param request: Request instance for CreateSampleSnapshotTemplate.
432
+ # @type request: :class:`Tencentcloud::vod::V20180717::CreateSampleSnapshotTemplateRequest`
433
+ # @rtype: :class:`Tencentcloud::vod::V20180717::CreateSampleSnapshotTemplateResponse`
434
+ def CreateSampleSnapshotTemplate(request)
435
+ body = send_request('CreateSampleSnapshotTemplate', request.serialize)
436
+ response = JSON.parse(body)
437
+ if response['Response'].key?('Error') == false
438
+ model = CreateSampleSnapshotTemplateResponse.new
439
+ model.deserialize(response['Response'])
440
+ model
441
+ else
442
+ code = response['Response']['Error']['Code']
443
+ message = response['Response']['Error']['Message']
444
+ reqid = response['Response']['RequestId']
445
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
446
+ end
447
+ rescue TencentCloud::Common::TencentCloudSDKException => e
448
+ raise e
449
+ rescue StandardError => e
450
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
451
+ end
452
+
453
+ # 创建用户自定义指定时间点截图模板,数量上限:16。
454
+
455
+ # @param request: Request instance for CreateSnapshotByTimeOffsetTemplate.
456
+ # @type request: :class:`Tencentcloud::vod::V20180717::CreateSnapshotByTimeOffsetTemplateRequest`
457
+ # @rtype: :class:`Tencentcloud::vod::V20180717::CreateSnapshotByTimeOffsetTemplateResponse`
458
+ def CreateSnapshotByTimeOffsetTemplate(request)
459
+ body = send_request('CreateSnapshotByTimeOffsetTemplate', request.serialize)
460
+ response = JSON.parse(body)
461
+ if response['Response'].key?('Error') == false
462
+ model = CreateSnapshotByTimeOffsetTemplateResponse.new
463
+ model.deserialize(response['Response'])
464
+ model
465
+ else
466
+ code = response['Response']['Error']['Code']
467
+ message = response['Response']['Error']['Message']
468
+ reqid = response['Response']['RequestId']
469
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
470
+ end
471
+ rescue TencentCloud::Common::TencentCloudSDKException => e
472
+ raise e
473
+ rescue StandardError => e
474
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
475
+ end
476
+
477
+ # 该接口用于创建点播子应用。
478
+
479
+ # @param request: Request instance for CreateSubAppId.
480
+ # @type request: :class:`Tencentcloud::vod::V20180717::CreateSubAppIdRequest`
481
+ # @rtype: :class:`Tencentcloud::vod::V20180717::CreateSubAppIdResponse`
482
+ def CreateSubAppId(request)
483
+ body = send_request('CreateSubAppId', request.serialize)
484
+ response = JSON.parse(body)
485
+ if response['Response'].key?('Error') == false
486
+ model = CreateSubAppIdResponse.new
487
+ model.deserialize(response['Response'])
488
+ model
489
+ else
490
+ code = response['Response']['Error']['Code']
491
+ message = response['Response']['Error']['Message']
492
+ reqid = response['Response']['RequestId']
493
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
494
+ end
495
+ rescue TencentCloud::Common::TencentCloudSDKException => e
496
+ raise e
497
+ rescue StandardError => e
498
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
499
+ end
500
+
501
+ # 创建超级播放器配置,数量上限:100。
502
+
503
+ # @param request: Request instance for CreateSuperPlayerConfig.
504
+ # @type request: :class:`Tencentcloud::vod::V20180717::CreateSuperPlayerConfigRequest`
505
+ # @rtype: :class:`Tencentcloud::vod::V20180717::CreateSuperPlayerConfigResponse`
506
+ def CreateSuperPlayerConfig(request)
507
+ body = send_request('CreateSuperPlayerConfig', request.serialize)
508
+ response = JSON.parse(body)
509
+ if response['Response'].key?('Error') == false
510
+ model = CreateSuperPlayerConfigResponse.new
511
+ model.deserialize(response['Response'])
512
+ model
513
+ else
514
+ code = response['Response']['Error']['Code']
515
+ message = response['Response']['Error']['Message']
516
+ reqid = response['Response']['RequestId']
517
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
518
+ end
519
+ rescue TencentCloud::Common::TencentCloudSDKException => e
520
+ raise e
521
+ rescue StandardError => e
522
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
523
+ end
524
+
525
+ # 创建用户自定义转码模板,数量上限:100。
526
+
527
+ # @param request: Request instance for CreateTranscodeTemplate.
528
+ # @type request: :class:`Tencentcloud::vod::V20180717::CreateTranscodeTemplateRequest`
529
+ # @rtype: :class:`Tencentcloud::vod::V20180717::CreateTranscodeTemplateResponse`
530
+ def CreateTranscodeTemplate(request)
531
+ body = send_request('CreateTranscodeTemplate', request.serialize)
532
+ response = JSON.parse(body)
533
+ if response['Response'].key?('Error') == false
534
+ model = CreateTranscodeTemplateResponse.new
535
+ model.deserialize(response['Response'])
536
+ model
537
+ else
538
+ code = response['Response']['Error']['Code']
539
+ message = response['Response']['Error']['Message']
540
+ reqid = response['Response']['RequestId']
541
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
542
+ end
543
+ rescue TencentCloud::Common::TencentCloudSDKException => e
544
+ raise e
545
+ rescue StandardError => e
546
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
547
+ end
548
+
549
+ # 该接口用于将加速域名添加到点播,一个用户最多添加20个加速域名。
550
+ # 1.域名添加成功后点播会进行域名的部署,域名由部署状态变为在线状态大概需要2分钟的时间。
551
+
552
+ # @param request: Request instance for CreateVodDomain.
553
+ # @type request: :class:`Tencentcloud::vod::V20180717::CreateVodDomainRequest`
554
+ # @rtype: :class:`Tencentcloud::vod::V20180717::CreateVodDomainResponse`
555
+ def CreateVodDomain(request)
556
+ body = send_request('CreateVodDomain', request.serialize)
557
+ response = JSON.parse(body)
558
+ if response['Response'].key?('Error') == false
559
+ model = CreateVodDomainResponse.new
560
+ model.deserialize(response['Response'])
561
+ model
562
+ else
563
+ code = response['Response']['Error']['Code']
564
+ message = response['Response']['Error']['Message']
565
+ reqid = response['Response']['RequestId']
566
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
567
+ end
568
+ rescue TencentCloud::Common::TencentCloudSDKException => e
569
+ raise e
570
+ rescue StandardError => e
571
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
572
+ end
573
+
574
+ # 创建用户自定义水印模板,数量上限:1000。
575
+
576
+ # @param request: Request instance for CreateWatermarkTemplate.
577
+ # @type request: :class:`Tencentcloud::vod::V20180717::CreateWatermarkTemplateRequest`
578
+ # @rtype: :class:`Tencentcloud::vod::V20180717::CreateWatermarkTemplateResponse`
579
+ def CreateWatermarkTemplate(request)
580
+ body = send_request('CreateWatermarkTemplate', request.serialize)
581
+ response = JSON.parse(body)
582
+ if response['Response'].key?('Error') == false
583
+ model = CreateWatermarkTemplateResponse.new
584
+ model.deserialize(response['Response'])
585
+ model
586
+ else
587
+ code = response['Response']['Error']['Code']
588
+ message = response['Response']['Error']['Message']
589
+ reqid = response['Response']['RequestId']
590
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
591
+ end
592
+ rescue TencentCloud::Common::TencentCloudSDKException => e
593
+ raise e
594
+ rescue StandardError => e
595
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
596
+ end
597
+
598
+ # 该接口用于批量创建关键词样本,样本用于通过OCR、ASR技术,进行不适宜内容识别、内容识别等视频处理。
599
+
600
+ # @param request: Request instance for CreateWordSamples.
601
+ # @type request: :class:`Tencentcloud::vod::V20180717::CreateWordSamplesRequest`
602
+ # @rtype: :class:`Tencentcloud::vod::V20180717::CreateWordSamplesResponse`
603
+ def CreateWordSamples(request)
604
+ body = send_request('CreateWordSamples', request.serialize)
605
+ response = JSON.parse(body)
606
+ if response['Response'].key?('Error') == false
607
+ model = CreateWordSamplesResponse.new
608
+ model.deserialize(response['Response'])
609
+ model
610
+ else
611
+ code = response['Response']['Error']['Code']
612
+ message = response['Response']['Error']['Message']
613
+ reqid = response['Response']['RequestId']
614
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
615
+ end
616
+ rescue TencentCloud::Common::TencentCloudSDKException => e
617
+ raise e
618
+ rescue StandardError => e
619
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
620
+ end
621
+
622
+ # 删除用户自定义视频内容分析模板。
623
+
624
+ # 注意:模板 ID 为 10000 以下的为系统预置模板,不允许删除。
625
+
626
+ # @param request: Request instance for DeleteAIAnalysisTemplate.
627
+ # @type request: :class:`Tencentcloud::vod::V20180717::DeleteAIAnalysisTemplateRequest`
628
+ # @rtype: :class:`Tencentcloud::vod::V20180717::DeleteAIAnalysisTemplateResponse`
629
+ def DeleteAIAnalysisTemplate(request)
630
+ body = send_request('DeleteAIAnalysisTemplate', request.serialize)
631
+ response = JSON.parse(body)
632
+ if response['Response'].key?('Error') == false
633
+ model = DeleteAIAnalysisTemplateResponse.new
634
+ model.deserialize(response['Response'])
635
+ model
636
+ else
637
+ code = response['Response']['Error']['Code']
638
+ message = response['Response']['Error']['Message']
639
+ reqid = response['Response']['RequestId']
640
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
641
+ end
642
+ rescue TencentCloud::Common::TencentCloudSDKException => e
643
+ raise e
644
+ rescue StandardError => e
645
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
646
+ end
647
+
648
+ # 删除用户自定义视频内容识别模板。
649
+
650
+ # @param request: Request instance for DeleteAIRecognitionTemplate.
651
+ # @type request: :class:`Tencentcloud::vod::V20180717::DeleteAIRecognitionTemplateRequest`
652
+ # @rtype: :class:`Tencentcloud::vod::V20180717::DeleteAIRecognitionTemplateResponse`
653
+ def DeleteAIRecognitionTemplate(request)
654
+ body = send_request('DeleteAIRecognitionTemplate', request.serialize)
655
+ response = JSON.parse(body)
656
+ if response['Response'].key?('Error') == false
657
+ model = DeleteAIRecognitionTemplateResponse.new
658
+ model.deserialize(response['Response'])
659
+ model
660
+ else
661
+ code = response['Response']['Error']['Code']
662
+ message = response['Response']['Error']['Message']
663
+ reqid = response['Response']['RequestId']
664
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
665
+ end
666
+ rescue TencentCloud::Common::TencentCloudSDKException => e
667
+ raise e
668
+ rescue StandardError => e
669
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
670
+ end
671
+
672
+ # 删除转自适应码流模板
673
+
674
+ # @param request: Request instance for DeleteAdaptiveDynamicStreamingTemplate.
675
+ # @type request: :class:`Tencentcloud::vod::V20180717::DeleteAdaptiveDynamicStreamingTemplateRequest`
676
+ # @rtype: :class:`Tencentcloud::vod::V20180717::DeleteAdaptiveDynamicStreamingTemplateResponse`
677
+ def DeleteAdaptiveDynamicStreamingTemplate(request)
678
+ body = send_request('DeleteAdaptiveDynamicStreamingTemplate', request.serialize)
679
+ response = JSON.parse(body)
680
+ if response['Response'].key?('Error') == false
681
+ model = DeleteAdaptiveDynamicStreamingTemplateResponse.new
682
+ model.deserialize(response['Response'])
683
+ model
684
+ else
685
+ code = response['Response']['Error']['Code']
686
+ message = response['Response']['Error']['Message']
687
+ reqid = response['Response']['RequestId']
688
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
689
+ end
690
+ rescue TencentCloud::Common::TencentCloudSDKException => e
691
+ raise e
692
+ rescue StandardError => e
693
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
694
+ end
695
+
696
+ # 删除用户自定义转动图模板。
697
+
698
+ # @param request: Request instance for DeleteAnimatedGraphicsTemplate.
699
+ # @type request: :class:`Tencentcloud::vod::V20180717::DeleteAnimatedGraphicsTemplateRequest`
700
+ # @rtype: :class:`Tencentcloud::vod::V20180717::DeleteAnimatedGraphicsTemplateResponse`
701
+ def DeleteAnimatedGraphicsTemplate(request)
702
+ body = send_request('DeleteAnimatedGraphicsTemplate', request.serialize)
703
+ response = JSON.parse(body)
704
+ if response['Response'].key?('Error') == false
705
+ model = DeleteAnimatedGraphicsTemplateResponse.new
706
+ model.deserialize(response['Response'])
707
+ model
708
+ else
709
+ code = response['Response']['Error']['Code']
710
+ message = response['Response']['Error']['Message']
711
+ reqid = response['Response']['RequestId']
712
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
713
+ end
714
+ rescue TencentCloud::Common::TencentCloudSDKException => e
715
+ raise e
716
+ rescue StandardError => e
717
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
718
+ end
719
+
720
+ # * 仅当待删分类无子分类且无媒体关联情况下,可删除分类;
721
+ # * 否则,请先执行[删除媒体](/document/product/266/31764)及子分类,再删除该分类;
722
+
723
+ # @param request: Request instance for DeleteClass.
724
+ # @type request: :class:`Tencentcloud::vod::V20180717::DeleteClassRequest`
725
+ # @rtype: :class:`Tencentcloud::vod::V20180717::DeleteClassResponse`
726
+ def DeleteClass(request)
727
+ body = send_request('DeleteClass', request.serialize)
728
+ response = JSON.parse(body)
729
+ if response['Response'].key?('Error') == false
730
+ model = DeleteClassResponse.new
731
+ model.deserialize(response['Response'])
732
+ model
733
+ else
734
+ code = response['Response']['Error']['Code']
735
+ message = response['Response']['Error']['Message']
736
+ reqid = response['Response']['RequestId']
737
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
738
+ end
739
+ rescue TencentCloud::Common::TencentCloudSDKException => e
740
+ raise e
741
+ rescue StandardError => e
742
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
743
+ end
744
+
745
+ # 删除用户自定义视频内容智能识别模板。
746
+
747
+ # @param request: Request instance for DeleteContentReviewTemplate.
748
+ # @type request: :class:`Tencentcloud::vod::V20180717::DeleteContentReviewTemplateRequest`
749
+ # @rtype: :class:`Tencentcloud::vod::V20180717::DeleteContentReviewTemplateResponse`
750
+ def DeleteContentReviewTemplate(request)
751
+ body = send_request('DeleteContentReviewTemplate', request.serialize)
752
+ response = JSON.parse(body)
753
+ if response['Response'].key?('Error') == false
754
+ model = DeleteContentReviewTemplateResponse.new
755
+ model.deserialize(response['Response'])
756
+ model
757
+ else
758
+ code = response['Response']['Error']['Code']
759
+ message = response['Response']['Error']['Message']
760
+ reqid = response['Response']['RequestId']
761
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
762
+ end
763
+ rescue TencentCloud::Common::TencentCloudSDKException => e
764
+ raise e
765
+ rescue StandardError => e
766
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
767
+ end
768
+
769
+ # 删除片头片尾模板。
770
+
771
+ # @param request: Request instance for DeleteHeadTailTemplate.
772
+ # @type request: :class:`Tencentcloud::vod::V20180717::DeleteHeadTailTemplateRequest`
773
+ # @rtype: :class:`Tencentcloud::vod::V20180717::DeleteHeadTailTemplateResponse`
774
+ def DeleteHeadTailTemplate(request)
775
+ body = send_request('DeleteHeadTailTemplate', request.serialize)
776
+ response = JSON.parse(body)
777
+ if response['Response'].key?('Error') == false
778
+ model = DeleteHeadTailTemplateResponse.new
779
+ model.deserialize(response['Response'])
780
+ model
781
+ else
782
+ code = response['Response']['Error']['Code']
783
+ message = response['Response']['Error']['Message']
784
+ reqid = response['Response']['RequestId']
785
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
786
+ end
787
+ rescue TencentCloud::Common::TencentCloudSDKException => e
788
+ raise e
789
+ rescue StandardError => e
790
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
791
+ end
792
+
793
+ # 删除用户自定义图片处理模板。
794
+
795
+ # @param request: Request instance for DeleteImageProcessingTemplate.
796
+ # @type request: :class:`Tencentcloud::vod::V20180717::DeleteImageProcessingTemplateRequest`
797
+ # @rtype: :class:`Tencentcloud::vod::V20180717::DeleteImageProcessingTemplateResponse`
798
+ def DeleteImageProcessingTemplate(request)
799
+ body = send_request('DeleteImageProcessingTemplate', request.serialize)
800
+ response = JSON.parse(body)
801
+ if response['Response'].key?('Error') == false
802
+ model = DeleteImageProcessingTemplateResponse.new
803
+ model.deserialize(response['Response'])
804
+ model
805
+ else
806
+ code = response['Response']['Error']['Code']
807
+ message = response['Response']['Error']['Message']
808
+ reqid = response['Response']['RequestId']
809
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
810
+ end
811
+ rescue TencentCloud::Common::TencentCloudSDKException => e
812
+ raise e
813
+ rescue StandardError => e
814
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
815
+ end
816
+
817
+ # 删除雪碧图模板。
818
+
819
+ # @param request: Request instance for DeleteImageSpriteTemplate.
820
+ # @type request: :class:`Tencentcloud::vod::V20180717::DeleteImageSpriteTemplateRequest`
821
+ # @rtype: :class:`Tencentcloud::vod::V20180717::DeleteImageSpriteTemplateResponse`
822
+ def DeleteImageSpriteTemplate(request)
823
+ body = send_request('DeleteImageSpriteTemplate', request.serialize)
824
+ response = JSON.parse(body)
825
+ if response['Response'].key?('Error') == false
826
+ model = DeleteImageSpriteTemplateResponse.new
827
+ model.deserialize(response['Response'])
828
+ model
829
+ else
830
+ code = response['Response']['Error']['Code']
831
+ message = response['Response']['Error']['Message']
832
+ reqid = response['Response']['RequestId']
833
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
834
+ end
835
+ rescue TencentCloud::Common::TencentCloudSDKException => e
836
+ raise e
837
+ rescue StandardError => e
838
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
839
+ end
840
+
841
+ # * 删除媒体及其对应的视频处理文件(原始文件、如转码视频、雪碧图、截图、微信发布视频等);
842
+ # * 可单独删除指定 ID 的视频文件下的原文件、转码视频、微信发布视频等;
843
+ # * 注意:原文件删除后,无法发起转码、微信发布等任何视频处理操作。
844
+
845
+ # @param request: Request instance for DeleteMedia.
846
+ # @type request: :class:`Tencentcloud::vod::V20180717::DeleteMediaRequest`
847
+ # @rtype: :class:`Tencentcloud::vod::V20180717::DeleteMediaResponse`
848
+ def DeleteMedia(request)
849
+ body = send_request('DeleteMedia', request.serialize)
850
+ response = JSON.parse(body)
851
+ if response['Response'].key?('Error') == false
852
+ model = DeleteMediaResponse.new
853
+ model.deserialize(response['Response'])
854
+ model
855
+ else
856
+ code = response['Response']['Error']['Code']
857
+ message = response['Response']['Error']['Message']
858
+ reqid = response['Response']['RequestId']
859
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
860
+ end
861
+ rescue TencentCloud::Common::TencentCloudSDKException => e
862
+ raise e
863
+ rescue StandardError => e
864
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
865
+ end
866
+
867
+ # 该接口用于根据人物 ID,删除素材样本。
868
+
869
+ # @param request: Request instance for DeletePersonSample.
870
+ # @type request: :class:`Tencentcloud::vod::V20180717::DeletePersonSampleRequest`
871
+ # @rtype: :class:`Tencentcloud::vod::V20180717::DeletePersonSampleResponse`
872
+ def DeletePersonSample(request)
873
+ body = send_request('DeletePersonSample', request.serialize)
874
+ response = JSON.parse(body)
875
+ if response['Response'].key?('Error') == false
876
+ model = DeletePersonSampleResponse.new
877
+ model.deserialize(response['Response'])
878
+ model
879
+ else
880
+ code = response['Response']['Error']['Code']
881
+ message = response['Response']['Error']['Message']
882
+ reqid = response['Response']['RequestId']
883
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
884
+ end
885
+ rescue TencentCloud::Common::TencentCloudSDKException => e
886
+ raise e
887
+ rescue StandardError => e
888
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
889
+ end
890
+
891
+ # 删除用户自定义的任务流模板。
892
+
893
+ # @param request: Request instance for DeleteProcedureTemplate.
894
+ # @type request: :class:`Tencentcloud::vod::V20180717::DeleteProcedureTemplateRequest`
895
+ # @rtype: :class:`Tencentcloud::vod::V20180717::DeleteProcedureTemplateResponse`
896
+ def DeleteProcedureTemplate(request)
897
+ body = send_request('DeleteProcedureTemplate', request.serialize)
898
+ response = JSON.parse(body)
899
+ if response['Response'].key?('Error') == false
900
+ model = DeleteProcedureTemplateResponse.new
901
+ model.deserialize(response['Response'])
902
+ model
903
+ else
904
+ code = response['Response']['Error']['Code']
905
+ message = response['Response']['Error']['Message']
906
+ reqid = response['Response']['RequestId']
907
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
908
+ end
909
+ rescue TencentCloud::Common::TencentCloudSDKException => e
910
+ raise e
911
+ rescue StandardError => e
912
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
913
+ end
914
+
915
+ # 删除用户自定义采样截图模板。
916
+
917
+ # @param request: Request instance for DeleteSampleSnapshotTemplate.
918
+ # @type request: :class:`Tencentcloud::vod::V20180717::DeleteSampleSnapshotTemplateRequest`
919
+ # @rtype: :class:`Tencentcloud::vod::V20180717::DeleteSampleSnapshotTemplateResponse`
920
+ def DeleteSampleSnapshotTemplate(request)
921
+ body = send_request('DeleteSampleSnapshotTemplate', request.serialize)
922
+ response = JSON.parse(body)
923
+ if response['Response'].key?('Error') == false
924
+ model = DeleteSampleSnapshotTemplateResponse.new
925
+ model.deserialize(response['Response'])
926
+ model
927
+ else
928
+ code = response['Response']['Error']['Code']
929
+ message = response['Response']['Error']['Message']
930
+ reqid = response['Response']['RequestId']
931
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
932
+ end
933
+ rescue TencentCloud::Common::TencentCloudSDKException => e
934
+ raise e
935
+ rescue StandardError => e
936
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
937
+ end
938
+
939
+ # 删除用户自定义指定时间点截图模板。
940
+
941
+ # @param request: Request instance for DeleteSnapshotByTimeOffsetTemplate.
942
+ # @type request: :class:`Tencentcloud::vod::V20180717::DeleteSnapshotByTimeOffsetTemplateRequest`
943
+ # @rtype: :class:`Tencentcloud::vod::V20180717::DeleteSnapshotByTimeOffsetTemplateResponse`
944
+ def DeleteSnapshotByTimeOffsetTemplate(request)
945
+ body = send_request('DeleteSnapshotByTimeOffsetTemplate', request.serialize)
946
+ response = JSON.parse(body)
947
+ if response['Response'].key?('Error') == false
948
+ model = DeleteSnapshotByTimeOffsetTemplateResponse.new
949
+ model.deserialize(response['Response'])
950
+ model
951
+ else
952
+ code = response['Response']['Error']['Code']
953
+ message = response['Response']['Error']['Message']
954
+ reqid = response['Response']['RequestId']
955
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
956
+ end
957
+ rescue TencentCloud::Common::TencentCloudSDKException => e
958
+ raise e
959
+ rescue StandardError => e
960
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
961
+ end
962
+
963
+ # 删除超级播放器配置。
964
+ # *注:系统预置播放器配置不允许删除。*
965
+
966
+ # @param request: Request instance for DeleteSuperPlayerConfig.
967
+ # @type request: :class:`Tencentcloud::vod::V20180717::DeleteSuperPlayerConfigRequest`
968
+ # @rtype: :class:`Tencentcloud::vod::V20180717::DeleteSuperPlayerConfigResponse`
969
+ def DeleteSuperPlayerConfig(request)
970
+ body = send_request('DeleteSuperPlayerConfig', request.serialize)
971
+ response = JSON.parse(body)
972
+ if response['Response'].key?('Error') == false
973
+ model = DeleteSuperPlayerConfigResponse.new
974
+ model.deserialize(response['Response'])
975
+ model
976
+ else
977
+ code = response['Response']['Error']['Code']
978
+ message = response['Response']['Error']['Message']
979
+ reqid = response['Response']['RequestId']
980
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
981
+ end
982
+ rescue TencentCloud::Common::TencentCloudSDKException => e
983
+ raise e
984
+ rescue StandardError => e
985
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
986
+ end
987
+
988
+ # 删除用户自定义转码模板。
989
+
990
+ # @param request: Request instance for DeleteTranscodeTemplate.
991
+ # @type request: :class:`Tencentcloud::vod::V20180717::DeleteTranscodeTemplateRequest`
992
+ # @rtype: :class:`Tencentcloud::vod::V20180717::DeleteTranscodeTemplateResponse`
993
+ def DeleteTranscodeTemplate(request)
994
+ body = send_request('DeleteTranscodeTemplate', request.serialize)
995
+ response = JSON.parse(body)
996
+ if response['Response'].key?('Error') == false
997
+ model = DeleteTranscodeTemplateResponse.new
998
+ model.deserialize(response['Response'])
999
+ model
1000
+ else
1001
+ code = response['Response']['Error']['Code']
1002
+ message = response['Response']['Error']['Message']
1003
+ reqid = response['Response']['RequestId']
1004
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
1005
+ end
1006
+ rescue TencentCloud::Common::TencentCloudSDKException => e
1007
+ raise e
1008
+ rescue StandardError => e
1009
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
1010
+ end
1011
+
1012
+ # 该接口用于删除点播加速域名。
1013
+ # 1、域名删除前需要先关闭所有区域的加速。
1014
+
1015
+ # @param request: Request instance for DeleteVodDomain.
1016
+ # @type request: :class:`Tencentcloud::vod::V20180717::DeleteVodDomainRequest`
1017
+ # @rtype: :class:`Tencentcloud::vod::V20180717::DeleteVodDomainResponse`
1018
+ def DeleteVodDomain(request)
1019
+ body = send_request('DeleteVodDomain', request.serialize)
1020
+ response = JSON.parse(body)
1021
+ if response['Response'].key?('Error') == false
1022
+ model = DeleteVodDomainResponse.new
1023
+ model.deserialize(response['Response'])
1024
+ model
1025
+ else
1026
+ code = response['Response']['Error']['Code']
1027
+ message = response['Response']['Error']['Message']
1028
+ reqid = response['Response']['RequestId']
1029
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
1030
+ end
1031
+ rescue TencentCloud::Common::TencentCloudSDKException => e
1032
+ raise e
1033
+ rescue StandardError => e
1034
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
1035
+ end
1036
+
1037
+ # 删除用户自定义水印模板。
1038
+
1039
+ # @param request: Request instance for DeleteWatermarkTemplate.
1040
+ # @type request: :class:`Tencentcloud::vod::V20180717::DeleteWatermarkTemplateRequest`
1041
+ # @rtype: :class:`Tencentcloud::vod::V20180717::DeleteWatermarkTemplateResponse`
1042
+ def DeleteWatermarkTemplate(request)
1043
+ body = send_request('DeleteWatermarkTemplate', request.serialize)
1044
+ response = JSON.parse(body)
1045
+ if response['Response'].key?('Error') == false
1046
+ model = DeleteWatermarkTemplateResponse.new
1047
+ model.deserialize(response['Response'])
1048
+ model
1049
+ else
1050
+ code = response['Response']['Error']['Code']
1051
+ message = response['Response']['Error']['Message']
1052
+ reqid = response['Response']['RequestId']
1053
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
1054
+ end
1055
+ rescue TencentCloud::Common::TencentCloudSDKException => e
1056
+ raise e
1057
+ rescue StandardError => e
1058
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
1059
+ end
1060
+
1061
+ # 该接口用于批量删除关键词样本。
1062
+
1063
+ # @param request: Request instance for DeleteWordSamples.
1064
+ # @type request: :class:`Tencentcloud::vod::V20180717::DeleteWordSamplesRequest`
1065
+ # @rtype: :class:`Tencentcloud::vod::V20180717::DeleteWordSamplesResponse`
1066
+ def DeleteWordSamples(request)
1067
+ body = send_request('DeleteWordSamples', request.serialize)
1068
+ response = JSON.parse(body)
1069
+ if response['Response'].key?('Error') == false
1070
+ model = DeleteWordSamplesResponse.new
1071
+ model.deserialize(response['Response'])
1072
+ model
1073
+ else
1074
+ code = response['Response']['Error']['Code']
1075
+ message = response['Response']['Error']['Message']
1076
+ reqid = response['Response']['RequestId']
1077
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
1078
+ end
1079
+ rescue TencentCloud::Common::TencentCloudSDKException => e
1080
+ raise e
1081
+ rescue StandardError => e
1082
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
1083
+ end
1084
+
1085
+ # 根据视频内容分析模板唯一标识,获取视频内容分析模板详情列表。返回结果包含符合条件的所有用户自定义视频内容分析模板及[系统预置视频内容分析模板](https://cloud.tencent.com/document/product/266/33476#.E9.A2.84.E7.BD.AE.E8.A7.86.E9.A2.91.E5.86.85.E5.AE.B9.E5.88.86.E6.9E.90.E6.A8.A1.E6.9D.BF)。
1086
+
1087
+ # @param request: Request instance for DescribeAIAnalysisTemplates.
1088
+ # @type request: :class:`Tencentcloud::vod::V20180717::DescribeAIAnalysisTemplatesRequest`
1089
+ # @rtype: :class:`Tencentcloud::vod::V20180717::DescribeAIAnalysisTemplatesResponse`
1090
+ def DescribeAIAnalysisTemplates(request)
1091
+ body = send_request('DescribeAIAnalysisTemplates', request.serialize)
1092
+ response = JSON.parse(body)
1093
+ if response['Response'].key?('Error') == false
1094
+ model = DescribeAIAnalysisTemplatesResponse.new
1095
+ model.deserialize(response['Response'])
1096
+ model
1097
+ else
1098
+ code = response['Response']['Error']['Code']
1099
+ message = response['Response']['Error']['Message']
1100
+ reqid = response['Response']['RequestId']
1101
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
1102
+ end
1103
+ rescue TencentCloud::Common::TencentCloudSDKException => e
1104
+ raise e
1105
+ rescue StandardError => e
1106
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
1107
+ end
1108
+
1109
+ # 根据视频内容识别模板唯一标识,获取视频内容识别模板详情列表。返回结果包含符合条件的所有用户自定义视频内容识别模板及[系统预置视频内容识别模板](https://cloud.tencent.com/document/product/266/33476#.E9.A2.84.E7.BD.AE.E8.A7.86.E9.A2.91.E5.86.85.E5.AE.B9.E8.AF.86.E5.88.AB.E6.A8.A1.E6.9D.BF)。
1110
+
1111
+ # @param request: Request instance for DescribeAIRecognitionTemplates.
1112
+ # @type request: :class:`Tencentcloud::vod::V20180717::DescribeAIRecognitionTemplatesRequest`
1113
+ # @rtype: :class:`Tencentcloud::vod::V20180717::DescribeAIRecognitionTemplatesResponse`
1114
+ def DescribeAIRecognitionTemplates(request)
1115
+ body = send_request('DescribeAIRecognitionTemplates', request.serialize)
1116
+ response = JSON.parse(body)
1117
+ if response['Response'].key?('Error') == false
1118
+ model = DescribeAIRecognitionTemplatesResponse.new
1119
+ model.deserialize(response['Response'])
1120
+ model
1121
+ else
1122
+ code = response['Response']['Error']['Code']
1123
+ message = response['Response']['Error']['Message']
1124
+ reqid = response['Response']['RequestId']
1125
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
1126
+ end
1127
+ rescue TencentCloud::Common::TencentCloudSDKException => e
1128
+ raise e
1129
+ rescue StandardError => e
1130
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
1131
+ end
1132
+
1133
+ # 查询转自适应码流模板,支持根据条件,分页查询。
1134
+
1135
+ # @param request: Request instance for DescribeAdaptiveDynamicStreamingTemplates.
1136
+ # @type request: :class:`Tencentcloud::vod::V20180717::DescribeAdaptiveDynamicStreamingTemplatesRequest`
1137
+ # @rtype: :class:`Tencentcloud::vod::V20180717::DescribeAdaptiveDynamicStreamingTemplatesResponse`
1138
+ def DescribeAdaptiveDynamicStreamingTemplates(request)
1139
+ body = send_request('DescribeAdaptiveDynamicStreamingTemplates', request.serialize)
1140
+ response = JSON.parse(body)
1141
+ if response['Response'].key?('Error') == false
1142
+ model = DescribeAdaptiveDynamicStreamingTemplatesResponse.new
1143
+ model.deserialize(response['Response'])
1144
+ model
1145
+ else
1146
+ code = response['Response']['Error']['Code']
1147
+ message = response['Response']['Error']['Message']
1148
+ reqid = response['Response']['RequestId']
1149
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
1150
+ end
1151
+ rescue TencentCloud::Common::TencentCloudSDKException => e
1152
+ raise e
1153
+ rescue StandardError => e
1154
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
1155
+ end
1156
+
1157
+ # * 获得用户的所有分类信息。
1158
+
1159
+ # @param request: Request instance for DescribeAllClass.
1160
+ # @type request: :class:`Tencentcloud::vod::V20180717::DescribeAllClassRequest`
1161
+ # @rtype: :class:`Tencentcloud::vod::V20180717::DescribeAllClassResponse`
1162
+ def DescribeAllClass(request)
1163
+ body = send_request('DescribeAllClass', request.serialize)
1164
+ response = JSON.parse(body)
1165
+ if response['Response'].key?('Error') == false
1166
+ model = DescribeAllClassResponse.new
1167
+ model.deserialize(response['Response'])
1168
+ model
1169
+ else
1170
+ code = response['Response']['Error']['Code']
1171
+ message = response['Response']['Error']['Message']
1172
+ reqid = response['Response']['RequestId']
1173
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
1174
+ end
1175
+ rescue TencentCloud::Common::TencentCloudSDKException => e
1176
+ raise e
1177
+ rescue StandardError => e
1178
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
1179
+ end
1180
+
1181
+ # 查询转动图模板列表,支持根据条件,分页查询。
1182
+
1183
+ # @param request: Request instance for DescribeAnimatedGraphicsTemplates.
1184
+ # @type request: :class:`Tencentcloud::vod::V20180717::DescribeAnimatedGraphicsTemplatesRequest`
1185
+ # @rtype: :class:`Tencentcloud::vod::V20180717::DescribeAnimatedGraphicsTemplatesResponse`
1186
+ def DescribeAnimatedGraphicsTemplates(request)
1187
+ body = send_request('DescribeAnimatedGraphicsTemplates', request.serialize)
1188
+ response = JSON.parse(body)
1189
+ if response['Response'].key?('Error') == false
1190
+ model = DescribeAnimatedGraphicsTemplatesResponse.new
1191
+ model.deserialize(response['Response'])
1192
+ model
1193
+ else
1194
+ code = response['Response']['Error']['Code']
1195
+ message = response['Response']['Error']['Message']
1196
+ reqid = response['Response']['RequestId']
1197
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
1198
+ end
1199
+ rescue TencentCloud::Common::TencentCloudSDKException => e
1200
+ raise e
1201
+ rescue StandardError => e
1202
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
1203
+ end
1204
+
1205
+ # 该接口用于查询点播域名的 CDN 带宽、流量等统计数据。
1206
+ # * 查询的起始时间和结束时间跨度不超过90天。
1207
+ # * 可以查询不同服务区域的数据。
1208
+ # * 中国境内的数据支持查询指定地区、运营商的统计数据。
1209
+
1210
+ # @param request: Request instance for DescribeCDNStatDetails.
1211
+ # @type request: :class:`Tencentcloud::vod::V20180717::DescribeCDNStatDetailsRequest`
1212
+ # @rtype: :class:`Tencentcloud::vod::V20180717::DescribeCDNStatDetailsResponse`
1213
+ def DescribeCDNStatDetails(request)
1214
+ body = send_request('DescribeCDNStatDetails', request.serialize)
1215
+ response = JSON.parse(body)
1216
+ if response['Response'].key?('Error') == false
1217
+ model = DescribeCDNStatDetailsResponse.new
1218
+ model.deserialize(response['Response'])
1219
+ model
1220
+ else
1221
+ code = response['Response']['Error']['Code']
1222
+ message = response['Response']['Error']['Message']
1223
+ reqid = response['Response']['RequestId']
1224
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
1225
+ end
1226
+ rescue TencentCloud::Common::TencentCloudSDKException => e
1227
+ raise e
1228
+ rescue StandardError => e
1229
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
1230
+ end
1231
+
1232
+ # 该接口用于查询点播 CDN 的流量、带宽等统计数据。
1233
+ # 1. 可以查询最近365天内的 CDN 用量数据。
1234
+ # 2. 查询时间跨度不超过90天。
1235
+ # 3. 可以指定用量数据的时间粒度,支持5分钟、1小时、1天的时间粒度。
1236
+ # 4. 流量为查询时间粒度内的总流量,带宽为查询时间粒度内的峰值带宽。
1237
+
1238
+ # @param request: Request instance for DescribeCDNUsageData.
1239
+ # @type request: :class:`Tencentcloud::vod::V20180717::DescribeCDNUsageDataRequest`
1240
+ # @rtype: :class:`Tencentcloud::vod::V20180717::DescribeCDNUsageDataResponse`
1241
+ def DescribeCDNUsageData(request)
1242
+ body = send_request('DescribeCDNUsageData', request.serialize)
1243
+ response = JSON.parse(body)
1244
+ if response['Response'].key?('Error') == false
1245
+ model = DescribeCDNUsageDataResponse.new
1246
+ model.deserialize(response['Response'])
1247
+ model
1248
+ else
1249
+ code = response['Response']['Error']['Code']
1250
+ message = response['Response']['Error']['Message']
1251
+ reqid = response['Response']['RequestId']
1252
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
1253
+ end
1254
+ rescue TencentCloud::Common::TencentCloudSDKException => e
1255
+ raise e
1256
+ rescue StandardError => e
1257
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
1258
+ end
1259
+
1260
+ # 查询点播域名的 CDN 访问日志的下载链接。
1261
+ # 1. 可以查询最近30天内的 CDN 日志下载链接。
1262
+ # 2. 默认情况下 CDN 每小时生成一个日志文件,如果某一个小时没有 CDN 访问,不会生成日志文件。
1263
+ # 3. CDN 日志下载链接的有效期为24小时。
1264
+
1265
+ # @param request: Request instance for DescribeCdnLogs.
1266
+ # @type request: :class:`Tencentcloud::vod::V20180717::DescribeCdnLogsRequest`
1267
+ # @rtype: :class:`Tencentcloud::vod::V20180717::DescribeCdnLogsResponse`
1268
+ def DescribeCdnLogs(request)
1269
+ body = send_request('DescribeCdnLogs', request.serialize)
1270
+ response = JSON.parse(body)
1271
+ if response['Response'].key?('Error') == false
1272
+ model = DescribeCdnLogsResponse.new
1273
+ model.deserialize(response['Response'])
1274
+ model
1275
+ else
1276
+ code = response['Response']['Error']['Code']
1277
+ message = response['Response']['Error']['Message']
1278
+ reqid = response['Response']['RequestId']
1279
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
1280
+ end
1281
+ rescue TencentCloud::Common::TencentCloudSDKException => e
1282
+ raise e
1283
+ rescue StandardError => e
1284
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
1285
+ end
1286
+
1287
+ # 根据视频内容智能识别模板唯一标识,获取视频内容智能识别模板详情列表。返回结果包含符合条件的所有用户自定义模板及[系统预置内容智能识别模板](https://cloud.tencent.com/document/product/266/33476#.E9.A2.84.E7.BD.AE.E8.A7.86.E9.A2.91.E5.86.85.E5.AE.B9.E5.AE.A1.E6.A0.B8.E6.A8.A1.E6.9D.BF)。
1288
+
1289
+ # @param request: Request instance for DescribeContentReviewTemplates.
1290
+ # @type request: :class:`Tencentcloud::vod::V20180717::DescribeContentReviewTemplatesRequest`
1291
+ # @rtype: :class:`Tencentcloud::vod::V20180717::DescribeContentReviewTemplatesResponse`
1292
+ def DescribeContentReviewTemplates(request)
1293
+ body = send_request('DescribeContentReviewTemplates', request.serialize)
1294
+ response = JSON.parse(body)
1295
+ if response['Response'].key?('Error') == false
1296
+ model = DescribeContentReviewTemplatesResponse.new
1297
+ model.deserialize(response['Response'])
1298
+ model
1299
+ else
1300
+ code = response['Response']['Error']['Code']
1301
+ message = response['Response']['Error']['Message']
1302
+ reqid = response['Response']['RequestId']
1303
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
1304
+ end
1305
+ rescue TencentCloud::Common::TencentCloudSDKException => e
1306
+ raise e
1307
+ rescue StandardError => e
1308
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
1309
+ end
1310
+
1311
+ # 该接口用于查询指定日期范围内每天的播放统计数据。
1312
+ # * 可以查询最近30天的播放统计数据。
1313
+
1314
+ # @param request: Request instance for DescribeDailyMediaPlayStat.
1315
+ # @type request: :class:`Tencentcloud::vod::V20180717::DescribeDailyMediaPlayStatRequest`
1316
+ # @rtype: :class:`Tencentcloud::vod::V20180717::DescribeDailyMediaPlayStatResponse`
1317
+ def DescribeDailyMediaPlayStat(request)
1318
+ body = send_request('DescribeDailyMediaPlayStat', request.serialize)
1319
+ response = JSON.parse(body)
1320
+ if response['Response'].key?('Error') == false
1321
+ model = DescribeDailyMediaPlayStatResponse.new
1322
+ model.deserialize(response['Response'])
1323
+ model
1324
+ else
1325
+ code = response['Response']['Error']['Code']
1326
+ message = response['Response']['Error']['Message']
1327
+ reqid = response['Response']['RequestId']
1328
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
1329
+ end
1330
+ rescue TencentCloud::Common::TencentCloudSDKException => e
1331
+ raise e
1332
+ rescue StandardError => e
1333
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
1334
+ end
1335
+
1336
+ # 该接口用于查询每日播放Top100 的媒体文件的播放统计数据。
1337
+ # * 可以查询最近30天的播放统计数据。
1338
+ # * 可以按播放次数或者播放流量查询。
1339
+ # * 播放次数统计说明:
1340
+ # 1. HLS 文件:访问 M3U8 文件时统计播放次数;访问 TS 文件不统计播放次数。
1341
+ # 2. 其它文件(如 MP4 文件):播放请求带有 range 参数且 range 的 start 参数不等于0时不统计播放次数,其它情况统计播放次数。
1342
+
1343
+ # @param request: Request instance for DescribeDailyMostPlayedStat.
1344
+ # @type request: :class:`Tencentcloud::vod::V20180717::DescribeDailyMostPlayedStatRequest`
1345
+ # @rtype: :class:`Tencentcloud::vod::V20180717::DescribeDailyMostPlayedStatResponse`
1346
+ def DescribeDailyMostPlayedStat(request)
1347
+ body = send_request('DescribeDailyMostPlayedStat', request.serialize)
1348
+ response = JSON.parse(body)
1349
+ if response['Response'].key?('Error') == false
1350
+ model = DescribeDailyMostPlayedStatResponse.new
1351
+ model.deserialize(response['Response'])
1352
+ model
1353
+ else
1354
+ code = response['Response']['Error']['Code']
1355
+ message = response['Response']['Error']['Message']
1356
+ reqid = response['Response']['RequestId']
1357
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
1358
+ end
1359
+ rescue TencentCloud::Common::TencentCloudSDKException => e
1360
+ raise e
1361
+ rescue StandardError => e
1362
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
1363
+ end
1364
+
1365
+ # 该接口用于查询播放统计文件的下载地址。
1366
+ # * 可以查询最近30天的播放统计文件下载地址。
1367
+ # * 云点播每天对前一天的 CDN 请求日志进行分析处理,生成播放统计文件。
1368
+ # * 播放统计文件内容包含媒体文件的播放次数、播放流量等统计信息。
1369
+ # * 播放次数统计说明:
1370
+ # 1. HLS 文件:访问M3U8 文件时统计播放次数;访问TS 文件不统计播放次数。
1371
+ # 2. 其它文件(如 MP4 文件):播放请求带有 range 参数且 range 的 start 参数不等于0时不统计播放次数,其它情况统计播放次数。
1372
+ # * 播放设备的统计:播放请求带了 UserAgent 参数,并且 UserAgent 包含 Android 或者 iPhone 等标识,会统计为移动端播放次数,否则统计为 PC 端播放次数。
1373
+
1374
+ # @param request: Request instance for DescribeDailyPlayStatFileList.
1375
+ # @type request: :class:`Tencentcloud::vod::V20180717::DescribeDailyPlayStatFileListRequest`
1376
+ # @rtype: :class:`Tencentcloud::vod::V20180717::DescribeDailyPlayStatFileListResponse`
1377
+ def DescribeDailyPlayStatFileList(request)
1378
+ body = send_request('DescribeDailyPlayStatFileList', request.serialize)
1379
+ response = JSON.parse(body)
1380
+ if response['Response'].key?('Error') == false
1381
+ model = DescribeDailyPlayStatFileListResponse.new
1382
+ model.deserialize(response['Response'])
1383
+ model
1384
+ else
1385
+ code = response['Response']['Error']['Code']
1386
+ message = response['Response']['Error']['Message']
1387
+ reqid = response['Response']['RequestId']
1388
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
1389
+ end
1390
+ rescue TencentCloud::Common::TencentCloudSDKException => e
1391
+ raise e
1392
+ rescue StandardError => e
1393
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
1394
+ end
1395
+
1396
+ # 本 API 是 [旧版本加密](https://cloud.tencent.com/document/product/266/9638) 中[DescribeDrmDataKey 的 API 2017 接口](https://cloud.tencent.com/document/product/266/9643)的升级版本。
1397
+ # 如果您是新接入点播加密的用户,不要使用该 API。请参考[视频加密综述](https://cloud.tencent.com/document/product/266/45552)使用。
1398
+
1399
+ # @param request: Request instance for DescribeDrmDataKey.
1400
+ # @type request: :class:`Tencentcloud::vod::V20180717::DescribeDrmDataKeyRequest`
1401
+ # @rtype: :class:`Tencentcloud::vod::V20180717::DescribeDrmDataKeyResponse`
1402
+ def DescribeDrmDataKey(request)
1403
+ body = send_request('DescribeDrmDataKey', request.serialize)
1404
+ response = JSON.parse(body)
1405
+ if response['Response'].key?('Error') == false
1406
+ model = DescribeDrmDataKeyResponse.new
1407
+ model.deserialize(response['Response'])
1408
+ model
1409
+ else
1410
+ code = response['Response']['Error']['Code']
1411
+ message = response['Response']['Error']['Message']
1412
+ reqid = response['Response']['RequestId']
1413
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
1414
+ end
1415
+ rescue TencentCloud::Common::TencentCloudSDKException => e
1416
+ raise e
1417
+ rescue StandardError => e
1418
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
1419
+ end
1420
+
1421
+ # 腾讯云点播为客户提供了媒体上传、媒体管理、媒体处理等等服务,在这些服务执行过程或执行结束时,腾讯云点播也提供各种对应的事件通知,方便开发者感知服务处理状态,并做下一步的业务操作。
1422
+
1423
+ # 开发者可以通过本接口来查询当前配置事件通知的接收方式、接收地址以及哪些事件开启了接收回调通知。
1424
+
1425
+ # 默认接口请求频率限制:100次/秒。
1426
+
1427
+ # @param request: Request instance for DescribeEventConfig.
1428
+ # @type request: :class:`Tencentcloud::vod::V20180717::DescribeEventConfigRequest`
1429
+ # @rtype: :class:`Tencentcloud::vod::V20180717::DescribeEventConfigResponse`
1430
+ def DescribeEventConfig(request)
1431
+ body = send_request('DescribeEventConfig', request.serialize)
1432
+ response = JSON.parse(body)
1433
+ if response['Response'].key?('Error') == false
1434
+ model = DescribeEventConfigResponse.new
1435
+ model.deserialize(response['Response'])
1436
+ model
1437
+ else
1438
+ code = response['Response']['Error']['Code']
1439
+ message = response['Response']['Error']['Message']
1440
+ reqid = response['Response']['RequestId']
1441
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
1442
+ end
1443
+ rescue TencentCloud::Common::TencentCloudSDKException => e
1444
+ raise e
1445
+ rescue StandardError => e
1446
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
1447
+ end
1448
+
1449
+ # * 该接口用于业务服务器获取 [可靠回调](https://cloud.tencent.com/document/product/266/33779#.E5.8F.AF.E9.9D.A0.E5.9B.9E.E8.B0.83) 事件通知的状态。
1450
+
1451
+ # @param request: Request instance for DescribeEventsState.
1452
+ # @type request: :class:`Tencentcloud::vod::V20180717::DescribeEventsStateRequest`
1453
+ # @rtype: :class:`Tencentcloud::vod::V20180717::DescribeEventsStateResponse`
1454
+ def DescribeEventsState(request)
1455
+ body = send_request('DescribeEventsState', request.serialize)
1456
+ response = JSON.parse(body)
1457
+ if response['Response'].key?('Error') == false
1458
+ model = DescribeEventsStateResponse.new
1459
+ model.deserialize(response['Response'])
1460
+ model
1461
+ else
1462
+ code = response['Response']['Error']['Code']
1463
+ message = response['Response']['Error']['Message']
1464
+ reqid = response['Response']['RequestId']
1465
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
1466
+ end
1467
+ rescue TencentCloud::Common::TencentCloudSDKException => e
1468
+ raise e
1469
+ rescue StandardError => e
1470
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
1471
+ end
1472
+
1473
+ # 获取片头片尾模板列表。
1474
+
1475
+ # @param request: Request instance for DescribeHeadTailTemplates.
1476
+ # @type request: :class:`Tencentcloud::vod::V20180717::DescribeHeadTailTemplatesRequest`
1477
+ # @rtype: :class:`Tencentcloud::vod::V20180717::DescribeHeadTailTemplatesResponse`
1478
+ def DescribeHeadTailTemplates(request)
1479
+ body = send_request('DescribeHeadTailTemplates', request.serialize)
1480
+ response = JSON.parse(body)
1481
+ if response['Response'].key?('Error') == false
1482
+ model = DescribeHeadTailTemplatesResponse.new
1483
+ model.deserialize(response['Response'])
1484
+ model
1485
+ else
1486
+ code = response['Response']['Error']['Code']
1487
+ message = response['Response']['Error']['Message']
1488
+ reqid = response['Response']['RequestId']
1489
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
1490
+ end
1491
+ rescue TencentCloud::Common::TencentCloudSDKException => e
1492
+ raise e
1493
+ rescue StandardError => e
1494
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
1495
+ end
1496
+
1497
+ # 获取图片处理模板列表,支持根据条件,分页查询。
1498
+
1499
+ # @param request: Request instance for DescribeImageProcessingTemplates.
1500
+ # @type request: :class:`Tencentcloud::vod::V20180717::DescribeImageProcessingTemplatesRequest`
1501
+ # @rtype: :class:`Tencentcloud::vod::V20180717::DescribeImageProcessingTemplatesResponse`
1502
+ def DescribeImageProcessingTemplates(request)
1503
+ body = send_request('DescribeImageProcessingTemplates', request.serialize)
1504
+ response = JSON.parse(body)
1505
+ if response['Response'].key?('Error') == false
1506
+ model = DescribeImageProcessingTemplatesResponse.new
1507
+ model.deserialize(response['Response'])
1508
+ model
1509
+ else
1510
+ code = response['Response']['Error']['Code']
1511
+ message = response['Response']['Error']['Message']
1512
+ reqid = response['Response']['RequestId']
1513
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
1514
+ end
1515
+ rescue TencentCloud::Common::TencentCloudSDKException => e
1516
+ raise e
1517
+ rescue StandardError => e
1518
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
1519
+ end
1520
+
1521
+ # 查询雪碧图模板,支持根据条件,分页查询。
1522
+
1523
+ # @param request: Request instance for DescribeImageSpriteTemplates.
1524
+ # @type request: :class:`Tencentcloud::vod::V20180717::DescribeImageSpriteTemplatesRequest`
1525
+ # @rtype: :class:`Tencentcloud::vod::V20180717::DescribeImageSpriteTemplatesResponse`
1526
+ def DescribeImageSpriteTemplates(request)
1527
+ body = send_request('DescribeImageSpriteTemplates', request.serialize)
1528
+ response = JSON.parse(body)
1529
+ if response['Response'].key?('Error') == false
1530
+ model = DescribeImageSpriteTemplatesResponse.new
1531
+ model.deserialize(response['Response'])
1532
+ model
1533
+ else
1534
+ code = response['Response']['Error']['Code']
1535
+ message = response['Response']['Error']['Message']
1536
+ reqid = response['Response']['RequestId']
1537
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
1538
+ end
1539
+ rescue TencentCloud::Common::TencentCloudSDKException => e
1540
+ raise e
1541
+ rescue StandardError => e
1542
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
1543
+ end
1544
+
1545
+ # 1. 该接口可以获取多个媒体文件的多种信息,包括:
1546
+ # 1. 基础信息(basicInfo):包括媒体名称、分类、播放地址、封面图片等。
1547
+ # 2. 元信息(metaData):包括大小、时长、视频流信息、音频流信息等。
1548
+ # 3. 转码结果信息(transcodeInfo):包括该媒体转码生成的各种规格的媒体地址、视频流参数、音频流参数等。
1549
+ # 4. 转动图结果信息(animatedGraphicsInfo):对视频转动图(如 gif)后的动图信息。
1550
+ # 5. 采样截图信息(sampleSnapshotInfo):对视频采样截图后的截图信息。
1551
+ # 6. 雪碧图信息(imageSpriteInfo):对视频截取雪碧图后的雪碧图信息。
1552
+ # 7. 指定时间点截图信息(snapshotByTimeOffsetInfo):对视频依照指定时间点截图后,的截图信息。
1553
+ # 8. 视频打点信息(keyFrameDescInfo):对视频设置的打点信息。
1554
+ # 9. 转自适应码流信息(adaptiveDynamicStreamingInfo):包括规格、加密类型、打包格式等相关信息。
1555
+ # 2. 可以指定回包只返回部分信息。
1556
+
1557
+ # @param request: Request instance for DescribeMediaInfos.
1558
+ # @type request: :class:`Tencentcloud::vod::V20180717::DescribeMediaInfosRequest`
1559
+ # @rtype: :class:`Tencentcloud::vod::V20180717::DescribeMediaInfosResponse`
1560
+ def DescribeMediaInfos(request)
1561
+ body = send_request('DescribeMediaInfos', request.serialize)
1562
+ response = JSON.parse(body)
1563
+ if response['Response'].key?('Error') == false
1564
+ model = DescribeMediaInfosResponse.new
1565
+ model.deserialize(response['Response'])
1566
+ model
1567
+ else
1568
+ code = response['Response']['Error']['Code']
1569
+ message = response['Response']['Error']['Message']
1570
+ reqid = response['Response']['RequestId']
1571
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
1572
+ end
1573
+ rescue TencentCloud::Common::TencentCloudSDKException => e
1574
+ raise e
1575
+ rescue StandardError => e
1576
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
1577
+ end
1578
+
1579
+ # 该接口返回查询时间范围内每天使用的视频处理用量信息。
1580
+ # 1. 可以查询最近365天内的视频处理统计数据。
1581
+ # 2. 查询时间跨度不超过90天。
1582
+
1583
+ # @param request: Request instance for DescribeMediaProcessUsageData.
1584
+ # @type request: :class:`Tencentcloud::vod::V20180717::DescribeMediaProcessUsageDataRequest`
1585
+ # @rtype: :class:`Tencentcloud::vod::V20180717::DescribeMediaProcessUsageDataResponse`
1586
+ def DescribeMediaProcessUsageData(request)
1587
+ body = send_request('DescribeMediaProcessUsageData', request.serialize)
1588
+ response = JSON.parse(body)
1589
+ if response['Response'].key?('Error') == false
1590
+ model = DescribeMediaProcessUsageDataResponse.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
+ # 该接口用于查询素材样本信息,支持根据素材 ID、名称、标签,分页查询。
1606
+
1607
+ # @param request: Request instance for DescribePersonSamples.
1608
+ # @type request: :class:`Tencentcloud::vod::V20180717::DescribePersonSamplesRequest`
1609
+ # @rtype: :class:`Tencentcloud::vod::V20180717::DescribePersonSamplesResponse`
1610
+ def DescribePersonSamples(request)
1611
+ body = send_request('DescribePersonSamples', request.serialize)
1612
+ response = JSON.parse(body)
1613
+ if response['Response'].key?('Error') == false
1614
+ model = DescribePersonSamplesResponse.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
+ # 1. 商品的类型、生效和失效日期。
1631
+ # 2. 商品中每种资源的额度和剩余额度。
1632
+
1633
+ # @param request: Request instance for DescribePrepaidProducts.
1634
+ # @type request: :class:`Tencentcloud::vod::V20180717::DescribePrepaidProductsRequest`
1635
+ # @rtype: :class:`Tencentcloud::vod::V20180717::DescribePrepaidProductsResponse`
1636
+ def DescribePrepaidProducts(request)
1637
+ body = send_request('DescribePrepaidProducts', request.serialize)
1638
+ response = JSON.parse(body)
1639
+ if response['Response'].key?('Error') == false
1640
+ model = DescribePrepaidProductsResponse.new
1641
+ model.deserialize(response['Response'])
1642
+ model
1643
+ else
1644
+ code = response['Response']['Error']['Code']
1645
+ message = response['Response']['Error']['Message']
1646
+ reqid = response['Response']['RequestId']
1647
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
1648
+ end
1649
+ rescue TencentCloud::Common::TencentCloudSDKException => e
1650
+ raise e
1651
+ rescue StandardError => e
1652
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
1653
+ end
1654
+
1655
+ # 根据任务流模板名字,获取任务流模板详情列表。
1656
+
1657
+ # @param request: Request instance for DescribeProcedureTemplates.
1658
+ # @type request: :class:`Tencentcloud::vod::V20180717::DescribeProcedureTemplatesRequest`
1659
+ # @rtype: :class:`Tencentcloud::vod::V20180717::DescribeProcedureTemplatesResponse`
1660
+ def DescribeProcedureTemplates(request)
1661
+ body = send_request('DescribeProcedureTemplates', request.serialize)
1662
+ response = JSON.parse(body)
1663
+ if response['Response'].key?('Error') == false
1664
+ model = DescribeProcedureTemplatesResponse.new
1665
+ model.deserialize(response['Response'])
1666
+ model
1667
+ else
1668
+ code = response['Response']['Error']['Code']
1669
+ message = response['Response']['Error']['Message']
1670
+ reqid = response['Response']['RequestId']
1671
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
1672
+ end
1673
+ rescue TencentCloud::Common::TencentCloudSDKException => e
1674
+ raise e
1675
+ rescue StandardError => e
1676
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
1677
+ end
1678
+
1679
+ # <b>本接口已不推荐使用,用 [DescribeMediaProcessUsageData](/document/product/266/41464) 替代</b>
1680
+
1681
+ # 该接口返回查询时间范围内每天使用的视频内容智能识别时长数据,单位: 秒。
1682
+
1683
+ # 1. 可以查询最近365天内的视频内容智能识别时长统计数据。
1684
+ # 2. 查询时间跨度不超过90天。
1685
+
1686
+ # @param request: Request instance for DescribeReviewDetails.
1687
+ # @type request: :class:`Tencentcloud::vod::V20180717::DescribeReviewDetailsRequest`
1688
+ # @rtype: :class:`Tencentcloud::vod::V20180717::DescribeReviewDetailsResponse`
1689
+ def DescribeReviewDetails(request)
1690
+ body = send_request('DescribeReviewDetails', request.serialize)
1691
+ response = JSON.parse(body)
1692
+ if response['Response'].key?('Error') == false
1693
+ model = DescribeReviewDetailsResponse.new
1694
+ model.deserialize(response['Response'])
1695
+ model
1696
+ else
1697
+ code = response['Response']['Error']['Code']
1698
+ message = response['Response']['Error']['Message']
1699
+ reqid = response['Response']['RequestId']
1700
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
1701
+ end
1702
+ rescue TencentCloud::Common::TencentCloudSDKException => e
1703
+ raise e
1704
+ rescue StandardError => e
1705
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
1706
+ end
1707
+
1708
+ # 查询采样截图模板,支持根据条件,分页查询。
1709
+
1710
+ # @param request: Request instance for DescribeSampleSnapshotTemplates.
1711
+ # @type request: :class:`Tencentcloud::vod::V20180717::DescribeSampleSnapshotTemplatesRequest`
1712
+ # @rtype: :class:`Tencentcloud::vod::V20180717::DescribeSampleSnapshotTemplatesResponse`
1713
+ def DescribeSampleSnapshotTemplates(request)
1714
+ body = send_request('DescribeSampleSnapshotTemplates', request.serialize)
1715
+ response = JSON.parse(body)
1716
+ if response['Response'].key?('Error') == false
1717
+ model = DescribeSampleSnapshotTemplatesResponse.new
1718
+ model.deserialize(response['Response'])
1719
+ model
1720
+ else
1721
+ code = response['Response']['Error']['Code']
1722
+ message = response['Response']['Error']['Message']
1723
+ reqid = response['Response']['RequestId']
1724
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
1725
+ end
1726
+ rescue TencentCloud::Common::TencentCloudSDKException => e
1727
+ raise e
1728
+ rescue StandardError => e
1729
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
1730
+ end
1731
+
1732
+ # 查询指定时间点截图模板,支持根据条件,分页查询。
1733
+
1734
+ # @param request: Request instance for DescribeSnapshotByTimeOffsetTemplates.
1735
+ # @type request: :class:`Tencentcloud::vod::V20180717::DescribeSnapshotByTimeOffsetTemplatesRequest`
1736
+ # @rtype: :class:`Tencentcloud::vod::V20180717::DescribeSnapshotByTimeOffsetTemplatesResponse`
1737
+ def DescribeSnapshotByTimeOffsetTemplates(request)
1738
+ body = send_request('DescribeSnapshotByTimeOffsetTemplates', request.serialize)
1739
+ response = JSON.parse(body)
1740
+ if response['Response'].key?('Error') == false
1741
+ model = DescribeSnapshotByTimeOffsetTemplatesResponse.new
1742
+ model.deserialize(response['Response'])
1743
+ model
1744
+ else
1745
+ code = response['Response']['Error']['Code']
1746
+ message = response['Response']['Error']['Message']
1747
+ reqid = response['Response']['RequestId']
1748
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
1749
+ end
1750
+ rescue TencentCloud::Common::TencentCloudSDKException => e
1751
+ raise e
1752
+ rescue StandardError => e
1753
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
1754
+ end
1755
+
1756
+ # 查询存储空间使用情况和文件数量。
1757
+
1758
+ # @param request: Request instance for DescribeStorageData.
1759
+ # @type request: :class:`Tencentcloud::vod::V20180717::DescribeStorageDataRequest`
1760
+ # @rtype: :class:`Tencentcloud::vod::V20180717::DescribeStorageDataResponse`
1761
+ def DescribeStorageData(request)
1762
+ body = send_request('DescribeStorageData', request.serialize)
1763
+ response = JSON.parse(body)
1764
+ if response['Response'].key?('Error') == false
1765
+ model = DescribeStorageDataResponse.new
1766
+ model.deserialize(response['Response'])
1767
+ model
1768
+ else
1769
+ code = response['Response']['Error']['Code']
1770
+ message = response['Response']['Error']['Message']
1771
+ reqid = response['Response']['RequestId']
1772
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
1773
+ end
1774
+ rescue TencentCloud::Common::TencentCloudSDKException => e
1775
+ raise e
1776
+ rescue StandardError => e
1777
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
1778
+ end
1779
+
1780
+ # 该接口返回查询时间范围内使用的点播存储空间,单位:字节。
1781
+ # 1. 可以查询最近365天内的存储空间数据;
1782
+ # 2. 查询时间跨度不超过90天;
1783
+ # 3. 分钟粒度查询跨度不超过7天;
1784
+
1785
+ # @param request: Request instance for DescribeStorageDetails.
1786
+ # @type request: :class:`Tencentcloud::vod::V20180717::DescribeStorageDetailsRequest`
1787
+ # @rtype: :class:`Tencentcloud::vod::V20180717::DescribeStorageDetailsResponse`
1788
+ def DescribeStorageDetails(request)
1789
+ body = send_request('DescribeStorageDetails', request.serialize)
1790
+ response = JSON.parse(body)
1791
+ if response['Response'].key?('Error') == false
1792
+ model = DescribeStorageDetailsResponse.new
1793
+ model.deserialize(response['Response'])
1794
+ model
1795
+ else
1796
+ code = response['Response']['Error']['Code']
1797
+ message = response['Response']['Error']['Message']
1798
+ reqid = response['Response']['RequestId']
1799
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
1800
+ end
1801
+ rescue TencentCloud::Common::TencentCloudSDKException => e
1802
+ raise e
1803
+ rescue StandardError => e
1804
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
1805
+ end
1806
+
1807
+ # 该接口用于获取当前账号的子应用列表,包含主应用。
1808
+
1809
+ # @param request: Request instance for DescribeSubAppIds.
1810
+ # @type request: :class:`Tencentcloud::vod::V20180717::DescribeSubAppIdsRequest`
1811
+ # @rtype: :class:`Tencentcloud::vod::V20180717::DescribeSubAppIdsResponse`
1812
+ def DescribeSubAppIds(request)
1813
+ body = send_request('DescribeSubAppIds', request.serialize)
1814
+ response = JSON.parse(body)
1815
+ if response['Response'].key?('Error') == false
1816
+ model = DescribeSubAppIdsResponse.new
1817
+ model.deserialize(response['Response'])
1818
+ model
1819
+ else
1820
+ code = response['Response']['Error']['Code']
1821
+ message = response['Response']['Error']['Message']
1822
+ reqid = response['Response']['RequestId']
1823
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
1824
+ end
1825
+ rescue TencentCloud::Common::TencentCloudSDKException => e
1826
+ raise e
1827
+ rescue StandardError => e
1828
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
1829
+ end
1830
+
1831
+ # 查询超级播放器配置,支持根据条件,分页查询。
1832
+
1833
+ # @param request: Request instance for DescribeSuperPlayerConfigs.
1834
+ # @type request: :class:`Tencentcloud::vod::V20180717::DescribeSuperPlayerConfigsRequest`
1835
+ # @rtype: :class:`Tencentcloud::vod::V20180717::DescribeSuperPlayerConfigsResponse`
1836
+ def DescribeSuperPlayerConfigs(request)
1837
+ body = send_request('DescribeSuperPlayerConfigs', request.serialize)
1838
+ response = JSON.parse(body)
1839
+ if response['Response'].key?('Error') == false
1840
+ model = DescribeSuperPlayerConfigsResponse.new
1841
+ model.deserialize(response['Response'])
1842
+ model
1843
+ else
1844
+ code = response['Response']['Error']['Code']
1845
+ message = response['Response']['Error']['Message']
1846
+ reqid = response['Response']['RequestId']
1847
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
1848
+ end
1849
+ rescue TencentCloud::Common::TencentCloudSDKException => e
1850
+ raise e
1851
+ rescue StandardError => e
1852
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
1853
+ end
1854
+
1855
+ # 通过任务 ID 查询任务的执行状态和结果的详细信息(最多可以查询3天之内提交的任务)。
1856
+
1857
+ # @param request: Request instance for DescribeTaskDetail.
1858
+ # @type request: :class:`Tencentcloud::vod::V20180717::DescribeTaskDetailRequest`
1859
+ # @rtype: :class:`Tencentcloud::vod::V20180717::DescribeTaskDetailResponse`
1860
+ def DescribeTaskDetail(request)
1861
+ body = send_request('DescribeTaskDetail', request.serialize)
1862
+ response = JSON.parse(body)
1863
+ if response['Response'].key?('Error') == false
1864
+ model = DescribeTaskDetailResponse.new
1865
+ model.deserialize(response['Response'])
1866
+ model
1867
+ else
1868
+ code = response['Response']['Error']['Code']
1869
+ message = response['Response']['Error']['Message']
1870
+ reqid = response['Response']['RequestId']
1871
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
1872
+ end
1873
+ rescue TencentCloud::Common::TencentCloudSDKException => e
1874
+ raise e
1875
+ rescue StandardError => e
1876
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
1877
+ end
1878
+
1879
+ # * 该接口用于查询任务列表;
1880
+ # * 当列表数据比较多时,单次接口调用无法拉取整个列表,可通过 ScrollToken 参数,分批拉取;
1881
+ # * 只能查询到最近三天(72 小时)内的任务。
1882
+
1883
+ # @param request: Request instance for DescribeTasks.
1884
+ # @type request: :class:`Tencentcloud::vod::V20180717::DescribeTasksRequest`
1885
+ # @rtype: :class:`Tencentcloud::vod::V20180717::DescribeTasksResponse`
1886
+ def DescribeTasks(request)
1887
+ body = send_request('DescribeTasks', request.serialize)
1888
+ response = JSON.parse(body)
1889
+ if response['Response'].key?('Error') == false
1890
+ model = DescribeTasksResponse.new
1891
+ model.deserialize(response['Response'])
1892
+ model
1893
+ else
1894
+ code = response['Response']['Error']['Code']
1895
+ message = response['Response']['Error']['Message']
1896
+ reqid = response['Response']['RequestId']
1897
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
1898
+ end
1899
+ rescue TencentCloud::Common::TencentCloudSDKException => e
1900
+ raise e
1901
+ rescue StandardError => e
1902
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
1903
+ end
1904
+
1905
+ # 根据转码模板唯一标识,获取转码模板详情列表。返回结果包含符合条件的所有用户自定义模板及[系统预置转码模板](https://cloud.tencent.com/document/product/266/33476#.E9.A2.84.E7.BD.AE.E8.BD.AC.E7.A0.81.E6.A8.A1.E6.9D.BF)。
1906
+
1907
+ # @param request: Request instance for DescribeTranscodeTemplates.
1908
+ # @type request: :class:`Tencentcloud::vod::V20180717::DescribeTranscodeTemplatesRequest`
1909
+ # @rtype: :class:`Tencentcloud::vod::V20180717::DescribeTranscodeTemplatesResponse`
1910
+ def DescribeTranscodeTemplates(request)
1911
+ body = send_request('DescribeTranscodeTemplates', request.serialize)
1912
+ response = JSON.parse(body)
1913
+ if response['Response'].key?('Error') == false
1914
+ model = DescribeTranscodeTemplatesResponse.new
1915
+ model.deserialize(response['Response'])
1916
+ model
1917
+ else
1918
+ code = response['Response']['Error']['Code']
1919
+ message = response['Response']['Error']['Message']
1920
+ reqid = response['Response']['RequestId']
1921
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
1922
+ end
1923
+ rescue TencentCloud::Common::TencentCloudSDKException => e
1924
+ raise e
1925
+ rescue StandardError => e
1926
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
1927
+ end
1928
+
1929
+ # 该接口用于查询点播域名信息列表。
1930
+
1931
+ # @param request: Request instance for DescribeVodDomains.
1932
+ # @type request: :class:`Tencentcloud::vod::V20180717::DescribeVodDomainsRequest`
1933
+ # @rtype: :class:`Tencentcloud::vod::V20180717::DescribeVodDomainsResponse`
1934
+ def DescribeVodDomains(request)
1935
+ body = send_request('DescribeVodDomains', request.serialize)
1936
+ response = JSON.parse(body)
1937
+ if response['Response'].key?('Error') == false
1938
+ model = DescribeVodDomainsResponse.new
1939
+ model.deserialize(response['Response'])
1940
+ model
1941
+ else
1942
+ code = response['Response']['Error']['Code']
1943
+ message = response['Response']['Error']['Message']
1944
+ reqid = response['Response']['RequestId']
1945
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
1946
+ end
1947
+ rescue TencentCloud::Common::TencentCloudSDKException => e
1948
+ raise e
1949
+ rescue StandardError => e
1950
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
1951
+ end
1952
+
1953
+ # 查询用户自定义水印模板,支持根据条件,分页查询。
1954
+
1955
+ # @param request: Request instance for DescribeWatermarkTemplates.
1956
+ # @type request: :class:`Tencentcloud::vod::V20180717::DescribeWatermarkTemplatesRequest`
1957
+ # @rtype: :class:`Tencentcloud::vod::V20180717::DescribeWatermarkTemplatesResponse`
1958
+ def DescribeWatermarkTemplates(request)
1959
+ body = send_request('DescribeWatermarkTemplates', request.serialize)
1960
+ response = JSON.parse(body)
1961
+ if response['Response'].key?('Error') == false
1962
+ model = DescribeWatermarkTemplatesResponse.new
1963
+ model.deserialize(response['Response'])
1964
+ model
1965
+ else
1966
+ code = response['Response']['Error']['Code']
1967
+ message = response['Response']['Error']['Message']
1968
+ reqid = response['Response']['RequestId']
1969
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
1970
+ end
1971
+ rescue TencentCloud::Common::TencentCloudSDKException => e
1972
+ raise e
1973
+ rescue StandardError => e
1974
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
1975
+ end
1976
+
1977
+ # 该接口用于根据应用场景、关键词、标签,分页查询关键词样本信息。
1978
+
1979
+ # @param request: Request instance for DescribeWordSamples.
1980
+ # @type request: :class:`Tencentcloud::vod::V20180717::DescribeWordSamplesRequest`
1981
+ # @rtype: :class:`Tencentcloud::vod::V20180717::DescribeWordSamplesResponse`
1982
+ def DescribeWordSamples(request)
1983
+ body = send_request('DescribeWordSamples', request.serialize)
1984
+ response = JSON.parse(body)
1985
+ if response['Response'].key?('Error') == false
1986
+ model = DescribeWordSamplesResponse.new
1987
+ model.deserialize(response['Response'])
1988
+ model
1989
+ else
1990
+ code = response['Response']['Error']['Code']
1991
+ message = response['Response']['Error']['Message']
1992
+ reqid = response['Response']['RequestId']
1993
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
1994
+ end
1995
+ rescue TencentCloud::Common::TencentCloudSDKException => e
1996
+ raise e
1997
+ rescue StandardError => e
1998
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
1999
+ end
2000
+
2001
+ # 对视频进行编辑(剪辑、拼接等),生成一个新的点播视频。编辑的功能包括:
2002
+
2003
+ # 1. 对点播中的一个文件进行剪辑,生成一个新的视频;
2004
+ # 2. 对点播中的多个文件进行拼接,生成一个新的视频;
2005
+ # 3. 对点播中的多个文件进行剪辑,然后再拼接,生成一个新的视频;
2006
+ # 4. 对点播中的一个流,直接生成一个新的视频;
2007
+ # 5. 对点播中的一个流进行剪辑,生成一个新的视频;
2008
+ # 6. 对点播中的多个流进行拼接,生成一个新的视频;
2009
+ # 7. 对点播中的多个流进行剪辑,然后拼接,生成一个新的视频。
2010
+
2011
+ # 对于生成的新视频,还可以指定生成后的视频是否要执行任务流。
2012
+
2013
+ # >当对直播流做剪辑、拼接等操作时,请确保流结束后再操作。否则生成的视频可能不完整。
2014
+
2015
+ # 如使用事件通知,事件通知的类型为 [视频编辑完成](https://cloud.tencent.com/document/product/266/33794)。
2016
+
2017
+ # @param request: Request instance for EditMedia.
2018
+ # @type request: :class:`Tencentcloud::vod::V20180717::EditMediaRequest`
2019
+ # @rtype: :class:`Tencentcloud::vod::V20180717::EditMediaResponse`
2020
+ def EditMedia(request)
2021
+ body = send_request('EditMedia', request.serialize)
2022
+ response = JSON.parse(body)
2023
+ if response['Response'].key?('Error') == false
2024
+ model = EditMediaResponse.new
2025
+ model.deserialize(response['Response'])
2026
+ model
2027
+ else
2028
+ code = response['Response']['Error']['Code']
2029
+ message = response['Response']['Error']['Message']
2030
+ reqid = response['Response']['RequestId']
2031
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
2032
+ end
2033
+ rescue TencentCloud::Common::TencentCloudSDKException => e
2034
+ raise e
2035
+ rescue StandardError => e
2036
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
2037
+ end
2038
+
2039
+ # 本接口仅用于定制开发的特殊场景,除非云点播客服人员主动告知您需要使用本接口,其它情况请勿调用。
2040
+
2041
+ # @param request: Request instance for ExecuteFunction.
2042
+ # @type request: :class:`Tencentcloud::vod::V20180717::ExecuteFunctionRequest`
2043
+ # @rtype: :class:`Tencentcloud::vod::V20180717::ExecuteFunctionResponse`
2044
+ def ExecuteFunction(request)
2045
+ body = send_request('ExecuteFunction', request.serialize)
2046
+ response = JSON.parse(body)
2047
+ if response['Response'].key?('Error') == false
2048
+ model = ExecuteFunctionResponse.new
2049
+ model.deserialize(response['Response'])
2050
+ model
2051
+ else
2052
+ code = response['Response']['Error']['Code']
2053
+ message = response['Response']['Error']['Message']
2054
+ reqid = response['Response']['RequestId']
2055
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
2056
+ end
2057
+ rescue TencentCloud::Common::TencentCloudSDKException => e
2058
+ raise e
2059
+ rescue StandardError => e
2060
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
2061
+ end
2062
+
2063
+ # * 对媒体禁播后,除了点播控制台预览,其他场景访问视频各种资源的 URL(原始文件、转码输出文件、截图等)均会返回 403。
2064
+ # 禁播/解禁操作全网生效时间约 5~10 分钟。
2065
+
2066
+ # @param request: Request instance for ForbidMediaDistribution.
2067
+ # @type request: :class:`Tencentcloud::vod::V20180717::ForbidMediaDistributionRequest`
2068
+ # @rtype: :class:`Tencentcloud::vod::V20180717::ForbidMediaDistributionResponse`
2069
+ def ForbidMediaDistribution(request)
2070
+ body = send_request('ForbidMediaDistribution', request.serialize)
2071
+ response = JSON.parse(body)
2072
+ if response['Response'].key?('Error') == false
2073
+ model = ForbidMediaDistributionResponse.new
2074
+ model.deserialize(response['Response'])
2075
+ model
2076
+ else
2077
+ code = response['Response']['Error']['Code']
2078
+ message = response['Response']['Error']['Message']
2079
+ reqid = response['Response']['RequestId']
2080
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
2081
+ end
2082
+ rescue TencentCloud::Common::TencentCloudSDKException => e
2083
+ raise e
2084
+ rescue StandardError => e
2085
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
2086
+ end
2087
+
2088
+ # 直播即时剪辑,是指在直播过程中(即直播尚未结束时),客户可以在过往直播内容中选择一段,实时生成一个新的视频(HLS 格式),开发者可以将其立即分享出去,或者长久保存起来。
2089
+
2090
+ # 腾讯云点播支持两种即时剪辑模式:
2091
+ # - 剪辑固化:将剪辑出来的视频保存成独立的视频,拥有独立 FileId;适用于将精彩片段**长久保存**的场景;
2092
+ # - 剪辑不固化:剪辑得到的视频附属于直播录制文件,没有独立 FileId;适用于将精彩片段**临时分享**的场景。
2093
+
2094
+ # 注意:
2095
+ # - 使用直播即时剪辑功能的前提是:目标直播流开启了[时移回看](https://cloud.tencent.com/document/product/267/32742)功能。
2096
+ # - 直播即时剪辑是基于直播录制生成的 m3u8 文件进行的,故而其最小剪辑精度为一个 ts 切片,无法实现秒级或者更为精确的剪辑精度。
2097
+ # - 由于直播过程中可能存在断流的情况,所以有可能导致剪辑生成的实际视频时长与期望不一致。例如剪辑某个直播流的时间区间为 2018-09-20T10:30:00Z 到 2018-09-20T10:40:00Z ,如果在该时间区间中发生过断流,那么返回的媒资文件的时长将少于 10 分钟,在这种情况下,可以通过输出参数 <a href="#p_segmentset">SegmentSet</a> 感知到。
2098
+
2099
+ # ### 剪辑固化
2100
+ # 所谓剪辑固化,是指将剪辑出来的视频是保存成一个独立的视频(拥有独立的 FileId)。其生命周期不受原始直播录制视频影响(即使原始录制视频被删除,剪辑结果也不会受到任何影响);也可以对其进行转码、微信发布等二次处理。
2101
+
2102
+ # 举例如下:一场完整的足球比赛,直播录制出来的原始视频可能长达 2 个小时,客户出于节省成本的目的可以对这个视频存储 2 个月,但对于直播即时剪辑的「精彩时刻」视频却可以指定存储更长时间,同时可以单独对「精彩时刻」视频进行转码、微信发布等额外的点播操作,这时候可以选择直播即时剪辑并且固化的方案。
2103
+
2104
+ # 剪辑固化的优势在于其生命周期与原始录制视频相互独立,可以独立管理、长久保存。
2105
+
2106
+ # ### 剪辑不固化
2107
+ # 所谓剪辑不固化,是指剪辑所得到的结果(m3u8 文件)与直播录制视频共享相同的 ts 分片,新生成的视频不是一个独立完整的视频(没有独立 FileId,只有播放 URL),其有效期与直播录制的完整视频有效期是一致的。一旦直播录制出来的视频被删除,也会导致该片段无法播放。
2108
+
2109
+ # 剪辑不固化,由于其剪辑结果不是一个独立的视频,因而也不会纳入点播媒资视频管理(例如控制台的视频总数不会统计这一片段)中,也无法单独针对这个片段做转码、微信发布等任何视频处理操作。
2110
+
2111
+ # 剪辑不固化的优势在于其剪辑操作十分“轻量化”,不会产生额外的存储开销。但其不足之处在于生命周期与原始录制视频相同,且无法进一步进行转码等视频处理。
2112
+
2113
+ # @param request: Request instance for LiveRealTimeClip.
2114
+ # @type request: :class:`Tencentcloud::vod::V20180717::LiveRealTimeClipRequest`
2115
+ # @rtype: :class:`Tencentcloud::vod::V20180717::LiveRealTimeClipResponse`
2116
+ def LiveRealTimeClip(request)
2117
+ body = send_request('LiveRealTimeClip', request.serialize)
2118
+ response = JSON.parse(body)
2119
+ if response['Response'].key?('Error') == false
2120
+ model = LiveRealTimeClipResponse.new
2121
+ model.deserialize(response['Response'])
2122
+ model
2123
+ else
2124
+ code = response['Response']['Error']['Code']
2125
+ message = response['Response']['Error']['Message']
2126
+ reqid = response['Response']['RequestId']
2127
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
2128
+ end
2129
+ rescue TencentCloud::Common::TencentCloudSDKException => e
2130
+ raise e
2131
+ rescue StandardError => e
2132
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
2133
+ end
2134
+
2135
+ # 对已发起的任务进行管理。
2136
+
2137
+ # @param request: Request instance for ManageTask.
2138
+ # @type request: :class:`Tencentcloud::vod::V20180717::ManageTaskRequest`
2139
+ # @rtype: :class:`Tencentcloud::vod::V20180717::ManageTaskResponse`
2140
+ def ManageTask(request)
2141
+ body = send_request('ManageTask', request.serialize)
2142
+ response = JSON.parse(body)
2143
+ if response['Response'].key?('Error') == false
2144
+ model = ManageTaskResponse.new
2145
+ model.deserialize(response['Response'])
2146
+ model
2147
+ else
2148
+ code = response['Response']['Error']['Code']
2149
+ message = response['Response']['Error']['Message']
2150
+ reqid = response['Response']['RequestId']
2151
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
2152
+ end
2153
+ rescue TencentCloud::Common::TencentCloudSDKException => e
2154
+ raise e
2155
+ rescue StandardError => e
2156
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
2157
+ end
2158
+
2159
+ # 修改用户自定义视频内容分析模板。
2160
+
2161
+ # 注意:模板 ID 10000 以下的为系统预置模板,不允许修改。
2162
+
2163
+ # @param request: Request instance for ModifyAIAnalysisTemplate.
2164
+ # @type request: :class:`Tencentcloud::vod::V20180717::ModifyAIAnalysisTemplateRequest`
2165
+ # @rtype: :class:`Tencentcloud::vod::V20180717::ModifyAIAnalysisTemplateResponse`
2166
+ def ModifyAIAnalysisTemplate(request)
2167
+ body = send_request('ModifyAIAnalysisTemplate', request.serialize)
2168
+ response = JSON.parse(body)
2169
+ if response['Response'].key?('Error') == false
2170
+ model = ModifyAIAnalysisTemplateResponse.new
2171
+ model.deserialize(response['Response'])
2172
+ model
2173
+ else
2174
+ code = response['Response']['Error']['Code']
2175
+ message = response['Response']['Error']['Message']
2176
+ reqid = response['Response']['RequestId']
2177
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
2178
+ end
2179
+ rescue TencentCloud::Common::TencentCloudSDKException => e
2180
+ raise e
2181
+ rescue StandardError => e
2182
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
2183
+ end
2184
+
2185
+ # 修改用户自定义视频内容识别模板。
2186
+
2187
+ # @param request: Request instance for ModifyAIRecognitionTemplate.
2188
+ # @type request: :class:`Tencentcloud::vod::V20180717::ModifyAIRecognitionTemplateRequest`
2189
+ # @rtype: :class:`Tencentcloud::vod::V20180717::ModifyAIRecognitionTemplateResponse`
2190
+ def ModifyAIRecognitionTemplate(request)
2191
+ body = send_request('ModifyAIRecognitionTemplate', request.serialize)
2192
+ response = JSON.parse(body)
2193
+ if response['Response'].key?('Error') == false
2194
+ model = ModifyAIRecognitionTemplateResponse.new
2195
+ model.deserialize(response['Response'])
2196
+ model
2197
+ else
2198
+ code = response['Response']['Error']['Code']
2199
+ message = response['Response']['Error']['Message']
2200
+ reqid = response['Response']['RequestId']
2201
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
2202
+ end
2203
+ rescue TencentCloud::Common::TencentCloudSDKException => e
2204
+ raise e
2205
+ rescue StandardError => e
2206
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
2207
+ end
2208
+
2209
+ # 修改转自适应码流模板
2210
+
2211
+ # @param request: Request instance for ModifyAdaptiveDynamicStreamingTemplate.
2212
+ # @type request: :class:`Tencentcloud::vod::V20180717::ModifyAdaptiveDynamicStreamingTemplateRequest`
2213
+ # @rtype: :class:`Tencentcloud::vod::V20180717::ModifyAdaptiveDynamicStreamingTemplateResponse`
2214
+ def ModifyAdaptiveDynamicStreamingTemplate(request)
2215
+ body = send_request('ModifyAdaptiveDynamicStreamingTemplate', request.serialize)
2216
+ response = JSON.parse(body)
2217
+ if response['Response'].key?('Error') == false
2218
+ model = ModifyAdaptiveDynamicStreamingTemplateResponse.new
2219
+ model.deserialize(response['Response'])
2220
+ model
2221
+ else
2222
+ code = response['Response']['Error']['Code']
2223
+ message = response['Response']['Error']['Message']
2224
+ reqid = response['Response']['RequestId']
2225
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
2226
+ end
2227
+ rescue TencentCloud::Common::TencentCloudSDKException => e
2228
+ raise e
2229
+ rescue StandardError => e
2230
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
2231
+ end
2232
+
2233
+ # 修改用户自定义转动图模板。
2234
+
2235
+ # @param request: Request instance for ModifyAnimatedGraphicsTemplate.
2236
+ # @type request: :class:`Tencentcloud::vod::V20180717::ModifyAnimatedGraphicsTemplateRequest`
2237
+ # @rtype: :class:`Tencentcloud::vod::V20180717::ModifyAnimatedGraphicsTemplateResponse`
2238
+ def ModifyAnimatedGraphicsTemplate(request)
2239
+ body = send_request('ModifyAnimatedGraphicsTemplate', request.serialize)
2240
+ response = JSON.parse(body)
2241
+ if response['Response'].key?('Error') == false
2242
+ model = ModifyAnimatedGraphicsTemplateResponse.new
2243
+ model.deserialize(response['Response'])
2244
+ model
2245
+ else
2246
+ code = response['Response']['Error']['Code']
2247
+ message = response['Response']['Error']['Message']
2248
+ reqid = response['Response']['RequestId']
2249
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
2250
+ end
2251
+ rescue TencentCloud::Common::TencentCloudSDKException => e
2252
+ raise e
2253
+ rescue StandardError => e
2254
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
2255
+ end
2256
+
2257
+ # 修改媒体分类属性。
2258
+
2259
+ # @param request: Request instance for ModifyClass.
2260
+ # @type request: :class:`Tencentcloud::vod::V20180717::ModifyClassRequest`
2261
+ # @rtype: :class:`Tencentcloud::vod::V20180717::ModifyClassResponse`
2262
+ def ModifyClass(request)
2263
+ body = send_request('ModifyClass', request.serialize)
2264
+ response = JSON.parse(body)
2265
+ if response['Response'].key?('Error') == false
2266
+ model = ModifyClassResponse.new
2267
+ model.deserialize(response['Response'])
2268
+ model
2269
+ else
2270
+ code = response['Response']['Error']['Code']
2271
+ message = response['Response']['Error']['Message']
2272
+ reqid = response['Response']['RequestId']
2273
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
2274
+ end
2275
+ rescue TencentCloud::Common::TencentCloudSDKException => e
2276
+ raise e
2277
+ rescue StandardError => e
2278
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
2279
+ end
2280
+
2281
+ # 修改用户自定义视频内容智能识别模板。
2282
+
2283
+ # @param request: Request instance for ModifyContentReviewTemplate.
2284
+ # @type request: :class:`Tencentcloud::vod::V20180717::ModifyContentReviewTemplateRequest`
2285
+ # @rtype: :class:`Tencentcloud::vod::V20180717::ModifyContentReviewTemplateResponse`
2286
+ def ModifyContentReviewTemplate(request)
2287
+ body = send_request('ModifyContentReviewTemplate', request.serialize)
2288
+ response = JSON.parse(body)
2289
+ if response['Response'].key?('Error') == false
2290
+ model = ModifyContentReviewTemplateResponse.new
2291
+ model.deserialize(response['Response'])
2292
+ model
2293
+ else
2294
+ code = response['Response']['Error']['Code']
2295
+ message = response['Response']['Error']['Message']
2296
+ reqid = response['Response']['RequestId']
2297
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
2298
+ end
2299
+ rescue TencentCloud::Common::TencentCloudSDKException => e
2300
+ raise e
2301
+ rescue StandardError => e
2302
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
2303
+ end
2304
+
2305
+ # 腾讯云点播为客户提供了媒体上传、媒体管理、媒体处理等等服务,在这些服务执行过程或执行结束时,腾讯云点播也提供各种对应的事件通知,方便开发者感知服务处理状态,并做下一步的业务操作。
2306
+
2307
+ # 开发者可以通过调用本接口来实现:
2308
+ # - 设置接收回调通知的类型,目前有[ HTTP 回调通知](https://cloud.tencent.com/document/product/266/33779) 和 [基于消息队列的可靠通知](https://cloud.tencent.com/document/product/266/33779) 两种类型。
2309
+ # - 对于[ HTTP 回调通知](https://cloud.tencent.com/document/product/266/33779),可设置 3.0 格式回调的地址。3.0 格式回调的说明参见 [历史格式回调](https://cloud.tencent.com/document/product/266/33796)。
2310
+ # - 对具体事件服务的通知事件选择设置接收或者忽略。
2311
+
2312
+ # @param request: Request instance for ModifyEventConfig.
2313
+ # @type request: :class:`Tencentcloud::vod::V20180717::ModifyEventConfigRequest`
2314
+ # @rtype: :class:`Tencentcloud::vod::V20180717::ModifyEventConfigResponse`
2315
+ def ModifyEventConfig(request)
2316
+ body = send_request('ModifyEventConfig', request.serialize)
2317
+ response = JSON.parse(body)
2318
+ if response['Response'].key?('Error') == false
2319
+ model = ModifyEventConfigResponse.new
2320
+ model.deserialize(response['Response'])
2321
+ model
2322
+ else
2323
+ code = response['Response']['Error']['Code']
2324
+ message = response['Response']['Error']['Message']
2325
+ reqid = response['Response']['RequestId']
2326
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
2327
+ end
2328
+ rescue TencentCloud::Common::TencentCloudSDKException => e
2329
+ raise e
2330
+ rescue StandardError => e
2331
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
2332
+ end
2333
+
2334
+ # 修改片头片尾模板。
2335
+
2336
+ # @param request: Request instance for ModifyHeadTailTemplate.
2337
+ # @type request: :class:`Tencentcloud::vod::V20180717::ModifyHeadTailTemplateRequest`
2338
+ # @rtype: :class:`Tencentcloud::vod::V20180717::ModifyHeadTailTemplateResponse`
2339
+ def ModifyHeadTailTemplate(request)
2340
+ body = send_request('ModifyHeadTailTemplate', request.serialize)
2341
+ response = JSON.parse(body)
2342
+ if response['Response'].key?('Error') == false
2343
+ model = ModifyHeadTailTemplateResponse.new
2344
+ model.deserialize(response['Response'])
2345
+ model
2346
+ else
2347
+ code = response['Response']['Error']['Code']
2348
+ message = response['Response']['Error']['Message']
2349
+ reqid = response['Response']['RequestId']
2350
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
2351
+ end
2352
+ rescue TencentCloud::Common::TencentCloudSDKException => e
2353
+ raise e
2354
+ rescue StandardError => e
2355
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
2356
+ end
2357
+
2358
+ # 修改用户自定义雪碧图模板。
2359
+
2360
+ # @param request: Request instance for ModifyImageSpriteTemplate.
2361
+ # @type request: :class:`Tencentcloud::vod::V20180717::ModifyImageSpriteTemplateRequest`
2362
+ # @rtype: :class:`Tencentcloud::vod::V20180717::ModifyImageSpriteTemplateResponse`
2363
+ def ModifyImageSpriteTemplate(request)
2364
+ body = send_request('ModifyImageSpriteTemplate', request.serialize)
2365
+ response = JSON.parse(body)
2366
+ if response['Response'].key?('Error') == false
2367
+ model = ModifyImageSpriteTemplateResponse.new
2368
+ model.deserialize(response['Response'])
2369
+ model
2370
+ else
2371
+ code = response['Response']['Error']['Code']
2372
+ message = response['Response']['Error']['Message']
2373
+ reqid = response['Response']['RequestId']
2374
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
2375
+ end
2376
+ rescue TencentCloud::Common::TencentCloudSDKException => e
2377
+ raise e
2378
+ rescue StandardError => e
2379
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
2380
+ end
2381
+
2382
+ # 修改媒体文件的属性,包括分类、名称、描述、标签、过期时间、打点信息、视频封面、字幕信息等。
2383
+
2384
+ # @param request: Request instance for ModifyMediaInfo.
2385
+ # @type request: :class:`Tencentcloud::vod::V20180717::ModifyMediaInfoRequest`
2386
+ # @rtype: :class:`Tencentcloud::vod::V20180717::ModifyMediaInfoResponse`
2387
+ def ModifyMediaInfo(request)
2388
+ body = send_request('ModifyMediaInfo', request.serialize)
2389
+ response = JSON.parse(body)
2390
+ if response['Response'].key?('Error') == false
2391
+ model = ModifyMediaInfoResponse.new
2392
+ model.deserialize(response['Response'])
2393
+ model
2394
+ else
2395
+ code = response['Response']['Error']['Code']
2396
+ message = response['Response']['Error']['Message']
2397
+ reqid = response['Response']['RequestId']
2398
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
2399
+ end
2400
+ rescue TencentCloud::Common::TencentCloudSDKException => e
2401
+ raise e
2402
+ rescue StandardError => e
2403
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
2404
+ end
2405
+
2406
+ # 该接口用于根据素材 ID,修改素材样本信息,包括名称、描述的修改,以及五官、标签的添加、删除、重置操作。五官删除操作需保证至少剩余 1 张图片,否则,请使用重置操作。
2407
+
2408
+ # @param request: Request instance for ModifyPersonSample.
2409
+ # @type request: :class:`Tencentcloud::vod::V20180717::ModifyPersonSampleRequest`
2410
+ # @rtype: :class:`Tencentcloud::vod::V20180717::ModifyPersonSampleResponse`
2411
+ def ModifyPersonSample(request)
2412
+ body = send_request('ModifyPersonSample', request.serialize)
2413
+ response = JSON.parse(body)
2414
+ if response['Response'].key?('Error') == false
2415
+ model = ModifyPersonSampleResponse.new
2416
+ model.deserialize(response['Response'])
2417
+ model
2418
+ else
2419
+ code = response['Response']['Error']['Code']
2420
+ message = response['Response']['Error']['Message']
2421
+ reqid = response['Response']['RequestId']
2422
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
2423
+ end
2424
+ rescue TencentCloud::Common::TencentCloudSDKException => e
2425
+ raise e
2426
+ rescue StandardError => e
2427
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
2428
+ end
2429
+
2430
+ # 修改用户自定义采样截图模板。
2431
+
2432
+ # @param request: Request instance for ModifySampleSnapshotTemplate.
2433
+ # @type request: :class:`Tencentcloud::vod::V20180717::ModifySampleSnapshotTemplateRequest`
2434
+ # @rtype: :class:`Tencentcloud::vod::V20180717::ModifySampleSnapshotTemplateResponse`
2435
+ def ModifySampleSnapshotTemplate(request)
2436
+ body = send_request('ModifySampleSnapshotTemplate', request.serialize)
2437
+ response = JSON.parse(body)
2438
+ if response['Response'].key?('Error') == false
2439
+ model = ModifySampleSnapshotTemplateResponse.new
2440
+ model.deserialize(response['Response'])
2441
+ model
2442
+ else
2443
+ code = response['Response']['Error']['Code']
2444
+ message = response['Response']['Error']['Message']
2445
+ reqid = response['Response']['RequestId']
2446
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
2447
+ end
2448
+ rescue TencentCloud::Common::TencentCloudSDKException => e
2449
+ raise e
2450
+ rescue StandardError => e
2451
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
2452
+ end
2453
+
2454
+ # 修改用户自定义指定时间点截图模板。
2455
+
2456
+ # @param request: Request instance for ModifySnapshotByTimeOffsetTemplate.
2457
+ # @type request: :class:`Tencentcloud::vod::V20180717::ModifySnapshotByTimeOffsetTemplateRequest`
2458
+ # @rtype: :class:`Tencentcloud::vod::V20180717::ModifySnapshotByTimeOffsetTemplateResponse`
2459
+ def ModifySnapshotByTimeOffsetTemplate(request)
2460
+ body = send_request('ModifySnapshotByTimeOffsetTemplate', request.serialize)
2461
+ response = JSON.parse(body)
2462
+ if response['Response'].key?('Error') == false
2463
+ model = ModifySnapshotByTimeOffsetTemplateResponse.new
2464
+ model.deserialize(response['Response'])
2465
+ model
2466
+ else
2467
+ code = response['Response']['Error']['Code']
2468
+ message = response['Response']['Error']['Message']
2469
+ reqid = response['Response']['RequestId']
2470
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
2471
+ end
2472
+ rescue TencentCloud::Common::TencentCloudSDKException => e
2473
+ raise e
2474
+ rescue StandardError => e
2475
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
2476
+ end
2477
+
2478
+ # 该接口用于修改子应用信息,但不允许修改主应用信息。
2479
+
2480
+ # @param request: Request instance for ModifySubAppIdInfo.
2481
+ # @type request: :class:`Tencentcloud::vod::V20180717::ModifySubAppIdInfoRequest`
2482
+ # @rtype: :class:`Tencentcloud::vod::V20180717::ModifySubAppIdInfoResponse`
2483
+ def ModifySubAppIdInfo(request)
2484
+ body = send_request('ModifySubAppIdInfo', request.serialize)
2485
+ response = JSON.parse(body)
2486
+ if response['Response'].key?('Error') == false
2487
+ model = ModifySubAppIdInfoResponse.new
2488
+ model.deserialize(response['Response'])
2489
+ model
2490
+ else
2491
+ code = response['Response']['Error']['Code']
2492
+ message = response['Response']['Error']['Message']
2493
+ reqid = response['Response']['RequestId']
2494
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
2495
+ end
2496
+ rescue TencentCloud::Common::TencentCloudSDKException => e
2497
+ raise e
2498
+ rescue StandardError => e
2499
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
2500
+ end
2501
+
2502
+ # 该接口用于启用、停用子应用。被停用的子应用将封停对应域名,并限制控制台访问。
2503
+
2504
+ # @param request: Request instance for ModifySubAppIdStatus.
2505
+ # @type request: :class:`Tencentcloud::vod::V20180717::ModifySubAppIdStatusRequest`
2506
+ # @rtype: :class:`Tencentcloud::vod::V20180717::ModifySubAppIdStatusResponse`
2507
+ def ModifySubAppIdStatus(request)
2508
+ body = send_request('ModifySubAppIdStatus', request.serialize)
2509
+ response = JSON.parse(body)
2510
+ if response['Response'].key?('Error') == false
2511
+ model = ModifySubAppIdStatusResponse.new
2512
+ model.deserialize(response['Response'])
2513
+ model
2514
+ else
2515
+ code = response['Response']['Error']['Code']
2516
+ message = response['Response']['Error']['Message']
2517
+ reqid = response['Response']['RequestId']
2518
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
2519
+ end
2520
+ rescue TencentCloud::Common::TencentCloudSDKException => e
2521
+ raise e
2522
+ rescue StandardError => e
2523
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
2524
+ end
2525
+
2526
+ # 修改超级播放器配置。
2527
+
2528
+ # @param request: Request instance for ModifySuperPlayerConfig.
2529
+ # @type request: :class:`Tencentcloud::vod::V20180717::ModifySuperPlayerConfigRequest`
2530
+ # @rtype: :class:`Tencentcloud::vod::V20180717::ModifySuperPlayerConfigResponse`
2531
+ def ModifySuperPlayerConfig(request)
2532
+ body = send_request('ModifySuperPlayerConfig', request.serialize)
2533
+ response = JSON.parse(body)
2534
+ if response['Response'].key?('Error') == false
2535
+ model = ModifySuperPlayerConfigResponse.new
2536
+ model.deserialize(response['Response'])
2537
+ model
2538
+ else
2539
+ code = response['Response']['Error']['Code']
2540
+ message = response['Response']['Error']['Message']
2541
+ reqid = response['Response']['RequestId']
2542
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
2543
+ end
2544
+ rescue TencentCloud::Common::TencentCloudSDKException => e
2545
+ raise e
2546
+ rescue StandardError => e
2547
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
2548
+ end
2549
+
2550
+ # 修改用户自定义转码模板信息。
2551
+
2552
+ # @param request: Request instance for ModifyTranscodeTemplate.
2553
+ # @type request: :class:`Tencentcloud::vod::V20180717::ModifyTranscodeTemplateRequest`
2554
+ # @rtype: :class:`Tencentcloud::vod::V20180717::ModifyTranscodeTemplateResponse`
2555
+ def ModifyTranscodeTemplate(request)
2556
+ body = send_request('ModifyTranscodeTemplate', request.serialize)
2557
+ response = JSON.parse(body)
2558
+ if response['Response'].key?('Error') == false
2559
+ model = ModifyTranscodeTemplateResponse.new
2560
+ model.deserialize(response['Response'])
2561
+ model
2562
+ else
2563
+ code = response['Response']['Error']['Code']
2564
+ message = response['Response']['Error']['Message']
2565
+ reqid = response['Response']['RequestId']
2566
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
2567
+ end
2568
+ rescue TencentCloud::Common::TencentCloudSDKException => e
2569
+ raise e
2570
+ rescue StandardError => e
2571
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
2572
+ end
2573
+
2574
+ # 该接口用于修改点播域名的加速区域。
2575
+ # 1、域名部署状态为 Online 状态时才允许修改加速区域。
2576
+
2577
+ # @param request: Request instance for ModifyVodDomainAccelerateConfig.
2578
+ # @type request: :class:`Tencentcloud::vod::V20180717::ModifyVodDomainAccelerateConfigRequest`
2579
+ # @rtype: :class:`Tencentcloud::vod::V20180717::ModifyVodDomainAccelerateConfigResponse`
2580
+ def ModifyVodDomainAccelerateConfig(request)
2581
+ body = send_request('ModifyVodDomainAccelerateConfig', request.serialize)
2582
+ response = JSON.parse(body)
2583
+ if response['Response'].key?('Error') == false
2584
+ model = ModifyVodDomainAccelerateConfigResponse.new
2585
+ model.deserialize(response['Response'])
2586
+ model
2587
+ else
2588
+ code = response['Response']['Error']['Code']
2589
+ message = response['Response']['Error']['Message']
2590
+ reqid = response['Response']['RequestId']
2591
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
2592
+ end
2593
+ rescue TencentCloud::Common::TencentCloudSDKException => e
2594
+ raise e
2595
+ rescue StandardError => e
2596
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
2597
+ end
2598
+
2599
+ # 该接口用于修改域名配置,可以修改域名的防盗链配置。
2600
+ # 1、域名部署状态为 Online 状态时才允许修改域名的配置。
2601
+
2602
+ # @param request: Request instance for ModifyVodDomainConfig.
2603
+ # @type request: :class:`Tencentcloud::vod::V20180717::ModifyVodDomainConfigRequest`
2604
+ # @rtype: :class:`Tencentcloud::vod::V20180717::ModifyVodDomainConfigResponse`
2605
+ def ModifyVodDomainConfig(request)
2606
+ body = send_request('ModifyVodDomainConfig', request.serialize)
2607
+ response = JSON.parse(body)
2608
+ if response['Response'].key?('Error') == false
2609
+ model = ModifyVodDomainConfigResponse.new
2610
+ model.deserialize(response['Response'])
2611
+ model
2612
+ else
2613
+ code = response['Response']['Error']['Code']
2614
+ message = response['Response']['Error']['Message']
2615
+ reqid = response['Response']['RequestId']
2616
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
2617
+ end
2618
+ rescue TencentCloud::Common::TencentCloudSDKException => e
2619
+ raise e
2620
+ rescue StandardError => e
2621
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
2622
+ end
2623
+
2624
+ # 修改用户自定义水印模板,水印类型不允许修改。
2625
+
2626
+ # @param request: Request instance for ModifyWatermarkTemplate.
2627
+ # @type request: :class:`Tencentcloud::vod::V20180717::ModifyWatermarkTemplateRequest`
2628
+ # @rtype: :class:`Tencentcloud::vod::V20180717::ModifyWatermarkTemplateResponse`
2629
+ def ModifyWatermarkTemplate(request)
2630
+ body = send_request('ModifyWatermarkTemplate', request.serialize)
2631
+ response = JSON.parse(body)
2632
+ if response['Response'].key?('Error') == false
2633
+ model = ModifyWatermarkTemplateResponse.new
2634
+ model.deserialize(response['Response'])
2635
+ model
2636
+ else
2637
+ code = response['Response']['Error']['Code']
2638
+ message = response['Response']['Error']['Message']
2639
+ reqid = response['Response']['RequestId']
2640
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
2641
+ end
2642
+ rescue TencentCloud::Common::TencentCloudSDKException => e
2643
+ raise e
2644
+ rescue StandardError => e
2645
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
2646
+ end
2647
+
2648
+ # 该接口用于修改关键词的应用场景、标签,关键词本身不可修改,如需修改,可删除重建。
2649
+
2650
+ # @param request: Request instance for ModifyWordSample.
2651
+ # @type request: :class:`Tencentcloud::vod::V20180717::ModifyWordSampleRequest`
2652
+ # @rtype: :class:`Tencentcloud::vod::V20180717::ModifyWordSampleResponse`
2653
+ def ModifyWordSample(request)
2654
+ body = send_request('ModifyWordSample', request.serialize)
2655
+ response = JSON.parse(body)
2656
+ if response['Response'].key?('Error') == false
2657
+ model = ModifyWordSampleResponse.new
2658
+ model.deserialize(response['Response'])
2659
+ model
2660
+ else
2661
+ code = response['Response']['Error']['Code']
2662
+ message = response['Response']['Error']['Message']
2663
+ reqid = response['Response']['RequestId']
2664
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
2665
+ end
2666
+ rescue TencentCloud::Common::TencentCloudSDKException => e
2667
+ raise e
2668
+ rescue StandardError => e
2669
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
2670
+ end
2671
+
2672
+ # 上传 HLS 视频时,解析索引文件内容,返回待上传的分片文件列表。分片文件路径必须是当前目录或子目录的相对路径,不能是 URL,不能是绝对路径。
2673
+
2674
+ # @param request: Request instance for ParseStreamingManifest.
2675
+ # @type request: :class:`Tencentcloud::vod::V20180717::ParseStreamingManifestRequest`
2676
+ # @rtype: :class:`Tencentcloud::vod::V20180717::ParseStreamingManifestResponse`
2677
+ def ParseStreamingManifest(request)
2678
+ body = send_request('ParseStreamingManifest', request.serialize)
2679
+ response = JSON.parse(body)
2680
+ if response['Response'].key?('Error') == false
2681
+ model = ParseStreamingManifestResponse.new
2682
+ model.deserialize(response['Response'])
2683
+ model
2684
+ else
2685
+ code = response['Response']['Error']['Code']
2686
+ message = response['Response']['Error']['Message']
2687
+ reqid = response['Response']['RequestId']
2688
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
2689
+ end
2690
+ rescue TencentCloud::Common::TencentCloudSDKException => e
2691
+ raise e
2692
+ rescue StandardError => e
2693
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
2694
+ end
2695
+
2696
+ # 对点播中的音视频媒体发起处理任务,功能包括:
2697
+ # 1. 视频转码(带水印);
2698
+ # 2. 视频转动图;
2699
+ # 3. 对视频按指定时间点截图;
2700
+ # 4. 对视频采样截图;
2701
+ # 5. 对视频截图雪碧图;
2702
+ # 6. 对视频截取一张图做封面;
2703
+ # 7. 对视频转自适应码流(并加密);
2704
+ # 8. 智能内容审核(鉴黄、鉴恐、鉴政);
2705
+ # 9. 智能内容分析(标签、分类、封面、按帧标签);
2706
+ # 10. 智能内容识别(视频片头片尾、人脸、文本全文、文本关键词、语音全文、语音关键词、物体)。
2707
+
2708
+ # 如使用事件通知,事件通知的类型为 [任务流状态变更](https://cloud.tencent.com/document/product/266/9636)。
2709
+
2710
+ # @param request: Request instance for ProcessMedia.
2711
+ # @type request: :class:`Tencentcloud::vod::V20180717::ProcessMediaRequest`
2712
+ # @rtype: :class:`Tencentcloud::vod::V20180717::ProcessMediaResponse`
2713
+ def ProcessMedia(request)
2714
+ body = send_request('ProcessMedia', request.serialize)
2715
+ response = JSON.parse(body)
2716
+ if response['Response'].key?('Error') == false
2717
+ model = ProcessMediaResponse.new
2718
+ model.deserialize(response['Response'])
2719
+ model
2720
+ else
2721
+ code = response['Response']['Error']['Code']
2722
+ message = response['Response']['Error']['Message']
2723
+ reqid = response['Response']['RequestId']
2724
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
2725
+ end
2726
+ rescue TencentCloud::Common::TencentCloudSDKException => e
2727
+ raise e
2728
+ rescue StandardError => e
2729
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
2730
+ end
2731
+
2732
+ # 使用任务流模板,对点播中的视频发起处理任务。
2733
+ # 有两种方式创建任务流模板:
2734
+ # 1. 在控制台上创建和修改任务流模板;
2735
+ # 2. 通过任务流模板接口创建任务流模板。
2736
+
2737
+ # 如使用事件通知,事件通知的类型为 [任务流状态变更](https://cloud.tencent.com/document/product/266/9636)。
2738
+
2739
+ # @param request: Request instance for ProcessMediaByProcedure.
2740
+ # @type request: :class:`Tencentcloud::vod::V20180717::ProcessMediaByProcedureRequest`
2741
+ # @rtype: :class:`Tencentcloud::vod::V20180717::ProcessMediaByProcedureResponse`
2742
+ def ProcessMediaByProcedure(request)
2743
+ body = send_request('ProcessMediaByProcedure', request.serialize)
2744
+ response = JSON.parse(body)
2745
+ if response['Response'].key?('Error') == false
2746
+ model = ProcessMediaByProcedureResponse.new
2747
+ model.deserialize(response['Response'])
2748
+ model
2749
+ else
2750
+ code = response['Response']['Error']['Code']
2751
+ message = response['Response']['Error']['Message']
2752
+ reqid = response['Response']['RequestId']
2753
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
2754
+ end
2755
+ rescue TencentCloud::Common::TencentCloudSDKException => e
2756
+ raise e
2757
+ rescue StandardError => e
2758
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
2759
+ end
2760
+
2761
+ # 该 API 已经<font color='red'>不再维护</font>,请使用 MPS 产品的 [ProcessMedia](https://cloud.tencent.com/document/product/862/37578) 接口,在入参 InputInfo.UrlInputInfo.Url 中指定视频 URL。
2762
+
2763
+ # @param request: Request instance for ProcessMediaByUrl.
2764
+ # @type request: :class:`Tencentcloud::vod::V20180717::ProcessMediaByUrlRequest`
2765
+ # @rtype: :class:`Tencentcloud::vod::V20180717::ProcessMediaByUrlResponse`
2766
+ def ProcessMediaByUrl(request)
2767
+ body = send_request('ProcessMediaByUrl', request.serialize)
2768
+ response = JSON.parse(body)
2769
+ if response['Response'].key?('Error') == false
2770
+ model = ProcessMediaByUrlResponse.new
2771
+ model.deserialize(response['Response'])
2772
+ model
2773
+ else
2774
+ code = response['Response']['Error']['Code']
2775
+ message = response['Response']['Error']['Message']
2776
+ reqid = response['Response']['RequestId']
2777
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
2778
+ end
2779
+ rescue TencentCloud::Common::TencentCloudSDKException => e
2780
+ raise e
2781
+ rescue StandardError => e
2782
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
2783
+ end
2784
+
2785
+ # * 该接口用于业务服务器以 [可靠回调](https://cloud.tencent.com/document/product/266/33779#.E5.8F.AF.E9.9D.A0.E5.9B.9E.E8.B0.83) 的方式获取事件通知;
2786
+ # * 接口为长轮询模式,即:如果服务端存在未消费事件,则立即返回给请求方;如果服务端没有未消费事件,则后台会将请求挂起,直到有新的事件产生为止;
2787
+ # * 请求最多挂起5秒,建议请求方将超时时间设置为10秒;
2788
+ # * 未被拉取的事件通知最多保留4天,超过该时限的事件通知可能会被清除;
2789
+ # * 若该接口有事件返回,调用方必须在<font color="red">30秒</font>内调用 [确认事件通知](https://cloud.tencent.com/document/product/266/33434) 接口,确认事件通知已经处理,否则该事件通知在<font color="red">30秒</font>后会再次被拉取到。
2790
+ # * 当前,API 每次最多可以获取16个事件通知。
2791
+
2792
+ # @param request: Request instance for PullEvents.
2793
+ # @type request: :class:`Tencentcloud::vod::V20180717::PullEventsRequest`
2794
+ # @rtype: :class:`Tencentcloud::vod::V20180717::PullEventsResponse`
2795
+ def PullEvents(request)
2796
+ body = send_request('PullEvents', request.serialize)
2797
+ response = JSON.parse(body)
2798
+ if response['Response'].key?('Error') == false
2799
+ model = PullEventsResponse.new
2800
+ model.deserialize(response['Response'])
2801
+ model
2802
+ else
2803
+ code = response['Response']['Error']['Code']
2804
+ message = response['Response']['Error']['Message']
2805
+ reqid = response['Response']['RequestId']
2806
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
2807
+ end
2808
+ rescue TencentCloud::Common::TencentCloudSDKException => e
2809
+ raise e
2810
+ rescue StandardError => e
2811
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
2812
+ end
2813
+
2814
+ # 该接口用于将一个网络上的视频拉取到云点播平台。
2815
+
2816
+ # @param request: Request instance for PullUpload.
2817
+ # @type request: :class:`Tencentcloud::vod::V20180717::PullUploadRequest`
2818
+ # @rtype: :class:`Tencentcloud::vod::V20180717::PullUploadResponse`
2819
+ def PullUpload(request)
2820
+ body = send_request('PullUpload', request.serialize)
2821
+ response = JSON.parse(body)
2822
+ if response['Response'].key?('Error') == false
2823
+ model = PullUploadResponse.new
2824
+ model.deserialize(response['Response'])
2825
+ model
2826
+ else
2827
+ code = response['Response']['Error']['Code']
2828
+ message = response['Response']['Error']['Message']
2829
+ reqid = response['Response']['RequestId']
2830
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
2831
+ end
2832
+ rescue TencentCloud::Common::TencentCloudSDKException => e
2833
+ raise e
2834
+ rescue StandardError => e
2835
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
2836
+ end
2837
+
2838
+ # 1. 预热指定的 URL 列表。
2839
+ # 2. URL 的域名必须已在云点播中注册。
2840
+ # 3. 单次请求最多指定20个 URL。
2841
+
2842
+ # @param request: Request instance for PushUrlCache.
2843
+ # @type request: :class:`Tencentcloud::vod::V20180717::PushUrlCacheRequest`
2844
+ # @rtype: :class:`Tencentcloud::vod::V20180717::PushUrlCacheResponse`
2845
+ def PushUrlCache(request)
2846
+ body = send_request('PushUrlCache', request.serialize)
2847
+ response = JSON.parse(body)
2848
+ if response['Response'].key?('Error') == false
2849
+ model = PushUrlCacheResponse.new
2850
+ model.deserialize(response['Response'])
2851
+ model
2852
+ else
2853
+ code = response['Response']['Error']['Code']
2854
+ message = response['Response']['Error']['Message']
2855
+ reqid = response['Response']['RequestId']
2856
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
2857
+ end
2858
+ rescue TencentCloud::Common::TencentCloudSDKException => e
2859
+ raise e
2860
+ rescue StandardError => e
2861
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
2862
+ end
2863
+
2864
+ # 重新设置用户自定义任务流模板的内容。
2865
+
2866
+ # @param request: Request instance for ResetProcedureTemplate.
2867
+ # @type request: :class:`Tencentcloud::vod::V20180717::ResetProcedureTemplateRequest`
2868
+ # @rtype: :class:`Tencentcloud::vod::V20180717::ResetProcedureTemplateResponse`
2869
+ def ResetProcedureTemplate(request)
2870
+ body = send_request('ResetProcedureTemplate', request.serialize)
2871
+ response = JSON.parse(body)
2872
+ if response['Response'].key?('Error') == false
2873
+ model = ResetProcedureTemplateResponse.new
2874
+ model.deserialize(response['Response'])
2875
+ model
2876
+ else
2877
+ code = response['Response']['Error']['Code']
2878
+ message = response['Response']['Error']['Message']
2879
+ reqid = response['Response']['RequestId']
2880
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
2881
+ end
2882
+ rescue TencentCloud::Common::TencentCloudSDKException => e
2883
+ raise e
2884
+ rescue StandardError => e
2885
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
2886
+ end
2887
+
2888
+ # 搜索媒体信息,支持多种条件筛选,以及支持对返回结果排序、过滤等功能,具体包括:
2889
+ # - 指定文件 ID 集合 FileIds ,返回匹配集合中任意 ID 的媒体。
2890
+ # - 根据多个媒体文件名 Names 或描述信息 Descriptions 进行模糊搜索。
2891
+ # - 根据多个文件名前缀 NamePrefixes 进行搜索。
2892
+ # - 指定分类集合 ClassIds(见输入参数),返回满足集合中任意分类的媒体。例如:媒体分类有电影、电视剧、综艺等,其中电影分类下又有子分类历史片、动作片、言情片。如果 ClassIds 指定了电影、电视剧,那么电影和电视剧下的所有子分类都会返回;而如果 ClassIds 指定的是历史片、动作片,那么只有这2个子分类下的媒体才会返回。
2893
+ # - 指定标签集合 Tags(见输入参数),返回满足集合中任意标签的媒体。例如:媒体标签有二次元、宫斗、鬼畜,如果 Tags 指定了二次元、鬼畜2个标签,那么只要符合这2个标签中任意一个的媒体都会被检索出来。
2894
+ # - 指定文件类型集合 Categories(见输入参数),返回满足集合中任意类型的媒体。例如:文件类型有 Video(视频)、 Audio (音频)、 Image (图片)。如果Categories指定了 Video 和 Audio 2个文件类型,那么符合这些类型的媒体都会被检索出来。
2895
+ # - 指定来源集合 SourceTypes(见输入参数),返回满足集合中任意来源的媒体。例如:媒体来源有 Record (直播录制)、Upload (上传)等。如果 SourceTypes 指定了 Record 和 Upload ,那么符合这些来源的媒体都会被检索出来。
2896
+ # - 指定直播推流码集合 StreamIds(见输入参数)筛选直播录制的媒体。
2897
+ # - 指定视频 ID 集合 Vids (见输入参数)筛选直播录制的媒体。
2898
+ # - 指定媒体的创建时间范围筛选媒体。
2899
+ # - (不推荐:应使用 Names、NamePrefixes 或 Descriptions 替代)指定单个文本 Text 对媒体文件名或描述信息进行模糊搜索。
2900
+ # - (不推荐:应使用 SourceTypes 替代)指定单个媒体文件来源 SourceType 进行搜索。
2901
+ # - (不推荐:应使用 StreamIds 替代)指定单个推流直播码 StreamId 进行搜索。
2902
+ # - (不推荐:应使用 Vids 替代)指定单个视频 ID Vid 进行搜索。
2903
+ # - (不推荐:应使用 CreateTime 替代)指定单个起始创建时间 StartTime 进行搜索。
2904
+ # - (不推荐:应使用 CreateTime 替代)指定单个结尾创建时间 EndTime 进行搜索。
2905
+ # - 以上参数之间可以任意组合进行检索。例如:筛选创建时间在2018年12月1日12:00:00到2018年12月8日12:00:00之间、分类为电影或电视剧、带有宫斗和悬疑标签的媒体。注意,任何支持数组输入的参数,其元素之间的搜索逻辑为‘或’。所有参数之间的逻辑关系为‘与’。
2906
+
2907
+ # - 允许对结果根据创建时间进行排序并分页返回,通过 Offset 和 Limit (见输入参数)来控制分页。
2908
+ # - 允许通过 Filters 控制返回的媒体信息种类(默认返回所有信息)。可选输入包括:
2909
+ # 1. 基础信息(basicInfo):包括媒体名称、分类、播放地址、封面图片等。
2910
+ # 2. 元信息(metaData):包括大小、时长、视频流信息、音频流信息等。
2911
+ # 3. 转码结果信息(transcodeInfo):包括该媒体转码生成的各种规格的媒体地址、视频流参数、音频流参数等。
2912
+ # 4. 转动图结果信息(animatedGraphicsInfo):对视频转动图(如 gif)后的动图信息。
2913
+ # 5. 采样截图信息(sampleSnapshotInfo):对视频采样截图后的截图信息。
2914
+ # 6. 雪碧图信息(imageSpriteInfo):对视频截取雪碧图后的雪碧图信息。
2915
+ # 7. 指定时间点截图信息(snapshotByTimeOffsetInfo):对视频依照指定时间点截图后,的截图信息。
2916
+ # 8. 视频打点信息(keyFrameDescInfo):对视频设置的打点信息。
2917
+ # 9. 转自适应码流信息(adaptiveDynamicStreamingInfo):包括规格、加密类型、打包格式等相关信息。
2918
+
2919
+ # <div id="maxResultsDesc">接口返回结果数限制:</div>
2920
+ # - <b><a href="#p_offset">Offset</a> 和 <a href="#p_limit">Limit</a> 两个参数影响单次分页查询结果数。特别注意:当这2个值都缺省时,本接口最多只返回10条查询结果。</b>
2921
+ # - <b>最大支持返回5000条搜索结果,超出部分不再支持查询。如果搜索结果量太大,建议使用更精细的筛选条件来减少搜索结果。</b>
2922
+
2923
+ # @param request: Request instance for SearchMedia.
2924
+ # @type request: :class:`Tencentcloud::vod::V20180717::SearchMediaRequest`
2925
+ # @rtype: :class:`Tencentcloud::vod::V20180717::SearchMediaResponse`
2926
+ def SearchMedia(request)
2927
+ body = send_request('SearchMedia', request.serialize)
2928
+ response = JSON.parse(body)
2929
+ if response['Response'].key?('Error') == false
2930
+ model = SearchMediaResponse.new
2931
+ model.deserialize(response['Response'])
2932
+ model
2933
+ else
2934
+ code = response['Response']['Error']['Code']
2935
+ message = response['Response']['Error']['Message']
2936
+ reqid = response['Response']['RequestId']
2937
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
2938
+ end
2939
+ rescue TencentCloud::Common::TencentCloudSDKException => e
2940
+ raise e
2941
+ rescue StandardError => e
2942
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
2943
+ end
2944
+
2945
+ # 对 HLS 视频进行按时间段裁剪,实时生成一个新的视频(HLS 格式),开发者可以将其立即分享出去,或者长久保存起来。
2946
+
2947
+ # 腾讯云点播支持两种剪辑模式:
2948
+ # - 剪辑固化:将剪辑出来的视频保存成独立的视频,拥有独立 FileId;适用于将精彩片段长久保存的场景;
2949
+ # - 剪辑不固化:剪辑得到的视频附属于输入文件,没有独立 FileId;适用于将精彩片段临时分享的场景。
2950
+
2951
+ # 注意:
2952
+ # - 剪辑是基于输入 m3u8 文件进行的,故而其最小剪辑精度为一个 ts 切片,无法实现秒级或者更为精确的剪辑精度。
2953
+
2954
+
2955
+ # ###剪辑固化
2956
+ # 所谓剪辑固化,是指将剪辑出来的视频保存成一个独立的视频(拥有独立的 FileId)。其生命周期不受原始输入视频影响(即使原始输入视频被删除,剪辑结果也不会受到任何影响);也可以对其进行转码、微信发布等二次处理。
2957
+
2958
+ # 举例如下:一场完整的足球比赛,原始视频可能长达 2 个小时,客户出于节省成本的目的可以对这个视频存储 2 个月,但对于剪辑的「精彩时刻」视频却可以指定存储更长时间,同时可以单独对「精彩时刻」视频进行转码、微信发布等额外的点播操作,这时候可以选择剪辑并且固化的方案。
2959
+
2960
+ # 剪辑固化的优势在于其生命周期与原始输入视频相互独立,可以独立管理、长久保存。
2961
+
2962
+ # ###剪辑不固化
2963
+ # 所谓剪辑不固化,是指剪辑所得到的结果(m3u8 文件)与原始输入视频共享相同的 ts 分片,新生成的视频不是一个独立完整的视频(没有独立 FileId,只有播放 URL),其有效期与原始输入的完整视频有效期是一致的。一旦原始输入的视频被删除,也会导致该片段无法播放。
2964
+
2965
+ # 剪辑不固化,由于其剪辑结果不是一个独立的视频,因而也不会纳入点播媒资视频管理(例如控制台的视频总数不会统计这一片段)中,也无法单独针对这个片段做转码、微信发布等任何视频处理操作。
2966
+
2967
+ # 剪辑不固化的优势在于其剪辑操作十分“轻量化”,不会产生额外的存储开销。但其不足之处在于生命周期与原始录制视频相同,且无法进一步进行转码等视频处理。
2968
+
2969
+ # @param request: Request instance for SimpleHlsClip.
2970
+ # @type request: :class:`Tencentcloud::vod::V20180717::SimpleHlsClipRequest`
2971
+ # @rtype: :class:`Tencentcloud::vod::V20180717::SimpleHlsClipResponse`
2972
+ def SimpleHlsClip(request)
2973
+ body = send_request('SimpleHlsClip', request.serialize)
2974
+ response = JSON.parse(body)
2975
+ if response['Response'].key?('Error') == false
2976
+ model = SimpleHlsClipResponse.new
2977
+ model.deserialize(response['Response'])
2978
+ model
2979
+ else
2980
+ code = response['Response']['Error']['Code']
2981
+ message = response['Response']['Error']['Message']
2982
+ reqid = response['Response']['RequestId']
2983
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
2984
+ end
2985
+ rescue TencentCloud::Common::TencentCloudSDKException => e
2986
+ raise e
2987
+ rescue StandardError => e
2988
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
2989
+ end
2990
+
2991
+ # 对点播视频进行拆条,生成多个新的点播视频。
2992
+
2993
+ # @param request: Request instance for SplitMedia.
2994
+ # @type request: :class:`Tencentcloud::vod::V20180717::SplitMediaRequest`
2995
+ # @rtype: :class:`Tencentcloud::vod::V20180717::SplitMediaResponse`
2996
+ def SplitMedia(request)
2997
+ body = send_request('SplitMedia', request.serialize)
2998
+ response = JSON.parse(body)
2999
+ if response['Response'].key?('Error') == false
3000
+ model = SplitMediaResponse.new
3001
+ model.deserialize(response['Response'])
3002
+ model
3003
+ else
3004
+ code = response['Response']['Error']['Code']
3005
+ message = response['Response']['Error']['Message']
3006
+ reqid = response['Response']['RequestId']
3007
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
3008
+ end
3009
+ rescue TencentCloud::Common::TencentCloudSDKException => e
3010
+ raise e
3011
+ rescue StandardError => e
3012
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
3013
+ end
3014
+
3015
+ # 将点播视频发布到微信小程序,供微信小程序播放器播放。
3016
+
3017
+ # @param request: Request instance for WeChatMiniProgramPublish.
3018
+ # @type request: :class:`Tencentcloud::vod::V20180717::WeChatMiniProgramPublishRequest`
3019
+ # @rtype: :class:`Tencentcloud::vod::V20180717::WeChatMiniProgramPublishResponse`
3020
+ def WeChatMiniProgramPublish(request)
3021
+ body = send_request('WeChatMiniProgramPublish', request.serialize)
3022
+ response = JSON.parse(body)
3023
+ if response['Response'].key?('Error') == false
3024
+ model = WeChatMiniProgramPublishResponse.new
3025
+ model.deserialize(response['Response'])
3026
+ model
3027
+ else
3028
+ code = response['Response']['Error']['Code']
3029
+ message = response['Response']['Error']['Message']
3030
+ reqid = response['Response']['RequestId']
3031
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
3032
+ end
3033
+ rescue TencentCloud::Common::TencentCloudSDKException => e
3034
+ raise e
3035
+ rescue StandardError => e
3036
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
3037
+ end
3038
+
3039
+
3040
+ end
3041
+ end
3042
+ end
3043
+ end