mux_ruby 1.0.0 → 1.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +5 -5
 - data/Gemfile +2 -1
 - data/Gemfile.lock +37 -35
 - data/README.md +5 -0
 - data/docs/Asset.md +2 -1
 - data/docs/AssetsApi.md +157 -0
 - data/docs/CreateAssetRequest.md +3 -1
 - data/docs/CreateLiveStreamRequest.md +4 -0
 - data/docs/CreateSimulcastTargetRequest.md +10 -0
 - data/docs/CreateTrackRequest.md +14 -0
 - data/docs/CreateTrackResponse.md +8 -0
 - data/docs/CreateUploadRequest.md +1 -0
 - data/docs/DeliveryReport.md +14 -0
 - data/docs/DeliveryUsageApi.md +68 -0
 - data/docs/GetMetricTimeseriesDataResponse.md +1 -1
 - data/docs/GetOverallValuesResponse.md +1 -1
 - data/docs/InputSettings.md +6 -1
 - data/docs/InputTrack.md +0 -2
 - data/docs/Insight.md +2 -2
 - data/docs/ListAllMetricValuesResponse.md +1 -1
 - data/docs/ListBreakdownValuesResponse.md +1 -1
 - data/docs/ListDeliveryUsageResponse.md +11 -0
 - data/docs/ListErrorsResponse.md +1 -1
 - data/docs/ListExportsResponse.md +1 -1
 - data/docs/ListFilterValuesResponse.md +1 -1
 - data/docs/ListFiltersResponse.md +1 -1
 - data/docs/ListInsightsResponse.md +1 -1
 - data/docs/ListVideoViewsResponse.md +1 -1
 - data/docs/LiveStream.md +3 -0
 - data/docs/LiveStreamsApi.md +161 -0
 - data/docs/SigningKeyResponse.md +1 -1
 - data/docs/SimulcastTarget.md +12 -0
 - data/docs/SimulcastTargetResponse.md +8 -0
 - data/docs/Track.md +5 -2
 - data/docs/UpdateAssetMasterAccessRequest.md +8 -0
 - data/docs/Upload.md +1 -0
 - data/docs/VideoViewResponse.md +1 -1
 - data/examples/data/exercise-errors.rb +1 -1
 - data/examples/data/exercise-metrics.rb +0 -7
 - data/examples/video/exercise-assets.rb +27 -1
 - data/examples/video/exercise-delivery-usage.rb +23 -0
 - data/examples/video/exercise-live-streams.rb +28 -1
 - data/lib/mux_ruby.rb +9 -0
 - data/lib/mux_ruby/api/assets_api.rb +174 -0
 - data/lib/mux_ruby/api/delivery_usage_api.rb +75 -0
 - data/lib/mux_ruby/api/live_streams_api.rb +176 -0
 - data/lib/mux_ruby/api_client.rb +7 -2
 - data/lib/mux_ruby/api_error.rb +3 -0
 - data/lib/mux_ruby/configuration.rb +1 -4
 - data/lib/mux_ruby/models/asset.rb +24 -13
 - data/lib/mux_ruby/models/create_asset_request.rb +46 -13
 - data/lib/mux_ruby/models/create_live_stream_request.rb +66 -4
 - data/lib/mux_ruby/models/create_simulcast_target_request.rb +210 -0
 - data/lib/mux_ruby/models/create_track_request.rb +304 -0
 - data/lib/mux_ruby/models/create_track_response.rb +184 -0
 - data/lib/mux_ruby/models/create_upload_request.rb +13 -4
 - data/lib/mux_ruby/models/delivery_report.rb +238 -0
 - data/lib/mux_ruby/models/get_metric_timeseries_data_response.rb +1 -1
 - data/lib/mux_ruby/models/get_overall_values_response.rb +1 -1
 - data/lib/mux_ruby/models/input_settings.rb +104 -13
 - data/lib/mux_ruby/models/input_settings_overlay_settings.rb +46 -0
 - data/lib/mux_ruby/models/input_track.rb +4 -22
 - data/lib/mux_ruby/models/insight.rb +2 -2
 - data/lib/mux_ruby/models/list_all_metric_values_response.rb +1 -1
 - data/lib/mux_ruby/models/list_breakdown_values_response.rb +1 -1
 - data/lib/mux_ruby/models/list_delivery_usage_response.rb +216 -0
 - data/lib/mux_ruby/models/list_errors_response.rb +1 -1
 - data/lib/mux_ruby/models/list_exports_response.rb +1 -1
 - data/lib/mux_ruby/models/list_filter_values_response.rb +1 -1
 - data/lib/mux_ruby/models/list_filters_response.rb +1 -1
 - data/lib/mux_ruby/models/list_insights_response.rb +1 -1
 - data/lib/mux_ruby/models/list_video_views_response.rb +1 -1
 - data/lib/mux_ruby/models/live_stream.rb +33 -4
 - data/lib/mux_ruby/models/simulcast_target.rb +259 -0
 - data/lib/mux_ruby/models/simulcast_target_response.rb +184 -0
 - data/lib/mux_ruby/models/track.rb +86 -13
 - data/lib/mux_ruby/models/update_asset_master_access_request.rb +219 -0
 - data/lib/mux_ruby/models/upload.rb +13 -4
 - data/lib/mux_ruby/models/video_view_response.rb +1 -1
 - data/lib/mux_ruby/version.rb +1 -1
 - data/spec/api/assets_api_spec.rb +37 -0
 - data/spec/api/delivery_usage_api_spec.rb +43 -0
 - data/spec/api/live_streams_api_spec.rb +39 -0
 - data/spec/models/asset_spec.rb +12 -6
 - data/spec/models/create_asset_request_spec.rb +22 -6
 - data/spec/models/create_live_stream_request_spec.rb +24 -0
 - data/spec/models/create_simulcast_target_request_spec.rb +46 -0
 - data/spec/models/create_track_request_spec.rb +78 -0
 - data/spec/models/create_track_response_spec.rb +34 -0
 - data/spec/models/create_upload_request_spec.rb +6 -0
 - data/spec/models/delivery_report_spec.rb +70 -0
 - data/spec/models/input_settings_overlay_settings_spec.rb +8 -0
 - data/spec/models/input_settings_spec.rb +40 -2
 - data/spec/models/input_track_spec.rb +0 -12
 - data/spec/models/list_delivery_usage_response_spec.rb +52 -0
 - data/spec/models/live_stream_spec.rb +18 -0
 - data/spec/models/simulcast_target_response_spec.rb +34 -0
 - data/spec/models/simulcast_target_spec.rb +62 -0
 - data/spec/models/track_spec.rb +28 -2
 - data/spec/models/update_asset_master_access_request_spec.rb +38 -0
 - data/spec/models/upload_spec.rb +6 -0
 - data/test.sh +28 -0
 - metadata +91 -54
 
