tencentcloud-sdk-vm 1.0.200

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: be433d3ebff9c0443091f0ffedf62557252a4d1e
4
+ data.tar.gz: d4b2b77f062a552a357f4e28d29c1259cb5c4c8b
5
+ SHA512:
6
+ metadata.gz: 60916d5e9f661b08deb59a1c1e0cfc8bf46affd7a53de47ea8842fbbc38db8523f911213f1e5a38fc2d6a5208ea08c77e7684d8ee5a4f97d2fe7caeff6591ed7
7
+ data.tar.gz: f7554f2845ae4654c9200903b0360ffea657f479b85d529842487373c46c9352b33890067f2d5b983b1b394834d638b1b02ec89dcb099f8a948e434a61e0a7e7
data/lib/VERSION ADDED
@@ -0,0 +1 @@
1
+ 1.0.200
@@ -0,0 +1,14 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'tencentcloud-sdk-common'
4
+
5
+ require_relative 'v20201229/client'
6
+ require_relative 'v20201229/models'
7
+
8
+ require_relative 'v20200709/client'
9
+ require_relative 'v20200709/models'
10
+
11
+ module TencentCloud
12
+ module Vm
13
+ end
14
+ end
@@ -0,0 +1,160 @@
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 Vm
21
+ module V20200709
22
+ class Client < TencentCloud::Common::AbstractClient
23
+
24
+ def initialize(credential, region, profile = nil)
25
+ api_version = '2020-07-09'
26
+ api_endpoint = 'vm.tencentcloudapi.com'
27
+ sdk_version = 'VM_' + File.read(File.expand_path('../VERSION', __dir__)).strip
28
+ super(credential, region, api_version, api_endpoint, sdk_version, profile)
29
+ end
30
+
31
+
32
+ # 取消任务
33
+
34
+ # @param request: Request instance for CancelTask.
35
+ # @type request: :class:`Tencentcloud::vm::V20200709::CancelTaskRequest`
36
+ # @rtype: :class:`Tencentcloud::vm::V20200709::CancelTaskResponse`
37
+ def CancelTask(request)
38
+ body = send_request('CancelTask', request.serialize)
39
+ response = JSON.parse(body)
40
+ if response['Response'].key?('Error') == false
41
+ model = CancelTaskResponse.new
42
+ model.deserialize(response['Response'])
43
+ model
44
+ else
45
+ code = response['Response']['Error']['Code']
46
+ message = response['Response']['Error']['Message']
47
+ reqid = response['Response']['RequestId']
48
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
49
+ end
50
+ rescue TencentCloud::Common::TencentCloudSDKException => e
51
+ raise e
52
+ rescue StandardError => e
53
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
54
+ end
55
+
56
+ # 创建业务配置,1个账号最多可以创建20个配置,可定义音频审核的场景,如色情、谩骂等,
57
+
58
+ # 在创建业务配置之前,你需要以下步骤:
59
+ # 1. 开通COS存储捅功能,新建存储桶,例如 cms_segments,用来存储 视频转换过程中生成对音频和图片。
60
+ # 2. 然后在COS控制台,授权天御内容安全主账号 对 cms_segments 存储桶对读写权限。具体授权操作,参考https://cloud.tencent.com/document/product/436/38648
61
+
62
+ # @param request: Request instance for CreateBizConfig.
63
+ # @type request: :class:`Tencentcloud::vm::V20200709::CreateBizConfigRequest`
64
+ # @rtype: :class:`Tencentcloud::vm::V20200709::CreateBizConfigResponse`
65
+ def CreateBizConfig(request)
66
+ body = send_request('CreateBizConfig', request.serialize)
67
+ response = JSON.parse(body)
68
+ if response['Response'].key?('Error') == false
69
+ model = CreateBizConfigResponse.new
70
+ model.deserialize(response['Response'])
71
+ model
72
+ else
73
+ code = response['Response']['Error']['Code']
74
+ message = response['Response']['Error']['Message']
75
+ reqid = response['Response']['RequestId']
76
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
77
+ end
78
+ rescue TencentCloud::Common::TencentCloudSDKException => e
79
+ raise e
80
+ rescue StandardError => e
81
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
82
+ end
83
+
84
+ # 通过URL或存储桶创建审核任务
85
+
86
+ # @param request: Request instance for CreateVideoModerationTask.
87
+ # @type request: :class:`Tencentcloud::vm::V20200709::CreateVideoModerationTaskRequest`
88
+ # @rtype: :class:`Tencentcloud::vm::V20200709::CreateVideoModerationTaskResponse`
89
+ def CreateVideoModerationTask(request)
90
+ body = send_request('CreateVideoModerationTask', request.serialize)
91
+ response = JSON.parse(body)
92
+ if response['Response'].key?('Error') == false
93
+ model = CreateVideoModerationTaskResponse.new
94
+ model.deserialize(response['Response'])
95
+ model
96
+ else
97
+ code = response['Response']['Error']['Code']
98
+ message = response['Response']['Error']['Message']
99
+ reqid = response['Response']['RequestId']
100
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
101
+ end
102
+ rescue TencentCloud::Common::TencentCloudSDKException => e
103
+ raise e
104
+ rescue StandardError => e
105
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
106
+ end
107
+
108
+ # 查看任务详情DescribeTaskDetail
109
+
110
+ # @param request: Request instance for DescribeTaskDetail.
111
+ # @type request: :class:`Tencentcloud::vm::V20200709::DescribeTaskDetailRequest`
112
+ # @rtype: :class:`Tencentcloud::vm::V20200709::DescribeTaskDetailResponse`
113
+ def DescribeTaskDetail(request)
114
+ body = send_request('DescribeTaskDetail', request.serialize)
115
+ response = JSON.parse(body)
116
+ if response['Response'].key?('Error') == false
117
+ model = DescribeTaskDetailResponse.new
118
+ model.deserialize(response['Response'])
119
+ model
120
+ else
121
+ code = response['Response']['Error']['Code']
122
+ message = response['Response']['Error']['Message']
123
+ reqid = response['Response']['RequestId']
124
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
125
+ end
126
+ rescue TencentCloud::Common::TencentCloudSDKException => e
127
+ raise e
128
+ rescue StandardError => e
129
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
130
+ end
131
+
132
+ # 控制台识别统计
133
+
134
+ # @param request: Request instance for DescribeVideoStat.
135
+ # @type request: :class:`Tencentcloud::vm::V20200709::DescribeVideoStatRequest`
136
+ # @rtype: :class:`Tencentcloud::vm::V20200709::DescribeVideoStatResponse`
137
+ def DescribeVideoStat(request)
138
+ body = send_request('DescribeVideoStat', request.serialize)
139
+ response = JSON.parse(body)
140
+ if response['Response'].key?('Error') == false
141
+ model = DescribeVideoStatResponse.new
142
+ model.deserialize(response['Response'])
143
+ model
144
+ else
145
+ code = response['Response']['Error']['Code']
146
+ message = response['Response']['Error']['Message']
147
+ reqid = response['Response']['RequestId']
148
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
149
+ end
150
+ rescue TencentCloud::Common::TencentCloudSDKException => e
151
+ raise e
152
+ rescue StandardError => e
153
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
154
+ end
155
+
156
+
157
+ end
158
+ end
159
+ end
160
+ end