Class: TencentCloud::Bda::V20200324::Client

Inherits:
Common::AbstractClient
  • Object
show all
Defined in:
lib/v20200324/client.rb

Instance Method Summary collapse

Constructor Details

#initialize(credential, region, profile = nil) ⇒ Client

Returns a new instance of Client.



24
25
26
27
28
29
# File 'lib/v20200324/client.rb', line 24

def initialize(credential, region, profile = nil)
    api_version = '2020-03-24'
    api_endpoint = 'bda.tencentcloudapi.com'
    sdk_version = 'BDA_' + File.read(File.expand_path('../VERSION', __dir__)).strip
    super(credential, region, api_version, api_endpoint, sdk_version, profile)
end

Instance Method Details

#CreateGroup(request) ⇒ Object

@rtype: :class:‘Tencentcloud::bda::V20200324::CreateGroupResponse`

Parameters:

  • request:

    Request instance for CreateGroup.



43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
# File 'lib/v20200324/client.rb', line 43

def CreateGroup(request)
  body = send_request('CreateGroup', request.serialize)
  response = JSON.parse(body)
  if response['Response'].key?('Error') == false
    model = CreateGroupResponse.new
    model.deserialize(response['Response'])
    model
  else
    code = response['Response']['Error']['Code']
    message = response['Response']['Error']['Message']
    reqid = response['Response']['RequestId']
    raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
  end
rescue TencentCloud::Common::TencentCloudSDKException => e
  raise e
rescue StandardError => e
  raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
end

#CreatePerson(request) ⇒ Object

@rtype: :class:‘Tencentcloud::bda::V20200324::CreatePersonResponse`

Parameters:

  • request:

    Request instance for CreatePerson.



74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
# File 'lib/v20200324/client.rb', line 74

def CreatePerson(request)
  body = send_request('CreatePerson', request.serialize)
  response = JSON.parse(body)
  if response['Response'].key?('Error') == false
    model = CreatePersonResponse.new
    model.deserialize(response['Response'])
    model
  else
    code = response['Response']['Error']['Code']
    message = response['Response']['Error']['Message']
    reqid = response['Response']['RequestId']
    raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
  end
rescue TencentCloud::Common::TencentCloudSDKException => e
  raise e
rescue StandardError => e
  raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
end

#CreateSegmentationTask(request) ⇒ Object

@rtype: :class:‘Tencentcloud::bda::V20200324::CreateSegmentationTaskResponse`

Parameters:

  • request:

    Request instance for CreateSegmentationTask.



98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
# File 'lib/v20200324/client.rb', line 98

def CreateSegmentationTask(request)
  body = send_request('CreateSegmentationTask', request.serialize)
  response = JSON.parse(body)
  if response['Response'].key?('Error') == false
    model = CreateSegmentationTaskResponse.new
    model.deserialize(response['Response'])
    model
  else
    code = response['Response']['Error']['Code']
    message = response['Response']['Error']['Message']
    reqid = response['Response']['RequestId']
    raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
  end
rescue TencentCloud::Common::TencentCloudSDKException => e
  raise e
rescue StandardError => e
  raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
end

#CreateTrace(request) ⇒ Object

@rtype: :class:‘Tencentcloud::bda::V20200324::CreateTraceResponse`

Parameters:

  • request:

    Request instance for CreateTrace.



129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
# File 'lib/v20200324/client.rb', line 129

def CreateTrace(request)
  body = send_request('CreateTrace', request.serialize)
  response = JSON.parse(body)
  if response['Response'].key?('Error') == false
    model = CreateTraceResponse.new
    model.deserialize(response['Response'])
    model
  else
    code = response['Response']['Error']['Code']
    message = response['Response']['Error']['Message']
    reqid = response['Response']['RequestId']
    raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
  end
rescue TencentCloud::Common::TencentCloudSDKException => e
  raise e
rescue StandardError => e
  raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
end

#DeleteGroup(request) ⇒ Object

@rtype: :class:‘Tencentcloud::bda::V20200324::DeleteGroupResponse`

Parameters:

  • request:

    Request instance for DeleteGroup.



153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
# File 'lib/v20200324/client.rb', line 153

def DeleteGroup(request)
  body = send_request('DeleteGroup', request.serialize)
  response = JSON.parse(body)
  if response['Response'].key?('Error') == false
    model = DeleteGroupResponse.new
    model.deserialize(response['Response'])
    model
  else
    code = response['Response']['Error']['Code']
    message = response['Response']['Error']['Message']
    reqid = response['Response']['RequestId']
    raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
  end
rescue TencentCloud::Common::TencentCloudSDKException => e
  raise e
rescue StandardError => e
  raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
end

#DeletePerson(request) ⇒ Object

@rtype: :class:‘Tencentcloud::bda::V20200324::DeletePersonResponse`

Parameters:

  • request:

    Request instance for DeletePerson.



177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
# File 'lib/v20200324/client.rb', line 177