| 
         @@ -5,6 +5,6 @@ Name | Type | Description | Notes 
     | 
|
| 
       5 
5 
     | 
    
         
             
            ------------ | ------------- | ------------- | -------------
         
     | 
| 
       6 
6 
     | 
    
         
             
            **data** | **Array<Array<String>>** |  | [optional] 
         
     | 
| 
       7 
7 
     | 
    
         
             
            **total_row_count** | **Integer** |  | [optional] 
         
     | 
| 
       8 
     | 
    
         
            -
            **timeframe** | **Array< 
     | 
| 
      
 8 
     | 
    
         
            +
            **timeframe** | **Array<Integer>** |  | [optional] 
         
     | 
| 
       9 
9 
     | 
    
         | 
| 
       10 
10 
     | 
    
         | 
| 
         @@ -5,6 +5,6 @@ Name | Type | Description | Notes 
     | 
|
| 
       5 
5 
     | 
    
         
             
            ------------ | ------------- | ------------- | -------------
         
     | 
| 
       6 
6 
     | 
    
         
             
            **data** | [**OverallValues**](OverallValues.md) |  | [optional] 
         
     | 
| 
       7 
7 
     | 
    
         
             
            **total_row_count** | **Integer** |  | [optional] 
         
     | 
| 
       8 
     | 
    
         
            -
            **timeframe** | **Array< 
     | 
| 
      
 8 
     | 
    
         
            +
            **timeframe** | **Array<Integer>** |  | [optional] 
         
     | 
| 
       9 
9 
     | 
    
         | 
| 
       10 
10 
     | 
    
         | 
    
        data/docs/InputSettings.md
    CHANGED
    
    | 
         @@ -4,7 +4,12 @@ 
     | 
|
| 
       4 
4 
     | 
    
         
             
            Name | Type | Description | Notes
         
     | 
| 
       5 
5 
     | 
    
         
             
            ------------ | ------------- | ------------- | -------------
         
     | 
| 
       6 
6 
     | 
    
         
             
            **url** | **String** |  | [optional] 
         
     | 
| 
       7 
     | 
    
         
            -
            **language** | **String** |  | [optional] 
         
     | 
| 
       8 
7 
     | 
    
         
             
            **overlay_settings** | [**InputSettingsOverlaySettings**](InputSettingsOverlaySettings.md) |  | [optional] 
         
     | 
| 
      
 8 
     | 
    
         
            +
            **type** | **String** |  | [optional] 
         
     | 
| 
      
 9 
     | 
    
         
            +
            **text_type** | **String** |  | [optional] 
         
     | 
| 
      
 10 
     | 
    
         
            +
            **language_code** | **String** |  | [optional] 
         
     | 
| 
      
 11 
     | 
    
         
            +
            **name** | **String** |  | [optional] 
         
     | 
| 
      
 12 
     | 
    
         
            +
            **closed_captions** | **BOOLEAN** |  | [optional] 
         
     | 
| 
      
 13 
     | 
    
         
            +
            **passthrough** | **String** |  | [optional] 
         
     | 
| 
       9 
14 
     | 
    
         | 
| 
       10 
15 
     | 
    
         | 
    
        data/docs/InputTrack.md
    CHANGED
    
    | 
         @@ -12,7 +12,5 @@ Name | Type | Description | Notes 
     | 
|
| 
       12 
12 
     | 
    
         
             
            **sample_rate** | **Integer** |  | [optional] 
         
     | 
| 
       13 
13 
     | 
    
         
             
            **sample_size** | **Integer** |  | [optional] 
         
     | 
| 
       14 
14 
     | 
    
         
             
            **channels** | **Integer** |  | [optional] 
         
     | 
| 
       15 
     | 
    
         
            -
            **text_track_type** | **String** |  | [optional] 
         
     | 
| 
       16 
     | 
    
         
            -
            **language** | **String** |  | [optional] 
         
     | 
| 
       17 
15 
     | 
    
         | 
| 
       18 
16 
     | 
    
         | 
    
        data/docs/Insight.md
    CHANGED
    
    | 
         @@ -5,8 +5,8 @@ Name | Type | Description | Notes 
     | 
|
| 
       5 
5 
     | 
    
         
             
            ------------ | ------------- | ------------- | -------------
         
     | 
| 
       6 
6 
     | 
    
         
             
            **total_watch_time** | **Integer** |  | [optional] 
         
     | 
| 
       7 
7 
     | 
    
         
             
            **total_views** | **Integer** |  | [optional] 
         
     | 
| 
       8 
     | 
    
         
            -
            **negative_impact_score** | ** 
     | 
| 
       9 
     | 
    
         
            -
            **metric** | ** 
     | 
| 
      
 8 
     | 
    
         
            +
            **negative_impact_score** | **Float** |  | [optional] 
         
     | 
| 
      
 9 
     | 
    
         
            +
            **metric** | **Float** |  | [optional] 
         
     | 
| 
       10 
10 
     | 
    
         
             
            **filter_value** | **String** |  | [optional] 
         
     | 
| 
       11 
11 
     | 
    
         
             
            **filter_column** | **String** |  | [optional] 
         
     | 
| 
       12 
12 
     | 
    
         | 
| 
         @@ -5,6 +5,6 @@ Name | Type | Description | Notes 
     | 
|
| 
       5 
5 
     | 
    
         
             
            ------------ | ------------- | ------------- | -------------
         
     | 
| 
       6 
6 
     | 
    
         
             
            **data** | [**Array<Score>**](Score.md) |  | [optional] 
         
     | 
| 
       7 
7 
     | 
    
         
             
            **total_row_count** | **Integer** |  | [optional] 
         
     | 
| 
       8 
     | 
    
         
            -
            **timeframe** | **Array< 
     | 
| 
      
 8 
     | 
    
         
            +
            **timeframe** | **Array<Integer>** |  | [optional] 
         
     | 
| 
       9 
9 
     | 
    
         | 
| 
       10 
10 
     | 
    
         | 
| 
         @@ -5,6 +5,6 @@ Name | Type | Description | Notes 
     | 
|
| 
       5 
5 
     | 
    
         
             
            ------------ | ------------- | ------------- | -------------
         
     | 
| 
       6 
6 
     | 
    
         
             
            **data** | [**Array<BreakdownValue>**](BreakdownValue.md) |  | [optional] 
         
     | 
| 
       7 
7 
     | 
    
         
             
            **total_row_count** | **Integer** |  | [optional] 
         
     | 
| 
       8 
     | 
    
         
            -
            **timeframe** | **Array< 
     | 
