tencentcloud-sdk-ivld 1.0.214

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: 00d9959004057e65e8904305885b4cc5a0d3d431
4
+ data.tar.gz: c10d9d25aef82611a49320dcf8d5e57bda7f6b53
5
+ SHA512:
6
+ metadata.gz: a4150e8be265b858900ac6896e8e239a61dcdf2afd740e46527f20b79ad71818dd0814e2ab49167cb7a67bf4e89d38da7359e6a1421abca887ae17c36be86b96
7
+ data.tar.gz: 0ae35de3bea154682ae7b1f92dbf210e0e23ba06830cb5ccfe20d237ced66566f08fbc1fd24cc1fc521c351c534e6e5adc00dfb3714bec6c8f0b533c3578a2de
data/lib/VERSION ADDED
@@ -0,0 +1 @@
1
+ 1.0.214
@@ -0,0 +1,11 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'tencentcloud-sdk-common'
4
+
5
+ require_relative 'v20210903/client'
6
+ require_relative 'v20210903/models'
7
+
8
+ module TencentCloud
9
+ module Ivld
10
+ end
11
+ end
@@ -0,0 +1,249 @@
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 Ivld
21
+ module V20210903
22
+ class Client < TencentCloud::Common::AbstractClient
23
+
24
+ def initialize(credential, region, profile = nil)
25
+ api_version = '2021-09-03'
26
+ api_endpoint = 'ivld.tencentcloudapi.com'
27
+ sdk_version = 'IVLD_' + 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
+ # 请注意,本接口为异步接口,**返回TaskId只代表任务创建成功,不代表任务执行成功**。
35
+
36
+ # @param request: Request instance for CreateTask.
37
+ # @type request: :class:`Tencentcloud::ivld::V20210903::CreateTaskRequest`
38
+ # @rtype: :class:`Tencentcloud::ivld::V20210903::CreateTaskResponse`
39
+ def CreateTask(request)
40
+ body = send_request('CreateTask', request.serialize)
41
+ response = JSON.parse(body)
42
+ if response['Response'].key?('Error') == false
43
+ model = CreateTaskResponse.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
+ # 将MediaId对应的媒资文件从系统中删除。
59
+
60
+ # **请注意,本接口仅删除媒资文件,媒资文件对应的视频分析结果不会被删除**。如您需要删除结构化分析结果,请调用DeleteTask接口。
61
+
62
+ # @param request: Request instance for DeleteMedia.
63
+ # @type request: :class:`Tencentcloud::ivld::V20210903::DeleteMediaRequest`
64
+ # @rtype: :class:`Tencentcloud::ivld::V20210903::DeleteMediaResponse`
65
+ def DeleteMedia(request)
66
+ body = send_request('DeleteMedia', request.serialize)
67
+ response = JSON.parse(body)
68
+ if response['Response'].key?('Error') == false
69
+ model = DeleteMediaResponse.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
+ # 描述媒资文件信息,包括媒资状态,分辨率,帧率等。
85
+
86
+ # 如果媒资文件未完成导入,本接口将仅输出媒资文件的状态信息;导入完成后,本接口还将输出媒资文件的其他元信息。
87
+
88
+ # @param request: Request instance for DescribeMedia.
89
+ # @type request: :class:`Tencentcloud::ivld::V20210903::DescribeMediaRequest`
90
+ # @rtype: :class:`Tencentcloud::ivld::V20210903::DescribeMediaResponse`
91
+ def DescribeMedia(request)
92
+ body = send_request('DescribeMedia', request.serialize)
93
+ response = JSON.parse(body)
94
+ if response['Response'].key?('Error') == false
95
+ model = DescribeMediaResponse.new
96
+ model.deserialize(response['Response'])
97
+ model
98
+ else
99
+ code = response['Response']['Error']['Code']
100
+ message = response['Response']['Error']['Message']
101
+ reqid = response['Response']['RequestId']
102
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
103
+ end
104
+ rescue TencentCloud::Common::TencentCloudSDKException => e
105
+ raise e
106
+ rescue StandardError => e
107
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
108
+ end
109
+
110
+ # 依照输入条件,描述命中的媒资文件信息,包括媒资状态,分辨率,帧率等。
111
+
112
+ # 请注意,本接口最多支持同时描述**50**个媒资文件
113
+
114
+ # 如果媒资文件未完成导入,本接口将仅输出媒资文件的状态信息;导入完成后,本接口还将输出媒资文件的其他元信息。
115
+
116
+ # @param request: Request instance for DescribeMedias.
117
+ # @type request: :class:`Tencentcloud::ivld::V20210903::DescribeMediasRequest`
118
+ # @rtype: :class:`Tencentcloud::ivld::V20210903::DescribeMediasResponse`
119
+ def DescribeMedias(request)
120
+ body = send_request('DescribeMedias', request.serialize)
121
+ response = JSON.parse(body)
122
+ if response['Response'].key?('Error') == false
123
+ model = DescribeMediasResponse.new
124
+ model.deserialize(response['Response'])
125
+ model
126
+ else
127
+ code = response['Response']['Error']['Code']
128
+ message = response['Response']['Error']['Message']
129
+ reqid = response['Response']['RequestId']
130
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
131
+ end
132
+ rescue TencentCloud::Common::TencentCloudSDKException => e
133
+ raise e
134
+ rescue StandardError => e
135
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
136
+ end
137
+
138
+ # 描述智能标签任务进度。
139
+
140
+ # 请注意,**此接口仅返回任务执行状态信息,不返回任务执行结果**
141
+
142
+
143
+ # @param request: Request instance for DescribeTask.
144
+ # @type request: :class:`Tencentcloud::ivld::V20210903::DescribeTaskRequest`
145
+ # @rtype: :class:`Tencentcloud::ivld::V20210903::DescribeTaskResponse`
146
+ def DescribeTask(request)
147
+ body = send_request('DescribeTask', request.serialize)
148
+ response = JSON.parse(body)
149
+ if response['Response'].key?('Error') == false
150
+ model = DescribeTaskResponse.new
151
+ model.deserialize(response['Response'])
152
+ model
153
+ else
154
+ code = response['Response']['Error']['Code']
155
+ message = response['Response']['Error']['Message']
156
+ reqid = response['Response']['RequestId']
157
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
158
+ end
159
+ rescue TencentCloud::Common::TencentCloudSDKException => e
160
+ raise e
161
+ rescue StandardError => e
162
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
163
+ end
164
+
165
+ # 描述任务信息,如果任务成功完成,还将返回任务结果
166
+
167
+ # @param request: Request instance for DescribeTaskDetail.
168
+ # @type request: :class:`Tencentcloud::ivld::V20210903::DescribeTaskDetailRequest`
169
+ # @rtype: :class:`Tencentcloud::ivld::V20210903::DescribeTaskDetailResponse`
170
+ def DescribeTaskDetail(request)
171
+ body = send_request('DescribeTaskDetail', request.serialize)
172
+ response = JSON.parse(body)
173
+ if response['Response'].key?('Error') == false
174
+ model = DescribeTaskDetailResponse.new
175
+ model.deserialize(response['Response'])
176
+ model
177
+ else
178
+ code = response['Response']['Error']['Code']
179
+ message = response['Response']['Error']['Message']
180
+ reqid = response['Response']['RequestId']
181
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
182
+ end
183
+ rescue TencentCloud::Common::TencentCloudSDKException => e
184
+ raise e
185
+ rescue StandardError => e
186
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
187
+ end
188
+
189
+ # 依照输入条件,描述命中的任务信息,包括任务创建时间,处理时间信息等。
190
+
191
+ # 请注意,本接口最多支持同时描述**50**个任务信息
192
+
193
+ # @param request: Request instance for DescribeTasks.
194
+ # @type request: :class:`Tencentcloud::ivld::V20210903::DescribeTasksRequest`
195
+ # @rtype: :class:`Tencentcloud::ivld::V20210903::DescribeTasksResponse`
196
+ def DescribeTasks(request)
197
+ body = send_request('DescribeTasks', request.serialize)
198
+ response = JSON.parse(body)
199
+ if response['Response'].key?('Error') == false
200
+ model = DescribeTasksResponse.new
201
+ model.deserialize(response['Response'])
202
+ model
203
+ else
204
+ code = response['Response']['Error']['Code']
205
+ message = response['Response']['Error']['Message']
206
+ reqid = response['Response']['RequestId']
207
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
208
+ end
209
+ rescue TencentCloud::Common::TencentCloudSDKException => e
210
+ raise e
211
+ rescue StandardError => e
212
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
213
+ end
214
+
215
+ # 将URL指向的媒资视频文件导入系统之中。
216
+
217
+ # **请注意,本接口为异步接口**。接口返回MediaId仅代表导入视频任务发起,不代表任务完成,您可调用读接口(DescribeMedia/DescribeMedias)接口查询MediaId对应的媒资文件的状态。
218
+
219
+ # 当前URL只支持COS地址,其形式为`https://${Bucket}-${AppId}.cos.${Region}.myqcloud.com/${ObjectKey}`,其中`${Bucket}`为您的COS桶名称,Region为COS桶所在[可用区](https://cloud.tencent.com/document/product/213/6091),`${ObjectKey}`为指向存储在COS桶内的待分析的视频的[ObjectKey](https://cloud.tencent.com/document/product/436/13324)
220
+
221
+ # 分析完成后,本产品将在您的`${Bucket}`桶内创建名为`${ObjectKey}-${task-start-time}`的目录(`task-start-time`形式为1970-01-01T08:08:08)并将分析结果将回传回该目录,也即,结构化分析结果(包括图片,JSON等数据)将会写回`https://${Bucket}-${AppId}.cos.${Region}.myqcloud.com/${ObjectKey}-${task-start-time}`目录
222
+
223
+ # @param request: Request instance for ImportMedia.
224
+ # @type request: :class:`Tencentcloud::ivld::V20210903::ImportMediaRequest`
225
+ # @rtype: :class:`Tencentcloud::ivld::V20210903::ImportMediaResponse`
226
+ def ImportMedia(request)
227
+ body = send_request('ImportMedia', request.serialize)
228
+ response = JSON.parse(body)
229
+ if response['Response'].key?('Error') == false
230
+ model = ImportMediaResponse.new
231
+ model.deserialize(response['Response'])
232
+ model
233
+ else
234
+ code = response['Response']['Error']['Code']
235
+ message = response['Response']['Error']['Message']
236
+ reqid = response['Response']['RequestId']
237
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
238
+ end
239
+ rescue TencentCloud::Common::TencentCloudSDKException => e
240
+ raise e
241
+ rescue StandardError => e
242
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
243
+ end
244
+
245
+
246
+ end
247
+ end
248
+ end
249
+ end