def DeletePerson(request)
  body = send_request('DeletePerson', request.serialize)
  response = JSON.parse(body)
  if response['Response'].key?('Error') == false
    model = DeletePersonResponse.new
    model.deserialize(response['Response'])
    model
  else
    code = response['Response']['Error']['Code']
    message = response['Response']['Error']['Message']
    reqid = response['Response']['RequestId']
    raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
  end
rescue TencentCloud::Common::TencentCloudSDKException => e
  raise e
rescue StandardError => e
  raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
end

#DescribeSegmentationTask(request) ⇒ Object

@rtype: :class:‘Tencentcloud::bda::V20200324::DescribeSegmentationTaskResponse`

Parameters:

  • request:

    Request instance for DescribeSegmentationTask.



201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
# File 'lib/v20200324/client.rb', line 201

def DescribeSegmentationTask(request)
  body = send_request('DescribeSegmentationTask', request.serialize)
  response = JSON.parse(body)
  if response['Response'].key?('Error') == false
    model = DescribeSegmentationTaskResponse.new
    model.deserialize(response['Response'])
    model
  else
    code = response['Response']['Error']['Code']
    message = response['Response']['Error']['Message']
    reqid = response['Response']['RequestId']
    raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
  end
rescue TencentCloud::Common::TencentCloudSDKException => e
  raise e
rescue StandardError => e
  raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
end

#DetectBody(request) ⇒ Object

@rtype: :class:‘Tencentcloud::bda::V20200324::DetectBodyResponse`

Parameters:

  • request:

    Request instance for DetectBody.



225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
# File 'lib/v20200324/client.rb', line 225

def DetectBody(request)
  body = send_request('DetectBody', request.serialize)
  response = JSON.parse(body)
  if response['Response'].key?('Error') == false
    model = DetectBodyResponse.new
    model.deserialize(response['Response'])
    model
  else
    code = response['Response']['Error']['Code']
    message = response['Response']['Error']['Message']
    reqid = response['Response']['RequestId']
    raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
  end
rescue TencentCloud::Common::TencentCloudSDKException => e
  raise e
rescue StandardError => e
  raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
end

#DetectBodyJoints(request) ⇒ Object

@rtype: :class:‘Tencentcloud::bda::V20200324::DetectBodyJointsResponse`

Parameters:

  • request:

    Request instance for DetectBodyJoints.



249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
# File 'lib/v20200324/client.rb', line 249

def DetectBodyJoints(request)
  body = send_request('DetectBodyJoints', request.serialize)
  response = JSON.parse(body)
  if response['Response'].key?('Error') == false
    model = DetectBodyJointsResponse.new
    model.deserialize(response['Response'])
    model
  else
    code = response['Response']['Error']['Code']
    message = response['Response']['Error']['Message']
    reqid = response['Response']['RequestId']
    raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
  end
rescue TencentCloud::Common::TencentCloudSDKException => e
  raise e
rescue StandardError => e
  raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
end

#GetGroupList(request) ⇒ Object

@rtype: :class:‘Tencentcloud::bda::V20200324::GetGroupListResponse`

Parameters:

  • request:

    Request instance for GetGroupList.



273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
# File 'lib/v20200324/client.rb', line 273

def GetGroupList(request)
  body = send_request('GetGroupList', request.serialize)
  response = JSON.parse(body)
  if response['Response'].key?('Error') == false
    model = GetGroupListResponse.new
    model.deserialize(response['Response'])
    model
  else
    code = response['Response']['Error']['Code']
    message = response['Response']['Error']['Message']
    reqid = response['Response']['RequestId']
    raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
  end
rescue TencentCloud::Common::TencentCloudSDKException => e
  raise e
rescue StandardError => e
  raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
end

#GetPersonList(request) ⇒ Object

@rtype: :class:‘Tencentcloud::bda::V20200324::GetPersonListResponse`

Parameters:

  • request:

    Request instance for GetPersonList.



297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
# File 'lib/v20200324/client.rb', line 297

def GetPersonList(request)
  body = send_request('GetPersonList', request.serialize)
  response = JSON.parse(body)
  if response['Response'].key?('Error') == false
    model = GetPersonListResponse.new
    model.deserialize(response['Response'])
    model
  else
    code = response['Response']['Error']['Code']
    message = response['Response']['Error']['Message']
    reqid = response['Response']['RequestId']
    raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
  end
rescue TencentCloud::Common::TencentCloudSDKException => e
  raise e
rescue StandardError => e
  raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
end

#GetSummaryInfo(request) ⇒ Object

@rtype: :class:‘Tencentcloud::bda::V20200324::GetSummaryInfoResponse`

Parameters:

  • request:

    Request instance for GetSummaryInfo.



321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
# File 'lib/v20200324/client.rb', line 321

def GetSummaryInfo(request)
  body = send_request('GetSummaryInfo', request.serialize)
  response = JSON.parse(body)
  if response['Response'].key?('Error') == false
    model = GetSummaryInfoResponse.new
    model.deserialize(response['Response'])
    model
  else
    code = response['Response']['Error']['Code']
    message = response['Response']['Error']['Message']
    reqid = response['Response']['RequestId']
    raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
  end