| 
      
 8 
     | 
    
         
            +
            **timeframe** | **Array<Integer>** |  | [optional] 
         
     | 
| 
       9 
9 
     | 
    
         | 
| 
       10 
10 
     | 
    
         | 
| 
         @@ -0,0 +1,11 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            # MuxRuby::ListDeliveryUsageResponse
         
     | 
| 
      
 2 
     | 
    
         
            +
             
     | 
| 
      
 3 
     | 
    
         
            +
            ## Properties
         
     | 
| 
      
 4 
     | 
    
         
            +
            Name | Type | Description | Notes
         
     | 
| 
      
 5 
     | 
    
         
            +
            ------------ | ------------- | ------------- | -------------
         
     | 
| 
      
 6 
     | 
    
         
            +
            **data** | [**Array<DeliveryReport>**](DeliveryReport.md) |  | [optional] 
         
     | 
| 
      
 7 
     | 
    
         
            +
            **total_row_count** | **Integer** |  | [optional] 
         
     | 
| 
      
 8 
     | 
    
         
            +
            **timeframe** | **Array<Integer>** |  | [optional] 
         
     | 
| 
      
 9 
     | 
    
         
            +
            **limit** | **Integer** | Number of assets returned in this response. Default value is 100. | [optional] 
         
     | 
| 
      
 10 
     | 
    
         
            +
             
     | 
| 
      
 11 
     | 
    
         
            +
             
     | 
    
        data/docs/ListErrorsResponse.md
    CHANGED
    
    | 
         @@ -5,6 +5,6 @@ Name | Type | Description | Notes 
     | 
|
| 
       5 
5 
     | 
    
         
             
            ------------ | ------------- | ------------- | -------------
         
     | 
| 
       6 
6 
     | 
    
         
             
            **data** | [**Array<Error>**](Error.md) |  | [optional] 
         
     | 
| 
       7 
7 
     | 
    
         
             
            **total_row_count** | **Integer** |  | [optional] 
         
     | 
| 
       8 
     | 
    
         
            -
            **timeframe** | **Array< 
     | 
| 
      
 8 
     | 
    
         
            +
            **timeframe** | **Array<Integer>** |  | [optional] 
         
     | 
| 
       9 
9 
     | 
    
         | 
| 
       10 
10 
     | 
    
         | 
    
        data/docs/ListExportsResponse.md
    CHANGED
    
    | 
         @@ -5,6 +5,6 @@ Name | Type | Description | Notes 
     | 
|
| 
       5 
5 
     | 
    
         
             
            ------------ | ------------- | ------------- | -------------
         
     | 
| 
       6 
6 
     | 
    
         
             
            **data** | **Array<String>** |  | [optional] 
         
     | 
| 
       7 
7 
     | 
    
         
             
            **total_row_count** | **Integer** |  | [optional] 
         
     | 
| 
       8 
     | 
    
         
            -
            **timeframe** | **Array< 
     | 
| 
      
 8 
     | 
    
         
            +
            **timeframe** | **Array<Integer>** |  | [optional] 
         
     | 
| 
       9 
9 
     | 
    
         | 
| 
       10 
10 
     | 
    
         | 
| 
         @@ -5,6 +5,6 @@ Name | Type | Description | Notes 
     | 
|
| 
       5 
5 
     | 
    
         
             
            ------------ | ------------- | ------------- | -------------
         
     | 
| 
       6 
6 
     | 
    
         
             
            **data** | [**Array<FilterValue>**](FilterValue.md) |  | [optional] 
         
     | 
| 
       7 
7 
     | 
    
         
             
            **total_row_count** | **Integer** |  | [optional] 
         
     | 
| 
       8 
     | 
    
         
            -
            **timeframe** | **Array< 
     | 
| 
      
 8 
     | 
    
         
            +
            **timeframe** | **Array<Integer>** |  | [optional] 
         
     | 
| 
       9 
9 
     | 
    
         | 
| 
       10 
10 
     | 
    
         | 
    
        data/docs/ListFiltersResponse.md
    CHANGED
    
    | 
         @@ -5,6 +5,6 @@ Name | Type | Description | Notes 
     | 
|
| 
       5 
5 
     | 
    
         
             
            ------------ | ------------- | ------------- | -------------
         
     | 
| 
       6 
6 
     | 
    
         
             
            **data** | [**ListFiltersResponseData**](ListFiltersResponseData.md) |  | [optional] 
         
     | 
| 
       7 
7 
     | 
    
         
             
            **total_row_count** | **Integer** |  | [optional] 
         
     | 
| 
       8 
     | 
    
         
            -
            **timeframe** | **Array< 
     | 
| 
      
 8 
     | 
    
         
            +
            **timeframe** | **Array<Integer>** |  | [optional] 
         
     | 
| 
       9 
9 
     | 
    
         | 
| 
       10 
10 
     | 
    
         | 
| 
         @@ -5,6 +5,6 @@ Name | Type | Description | Notes 
     | 
|
| 
       5 
5 
     | 
    
         
             
            ------------ | ------------- | ------------- | -------------
         
     | 
| 
       6 
6 
     | 
    
         
             
            **data** | [**Array<Insight>**](Insight.md) |  | [optional] 
         
     | 
| 
       7 
7 
     | 
    
         
             
            **total_row_count** | **Integer** |  | [optional] 
         
     | 
| 
       8 
     | 
    
         
            -
            **timeframe** | **Array< 
     | 
| 
      
 8 
     | 
    
         
            +
            **timeframe** | **Array<Integer>** |  | [optional] 
         
     | 
| 
       9 
9 
     | 
    
         | 
| 
       10 
10 
     | 
    
         | 
| 
         @@ -5,6 +5,6 @@ Name | Type | Description | Notes 
     | 
|
| 
       5 
5 
     | 
    
         
             
            ------------ | ------------- | ------------- | -------------
         
     | 
| 
       6 
6 
     | 
    
         
             
            **data** | [**Array<AbridgedVideoView>**](AbridgedVideoView.md) |  | [optional] 
         
     | 
| 
       7 
7 
     | 
    
         
             
            **total_row_count** | **Integer** |  | [optional] 
         
     | 
| 
       8 
     | 
    
         
            -
            **timeframe** | **Array< 
     | 
| 
      
 8 
     | 
    
         
            +
            **timeframe** | **Array<Integer>** |  | [optional] 
         
     | 
| 
       9 
9 
     | 
    
         | 
| 
       10 
10 
     | 
    
         | 
    
        data/docs/LiveStream.md
    CHANGED
    
    | 
         @@ -13,5 +13,8 @@ Name | Type | Description | Notes 
     | 
|
| 
       13 
13 
     | 
    
         
             
            **new_asset_settings** | [**Asset**](Asset.md) |  | [optional] 
         
     | 
