tencentcloud-sdk-ticm 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: 78da93f2e3bb1f51ae436cfd36c82490d775aebd
4
+ data.tar.gz: cc3b621554b4d8669cd21059bba13849c436d683
5
+ SHA512:
6
+ metadata.gz: b6be23e341e554aa4fe4ddf76cd7535224b7df14a53b859e06e6c90079219b9aff252377670edc8cb525f67044d3afed98d8af0d4ffca716689d378ecee6dade
7
+ data.tar.gz: a8db3c123d8b8fa418b9e974d98aaaabb555f238119642d31032bdc7a9440451b04aef9b9708081ad9cbb306fbaf4640439e5b8d8383ed0cc2e18e33cb897397
data/lib/VERSION ADDED
@@ -0,0 +1 @@
1
+ 1.0.200
@@ -0,0 +1,11 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'tencentcloud-sdk-common'
4
+
5
+ require_relative 'v20181127/client'
6
+ require_relative 'v20181127/models'
7
+
8
+ module TencentCloud
9
+ module Ticm
10
+ end
11
+ end
@@ -0,0 +1,108 @@
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 Ticm
21
+ module V20181127
22
+ class Client < TencentCloud::Common::AbstractClient
23
+
24
+ def initialize(credential, region, profile = nil)
25
+ api_version = '2018-11-27'
26
+ api_endpoint = 'ticm.tencentcloudapi.com'
27
+ sdk_version = 'TICM_' + 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 DescribeVideoTask.
35
+ # @type request: :class:`Tencentcloud::ticm::V20181127::DescribeVideoTaskRequest`
36
+ # @rtype: :class:`Tencentcloud::ticm::V20181127::DescribeVideoTaskResponse`
37
+ def DescribeVideoTask(request)
38
+ body = send_request('DescribeVideoTask', request.serialize)
39
+ response = JSON.parse(body)
40
+ if response['Response'].key?('Error') == false
41
+ model = DescribeVideoTaskResponse.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
+ # 本接口提供多种维度的图像审核能力,支持色情和性感内容识别,政治人物和涉政敏感场景识别,以及暴恐人物、场景、旗帜标识等违禁内容的识别。
57
+
58
+ # @param request: Request instance for ImageModeration.
59
+ # @type request: :class:`Tencentcloud::ticm::V20181127::ImageModerationRequest`
60
+ # @rtype: :class:`Tencentcloud::ticm::V20181127::ImageModerationResponse`
61
+ def ImageModeration(request)
62
+ body = send_request('ImageModeration', request.serialize)
63
+ response = JSON.parse(body)
64
+ if response['Response'].key?('Error') == false
65
+ model = ImageModerationResponse.new
66
+ model.deserialize(response['Response'])
67
+ model
68
+ else
69
+ code = response['Response']['Error']['Code']
70
+ message = response['Response']['Error']['Message']
71
+ reqid = response['Response']['RequestId']
72
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
73
+ end
74
+ rescue TencentCloud::Common::TencentCloudSDKException => e
75
+ raise e
76
+ rescue StandardError => e
77
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
78
+ end
79
+
80
+ # 本接口提供多种维度的视频审核能力,支持色情和性感内容识别,政治人物和涉政敏感场景识别,以及暴恐人物、场景、旗帜标识等违禁内容的识别。
81
+
82
+ # @param request: Request instance for VideoModeration.
83
+ # @type request: :class:`Tencentcloud::ticm::V20181127::VideoModerationRequest`
84
+ # @rtype: :class:`Tencentcloud::ticm::V20181127::VideoModerationResponse`
85
+ def VideoModeration(request)
86
+ body = send_request('VideoModeration', request.serialize)
87
+ response = JSON.parse(body)
88
+ if response['Response'].key?('Error') == false
89
+ model = VideoModerationResponse.new
90
+ model.deserialize(response['Response'])
91
+ model
92
+ else
93
+ code = response['Response']['Error']['Code']
94
+ message = response['Response']['Error']['Message']
95
+ reqid = response['Response']['RequestId']
96
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
97
+ end
98
+ rescue TencentCloud::Common::TencentCloudSDKException => e
99
+ raise e
100
+ rescue StandardError => e
101
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
102
+ end
103
+
104
+
105
+ end
106
+ end
107
+ end
108
+ end