rescue TencentCloud::Common::TencentCloudSDKException => e
  raise e
rescue StandardError => e
  raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
end

#ModifyGroup(request) ⇒ Object

@rtype: :class:‘Tencentcloud::bda::V20200324::ModifyGroupResponse`

Parameters:

  • request:

    Request instance for ModifyGroup.



345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
# File 'lib/v20200324/client.rb', line 345

def ModifyGroup(request)
  body = send_request('ModifyGroup', request.serialize)
  response = JSON.parse(body)
  if response['Response'].key?('Error') == false
    model = ModifyGroupResponse.new
    model.deserialize(response['Response'])
    model
  else
    code = response['Response']['Error']['Code']
    message = response['Response']['Error']['Message']
    reqid = response['Response']['RequestId']
    raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
  end
rescue TencentCloud::Common::TencentCloudSDKException => e
  raise e
rescue StandardError => e
  raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
end

#ModifyPersonInfo(request) ⇒ Object

@rtype: :class:‘Tencentcloud::bda::V20200324::ModifyPersonInfoResponse`

Parameters:

  • request:

    Request instance for ModifyPersonInfo.



369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
# File 'lib/v20200324/client.rb', line 369

def ModifyPersonInfo(request)
  body = send_request('ModifyPersonInfo', request.serialize)
  response = JSON.parse(body)
  if response['Response'].key?('Error') == false
    model = ModifyPersonInfoResponse.new
    model.deserialize(response['Response'])
    model
  else
    code = response['Response']['Error']['Code']
    message = response['Response']['Error']['Message']
    reqid = response['Response']['RequestId']
    raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
  end
rescue TencentCloud::Common::TencentCloudSDKException => e
  raise e
rescue StandardError => e
  raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
end

#SearchTrace(request) ⇒ Object

@rtype: :class:‘Tencentcloud::bda::V20200324::SearchTraceResponse`

Parameters:

  • request:

    Request instance for SearchTrace.



400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
# File 'lib/v20200324/client.rb', line 400

def SearchTrace(request)
  body = send_request('SearchTrace', request.serialize)
  response = JSON.parse(body)
  if response['Response'].key?('Error') == false
    model = SearchTraceResponse.new
    model.deserialize(response['Response'])
    model
  else
    code = response['Response']['Error']['Code']
    message = response['Response']['Error']['Message']
    reqid = response['Response']['RequestId']
    raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
  end
rescue TencentCloud::Common::TencentCloudSDKException => e
  raise e
rescue StandardError => e
  raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
end

#SegmentCustomizedPortraitPic(request) ⇒ Object

@rtype: :class:‘Tencentcloud::bda::V20200324::SegmentCustomizedPortraitPicResponse`

Parameters:

  • request:

    Request instance for SegmentCustomizedPortraitPic.



424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
# File 'lib/v20200324/client.rb', line 424

def SegmentCustomizedPortraitPic(request)
  body = send_request('SegmentCustomizedPortraitPic', request.serialize)
  response = JSON.parse(body)
  if response['Response'].key?('Error') == false
    model = SegmentCustomizedPortraitPicResponse.new
    model.deserialize(response['Response'])
    model
  else
    code = response['Response']['Error']['Code']
    message = response['Response']['Error']['Message']
    reqid = response['Response']['RequestId']
    raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
  end
rescue TencentCloud::Common::TencentCloudSDKException => e
  raise e
rescue StandardError => e
  raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
end

#SegmentPortraitPic(request) ⇒ Object

@rtype: :class:‘Tencentcloud::bda::V20200324::SegmentPortraitPicResponse`

Parameters:

  • request:

    Request instance for SegmentPortraitPic.



448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
# File 'lib/v20200324/client.rb', line 448

def SegmentPortraitPic(request)
  body = send_request('SegmentPortraitPic', request.serialize)
  response = JSON.parse(body)
  if response['Response'].key?('Error') == false
    model = SegmentPortraitPicResponse.new
    model.deserialize(response['Response'])
    model
  else
    code = response['Response']['Error']['Code']
    message = response['Response']['Error']['Message']
    reqid = response['Response']['RequestId']
    raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
  end
rescue TencentCloud::Common::TencentCloudSDKException => e
  raise e
rescue StandardError => e
  raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
end

#TerminateSegmentationTask(request) ⇒ Object

@rtype: :class:‘Tencentcloud::bda::V20200324::TerminateSegmentationTaskResponse`

Parameters:

  • request:

    Request instance for TerminateSegmentationTask.



472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
# File 'lib/v20200324/client.rb', line 472

def TerminateSegmentationTask(request)
  body = send_request('TerminateSegmentationTask', request.serialize)
  response = JSON.parse(body)
  if response['Response'].key?('Error') == false
    model = TerminateSegmentationTaskResponse.new
    model.deserialize(response['Response'])
    model
  else
    code = response['Response']['Error']['Code']
    message = response['Response']['Error']['Message']
    reqid = response['Response']['RequestId']
    raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
  end
rescue TencentCloud::Common::TencentCloudSDKException => e
  raise e
rescue StandardError => e
  raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
end