Class: TencentCloud::Drm::V20181115::Client

Inherits:
Common::AbstractClient
  • Object
show all
Defined in:
lib/v20181115/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/v20181115/client.rb', line 24

def initialize(credential, region, profile = nil)
    api_version = '2018-11-15'
    api_endpoint = 'drm.tencentcloudapi.com'
    sdk_version = 'DRM_' + File.read(File.expand_path('../VERSION', __dir__)).strip
    super(credential, region, api_version, api_endpoint, sdk_version, profile)
end

Instance Method Details

#AddFairPlayPem(request) ⇒ Object

@rtype: :class:‘Tencentcloud::drm::V20181115::AddFairPlayPemResponse`

Parameters:

  • request:

    Request instance for AddFairPlayPem.



38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
# File 'lib/v20181115/client.rb', line 38

def AddFairPlayPem(request)
  body = send_request('AddFairPlayPem', request.serialize)
  response = JSON.parse(body)
  if response['Response'].key?('Error') == false
    model = AddFairPlayPemResponse.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

#CreateEncryptKeys(request) ⇒ Object

@rtype: :class:‘Tencentcloud::drm::V20181115::CreateEncryptKeysResponse`

Parameters:

  • request:

    Request instance for CreateEncryptKeys.



62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
# File 'lib/v20181115/client.rb', line 62

def CreateEncryptKeys(request)
  body = send_request('CreateEncryptKeys', request.serialize)
  response = JSON.parse(body)
  if response['Response'].key?('Error') == false
    model = CreateEncryptKeysResponse.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

#CreateLicense(request) ⇒ Object

@rtype: :class:‘Tencentcloud::drm::V20181115::CreateLicenseResponse`

Parameters:

  • request:

    Request instance for CreateLicense.



87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
# File 'lib/v20181115/client.rb', line 87

def CreateLicense(request)
  body = send_request('CreateLicense', request.serialize)
  response = JSON.parse(body)
  if response['Response'].key?('Error') == false
    model = CreateLicenseResponse.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

#DeleteFairPlayPem(request) ⇒ Object

@rtype: :class:‘Tencentcloud::drm::V20181115::DeleteFairPlayPemResponse`

Parameters:

  • request:

    Request instance for DeleteFairPlayPem.



113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
# File 'lib/v20181115/client.rb', line 113

def DeleteFairPlayPem(request)
  body = send_request('DeleteFairPlayPem', request.serialize)
  response = JSON.parse(body)
  if response['Response'].key?('Error') == false
    model = DeleteFairPlayPemResponse.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

#DescribeAllKeys(request) ⇒ Object

@rtype: :class:‘Tencentcloud::drm::V20181115::DescribeAllKeysResponse`

Parameters:

  • request:

    Request instance for DescribeAllKeys.



137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
# File 'lib/v20181115/client.rb', line 137

def DescribeAllKeys(request)
  body = send_request('DescribeAllKeys', request.serialize)
  response = JSON.parse(body)
  if response['Response'].key?('Error') == false
    model = DescribeAllKeysResponse.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

#DescribeDRMLicense(request) ⇒ Object

@rtype: :class:‘Tencentcloud::drm::V20181115::DescribeDRMLicenseResponse`

Parameters:

  • request:

    Request instance for DescribeDRMLicense.



161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
# File 'lib/v20181115/client.rb', line 161

def DescribeDRMLicense(request)
  body = send_request('DescribeDRMLicense', request.serialize)
  response = JSON.parse(body)
  if response['Response'].key?('Error') == false
    model = DescribeDRMLicenseResponse.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

#DescribeFairPlayPem(request) ⇒ Object

@rtype: :class:‘Tencentcloud::drm::V20181115::DescribeFairPlayPemResponse`

Parameters:

  • request:

    Request instance for DescribeFairPlayPem.



185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
# File 'lib/v20181115/client.rb', line 185

def DescribeFairPlayPem(request)
  body = send_request('DescribeFairPlayPem', request.serialize)
  response = JSON.parse(body)
  if response['Response'].key?('Error') == false
    model = DescribeFairPlayPemResponse.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

#DescribeKeys(request) ⇒ Object

@rtype: :class:‘Tencentcloud::drm::V20181115::DescribeKeysResponse`

Parameters:

  • request:

    Request instance for DescribeKeys.



210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
# File 'lib/v20181115/client.rb', line 210

def DescribeKeys(request)
  body = send_request('DescribeKeys', request.serialize)
  response = JSON.parse(body)
  if response['Response'].key?('Error') == false
    model = DescribeKeysResponse.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

#GenerateTDRMKey(request) ⇒ Object

@rtype: :class:‘Tencentcloud::drm::V20181115::GenerateTDRMKeyResponse`

Parameters:

  • request:

    Request instance for GenerateTDRMKey.



234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
# File 'lib/v20181115/client.rb', line 234

def GenerateTDRMKey(request)
  body = send_request('GenerateTDRMKey', request.serialize)
  response = JSON.parse(body)
  if response['Response'].key?('Error') == false
    model = GenerateTDRMKeyResponse.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

#ModifyFairPlayPem(request) ⇒ Object

@rtype: :class:‘Tencentcloud::drm::V20181115::ModifyFairPlayPemResponse`

Parameters:

  • request:

    Request instance for ModifyFairPlayPem.



259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
# File 'lib/v20181115/client.rb', line 259

def ModifyFairPlayPem(request)
  body = send_request('ModifyFairPlayPem', request.serialize)
  response = JSON.parse(body)
  if response['Response'].key?('Error') == false
    model = ModifyFairPlayPemResponse.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

#StartEncryption(request) ⇒ Object

@rtype: :class:‘Tencentcloud::drm::V20181115::StartEncryptionResponse`

Parameters:

  • request:

    Request instance for StartEncryption.



284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
# File 'lib/v20181115/client.rb', line 284

def StartEncryption(request)
  body = send_request('StartEncryption', request.serialize)
  response = JSON.parse(body)
  if response['Response'].key?('Error') == false
    model = StartEncryptionResponse.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