| 
       14 
14 
     | 
    
         
             
            **passthrough** | **String** |  | [optional] 
         
     | 
| 
       15 
15 
     | 
    
         
             
            **reconnect_window** | **Float** |  | [optional] 
         
     | 
| 
      
 16 
     | 
    
         
            +
            **reduced_latency** | **BOOLEAN** |  | [optional] 
         
     | 
| 
      
 17 
     | 
    
         
            +
            **simulcast_targets** | [**Array<SimulcastTarget>**](SimulcastTarget.md) |  | [optional] 
         
     | 
| 
      
 18 
     | 
    
         
            +
            **test** | **BOOLEAN** |  | [optional] 
         
     | 
| 
       16 
19 
     | 
    
         | 
| 
       17 
20 
     | 
    
         | 
    
        data/docs/LiveStreamsApi.md
    CHANGED
    
    | 
         @@ -6,9 +6,12 @@ Method | HTTP request | Description 
     | 
|
| 
       6 
6 
     | 
    
         
             
            ------------- | ------------- | -------------
         
     | 
| 
       7 
7 
     | 
    
         
             
            [**create_live_stream**](LiveStreamsApi.md#create_live_stream) | **POST** /video/v1/live-streams | Create a live stream
         
     | 
| 
       8 
8 
     | 
    
         
             
            [**create_live_stream_playback_id**](LiveStreamsApi.md#create_live_stream_playback_id) | **POST** /video/v1/live-streams/{LIVE_STREAM_ID}/playback-ids | Create a live stream playback ID
         
     | 
| 
      
 9 
     | 
    
         
            +
            [**create_live_stream_simulcast_target**](LiveStreamsApi.md#create_live_stream_simulcast_target) | **POST** /video/v1/live-streams/{LIVE_STREAM_ID}/simulcast-targets | Create a live stream simulcast target
         
     | 
| 
       9 
10 
     | 
    
         
             
            [**delete_live_stream**](LiveStreamsApi.md#delete_live_stream) | **DELETE** /video/v1/live-streams/{LIVE_STREAM_ID} | Delete a live stream
         
     | 
| 
       10 
11 
     | 
    
         
             
            [**delete_live_stream_playback_id**](LiveStreamsApi.md#delete_live_stream_playback_id) | **DELETE** /video/v1/live-streams/{LIVE_STREAM_ID}/playback-ids/{PLAYBACK_ID} | Delete a live stream playback ID
         
     | 
| 
      
 12 
     | 
    
         
            +
            [**delete_live_stream_simulcast_target**](LiveStreamsApi.md#delete_live_stream_simulcast_target) | **DELETE** /video/v1/live-streams/{LIVE_STREAM_ID}/simulcast-targets/{SIMULCAST_TARGET_ID} | Delete a Live Stream Simulcast Target
         
     | 
| 
       11 
13 
     | 
    
         
             
            [**get_live_stream**](LiveStreamsApi.md#get_live_stream) | **GET** /video/v1/live-streams/{LIVE_STREAM_ID} | Retrieve a live stream
         
     | 
| 
      
 14 
     | 
    
         
            +
            [**get_live_stream_simulcast_target**](LiveStreamsApi.md#get_live_stream_simulcast_target) | **GET** /video/v1/live-streams/{LIVE_STREAM_ID}/simulcast-targets/{SIMULCAST_TARGET_ID} | Retrieve a Live Stream Simulcast Target
         
     | 
| 
       12 
15 
     | 
    
         
             
            [**list_live_streams**](LiveStreamsApi.md#list_live_streams) | **GET** /video/v1/live-streams | List live streams
         
     | 
| 
       13 
16 
     | 
    
         
             
            [**reset_stream_key**](LiveStreamsApi.md#reset_stream_key) | **POST** /video/v1/live-streams/{LIVE_STREAM_ID}/reset-stream-key | Reset a live stream’s stream key
         
     | 
| 
       14 
17 
     | 
    
         
             
            [**signal_live_stream_complete**](LiveStreamsApi.md#signal_live_stream_complete) | **PUT** /video/v1/live-streams/{LIVE_STREAM_ID}/complete | Signal a live stream is finished
         
     | 
| 
         @@ -114,6 +117,59 @@ Name | Type | Description  | Notes 
     | 
|
| 
       114 
117 
     | 
    
         | 
| 
       115 
118 
     | 
    
         | 
| 
       116 
119 
     | 
    
         | 
| 
      
 120 
     | 
    
         
            +
            # **create_live_stream_simulcast_target**
         
     | 
| 
      
 121 
     | 
    
         
            +
            > SimulcastTargetResponse create_live_stream_simulcast_target(live_stream_id, create_simulcast_target_request)
         
     | 
| 
      
 122 
     | 
    
         
            +
             
     | 
| 
      
 123 
     | 
    
         
            +
            Create a live stream simulcast target
         
     | 
| 
      
 124 
     | 
    
         
            +
             
     | 
| 
      
 125 
     | 
    
         
            +
            Create a simulcast target for the parent live stream. Simulcast target can only be created when the parent live stream is in idle state. Only one simulcast target can be created at a time with this API.
         
     | 
| 
      
 126 
     | 
    
         
            +
             
     | 
| 
      
 127 
     | 
    
         
            +
            ### Example
         
     | 
| 
      
 128 
     | 
    
         
            +
            ```ruby
         
     | 
| 
      
 129 
     | 
    
         
            +
            # load the gem
         
     | 
| 
      
 130 
     | 
    
         
            +
            require 'mux_ruby'
         
     | 
| 
      
 131 
     | 
    
         
            +
            # setup authorization
         
     | 
| 
      
 132 
     | 
    
         
            +
            MuxRuby.configure do |config|
         
     | 
| 
      
 133 
     | 
    
         
            +
              # Configure HTTP basic authorization: accessToken
         
     | 
| 
      
 134 
     | 
    
         
            +
              config.username = 'YOUR USERNAME'
         
     | 
| 
      
 135 
     | 
    
         
            +
              config.password = 'YOUR PASSWORD'
         
     | 
| 
      
 136 
     | 
    
         
            +
            end
         
     | 
| 
      
 137 
     | 
    
         
            +
             
     | 
| 
      
 138 
     | 
    
         
            +
            api_instance = MuxRuby::LiveStreamsApi.new
         
     | 
| 
      
 139 
     | 
    
         
            +
            live_stream_id = 'live_stream_id_example' # String | The live stream ID
         
     | 
| 
      
 140 
     | 
    
         
            +
            create_simulcast_target_request = MuxRuby::CreateSimulcastTargetRequest.new # CreateSimulcastTargetRequest | 
         
     | 
| 
      
 141 
     | 
    
         
            +
             
     | 
| 
      
 142 
     | 
    
         
            +
            begin
         
     | 
| 
      
 143 
     | 
    
         
            +
              #Create a live stream simulcast target
         
     | 
| 
      
 144 
     | 
    
         
            +
              result = api_instance.create_live_stream_simulcast_target(live_stream_id, create_simulcast_target_request)
         
     | 
| 
      
 145 
     | 
    
         
            +
              p result
         
     | 
| 
      
 146 
     | 
    
         
            +
            rescue MuxRuby::ApiError => e
         
     | 
| 
      
 147 
     | 
    
         
            +
              puts "Exception when calling LiveStreamsApi->create_live_stream_simulcast_target: #{e}"
         
     | 
| 
      
 148 
     | 
    
         
            +
            end
         
     | 
| 
      
 149 
     | 
    
         
            +
            ```
         
     | 
| 
      
 150 
     | 
    
         
            +
             
     | 
| 
      
 151 
     | 
    
         
            +
            ### Parameters
         
     | 
| 
      
 152 
     | 
    
         
            +
             
     | 
| 
      
 153 
     | 
    
         
            +
            Name | Type | Description  | Notes
         
     | 
| 
      
 154 
     | 
    
         
            +
            ------------- | ------------- | ------------- | -------------
         
     | 
| 
      
 155 
     | 
    
         
            +
             **live_stream_id** | **String**| The live stream ID | 
         
     | 
| 
      
 156 
     | 
    
         
            +
             **create_simulcast_target_request** | [**CreateSimulcastTargetRequest**](CreateSimulcastTargetRequest.md)|  | 
         
     | 
| 
      
 157 
     | 
    
         
            +
             
     | 
| 
      
 158 
     | 
    
         
            +
            ### Return type
         
     | 
| 
      
 159 
     | 
    
         
            +
             
     | 
| 
      
 160 
     | 
    
         
            +
            [**SimulcastTargetResponse**](SimulcastTargetResponse.md)
         
     | 
| 
      
 161 
     | 
    
         
            +
             
     | 
| 
      
 162 
     | 
    
         
            +
            ### Authorization
         
     | 
| 
      
 163 
     | 
    
         
            +
             
     | 
| 
      
 164 
     | 
    
         
            +
            [accessToken](../README.md#accessToken)
         
     | 
| 
      
 165 
     | 
    
         
            +
             
     | 
| 
      
 166 
     | 
    
         
            +
            ### HTTP request headers
         
     | 
| 
      
 167 
     | 
    
         
            +
             
     | 
| 
      
 168 
     | 
    
         
            +
             - **Content-Type**: application/json
         
     | 
| 
      
 169 
     | 
    
         
            +
             - **Accept**: application/json
         
     | 
| 
      
 170 
     | 
    
         
            +
             
     | 
| 
      
 171 
     | 
    
         
            +
             
     | 
| 
      
 172 
     | 
    
         
            +
             
     | 
| 
       117 
173 
     | 
    
         
             
            # **delete_live_stream**
         
     | 
| 
       118 
174 
     | 
    
         
             
            > delete_live_stream(live_stream_id)
         
     | 
| 
       119 
175 
     | 
    
         | 
| 
         @@ -212,6 +268,58 @@ nil (empty response body) 
     | 
|
| 
       212 
268 
     | 
    
         | 
| 
       213 
269 
     | 
    
         | 
| 
       214 
270 
     | 
    
         | 
| 
      
 271 
     | 
    
         
            +
            # **delete_live_stream_simulcast_target**
         
     | 
| 
      
 272 
     | 
    
         
            +
            > delete_live_stream_simulcast_target(live_stream_id, simulcast_target_id)
         
     | 
| 
      
 273 
     | 
    
         
            +
             
     | 
| 
      
 274 
     | 
    
         
            +
            Delete a Live Stream Simulcast Target
         
     | 
| 
      
 275 
     | 
    
         
            +
             
     | 
| 
      
 276 
     | 
    
         
            +
            Delete the simulcast target using the simulcast target ID returned when creating the simulcast target. Simulcast Target can only be deleted when the parent live stream is in idle state.
         
     | 
| 
      
 277 
     | 
    
         
            +
             
     | 
| 
      
 278 
     | 
    
         
            +
            ### Example
         
     | 
| 
      
 279 
     | 
    
         
            +
            ```ruby
         
     | 
| 
      
 280 
     | 
    
         
            +
            # load the gem
         
     | 
| 
      
 281 
     | 
    
         
            +
            require 'mux_ruby'
         
     | 
| 
      
 282 
     | 
    
         
            +
            # setup authorization
         
     | 
| 
      
 283 
     | 
    
         
            +
            MuxRuby.configure do |config|
         
     | 
| 
      
 284 
     | 
    
         
            +
              # Configure HTTP basic authorization: accessToken
         
     | 
| 
      
 285 
     | 
    
         
            +
              config.username = 'YOUR USERNAME'
         
     | 
| 
      
 286 
     | 
    
         
            +
              config.password = 'YOUR PASSWORD'
         
     | 
| 
      
 287 
     | 
    
         
            +
            end
         
     | 
| 
      
 288 
     | 
    
         
            +
             
     | 
| 
      
 289 
     | 
    
         
            +
            api_instance = MuxRuby::LiveStreamsApi.new
         
     | 
| 
      
 290 
     | 
    
         
            +
            live_stream_id = 'live_stream_id_example' # String | The live stream ID
         
     | 
| 
      
 291 
     | 
    
         
            +
            simulcast_target_id = 'simulcast_target_id_example' # String | The ID of the simulcast target.
         
     | 
| 
      
 292 
     | 
    
         
            +
             
     | 
| 
      
 293 
     | 
    
         
            +
            begin
         
     | 
| 
      
 294 
     | 
    
         
            +
              #Delete a Live Stream Simulcast Target
         
     | 
| 
      
 295 
     | 
    
         
            +
              api_instance.delete_live_stream_simulcast_target(live_stream_id, simulcast_target_id)
         
     | 
| 
      
 296 
     | 
    
         
            +
            rescue MuxRuby::ApiError => e
         
     | 
| 
      
 297 
     | 
    
         
            +
              puts "Exception when calling LiveStreamsApi->delete_live_stream_simulcast_target: #{e}"
         
     | 
| 
      
 298 
     | 
    
         
            +
            end
         
     | 
| 
      
 299 
     | 
    
         
            +
            ```
         
     | 
| 
      
 300 
     | 
    
         
            +
             
     | 
| 
      
 301 
     | 
    
         
            +
            ### Parameters
         
     | 
| 
      
 302 
     | 
    
         
            +
             
     | 
| 
      
 303 
     | 
    
         
            +
            Name | Type | Description  | Notes
         
     | 
| 
      
 304 
     | 
    
         
            +
            ------------- | ------------- | ------------- | -------------
         
     | 
| 
      
 305 
     | 
    
         
            +
             **live_stream_id** | **String**| The live stream ID | 
         
     | 
| 
      
 306 
     | 
    
         
            +
             **simulcast_target_id** | **String**| The ID of the simulcast target. | 
         
     | 
| 
      
 307 
     | 
    
         
            +
             
     | 
| 
      
 308 
     | 
    
         
            +
            ### Return type
         
     | 
| 
      
 309 
     | 
    
         
            +
             
     | 
| 
      
 310 
     | 
    
         
            +
            nil (empty response body)
         
     | 
| 
      
 311 
     | 
    
         
            +
             
     | 
| 
      
 312 
     | 
    
         
            +
            ### Authorization
         
     | 
| 
      
 313 
     | 
    
         
            +
             
     | 
| 
      
 314 
     | 
    
         
            +
            [accessToken](../README.md#accessToken)
         
     | 
| 
      
 315 
     | 
    
         
            +
             
     | 
| 
      
 316 
     | 
    
         
            +
            ### HTTP request headers
         
     | 
| 
      
 317 
     | 
    
         
            +
             
     | 
| 
      
 318 
     | 
    
         
            +
             - **Content-Type**: Not defined
         
     | 
| 
      
 319 
     | 
    
         
            +
             - **Accept**: Not defined
         
     | 
| 
      
 320 
     | 
    
         
            +
             
     | 
| 
      
 321 
     | 
    
         
            +
             
     | 
| 
      
 322 
     | 
    
         
            +
             
     | 
| 
       215 
323 
     | 
    
         
             
            # **get_live_stream**
         
     | 
| 
       216 
324 
     | 
    
         
             
            > LiveStreamResponse get_live_stream(live_stream_id)
         
     | 
| 
       217 
325 
     | 
    
         | 
| 
         @@ -263,6 +371,59 @@ Name | Type | Description  | Notes 
     | 
|
| 
       263 
371 
     | 
    
         | 
| 
       264 
372 
     | 
    
         | 
| 
       265 
373 
     | 
    
         | 
| 
      
 374 
     | 
    
         
            +
            # **get_live_stream_simulcast_target**
         
     | 
| 
      
 375 
     | 
    
         
            +
            > SimulcastTargetResponse get_live_stream_simulcast_target(live_stream_id, simulcast_target_id)
         
     | 
| 
      
 376 
     | 
    
         
            +
             
     | 
| 
      
 377 
     | 
    
         
            +
            Retrieve a Live Stream Simulcast Target
         
     | 
| 
      
 378 
     | 
    
         
            +
             
     | 
| 
      
 379 
     | 
    
         
            +
            Retrieves the details of the simulcast target created for the parent live stream. Supply the unique live stream ID and simulcast target ID that was returned in the response of create simulcast target request, and Mux will return the corresponding information.
         
     | 
| 
      
 380 
     | 
    
         
            +
             
     | 
| 
      
 381 
     | 
    
         
            +
            ### Example
         
     | 
| 
      
 382 
     | 
    
         
            +
            ```ruby
         
     | 
| 
      
 383 
     | 
    
         
            +
            # load the gem
         
     | 
| 
      
 384 
     | 
    
         
            +
            require 'mux_ruby'
         
     | 
| 
      
 385 
     | 
    
         
            +
            # setup authorization
         
     | 
| 
      
 386 
     | 
    
         
            +
            MuxRuby.configure do |config|
         
     | 
| 
      
 387 
     | 
    
         
            +
              # Configure HTTP basic authorization: accessToken
         
     | 
| 
      
 388 
     | 
    
         
            +
              config.username = 'YOUR USERNAME'
         
     | 
| 
      
 389 
     | 
    
         
            +
              config.password = 'YOUR PASSWORD'
         
     | 
| 
      
 390 
     | 
    
         
            +
            end
         
     | 
| 
      
 391 
     | 
    
         
            +
             
     | 
| 
      
 392 
     | 
    
         
            +
            api_instance = MuxRuby::LiveStreamsApi.new
         
     | 
| 
      
 393 
     | 
    
         
            +
            live_stream_id = 'live_stream_id_example' # String | The live stream ID
         
     | 
| 
      
 394 
     | 
    
         
            +
            simulcast_target_id = 'simulcast_target_id_example' # String | The ID of the simulcast target.
         
     | 
| 
      
 395 
     | 
    
         
            +
             
     | 
| 
      
 396 
     | 
    
         
            +
            begin
         
     | 
| 
      
 397 
     | 
    
         
            +
              #Retrieve a Live Stream Simulcast Target
         
     | 
| 
      
 398 
     | 
    
         
            +
              result = api_instance.get_live_stream_simulcast_target(live_stream_id, simulcast_target_id)
         
     | 
| 
      
 399 
     | 
    
         
            +
              p result
         
     | 
| 
      
 400 
     | 
    
         
            +
            rescue MuxRuby::ApiError => e
         
     | 
| 
      
 401 
     | 
    
         
            +
              puts "Exception when calling LiveStreamsApi->get_live_stream_simulcast_target: #{e}"
         
     | 
| 
      
 402 
     | 
    
         
            +
            end
         
     | 
| 
      
 403 
     | 
    
         
            +
            ```
         
     | 
| 
      
 404 
     | 
    
         
            +
             
     | 
| 
      
 405 
     | 
    
         
            +
            ### Parameters
         
     | 
| 
      
 406 
     | 
    
         
            +
             
     | 
| 
      
 407 
     | 
    
         
            +
            Name | Type | Description  | Notes
         
     | 
| 
      
 408 
     | 
    
         
            +
            ------------- | ------------- | ------------- | -------------
         
     | 
| 
      
 409 
     | 
    
         
            +
             **live_stream_id** | **String**| The live stream ID | 
         
     | 
| 
      
 410 
     | 
    
         
            +
             **simulcast_target_id** | **String**| The ID of the simulcast target. | 
         
     | 
| 
      
 411 
     | 
    
         
            +
             
     | 
| 
      
 412 
     | 
    
         
            +
            ### Return type
         
     | 
| 
      
 413 
     | 
    
         
            +
             
     | 
| 
      
 414 
     | 
    
         
            +
            [**SimulcastTargetResponse**](SimulcastTargetResponse.md)
         
     | 
| 
      
 415 
     | 
    
         
            +
             
     | 
| 
      
 416 
     | 
    
         
            +
            ### Authorization
         
     | 
| 
      
 417 
     | 
    
         
            +
             
     | 
| 
      
 418 
     | 
    
         
            +
            [accessToken](../README.md#accessToken)
         
     | 
| 
      
 419 
     | 
    
         
            +
             
     | 
| 
      
 420 
     | 
    
         
            +
            ### HTTP request headers
         
     | 
| 
      
 421 
     | 
    
         
            +
             
     | 
| 
      
 422 
     | 
    
         
            +
             - **Content-Type**: Not defined
         
     | 
| 
      
 423 
     | 
    
         
            +
             - **Accept**: application/json
         
     | 
| 
      
 424 
     | 
    
         
            +
             
     | 
| 
      
 425 
     | 
    
         
            +
             
     | 
| 
      
 426 
     | 
    
         
            +
             
     | 
| 
       266 
427 
     | 
    
         
             
            # **list_live_streams**
         
     | 
| 
       267 
428 
     | 
    
         
             
            > ListLiveStreamsResponse list_live_streams(opts)
         
     | 
| 
       268 
429 
     | 
    
         | 
    
        data/docs/SigningKeyResponse.md
    CHANGED
    
    
| 
         @@ -0,0 +1,12 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            # MuxRuby::SimulcastTarget
         
     | 
| 
      
 2 
     | 
    
         
            +
             
     | 
| 
      
 3 
     | 
    
         
            +
            ## Properties
         
     | 
| 
      
 4 
     | 
    
         
            +
            Name | Type | Description | Notes
         
     | 
| 
      
 5 
     | 
    
         
            +
            ------------ | ------------- | ------------- | -------------
         
     | 
| 
      
 6 
     | 
    
         
            +
            **id** | **String** | ID of the Simulcast Target | [optional] 
         
     | 
| 
      
 7 
     | 
    
         
            +
            **passthrough** | **String** | Arbitrary Metadata set when creating a simulcast target. | [optional] 
         
     | 
| 
      
 8 
     | 
    
         
            +
            **status** | **String** | The current status of the simulcast target. See Statuses below for detailed description.   * `idle`: Default status. When the parent live stream is in disconnected status, simulcast targets will be idle state.   * `starting`: The simulcast target transitions into this state when the parent live stream transition into connected state.   * `broadcasting`: The simulcast target has successfully connected to the third party live streaming service and is pushing video to that service.   * `errored`: The simulcast target encountered an error either while attempting to connect to the third party live streaming service, or mid-broadcasting. Compared to other errored statuses in the Mux Video API, a simulcast may transition back into the broadcasting state if a connection with the service can be re-established.  | [optional] 
         
     | 
| 
      
 9 
     | 
    
         
            +
            **stream_key** | **String** | Stream Key represents an stream identifier for the third party live streaming service to simulcast the parent live stream too. | [optional] 
         
     | 
| 
      
 10 
     | 
    
         
            +
            **url** | **String** | RTMP hostname including the application name for the third party live streaming service. | [optional] 
         
     | 
| 
      
 11 
     | 
    
         
            +
             
     | 
| 
      
 12 
     | 
    
         
            +
             
     | 
    
        data/docs/Track.md
    CHANGED
    
    | 
         @@ -11,7 +11,10 @@ Name | Type | Description | Notes 
     | 
|
| 
       11 
11 
     | 
    
         
             
            **max_frame_rate** | **Float** |  | [optional] 
         
     | 
| 
       12 
12 
     | 
    
         
             
            **max_channels** | **Integer** |  | [optional] 
         
     | 
| 
       13 
13 
     | 
    
         
             
            **max_channel_layout** | **String** |  | [optional] 
         
     | 
| 
       14 
     | 
    
         
            -
            ** 
     | 
| 
       15 
     | 
    
         
            -
            ** 
     | 
| 
      
 14 
     | 
    
         
            +
            **text_type** | **String** |  | [optional] 
         
     | 
| 
      
 15 
     | 
    
         
            +
            **language_code** | **String** |  | [optional] 
         
     | 
| 
      
 16 
     | 
    
         
            +
            **name** | **String** |  | [optional] 
         
     | 
| 
      
 17 
     | 
    
         
            +
            **closed_captions** | **BOOLEAN** |  | [optional] 
         
     | 
| 
      
 18 
     | 
    
         
            +
            **passthrough** | **String** |  | [optional] 
         
     | 
| 
       16 
19 
     | 
    
         | 
| 
       17 
20 
     | 
    
         | 
| 
         @@ -0,0 +1,8 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            # MuxRuby::UpdateAssetMasterAccessRequest
         
     | 
| 
      
 2 
     | 
    
         
            +
             
     | 
| 
      
 3 
     | 
    
         
            +
            ## Properties
         
     | 
| 
      
 4 
     | 
    
         
            +
            Name | Type | Description | Notes
         
     | 
| 
      
 5 
     | 
    
         
            +
            ------------ | ------------- | ------------- | -------------
         
     | 
| 
      
 6 
     | 
    
         
            +
            **master_access** | **String** | Add or remove access to the master version of the video. | [optional] 
         
     | 
| 
      
 7 
     | 
    
         
            +
             
     | 
| 
      
 8 
     | 
    
         
            +
             
     | 
    
        data/docs/Upload.md
    CHANGED
    
    | 
         @@ -11,5 +11,6 @@ Name | Type | Description | Notes 
     | 
|
| 
       11 
11 
     | 
    
         
             
            **error** | [**UploadError**](UploadError.md) |  | [optional] 
         
     | 
| 
       12 
12 
     | 
    
         
             
            **cors_origin** | **String** | If the upload URL will be used in a browser, you must specify the origin in order for the signed URL to have the correct CORS headers. | [optional] 
         
     | 
| 
       13 
13 
     | 
    
         
             
            **url** | **String** | The URL to upload the associated source media to. | [optional] 
         
     | 
| 
      
 14 
     | 
    
         
            +
            **test** | **BOOLEAN** |  | [optional] 
         
     | 
| 
       14 
15 
     | 
    
         | 
| 
       15 
16 
     | 
    
         | 
    
        data/docs/VideoViewResponse.md
    CHANGED
    
    
| 
         @@ -15,7 +15,7 @@ end 
     | 
|
| 
       15 
15 
     | 
    
         
             
            errors_api = MuxRuby::ErrorsApi.new
         
     | 
| 
       16 
16 
     | 
    
         | 
| 
       17 
17 
     | 
    
         
             
            # ========== list-errors ==========
         
     | 
| 
       18 
     | 
    
         
            -
            errors = errors_api.list_errors(:filters => ['browser: 
     | 
| 
      
 18 
     | 
    
         
            +
            errors = errors_api.list_errors(:filters => ['browser:Safari'], :timeframe => ['7:days'])
         
     | 
| 
       19 
19 
     | 
    
         
             
            assert errors != nil
         
     | 
| 
       20 
20 
     | 
    
         
             
            assert errors.data != nil
         
     | 
| 
       21 
21 
     | 
    
         
             
            assert errors.data.length > 0
         
     | 
| 
         @@ -5,13 +5,6 @@ require 'solid_assert' 
     | 
|
| 
       5 
5 
     | 
    
         | 
| 
       6 
6 
     | 
    
         
             
            SolidAssert.enable_assertions
         
     | 
| 
       7 
7 
     | 
    
         | 
| 
       8 
     | 
    
         
            -
            # Exercises all asset operations:
         
     | 
| 
       9 
     | 
    
         
            -
            #   list-breakdown-values
         
     | 
| 
       10 
     | 
    
         
            -
            #   get-overall-values
         
     | 
| 
       11 
     | 
    
         
            -
            #   list-insights
         
     | 
| 
       12 
     | 
    
         
            -
            #   get-metric-timeseries-data
         
     | 
| 
       13 
     | 
    
         
            -
            #   list-all-metric-values
         
     | 
| 
       14 
     | 
    
         
            -
             
     | 
| 
       15 
8 
     | 
    
         
             
            # Authentication Setup
         
     | 
| 
       16 
9 
     | 
    
         
             
            openapi = MuxRuby.configure do |config|
         
     | 
| 
       17 
10 
     | 
    
         
             
              config.username = ENV['MUX_TOKEN_ID']
         
     | 
| 
         @@ -16,7 +16,7 @@ assets_api = MuxRuby::AssetsApi.new 
     | 
|
| 
       16 
16 
     | 
    
         | 
| 
       17 
17 
     | 
    
         
             
            # ========== create-asset ==========
         
     | 
| 
       18 
18 
     | 
    
         
             
            car = MuxRuby::CreateAssetRequest.new
         
     | 
| 
       19 
     | 
    
         
            -
            car.input = 'https://storage.googleapis.com/muxdemofiles/mux-video-intro.mp4'
         
     | 
| 
      
 19 
     | 
    
         
            +
            car.input = [{:url => 'https://storage.googleapis.com/muxdemofiles/mux-video-intro.mp4'}, {:url => "https://tears-of-steel-subtitles.s3.amazonaws.com/tears-fr.vtt", :type => "text", :text_type => "subtitles", :name => "French", :language_code => "fr", :closed_captions => false}]
         
     | 
| 
       20 
20 
     | 
    
         
             
            create_response = assets_api.create_asset(car)
         
     | 
| 
       21 
21 
     | 
    
         
             
            assert create_response != nil
         
     | 
| 
       22 
22 
     | 
    
         
             
            assert create_response.data.id != nil
         
     | 
| 
         @@ -77,6 +77,32 @@ assert mp4_asset.data.id == create_response.data.id 
     | 
|
| 
       77 
77 
     | 
    
         
             
            assert mp4_asset.data.mp4_support == 'standard'
         
     | 
| 
       78 
78 
     | 
    
         
             
            puts "update-asset-mp4-support OK ✅"
         
     | 
| 
       79 
79 
     | 
    
         | 
| 
      
 80 
     | 
    
         
            +
            # ========== update-asset-master-access ==========
         
     | 
| 
      
 81 
     | 
    
         
            +
            master_req = MuxRuby::UpdateAssetMasterAccessRequest.new
         
     | 
| 
      
 82 
     | 
    
         
            +
            master_req.master_access = 'temporary'
         
     | 
| 
      
 83 
     | 
    
         
            +
            master_asset = assets_api.update_asset_master_access(create_response.data.id, master_req)
         
     | 
| 
      
 84 
     | 
    
         
            +
            assert master_asset != nil
         
     | 
| 
      
 85 
     | 
    
         
            +
            assert master_asset.data != nil
         
     | 
| 
      
 86 
     | 
    
         
            +
            assert master_asset.data.id == create_response.data.id
         
     | 
| 
      
 87 
     | 
    
         
            +
            assert master_asset.data.master_access == 'temporary'
         
     | 
| 
      
 88 
     | 
    
         
            +
            puts "update-asset-master-access OK ✅"
         
     | 
| 
      
 89 
     | 
    
         
            +
             
     | 
| 
      
 90 
     | 
    
         
            +
            # ========== create-asset-track ==========
         
     | 
| 
      
 91 
     | 
    
         
            +
            cat = MuxRuby::CreateTrackRequest.new(:url => "https://tears-of-steel-subtitles.s3.amazonaws.com/tears-en.vtt", :type => "text", :text_type => "subtitles", :language_code => "en", :name => "English", :closed_captions => false)
         
     | 
| 
      
 92 
     | 
    
         
            +
            subtitles_track = assets_api.create_asset_track(create_response.data.id, cat)
         
     | 
| 
      
 93 
     | 
    
         
            +
            assert subtitles_track != nil
         
     | 
| 
      
 94 
     | 
    
         
            +
            assert subtitles_track.data.id != nil
         
     | 
| 
      
 95 
     | 
    
         
            +
            assert subtitles_track.data.name == 'English'
         
     | 
| 
      
 96 
     | 
    
         
            +
            asset_with_2_captions = assets_api.get_asset(create_response.data.id)
         
     | 
| 
      
 97 
     | 
    
         
            +
            assert asset_with_2_captions.data.tracks.length == 4 # Audio, Video, French that we ingested with the asset, and the English we added here!
         
     | 
| 
      
 98 
     | 
    
         
            +
            puts "create-asset-track OK ✅"
         
     | 
| 
      
 99 
     | 
    
         
            +
             
     | 
| 
      
 100 
     | 
    
         
            +
            # ========== delete-asset-track ==========
         
     | 
| 
      
 101 
     | 
    
         
            +
            assets_api.delete_asset_track(create_response.data.id, subtitles_track.data.id)
         
     | 
| 
      
 102 
     | 
    
         
            +
            asset_with_1_captions = assets_api.get_asset(create_response.data.id)
         
     | 
| 
      
 103 
     | 
    
         
            +
            assert asset_with_1_captions.data.tracks.length == 3 # Audio, Video, French that we ingested with the asset
         
     | 
| 
      
 104 
     | 
    
         
            +
            puts "delete-asset-track OK ✅"
         
     | 
| 
      
 105 
     | 
    
         
            +
             
     | 
| 
       80 
106 
     | 
    
         
             
            # ========== delete-asset-playback-id ==========
         
     | 
| 
       81 
107 
     | 
    
         
             
            assets_api.delete_asset_playback_id(create_response.data.id, pb_id_c.data.id)
         
     | 
| 
       82 
108 
     | 
    
         
             
            deleted_playback_id_asset = assets_api.get_asset(create_response.data.id)
         
     |