Class: MuxRuby::AssetsApi

Inherits:
Object
  • Object
show all
Defined in:
lib/mux_ruby/api/assets_api.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = ApiClient.default) ⇒ AssetsApi

Returns a new instance of AssetsApi.



19
20
21
# File 'lib/mux_ruby/api/assets_api.rb', line 19

def initialize(api_client = ApiClient.default)
  @api_client = api_client
end

Instance Attribute Details

#api_clientObject

Returns the value of attribute api_client.



17
18
19
# File 'lib/mux_ruby/api/assets_api.rb', line 17

def api_client
  @api_client
end

Instance Method Details

#create_asset(create_asset_request, opts = {}) ⇒ AssetResponse

Create an asset Create a new Mux Video asset.

Parameters:

  • create_asset_request (CreateAssetRequest)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



27
28
29
30
# File 'lib/mux_ruby/api/assets_api.rb', line 27

def create_asset(create_asset_request, opts = {})
  data, _status_code, _headers = create_asset_with_http_info(create_asset_request, opts)
  data
end

#create_asset_playback_id(asset_id, create_playback_id_request, opts = {}) ⇒ CreatePlaybackIDResponse

Create a playback ID Creates a playback ID that can be used to stream the asset to a viewer.

Parameters:

  • asset_id (String)

    The asset ID.

  • create_playback_id_request (CreatePlaybackIDRequest)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



93
94
95
96
# File 'lib/mux_ruby/api/assets_api.rb', line 93

def create_asset_playback_id(asset_id, create_playback_id_request, opts = {})
  data, _status_code, _headers = create_asset_playback_id_with_http_info(asset_id, create_playback_id_request, opts)
  data
end

#create_asset_playback_id_with_http_info(asset_id, create_playback_id_request, opts = {}) ⇒ Array<(CreatePlaybackIDResponse, Integer, Hash)>

Create a playback ID Creates a playback ID that can be used to stream the asset to a viewer.

Parameters:

  • asset_id (String)

    The asset ID.

  • create_playback_id_request (CreatePlaybackIDRequest)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(CreatePlaybackIDResponse, Integer, Hash)>)

    CreatePlaybackIDResponse data, response status code and response headers



104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
# File 'lib/mux_ruby/api/assets_api.rb', line 104

