Class: MuxRuby::AssetsApi
- Inherits:
-
Object
- Object
- MuxRuby::AssetsApi
- Defined in:
- lib/mux_ruby/api/assets_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#create_asset(create_asset_request, opts = {}) ⇒ AssetResponse
Create an asset Create a new Mux Video asset.
-
#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.
-
#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.
-
#create_asset_static_rendition(asset_id, create_static_rendition_request, opts = {}) ⇒ CreateStaticRenditionResponse
Create a static rendition for an asset Creates a static rendition (i.e. MP4) for an asset.
-
#create_asset_static_rendition_with_http_info(asset_id, create_static_rendition_request, opts = {}) ⇒ Array<(CreateStaticRenditionResponse, Integer, Hash)>
Create a static rendition for an asset Creates a static rendition (i.e. MP4) for an asset.
-
#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.
-
#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.
-
#create_asset_with_http_info(create_asset_request, opts = {}) ⇒ Array<(AssetResponse, Integer, Hash)>
Create an asset Create a new Mux Video asset.
-
#delete_asset(asset_id, opts = {}) ⇒ nil
Delete an asset Deletes a video asset and all its data.
-
#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.
-
#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's video content.
-
#delete_asset_static_rendition(asset_id, static_rendition_id, opts = {}) ⇒ nil
Delete a single static rendition for an asset Deletes a single static rendition for an asset.
-
#delete_asset_static_rendition_with_http_info(asset_id, static_rendition_id, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Delete a single static rendition for an asset Deletes a single static rendition for an asset.
-
#delete_asset_track(asset_id, track_id, opts = {}) ⇒ nil
Delete an asset track Removes a text or additional audio track from an asset.
-
#delete_asset_track_with_http_info(asset_id, track_id, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Delete an asset track Removes a text or additional audio track from an asset.
-
#delete_asset_with_http_info(asset_id, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Delete an asset Deletes a video asset and all its data.
-
#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.
-
#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.
-
#get_asset(asset_id, opts = {}) ⇒ AssetResponse
Retrieve an asset Retrieves the details of an asset that has previously been created.
-
#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.
-
#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.
-
#get_asset_playback_id(asset_id, playback_id, opts = {}) ⇒ GetAssetPlaybackIDResponse
Retrieve a playback ID Retrieves information about the specified playback ID.
-
#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.
-
#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.
-
#initialize(api_client = ApiClient.default) ⇒ AssetsApi
constructor
A new instance of AssetsApi.
-
#list_assets(opts = {}) ⇒ ListAssetsResponse
List assets List all Mux assets.
-
#list_assets_with_http_info(opts = {}) ⇒ Array<(ListAssetsResponse, Integer, Hash)>
List assets List all Mux assets.
-
#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.
-
#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.
-
#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.
-
#update_asset_mp4_support(asset_id, update_asset_mp4_support_request, opts = {}) ⇒ AssetResponse
Update MP4 support This method has been deprecated.
-
#update_asset_mp4_support_with_http_info(asset_id, update_asset_mp4_support_request, opts = {}) ⇒ Array<(AssetResponse, Integer, Hash)>
Update MP4 support This method has been deprecated.
-
#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.
Constructor Details
Instance Attribute Details
#api_client ⇒ Object
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.
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.
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.
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'] = 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, ) 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_static_rendition(asset_id, create_static_rendition_request, opts = {}) ⇒ CreateStaticRenditionResponse
Create a static rendition for an asset Creates a static rendition (i.e. MP4) for an asset
164 165 166 167 |
# File 'lib/mux_ruby/api/assets_api.rb', line 164 def create_asset_static_rendition(asset_id, create_static_rendition_request, opts = {}) data, _status_code, _headers = create_asset_static_rendition_with_http_info(asset_id, create_static_rendition_request, opts) data end |
#create_asset_static_rendition_with_http_info(asset_id, create_static_rendition_request, opts = {}) ⇒ Array<(CreateStaticRenditionResponse, Integer, Hash)>
Create a static rendition for an asset Creates a static rendition (i.e. MP4) for an asset
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_static_rendition_with_http_info(asset_id, create_static_rendition_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AssetsApi.create_asset_static_rendition ...' 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_static_rendition" end # verify the required parameter 'create_static_rendition_request' is set if @api_client.config.client_side_validation && create_static_rendition_request.nil? fail ArgumentError, "Missing the required parameter 'create_static_rendition_request' when calling AssetsApi.create_asset_static_rendition" end # resource path local_var_path = '/video/v1/assets/{ASSET_ID}/static-renditions'.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_static_rendition_request) # return_type return_type = opts[:debug_return_type] || 'CreateStaticRenditionResponse' # auth_names auth_names = opts[:debug_auth_names] || ['accessToken'] = opts.merge( :operation => :"AssetsApi.create_asset_static_rendition", :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, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: AssetsApi#create_asset_static_rendition\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. Assets must be in the ‘ready` state before tracks can be added.
235 236 237 238 |
# File 'lib/mux_ruby/api/assets_api.rb', line 235 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. Assets must be in the `ready` state before tracks can be added.
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 289 290 291 292 293 294 295 296 297 298 |
# File 'lib/mux_ruby/api/assets_api.rb', line 246 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'] = 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, ) 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.
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'] = 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, ) 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.
305 306 307 308 |
# File 'lib/mux_ruby/api/assets_api.rb', line 305 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.
367 368 369 370 |
# File 'lib/mux_ruby/api/assets_api.rb', line 367 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'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.
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 423 424 425 426 |
# File 'lib/mux_ruby/api/assets_api.rb', line 378 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'] = 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, ) 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_static_rendition(asset_id, static_rendition_id, opts = {}) ⇒ nil
Delete a single static rendition for an asset Deletes a single static rendition for an asset
434 435 436 437 |
# File 'lib/mux_ruby/api/assets_api.rb', line 434 def delete_asset_static_rendition(asset_id, static_rendition_id, opts = {}) delete_asset_static_rendition_with_http_info(asset_id, static_rendition_id, opts) nil end |
#delete_asset_static_rendition_with_http_info(asset_id, static_rendition_id, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Delete a single static rendition for an asset Deletes a single static rendition for an asset
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 |
# File 'lib/mux_ruby/api/assets_api.rb', line 445 def delete_asset_static_rendition_with_http_info(asset_id, static_rendition_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AssetsApi.delete_asset_static_rendition ...' 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_static_rendition" end # verify the required parameter 'static_rendition_id' is set if @api_client.config.client_side_validation && static_rendition_id.nil? fail ArgumentError, "Missing the required parameter 'static_rendition_id' when calling AssetsApi.delete_asset_static_rendition" end # resource path local_var_path = '/video/v1/assets/{ASSET_ID}/static-renditions/{STATIC_RENDITION_ID}'.sub('{' + 'ASSET_ID' + '}', CGI.escape(asset_id.to_s)).sub('{' + 'STATIC_RENDITION_ID' + '}', CGI.escape(static_rendition_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'] = opts.merge( :operation => :"AssetsApi.delete_asset_static_rendition", :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, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: AssetsApi#delete_asset_static_rendition\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 or additional audio track from an asset. Neither video nor the primary audio track can be removed.
501 502 503 504 |
# File 'lib/mux_ruby/api/assets_api.rb', line 501 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 or additional audio track from an asset. Neither video nor the primary audio track can be removed.
512 513 514 515 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 |
# File 'lib/mux_ruby/api/assets_api.rb', line 512 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'] = 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, ) 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.
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 356 357 358 359 |
# File 'lib/mux_ruby/api/assets_api.rb', line 315 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'] = 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, ) 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.
569 570 571 572 |
# File 'lib/mux_ruby/api/assets_api.rb', line 569 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.
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 626 627 628 629 630 631 632 633 634 635 636 637 |
# File 'lib/mux_ruby/api/assets_api.rb', line 581 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'] = 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, ) 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.
644 645 646 647 |
# File 'lib/mux_ruby/api/assets_api.rb', line 644 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.
707 708 709 710 |
# File 'lib/mux_ruby/api/assets_api.rb', line 707 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.
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 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'] = 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, ) 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.
771 772 773 774 |
# File 'lib/mux_ruby/api/assets_api.rb', line 771 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.
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 |
# File 'lib/mux_ruby/api/assets_api.rb', line 782 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'] = 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, ) 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.
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 695 696 697 698 699 700 |
# File 'lib/mux_ruby/api/assets_api.rb', line 654 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'] = 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, ) 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.
843 844 845 846 |
# File 'lib/mux_ruby/api/assets_api.rb', line 843 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.
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 |
# File 'lib/mux_ruby/api/assets_api.rb', line 857 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[:'cursor'] = opts[:'cursor'] if !opts[:'cursor'].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'] = 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, ) 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.
912 913 914 915 |
# File 'lib/mux_ruby/api/assets_api.rb', line 912 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.
983 984 985 986 |
# File 'lib/mux_ruby/api/assets_api.rb', line 983 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 "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.
994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 |
# File 'lib/mux_ruby/api/assets_api.rb', line 994 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'] = 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, ) 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 This method has been deprecated. Please see the [Static Rendition API](www.mux.com/docs/guides/enable-static-mp4-renditions#after-asset-creation). 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.
1054 1055 1056 1057 |
# File 'lib/mux_ruby/api/assets_api.rb', line 1054 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 This method has been deprecated. Please see the [Static Rendition API](www.mux.com/docs/guides/enable-static-mp4-renditions#after-asset-creation). 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.
1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 |
# File 'lib/mux_ruby/api/assets_api.rb', line 1065 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'] = 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, ) 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 `passthrough` field.
923 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 |
# File 'lib/mux_ruby/api/assets_api.rb', line 923 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'] = 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, ) 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 |