lib/v20211125/client.rb in tencentcloud-sdk-iotvideo-1.0.354 vs lib/v20211125/client.rb in tencentcloud-sdk-iotvideo-1.0.355
- old
+ new
@@ -75,10 +75,34 @@
raise e
rescue StandardError => e
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
end
+ # 创建产品
+
+ # @param request: Request instance for CreateProduct.
+ # @type request: :class:`Tencentcloud::iotvideo::V20211125::CreateProductRequest`
+ # @rtype: :class:`Tencentcloud::iotvideo::V20211125::CreateProductResponse`
+ def CreateProduct(request)
+ body = send_request('CreateProduct', request.serialize)
+ response = JSON.parse(body)
+ if response['Response'].key?('Error') == false
+ model = CreateProductResponse.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
+
# 查询设备数据统计
# @param request: Request instance for DescribeDeviceDataStats.
# @type request: :class:`Tencentcloud::iotvideo::V20211125::DescribeDeviceDataStatsRequest`
# @rtype: :class:`Tencentcloud::iotvideo::V20211125::DescribeDeviceDataStatsResponse`
@@ -109,9 +133,33 @@
def DescribeMessageDataStats(request)
body = send_request('DescribeMessageDataStats', request.serialize)
response = JSON.parse(body)
if response['Response'].key?('Error') == false
model = DescribeMessageDataStatsResponse.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
+
+ # 获取设备的绑定签名
+
+ # @param request: Request instance for GenSingleDeviceSignatureOfPublic.
+ # @type request: :class:`Tencentcloud::iotvideo::V20211125::GenSingleDeviceSignatureOfPublicRequest`
+ # @rtype: :class:`Tencentcloud::iotvideo::V20211125::GenSingleDeviceSignatureOfPublicResponse`
+ def GenSingleDeviceSignatureOfPublic(request)
+ body = send_request('GenSingleDeviceSignatureOfPublic', request.serialize)
+ response = JSON.parse(body)
+ if response['Response'].key?('Error') == false
+ model = GenSingleDeviceSignatureOfPublicResponse.new
model.deserialize(response['Response'])
model
else
code = response['Response']['Error']['Code']
message = response['Response']['Error']['Message']
\ No newline at end of file