def create_asset_playback_id_with_http_info(asset_id, create_playback_id_request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AssetsApi.create_asset_playback_id ...'
  end
  # verify the required parameter 'asset_id' is set
  if @api_client.config.client_side_validation && asset_id.nil?
    fail ArgumentError, "Missing the required parameter 'asset_id' when calling AssetsApi.create_asset_playback_id"
  end
  # verify the required parameter 'create_playback_id_request' is set
  if @api_client.config.client_side_validation && create_playback_id_request.nil?
    fail ArgumentError, "Missing the required parameter 'create_playback_id_request' when calling AssetsApi.create_asset_playback_id"
  end
  # resource path
  local_var_path = '/video/v1/assets/{ASSET_ID}/playback-ids'.sub('{' + 'ASSET_ID' + '}', CGI.escape(asset_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(create_playback_id_request)

  # return_type
  return_type = opts[:debug_return_type] || 'CreatePlaybackIDResponse'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['accessToken']

  new_options = opts.merge(
    :operation => :"AssetsApi.create_asset_playback_id",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AssetsApi#create_asset_playback_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#create_asset_track(asset_id, create_track_request, opts = {}) ⇒ CreateTrackResponse

Create an asset track Adds an asset track (for example, subtitles, or an alternate audio track) to an asset.

Parameters:

  • asset_id (String)

    The asset ID.

  • create_track_request (CreateTrackRequest)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



164
165
166
167
# File 'lib/mux_ruby/api/assets_api.rb', line 164

def create_asset_track(asset_id, create_track_request, opts = {})
  data, _status_code, _headers = create_asset_track_with_http_info(asset_id, create_track_request, opts)
  data
end

#create_asset_track_with_http_info(asset_id, create_track_request, opts = {}) ⇒ Array<(CreateTrackResponse, Integer, Hash)>

Create an asset track Adds an asset track (for example, subtitles, or an alternate audio track) to an asset.

Parameters:

  • asset_id (String)

    The asset ID.

  • create_track_request (CreateTrackRequest)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(CreateTrackResponse, Integer, Hash)>)

    CreateTrackResponse data, response status code and response headers



175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
# File 'lib/mux_ruby/api/assets_api.rb', line 175

def create_asset_track_with_http_info(asset_id, create_track_request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AssetsApi.create_asset_track ...'
  end
  # verify the required parameter 'asset_id' is set
  if @api_client.config.client_side_validation && asset_id.nil?
    fail ArgumentError, "Missing the required parameter 'asset_id' when calling AssetsApi.create_asset_track"
  end
  # verify the required parameter 'create_track_request' is set
  if @api_client.config.client_side_validation && create_track_request.nil?
    fail ArgumentError, "Missing the required parameter 'create_track_request' when calling AssetsApi.create_asset_track"
  end
  # resource path
  local_var_path = '/video/v1/assets/{ASSET_ID}/tracks'.sub('{' + 'ASSET_ID' + '}', CGI.escape(asset_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(create_track_request)

  # return_type
  return_type = opts[:debug_return_type] || 'CreateTrackResponse'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['accessToken']

  new_options = opts.merge(
    :operation => :"AssetsApi.create_asset_track",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AssetsApi#create_asset_track\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#create_asset_with_http_info(create_asset_request, opts = {}) ⇒ Array<(AssetResponse, Integer, Hash)>

Create an asset Create a new Mux Video asset.

Parameters:

  • create_asset_request (CreateAssetRequest)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(AssetResponse, Integer, Hash)>)

    AssetResponse data, response status code and response headers



37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
# File 'lib/mux_ruby/api/assets_api.rb', line 37

def create_asset_with_http_info(create_asset_request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AssetsApi.create_asset ...'
  end
  # verify the required parameter 'create_asset_request' is set
  if @api_client.config.client_side_validation && create_asset_request.nil?
    fail ArgumentError, "Missing the required parameter 'create_asset_request' when calling AssetsApi.create_asset"
  end
  # resource path
  local_var_path = '/video/v1/assets'

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(create_asset_request)

  # return_type
  return_type = opts[:debug_return_type] || 'AssetResponse'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['accessToken']

  new_options = opts.merge(
    :operation => :"AssetsApi.create_asset",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AssetsApi#create_asset\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#delete_asset(asset_id, opts = {}) ⇒ nil

Delete an asset Deletes a video asset and all its data.

Parameters:

  • asset_id (String)

    The asset ID.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (nil)


234
235
236
237
# File 'lib/mux_ruby/api/assets_api.rb', line 234

def delete_asset(asset_id, opts = {})
  delete_asset_with_http_info(asset_id, opts)
  nil
end

#delete_asset_playback_id(asset_id, playback_id, opts = {}) ⇒ nil

Delete a playback ID Deletes a playback ID, rendering it nonfunctional for viewing an asset’s video content. Please note that deleting the playback ID removes access to the underlying asset; a viewer who started playback before the playback ID was deleted may be able to watch the entire video for a limited duration.

Parameters:

  • asset_id (String)

    The asset ID.

  • playback_id (String)

    The live stream&#39;s playback ID.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (nil)


296
297
298
299
# File 'lib/mux_ruby/api/assets_api.rb', line 296

def delete_asset_playback_id(asset_id, playback_id, opts = {})
  delete_asset_playback_id_with_http_info(asset_id, playback_id, opts)
  nil
end

#delete_asset_playback_id_with_http_info(asset_id, playback_id, opts = {}) ⇒ Array<(nil, Integer, Hash)>

Delete a playback ID Deletes a playback ID, rendering it nonfunctional for viewing an asset&#39;s video content. Please note that deleting the playback ID removes access to the underlying asset; a viewer who started playback before the playback ID was deleted may be able to watch the entire video for a limited duration.

Parameters:

  • asset_id (String)

    The asset ID.

  • playback_id (String)

    The live stream&#39;s playback ID.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(nil, Integer, Hash)>)

    nil, response status code and response headers



307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
# File 'lib/mux_ruby/api/assets_api.rb', line 307

def delete_asset_playback_id_with_http_info(asset_id, playback_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AssetsApi.delete_asset_playback_id ...'
  end
  # verify the required parameter 'asset_id' is set
  if @api_client.config.client_side_validation && asset_id.nil?
    fail ArgumentError, "Missing the required parameter 'asset_id' when calling AssetsApi.delete_asset_playback_id"
  end
  # verify the required parameter 'playback_id' is set
  if @api_client.config.client_side_validation && playback_id.nil?
    fail ArgumentError, "Missing the required parameter 'playback_id' when calling AssetsApi.delete_asset_playback_id"
  end
  # resource path
  local_var_path = '/video/v1/assets/{ASSET_ID}/playback-ids/{PLAYBACK_ID}'.sub('{' + 'ASSET_ID' + '}', CGI.escape(asset_id.to_s)).sub('{' + 'PLAYBACK_ID' + '}', CGI.escape(playback_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type]

  # auth_names
  auth_names = opts[:debug_auth_names] || ['accessToken']

  new_options = opts.merge(
    :operation => :"AssetsApi.delete_asset_playback_id",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AssetsApi#delete_asset_playback_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#delete_asset_track(asset_id, track_id, opts = {}) ⇒ nil

Delete an asset track Removes a text track from an asset. Audio and video tracks on assets cannot be removed.

Parameters:

  • asset_id (String)

    The asset ID.

  • track_id (String)

    The track ID.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (nil)


363
364
365
366
# File 'lib/mux_ruby/api/assets_api.rb', line 363

def delete_asset_track(asset_id, track_id, opts = {})
  delete_asset_track_with_http_info(asset_id, track_id, opts)
  nil
end

#delete_asset_track_with_http_info(asset_id, track_id, opts = {}) ⇒ Array<(nil, Integer, Hash)>

Delete an asset track Removes a text track from an asset. Audio and video tracks on assets cannot be removed.

Parameters:

  • asset_id (String)

    The asset ID.

  • track_id (String)

    The track ID.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(nil, Integer, Hash)>)

    nil, response status code and response headers



374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
# File 'lib/mux_ruby/api/assets_api.rb', line 374

def delete_asset_track_with_http_info(asset_id, track_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AssetsApi.delete_asset_track ...'
  end
  # verify the required parameter 'asset_id' is set
  if @api_client.config.client_side_validation && asset_id.nil?
    fail ArgumentError, "Missing the required parameter 'asset_id' when calling AssetsApi.delete_asset_track"
  end
  # verify the required parameter 'track_id' is set
  if @api_client.config.client_side_validation && track_id.nil?
    fail ArgumentError, "Missing the required parameter 'track_id' when calling AssetsApi.delete_asset_track"
  end
  # resource path
  local_var_path = '/video/v1/assets/{ASSET_ID}/tracks/{TRACK_ID}'.sub('{' + 'ASSET_ID' + '}', CGI.escape(asset_id.to_s)).sub('{' + 'TRACK_ID' + '}', CGI.escape(track_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type]

  # auth_names
  auth_names = opts[:debug_auth_names] || ['accessToken']

  new_options = opts.merge(
    :operation => :"AssetsApi.delete_asset_track",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AssetsApi#delete_asset_track\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#delete_asset_with_http_info(asset_id, opts = {}) ⇒ Array<(nil, Integer, Hash)>

Delete an asset Deletes a video asset and all its data.

Parameters:

  • asset_id (String)

    The asset ID.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(nil, Integer, Hash)>)

    nil, response status code and response headers



244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
# File 'lib/mux_ruby/api/assets_api.rb', line 244

def delete_asset_with_http_info(asset_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AssetsApi.delete_asset ...'
  end
  # verify the required parameter 'asset_id' is set
  if @api_client.config.client_side_validation && asset_id.nil?
    fail ArgumentError, "Missing the required parameter 'asset_id' when calling AssetsApi.delete_asset"
  end
  # resource path
  local_var_path = '/video/v1/assets/{ASSET_ID}'.sub('{' + 'ASSET_ID' + '}', CGI.escape(asset_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type]

  # auth_names
  auth_names = opts[:debug_auth_names] || ['accessToken']

  new_options = opts.merge(
    :operation => :"AssetsApi.delete_asset",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AssetsApi#delete_asset\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#generate_asset_track_subtitles(asset_id, track_id, generate_track_subtitles_request, opts = {}) ⇒ GenerateTrackSubtitlesResponse

Generate track subtitles Generates subtitles (captions) for a given audio track. This API can be used for up to 7 days after an asset is created.

Parameters:

  • asset_id (String)

    The asset ID.

  • track_id (String)

    The track ID.

  • generate_track_subtitles_request (GenerateTrackSubtitlesRequest)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



431
432
433
434
# File 'lib/mux_ruby/api/assets_api.rb', line 431

def generate_asset_track_subtitles(asset_id, track_id, generate_track_subtitles_request, opts = {})
  data, _status_code, _headers = generate_asset_track_subtitles_with_http_info(asset_id, track_id, generate_track_subtitles_request, opts)
  data
end

#generate_asset_track_subtitles_with_http_info(asset_id, track_id, generate_track_subtitles_request, opts = {}) ⇒ Array<(GenerateTrackSubtitlesResponse, Integer, Hash)>

Generate track subtitles Generates subtitles (captions) for a given audio track. This API can be used for up to 7 days after an asset is created.

Parameters:

  • asset_id (String)

    The asset ID.

  • track_id (String)

    The track ID.

  • generate_track_subtitles_request (GenerateTrackSubtitlesRequest)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
# File 'lib/mux_ruby/api/assets_api.rb', line 443

def generate_asset_track_subtitles_with_http_info(asset_id, track_id, generate_track_subtitles_request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AssetsApi.generate_asset_track_subtitles ...'
  end
  # verify the required parameter 'asset_id' is set
  if @api_client.config.client_side_validation && asset_id.nil?
    fail ArgumentError, "Missing the required parameter 'asset_id' when calling AssetsApi.generate_asset_track_subtitles"
  end
  # verify the required parameter 'track_id' is set
  if @api_client.config.client_side_validation && track_id.nil?
    fail ArgumentError, "Missing the required parameter 'track_id' when calling AssetsApi.generate_asset_track_subtitles"
  end
  # verify the required parameter 'generate_track_subtitles_request' is set
  if @api_client.config.client_side_validation && generate_track_subtitles_request.nil?
    fail ArgumentError, "Missing the required parameter 'generate_track_subtitles_request' when calling AssetsApi.generate_asset_track_subtitles"
  end
  # resource path
  local_var_path = '/video/v1/assets/{ASSET_ID}/tracks/{TRACK_ID}/generate-subtitles'.sub('{' + 'ASSET_ID' + '}', CGI.escape(asset_id.to_s)).sub('{' + 'TRACK_ID' + '}', CGI.escape(track_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(generate_track_subtitles_request)

  # return_type
  return_type = opts[:debug_return_type] || 'GenerateTrackSubtitlesResponse'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['accessToken']

  new_options = opts.merge(
    :operation => :"AssetsApi.generate_asset_track_subtitles",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AssetsApi#generate_asset_track_subtitles\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_asset(asset_id, opts = {}) ⇒ AssetResponse

Retrieve an asset Retrieves the details of an asset that has previously been created. Supply the unique asset ID that was returned from your previous request, and Mux will return the corresponding asset information. The same information is returned when creating an asset.

Parameters:

  • asset_id (String)

    The asset ID.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



506
507
508
509
# File 'lib/mux_ruby/api/assets_api.rb', line 506

def get_asset(asset_id, opts = {})
  data, _status_code, _headers = get_asset_with_http_info(asset_id, opts)
  data
end

#get_asset_input_info(asset_id, opts = {}) ⇒ GetAssetInputInfoResponse

Retrieve asset input info Returns a list of the input objects that were used to create the asset along with any settings that were applied to each input.

Parameters:

  • asset_id (String)

    The asset ID.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



569
570
571
572
# File 'lib/mux_ruby/api/assets_api.rb', line 569

def get_asset_input_info(asset_id, opts = {})
  data, _status_code, _headers = get_asset_input_info_with_http_info(asset_id, opts)
  data
end

#get_asset_input_info_with_http_info(asset_id, opts = {}) ⇒ Array<(GetAssetInputInfoResponse, Integer, Hash)>

Retrieve asset input info Returns a list of the input objects that were used to create the asset along with any settings that were applied to each input.

Parameters:

  • asset_id (String)

    The asset ID.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(GetAssetInputInfoResponse, Integer, Hash)>)

    GetAssetInputInfoResponse data, response status code and response headers



579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
# File 'lib/mux_ruby/api/assets_api.rb', line 579

def get_asset_input_info_with_http_info(asset_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AssetsApi.get_asset_input_info ...'
  end
  # verify the required parameter 'asset_id' is set
  if @api_client.config.client_side_validation && asset_id.nil?
    fail ArgumentError, "Missing the required parameter 'asset_id' when calling AssetsApi.get_asset_input_info"
  end
  # resource path
  local_var_path = '/video/v1/assets/{ASSET_ID}/input-info'.sub('{' + 'ASSET_ID' + '}', CGI.escape(asset_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'GetAssetInputInfoResponse'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['accessToken']

  new_options = opts.merge(
    :operation => :"AssetsApi.get_asset_input_info",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AssetsApi#get_asset_input_info\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_asset_playback_id(asset_id, playback_id, opts = {}) ⇒ GetAssetPlaybackIDResponse

Retrieve a playback ID Retrieves information about the specified playback ID.

Parameters:

  • asset_id (String)

    The asset ID.

  • playback_id (String)

    The live stream&#39;s playback ID.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



633
634
635
636
# File 'lib/mux_ruby/api/assets_api.rb', line 633

def get_asset_playback_id(asset_id, playback_id, opts = {})
  data, _status_code, _headers = get_asset_playback_id_with_http_info(asset_id, playback_id, opts)
  data
end

#get_asset_playback_id_with_http_info(asset_id, playback_id, opts = {}) ⇒ Array<(GetAssetPlaybackIDResponse, Integer, Hash)>

Retrieve a playback ID Retrieves information about the specified playback ID.

Parameters:

  • asset_id (String)

    The asset ID.

  • playback_id (String)

    The live stream&#39;s playback ID.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(GetAssetPlaybackIDResponse, Integer, Hash)>)

    GetAssetPlaybackIDResponse data, response status code and response headers



644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
# File 'lib/mux_ruby/api/assets_api.rb', line 644

def get_asset_playback_id_with_http_info(asset_id, playback_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AssetsApi.get_asset_playback_id ...'
  end
  # verify the required parameter 'asset_id' is set
  if @api_client.config.client_side_validation && asset_id.nil?
    fail ArgumentError, "Missing the required parameter 'asset_id' when calling AssetsApi.get_asset_playback_id"
  end
  # verify the required parameter 'playback_id' is set
  if @api_client.config.client_side_validation && playback_id.nil?
    fail ArgumentError, "Missing the required parameter 'playback_id' when calling AssetsApi.get_asset_playback_id"
  end
  # resource path
  local_var_path = '/video/v1/assets/{ASSET_ID}/playback-ids/{PLAYBACK_ID}'.sub('{' + 'ASSET_ID' + '}', CGI.escape(asset_id.to_s)).sub('{' + 'PLAYBACK_ID' + '}', CGI.escape(playback_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'GetAssetPlaybackIDResponse'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['accessToken']

  new_options = opts.merge(
    :operation => :"AssetsApi.get_asset_playback_id",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AssetsApi#get_asset_playback_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_asset_with_http_info(asset_id, opts = {}) ⇒ Array<(AssetResponse, Integer, Hash)>

Retrieve an asset Retrieves the details of an asset that has previously been created. Supply the unique asset ID that was returned from your previous request, and Mux will return the corresponding asset information. The same information is returned when creating an asset.

Parameters:

  • asset_id (String)

    The asset ID.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(AssetResponse, Integer, Hash)>)

    AssetResponse data, response status code and response headers



516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
# File 'lib/mux_ruby/api/assets_api.rb', line 516

def get_asset_with_http_info(asset_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AssetsApi.get_asset ...'
  end
  # verify the required parameter 'asset_id' is set
  if @api_client.config.client_side_validation && asset_id.nil?
    fail ArgumentError, "Missing the required parameter 'asset_id' when calling AssetsApi.get_asset"
  end
  # resource path
  local_var_path = '/video/v1/assets/{ASSET_ID}'.sub('{' + 'ASSET_ID' + '}', CGI.escape(asset_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'AssetResponse'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['accessToken']

  new_options = opts.merge(
    :operation => :"AssetsApi.get_asset",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AssetsApi#get_asset\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#list_assets(opts = {}) ⇒ ListAssetsResponse

List assets List all Mux assets.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :limit (Integer)

    Number of items to include in the response (default to 25)

  • :page (Integer)

    Offset by this many pages, of the size of &#x60;limit&#x60; (default to 1)

  • :live_stream_id (String)

    Filter response to return all the assets for this live stream only

  • :upload_id (String)

    Filter response to return an asset created from this direct upload only

Returns:



704
705
706
707
# File 'lib/mux_ruby/api/assets_api.rb', line 704

def list_assets(opts = {})
  data, _status_code, _headers = list_assets_with_http_info(opts)
  data
end

#list_assets_with_http_info(opts = {}) ⇒ Array<(ListAssetsResponse, Integer, Hash)>

List assets List all Mux assets.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :limit (Integer)

    Number of items to include in the response

  • :page (Integer)

    Offset by this many pages, of the size of &#x60;limit&#x60;

  • :live_stream_id (String)

    Filter response to return all the assets for this live stream only

  • :upload_id (String)

    Filter response to return an asset created from this direct upload only

Returns:

  • (Array<(ListAssetsResponse, Integer, Hash)>)

    ListAssetsResponse data, response status code and response headers



717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
# File 'lib/mux_ruby/api/assets_api.rb', line 717

def list_assets_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AssetsApi.list_assets ...'
  end
  # resource path
  local_var_path = '/video/v1/assets'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
  query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
  query_params[:'live_stream_id'] = opts[:'live_stream_id'] if !opts[:'live_stream_id'].nil?
  query_params[:'upload_id'] = opts[:'upload_id'] if !opts[:'upload_id'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'ListAssetsResponse'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['accessToken']

  new_options = opts.merge(
    :operation => :"AssetsApi.list_assets",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AssetsApi#list_assets\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#update_asset(asset_id, update_asset_request, opts = {}) ⇒ AssetResponse

Update an asset Updates the details of an already-created Asset with the provided Asset ID. This currently supports only the ‘passthrough` field.

Parameters:

  • asset_id (String)

    The asset ID.

  • update_asset_request (UpdateAssetRequest)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



771
772
773
774
# File 'lib/mux_ruby/api/assets_api.rb', line 771

def update_asset(asset_id, update_asset_request, opts = {})
  data, _status_code, _headers = update_asset_with_http_info(asset_id, update_asset_request, opts)
  data
end

#update_asset_master_access(asset_id, update_asset_master_access_request, opts = {}) ⇒ AssetResponse

Update master access Allows you to add temporary access to the master (highest-quality) version of the asset in MP4 format. A URL will be created that can be used to download the master version for 24 hours. After 24 hours Master Access will revert to "none". This master version is not optimized for web and not meant to be streamed, only downloaded for purposes like archiving or editing the video offline.

Parameters:

  • asset_id (String)

    The asset ID.

  • update_asset_master_access_request (UpdateAssetMasterAccessRequest)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



842
843
844
845
# File 'lib/mux_ruby/api/assets_api.rb', line 842

def update_asset_master_access(asset_id, update_asset_master_access_request, opts = {})
  data, _status_code, _headers = update_asset_master_access_with_http_info(asset_id, update_asset_master_access_request, opts)
  data
end

#update_asset_master_access_with_http_info(asset_id, update_asset_master_access_request, opts = {}) ⇒ Array<(AssetResponse, Integer, Hash)>

Update master access Allows you to add temporary access to the master (highest-quality) version of the asset in MP4 format. A URL will be created that can be used to download the master version for 24 hours. After 24 hours Master Access will revert to &quot;none&quot;. This master version is not optimized for web and not meant to be streamed, only downloaded for purposes like archiving or editing the video offline.

Parameters:

  • asset_id (String)

    The asset ID.

  • update_asset_master_access_request (UpdateAssetMasterAccessRequest)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(AssetResponse, Integer, Hash)>)

    AssetResponse data, response status code and response headers



853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
# File 'lib/mux_ruby/api/assets_api.rb', line 853

def update_asset_master_access_with_http_info(asset_id, update_asset_master_access_request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AssetsApi.update_asset_master_access ...'
  end
  # verify the required parameter 'asset_id' is set
  if @api_client.config.client_side_validation && asset_id.nil?
    fail ArgumentError, "Missing the required parameter 'asset_id' when calling AssetsApi.update_asset_master_access"
  end
  # verify the required parameter 'update_asset_master_access_request' is set
  if @api_client.config.client_side_validation && update_asset_master_access_request.nil?
    fail ArgumentError, "Missing the required parameter 'update_asset_master_access_request' when calling AssetsApi.update_asset_master_access"
  end
  # resource path
  local_var_path = '/video/v1/assets/{ASSET_ID}/master-access'.sub('{' + 'ASSET_ID' + '}', CGI.escape(asset_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(update_asset_master_access_request)

  # return_type
  return_type = opts[:debug_return_type] || 'AssetResponse'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['accessToken']

  new_options = opts.merge(
    :operation => :"AssetsApi.update_asset_master_access",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AssetsApi#update_asset_master_access\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#update_asset_mp4_support(asset_id, update_asset_mp4_support_request, opts = {}) ⇒ AssetResponse

Update MP4 support Allows you to add or remove mp4 support for assets that were created without it. The values supported are ‘capped-1080p`, `audio-only`, `audio-only,capped-1080p`, `standard`(deprecated), and `none`. `none` means that an asset *does not* have mp4 support, so submitting a request with `mp4_support` set to `none` will delete the mp4 assets from the asset in question.

Parameters:

  • asset_id (String)

    The asset ID.

  • update_asset_mp4_support_request (UpdateAssetMP4SupportRequest)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



913
914
915
916
# File 'lib/mux_ruby/api/assets_api.rb', line 913

def update_asset_mp4_support(asset_id, update_asset_mp4_support_request, opts = {})
  data, _status_code, _headers = update_asset_mp4_support_with_http_info(asset_id, update_asset_mp4_support_request, opts)
  data
end

#update_asset_mp4_support_with_http_info(asset_id, update_asset_mp4_support_request, opts = {}) ⇒ Array<(AssetResponse, Integer, Hash)>

Update MP4 support Allows you to add or remove mp4 support for assets that were created without it. The values supported are &#x60;capped-1080p&#x60;, &#x60;audio-only&#x60;, &#x60;audio-only,capped-1080p&#x60;, &#x60;standard&#x60;(deprecated), and &#x60;none&#x60;. &#x60;none&#x60; means that an asset *does not* have mp4 support, so submitting a request with &#x60;mp4_support&#x60; set to &#x60;none&#x60; will delete the mp4 assets from the asset in question.

Parameters:

  • asset_id (String)

    The asset ID.

  • update_asset_mp4_support_request (UpdateAssetMP4SupportRequest)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(AssetResponse, Integer, Hash)>)

    AssetResponse data, response status code and response headers



924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
# File 'lib/mux_ruby/api/assets_api.rb', line 924

def update_asset_mp4_support_with_http_info(asset_id, update_asset_mp4_support_request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AssetsApi.update_asset_mp4_support ...'
  end
  # verify the required parameter 'asset_id' is set
  if @api_client.config.client_side_validation && asset_id.nil?
    fail ArgumentError, "Missing the required parameter 'asset_id' when calling AssetsApi.update_asset_mp4_support"
  end
  # verify the required parameter 'update_asset_mp4_support_request' is set
  if @api_client.config.client_side_validation && update_asset_mp4_support_request.nil?
    fail ArgumentError, "Missing the required parameter 'update_asset_mp4_support_request' when calling AssetsApi.update_asset_mp4_support"
  end
  # resource path
  local_var_path = '/video/v1/assets/{ASSET_ID}/mp4-support'.sub('{' + 'ASSET_ID' + '}', CGI.escape(asset_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(update_asset_mp4_support_request)

  # return_type
  return_type = opts[:debug_return_type] || 'AssetResponse'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['accessToken']

  new_options = opts.merge(
    :operation => :"AssetsApi.update_asset_mp4_support",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AssetsApi#update_asset_mp4_support\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#update_asset_with_http_info(asset_id, update_asset_request, opts = {}) ⇒ Array<(AssetResponse, Integer, Hash)>

Update an asset Updates the details of an already-created Asset with the provided Asset ID. This currently supports only the &#x60;passthrough&#x60; field.

Parameters:

  • asset_id (String)

    The asset ID.

  • update_asset_request (UpdateAssetRequest)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(AssetResponse, Integer, Hash)>)

    AssetResponse data, response status code and response headers



782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
# File 'lib/mux_ruby/api/assets_api.rb', line 782

def update_asset_with_http_info(asset_id, update_asset_request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AssetsApi.update_asset ...'
  end
  # verify the required parameter 'asset_id' is set
  if @api_client.config.client_side_validation && asset_id.nil?
    fail ArgumentError, "Missing the required parameter 'asset_id' when calling AssetsApi.update_asset"
  end
  # verify the required parameter 'update_asset_request' is set
  if @api_client.config.client_side_validation && update_asset_request.nil?
    fail ArgumentError, "Missing the required parameter 'update_asset_request' when calling AssetsApi.update_asset"
  end
  # resource path
  local_var_path = '/video/v1/assets/{ASSET_ID}'.sub('{' + 'ASSET_ID' + '}', CGI.escape(asset_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(update_asset_request)

  # return_type
  return_type = opts[:debug_return_type] || 'AssetResponse'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['accessToken']

  new_options = opts.merge(
    :operation => :"AssetsApi.update_asset",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AssetsApi#update_asset\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end