diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 0c88a07..3c62e93 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -15,6 +15,9 @@ jobs: matrix: os: [ubuntu-latest, macos-latest] ruby: ['2.7', '3.0', '3.1', '3.2'] + exclude: + - os: ubuntu-latest + ruby: '2.7' runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v3 diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES index 4616df1..a2eecb4 100644 --- a/.openapi-generator/FILES +++ b/.openapi-generator/FILES @@ -34,6 +34,9 @@ docs/CreateTrackResponse.md docs/CreateTranscriptionVocabularyRequest.md docs/CreateUploadRequest.md docs/CreateWebInputRequest.md +docs/DRMConfiguration.md +docs/DRMConfigurationResponse.md +docs/DRMConfigurationsApi.md docs/DeliveryReport.md docs/DeliveryReportDeliveredSecondsByResolution.md docs/DeliveryUsageApi.md @@ -85,6 +88,7 @@ docs/ListAllMetricValuesResponse.md docs/ListAssetsResponse.md docs/ListBreakdownValuesResponse.md docs/ListBreakdownValuesResponseMeta.md +docs/ListDRMConfigurationsResponse.md docs/ListDeliveryUsageResponse.md docs/ListDimensionValuesResponse.md docs/ListDimensionsResponse.md @@ -190,6 +194,7 @@ lib/mux_ruby/api/assets_api.rb lib/mux_ruby/api/delivery_usage_api.rb lib/mux_ruby/api/dimensions_api.rb lib/mux_ruby/api/direct_uploads_api.rb +lib/mux_ruby/api/drm_configurations_api.rb lib/mux_ruby/api/errors_api.rb lib/mux_ruby/api/exports_api.rb lib/mux_ruby/api/filters_api.rb @@ -243,6 +248,8 @@ lib/mux_ruby/models/delivery_report.rb lib/mux_ruby/models/delivery_report_delivered_seconds_by_resolution.rb lib/mux_ruby/models/dimension_value.rb lib/mux_ruby/models/disable_live_stream_response.rb +lib/mux_ruby/models/drm_configuration.rb +lib/mux_ruby/models/drm_configuration_response.rb lib/mux_ruby/models/enable_live_stream_response.rb lib/mux_ruby/models/error.rb lib/mux_ruby/models/export_date.rb @@ -286,6 +293,7 @@ lib/mux_ruby/models/list_breakdown_values_response_meta.rb lib/mux_ruby/models/list_delivery_usage_response.rb lib/mux_ruby/models/list_dimension_values_response.rb lib/mux_ruby/models/list_dimensions_response.rb +lib/mux_ruby/models/list_drm_configurations_response.rb lib/mux_ruby/models/list_errors_response.rb lib/mux_ruby/models/list_exports_response.rb lib/mux_ruby/models/list_filter_values_response.rb @@ -373,10 +381,10 @@ lib/mux_ruby/models/web_input.rb lib/mux_ruby/models/web_input_response.rb lib/mux_ruby/version.rb mux_ruby.gemspec +spec/api/drm_configurations_api_spec.rb spec/api_client_spec.rb spec/configuration_spec.rb -spec/models/update_live_stream_new_asset_settings_spec.rb -spec/models/update_user_agent_restriction_request_spec.rb -spec/models/user_agent_restriction_request_spec.rb -spec/models/user_agent_restriction_settings_spec.rb +spec/models/drm_configuration_response_spec.rb +spec/models/drm_configuration_spec.rb +spec/models/list_drm_configurations_response_spec.rb spec/spec_helper.rb diff --git a/Gemfile.lock b/Gemfile.lock index 66f97f2..732d4d5 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,7 +1,7 @@ PATH remote: . specs: - mux_ruby (3.16.0) + mux_ruby (3.17.0) typhoeus (~> 1.0, >= 1.0.1) GEM diff --git a/README.md b/README.md index 8bc23bf..1854319 100644 --- a/README.md +++ b/README.md @@ -23,7 +23,7 @@ Not familiar with Mux? Check out https://mux.com/ for more information. This SDK is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: - API version: v1 -- Package version: 3.16.0 +- Package version: 3.17.0 - Build package: org.openapitools.codegen.languages.RubyClientCodegen For more information, please visit [https://docs.mux.com](https://docs.mux.com) @@ -40,16 +40,16 @@ gem build mux_ruby.gemspec Then either install the gem locally: ```shell -gem install ./mux_ruby-3.16.0.gem +gem install ./mux_ruby-3.17.0.gem ``` -(for development, run `gem install --dev ./mux_ruby-3.16.0.gem` to install the development dependencies) +(for development, run `gem install --dev ./mux_ruby-3.17.0.gem` to install the development dependencies) or publish the gem to a gem hosting service, e.g. [RubyGems](https://rubygems.org/). Finally add this to the Gemfile: - gem 'mux_ruby', '~> 3.16.0' + gem 'mux_ruby', '~> 3.17.0' ### Install from Git diff --git a/docs/CreateAssetRequest.md b/docs/CreateAssetRequest.md index d160a6c..e8c9033 100644 --- a/docs/CreateAssetRequest.md +++ b/docs/CreateAssetRequest.md @@ -5,7 +5,8 @@ | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | | **input** | [**Array<InputSettings>**](InputSettings.md) | An array of objects that each describe an input file to be used to create the asset. As a shortcut, input can also be a string URL for a file when only one input file is used. See `input[].url` for requirements. | [optional] | -| **playback_policy** | [**Array<PlaybackPolicy>**](PlaybackPolicy.md) | An array of playback policy names that you want applied to this asset and available through `playback_ids`. Options include: `\"public\"` (anyone with the playback URL can stream the asset). And `\"signed\"` (an additional access token is required to play the asset). If no playback_policy is set, the asset will have no playback IDs and will therefore not be playable. For simplicity, a single string name can be used in place of the array in the case of only one playback policy. | [optional] | +| **playback_policy** | [**Array<PlaybackPolicy>**](PlaybackPolicy.md) | An array of playback policy names that you want applied to this asset and available through `playback_ids`. Options include: * `\"public\"` (anyone with the playback URL can stream the asset). * `\"signed\"` (an additional access token is required to play the asset). If no `playback_policy` is set, the asset will have no playback IDs and will therefore not be playable. For simplicity, a single string name can be used in place of the array in the case of only one playback policy. | [optional] | +| **advanced_playback_policies** | [**Array<CreatePlaybackIDRequest>**](CreatePlaybackIDRequest.md) | An array of playback policy objects that you want applied to this asset and available through `playback_ids`. `advanced_playback_policies` must be used instead of `playback_policy` when creating a DRM playback ID. | [optional] | | **per_title_encode** | **Boolean** | | [optional] | | **passthrough** | **String** | Arbitrary user-supplied metadata that will be included in the asset details and related webhooks. Can be used to store your own ID for a video along with the asset. **Max: 255 characters**. | [optional] | | **mp4_support** | **String** | Specify what level of support for mp4 playback. * The `capped-1080p` option produces a single MP4 file, called `capped-1080p.mp4`, with the video resolution capped at 1080p. This option produces an `audio.m4a` file for an audio-only asset. * The `audio-only` option produces a single M4A file, called `audio.m4a` for a video or an audio-only asset. MP4 generation will error when this option is specified for a video-only asset. * The `audio-only,capped-1080p` option produces both the `audio.m4a` and `capped-1080p.mp4` files. Only the `capped-1080p.mp4` file is produced for a video-only asset, while only the `audio.m4a` file is produced for an audio-only asset. The `standard`(deprecated) option produces up to three MP4 files with different levels of resolution (`high.mp4`, `medium.mp4`, `low.mp4`, or `audio.m4a` for an audio-only asset). MP4 files are not produced for `none` (default). In most cases you should use our default HLS-based streaming playback (`{playback_id}.m3u8`) which can automatically adjust to viewers' connection speeds, but an mp4 can be useful for some legacy devices or downloading for offline playback. See the [Download your videos guide](https://docs.mux.com/guides/enable-static-mp4-renditions) for more information. | [optional] | @@ -23,6 +24,7 @@ require 'mux_ruby' instance = MuxRuby::CreateAssetRequest.new( input: null, playback_policy: null, + advanced_playback_policies: null, per_title_encode: null, passthrough: null, mp4_support: null, diff --git a/docs/CreateLiveStreamRequest.md b/docs/CreateLiveStreamRequest.md index 6cd3861..8947a83 100644 --- a/docs/CreateLiveStreamRequest.md +++ b/docs/CreateLiveStreamRequest.md @@ -5,6 +5,7 @@ | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | | **playback_policy** | [**Array<PlaybackPolicy>**](PlaybackPolicy.md) | | [optional] | +| **advanced_playback_policies** | [**Array<CreatePlaybackIDRequest>**](CreatePlaybackIDRequest.md) | An array of playback policy objects that you want applied to this asset and available through `playback_ids`. `advanced_playback_policies` must be used instead of `playback_policy` when creating a DRM playback ID. | [optional] | | **new_asset_settings** | [**CreateAssetRequest**](CreateAssetRequest.md) | | [optional] | | **reconnect_window** | **Float** | When live streaming software disconnects from Mux, either intentionally or due to a drop in the network, the Reconnect Window is the time in seconds that Mux should wait for the streaming software to reconnect before considering the live stream finished and completing the recorded asset. Defaults to 60 seconds on the API if not specified. If not specified directly, Standard Latency streams have a Reconnect Window of 60 seconds; Reduced and Low Latency streams have a default of 0 seconds, or no Reconnect Window. For that reason, we suggest specifying a value other than zero for Reduced and Low Latency streams. Reduced and Low Latency streams with a Reconnect Window greater than zero will insert slate media into the recorded asset while waiting for the streaming software to reconnect or when there are brief interruptions in the live stream media. When using a Reconnect Window setting higher than 60 seconds with a Standard Latency stream, we highly recommend enabling slate with the `use_slate_for_standard_latency` option. | [optional][default to 60] | | **use_slate_for_standard_latency** | **Boolean** | By default, Standard Latency live streams do not have slate media inserted while waiting for live streaming software to reconnect to Mux. Setting this to true enables slate insertion on a Standard Latency stream. | [optional][default to false] | @@ -27,6 +28,7 @@ require 'mux_ruby' instance = MuxRuby::CreateLiveStreamRequest.new( playback_policy: null, + advanced_playback_policies: null, new_asset_settings: null, reconnect_window: null, use_slate_for_standard_latency: null, diff --git a/docs/CreatePlaybackIDRequest.md b/docs/CreatePlaybackIDRequest.md index 778d036..1eee2ee 100644 --- a/docs/CreatePlaybackIDRequest.md +++ b/docs/CreatePlaybackIDRequest.md @@ -5,6 +5,7 @@ | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | | **policy** | [**PlaybackPolicy**](PlaybackPolicy.md) | | [optional] | +| **drm_configuration_id** | **String** | The DRM configuration used by this playback ID. Must only be set when `policy` is set to `drm`. | [optional] | ## Example @@ -12,7 +13,8 @@ require 'mux_ruby' instance = MuxRuby::CreatePlaybackIDRequest.new( - policy: null + policy: null, + drm_configuration_id: null ) ``` diff --git a/docs/CreateUploadRequest.md b/docs/CreateUploadRequest.md index 5c1b648..a3d2aef 100644 --- a/docs/CreateUploadRequest.md +++ b/docs/CreateUploadRequest.md @@ -7,7 +7,7 @@ | **timeout** | **Integer** | Max time in seconds for the signed upload URL to be valid. If a successful upload has not occurred before the timeout limit, the direct upload is marked `timed_out` | [optional][default to 3600] | | **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] | | **new_asset_settings** | [**CreateAssetRequest**](CreateAssetRequest.md) | | [optional] | -| **test** | **Boolean** | | [optional] | +| **test** | **Boolean** | Indicates if this is a test Direct Upload, in which case the Asset that gets created will be a `test` Asset. | [optional] | ## Example diff --git a/docs/DRMConfiguration.md b/docs/DRMConfiguration.md new file mode 100644 index 0000000..f535207 --- /dev/null +++ b/docs/DRMConfiguration.md @@ -0,0 +1,18 @@ +# MuxRuby::DRMConfiguration + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **id** | **String** | Unique identifier for the DRM Configuration. Max 255 characters. | [optional] | + +## Example + +```ruby +require 'mux_ruby' + +instance = MuxRuby::DRMConfiguration.new( + id: null +) +``` + diff --git a/docs/DRMConfigurationResponse.md b/docs/DRMConfigurationResponse.md new file mode 100644 index 0000000..0cbcc60 --- /dev/null +++ b/docs/DRMConfigurationResponse.md @@ -0,0 +1,18 @@ +# MuxRuby::DRMConfigurationResponse + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **data** | [**DRMConfiguration**](DRMConfiguration.md) | | [optional] | + +## Example + +```ruby +require 'mux_ruby' + +instance = MuxRuby::DRMConfigurationResponse.new( + data: null +) +``` + diff --git a/docs/DRMConfigurationsApi.md b/docs/DRMConfigurationsApi.md new file mode 100644 index 0000000..6629946 --- /dev/null +++ b/docs/DRMConfigurationsApi.md @@ -0,0 +1,153 @@ +# MuxRuby::DRMConfigurationsApi + +All URIs are relative to *https://api.mux.com* + +| Method | HTTP request | Description | +| ------ | ------------ | ----------- | +| [**get_drm_configuration**](DRMConfigurationsApi.md#get_drm_configuration) | **GET** /video/v1/drm-configurations/{DRM_CONFIGURATION_ID} | Retrieve a DRM Configuration | +| [**list_drm_configurations**](DRMConfigurationsApi.md#list_drm_configurations) | **GET** /video/v1/drm-configurations | List DRM Configurations | + + +## get_drm_configuration + +> get_drm_configuration(drm_configuration_id) + +Retrieve a DRM Configuration + +Retrieves a single DRM Configuration. + +### Examples + +```ruby +require 'time' +require 'mux_ruby' +# setup authorization +MuxRuby.configure do |config| + # Configure HTTP basic authorization: accessToken + config.username = 'YOUR USERNAME' + config.password = 'YOUR PASSWORD' +end + +api_instance = MuxRuby::DRMConfigurationsApi.new +drm_configuration_id = 'drm_configuration_id_example' # String | The DRM Configuration ID. + +begin + # Retrieve a DRM Configuration + result = api_instance.get_drm_configuration(drm_configuration_id) + p result +rescue MuxRuby::ApiError => e + puts "Error when calling DRMConfigurationsApi->get_drm_configuration: #{e}" +end +``` + +#### Using the get_drm_configuration_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> get_drm_configuration_with_http_info(drm_configuration_id) + +```ruby +begin + # Retrieve a DRM Configuration + data, status_code, headers = api_instance.get_drm_configuration_with_http_info(drm_configuration_id) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue MuxRuby::ApiError => e + puts "Error when calling DRMConfigurationsApi->get_drm_configuration_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **drm_configuration_id** | **String** | The DRM Configuration ID. | | + +### Return type + +[**DRMConfigurationResponse**](DRMConfigurationResponse.md) + +### Authorization + +[accessToken](../README.md#accessToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## list_drm_configurations + +> list_drm_configurations(opts) + +List DRM Configurations + +Returns a list of DRM Configurations + +### Examples + +```ruby +require 'time' +require 'mux_ruby' +# setup authorization +MuxRuby.configure do |config| + # Configure HTTP basic authorization: accessToken + config.username = 'YOUR USERNAME' + config.password = 'YOUR PASSWORD' +end + +api_instance = MuxRuby::DRMConfigurationsApi.new +opts = { + page: 56, # Integer | Offset by this many pages, of the size of `limit` + limit: 56 # Integer | Number of items to include in the response +} + +begin + # List DRM Configurations + result = api_instance.list_drm_configurations(opts) + p result +rescue MuxRuby::ApiError => e + puts "Error when calling DRMConfigurationsApi->list_drm_configurations: #{e}" +end +``` + +#### Using the list_drm_configurations_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> list_drm_configurations_with_http_info(opts) + +```ruby +begin + # List DRM Configurations + data, status_code, headers = api_instance.list_drm_configurations_with_http_info(opts) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue MuxRuby::ApiError => e + puts "Error when calling DRMConfigurationsApi->list_drm_configurations_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **page** | **Integer** | Offset by this many pages, of the size of `limit` | [optional][default to 1] | +| **limit** | **Integer** | Number of items to include in the response | [optional][default to 25] | + +### Return type + +[**ListDRMConfigurationsResponse**](ListDRMConfigurationsResponse.md) + +### Authorization + +[accessToken](../README.md#accessToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + diff --git a/docs/ListDRMConfigurationsResponse.md b/docs/ListDRMConfigurationsResponse.md new file mode 100644 index 0000000..2ddc412 --- /dev/null +++ b/docs/ListDRMConfigurationsResponse.md @@ -0,0 +1,18 @@ +# MuxRuby::ListDRMConfigurationsResponse + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **data** | [**Array<DRMConfiguration>**](DRMConfiguration.md) | | [optional] | + +## Example + +```ruby +require 'mux_ruby' + +instance = MuxRuby::ListDRMConfigurationsResponse.new( + data: null +) +``` + diff --git a/docs/MetricsApi.md b/docs/MetricsApi.md index 78b3ac9..ed1aadf 100644 --- a/docs/MetricsApi.md +++ b/docs/MetricsApi.md @@ -37,7 +37,7 @@ opts = { timeframe: ['inner_example'], # Array | Timeframe window to limit results by. Must be provided as an array query string parameter (e.g. timeframe[]=). Accepted formats are... * array of epoch timestamps e.g. `timeframe[]=1498867200&timeframe[]=1498953600` * duration string e.g. `timeframe[]=24:hours or timeframe[]=7:days` filters: ['inner_example'], # Array | Limit the results to rows that match conditions from provided key:value pairs. Must be provided as an array query string parameter. To exclude rows that match a certain condition, prepend a `!` character to the dimension. Possible filter names are the same as returned by the List Filters endpoint. Example: * `filters[]=operating_system:windows&filters[]=!country:US` metric_filters: ['inner_example'], # Array | Limit the results to rows that match inequality conditions from provided metric comparison clauses. Must be provided as an array query string parameter. Possible filterable metrics are the same as the set of metric ids, with the exceptions of `exits_before_video_start`, `unique_viewers`, `video_startup_failure_percentage`, and `views`. Example: * `metric_filters[]=aggregate_startup_time>=1000` - measurement: '95th', # String | Measurement for the provided metric. If omitted, the default for the metric will be used. + measurement: '95th', # String | Measurement for the provided metric. If omitted, the default for the metric will be used. The default measurement for each metric is: \"sum\" : `ad_attempt_count`, `ad_break_count`, `ad_break_error_count`, `ad_error_count`, `ad_impression_count`, `playing_time` \"median\" : `ad_preroll_startup_time`, `ad_watch_time`, `aggregate_startup_time`, `content_startup_time`, `content_watch_time`, `max_downscale_percentage`, `max_upscale_percentage`, `page_load_time`, `player_average_live_latency`, `player_startup_time`, `rebuffer_count`, `rebuffer_duration`, `requests_for_first_preroll`, `video_startup_preroll_load_time`, `video_startup_preroll_request_time`, `video_startup_time`, `view_average_request_latency`, `view_average_request_throughput`, `view_max_request_latency`, `weighted_average_bitrate` \"avg\" : `ad_break_error_percentage`, `ad_error_percentage`, `ad_exit_before_start_count`, `ad_exit_before_start_percentage`, `ad_playback_failure_percentage`, `ad_startup_error_count`, `ad_startup_error_percentage`, `content_playback_failure_percentage`, `downscale_percentage`, `exits_before_video_start`, `playback_business_exception_percentage`, `playback_failure_percentage`, `playback_success_score`, `rebuffer_frequency`, `rebuffer_percentage`, `seek_latency`, `smoothness_score`, `startup_time_score`, `upscale_percentage`, `video_quality_score`, `video_startup_business_exception_percentage`, `video_startup_failure_percentage`, `viewer_experience_score` \"count\" : `started_views`, `unique_viewers` order_direction: 'asc', # String | Sort order. group_by: 'minute' # String | Time granularity to group results by. If this value is omitted, a default granularity is chosen based on the timeframe. For timeframes of less than 90 minutes, the default granularity is `minute`. Between 90 minutes and 6 hours, the default granularity is `ten_minutes`. Between 6 hours and 15 days inclusive, the default granularity is `hour`. The granularity of timeframes that exceed 15 days is `day`. This default behavior is subject to change; it is strongly suggested that you explicitly specify the granularity. } @@ -77,7 +77,7 @@ end | **timeframe** | [**Array<String>**](String.md) | Timeframe window to limit results by. Must be provided as an array query string parameter (e.g. timeframe[]=). Accepted formats are... * array of epoch timestamps e.g. `timeframe[]=1498867200&timeframe[]=1498953600` * duration string e.g. `timeframe[]=24:hours or timeframe[]=7:days` | [optional] | | **filters** | [**Array<String>**](String.md) | Limit the results to rows that match conditions from provided key:value pairs. Must be provided as an array query string parameter. To exclude rows that match a certain condition, prepend a `!` character to the dimension. Possible filter names are the same as returned by the List Filters endpoint. Example: * `filters[]=operating_system:windows&filters[]=!country:US` | [optional] | | **metric_filters** | [**Array<String>**](String.md) | Limit the results to rows that match inequality conditions from provided metric comparison clauses. Must be provided as an array query string parameter. Possible filterable metrics are the same as the set of metric ids, with the exceptions of `exits_before_video_start`, `unique_viewers`, `video_startup_failure_percentage`, and `views`. Example: * `metric_filters[]=aggregate_startup_time>=1000` | [optional] | -| **measurement** | **String** | Measurement for the provided metric. If omitted, the default for the metric will be used. | [optional] | +| **measurement** | **String** | Measurement for the provided metric. If omitted, the default for the metric will be used. The default measurement for each metric is: \"sum\" : `ad_attempt_count`, `ad_break_count`, `ad_break_error_count`, `ad_error_count`, `ad_impression_count`, `playing_time` \"median\" : `ad_preroll_startup_time`, `ad_watch_time`, `aggregate_startup_time`, `content_startup_time`, `content_watch_time`, `max_downscale_percentage`, `max_upscale_percentage`, `page_load_time`, `player_average_live_latency`, `player_startup_time`, `rebuffer_count`, `rebuffer_duration`, `requests_for_first_preroll`, `video_startup_preroll_load_time`, `video_startup_preroll_request_time`, `video_startup_time`, `view_average_request_latency`, `view_average_request_throughput`, `view_max_request_latency`, `weighted_average_bitrate` \"avg\" : `ad_break_error_percentage`, `ad_error_percentage`, `ad_exit_before_start_count`, `ad_exit_before_start_percentage`, `ad_playback_failure_percentage`, `ad_startup_error_count`, `ad_startup_error_percentage`, `content_playback_failure_percentage`, `downscale_percentage`, `exits_before_video_start`, `playback_business_exception_percentage`, `playback_failure_percentage`, `playback_success_score`, `rebuffer_frequency`, `rebuffer_percentage`, `seek_latency`, `smoothness_score`, `startup_time_score`, `upscale_percentage`, `video_quality_score`, `video_startup_business_exception_percentage`, `video_startup_failure_percentage`, `viewer_experience_score` \"count\" : `started_views`, `unique_viewers` | [optional] | | **order_direction** | **String** | Sort order. | [optional] | | **group_by** | **String** | Time granularity to group results by. If this value is omitted, a default granularity is chosen based on the timeframe. For timeframes of less than 90 minutes, the default granularity is `minute`. Between 90 minutes and 6 hours, the default granularity is `ten_minutes`. Between 6 hours and 15 days inclusive, the default granularity is `hour`. The granularity of timeframes that exceed 15 days is `day`. This default behavior is subject to change; it is strongly suggested that you explicitly specify the granularity. | [optional] | @@ -121,7 +121,7 @@ opts = { timeframe: ['inner_example'], # Array | Timeframe window to limit results by. Must be provided as an array query string parameter (e.g. timeframe[]=). Accepted formats are... * array of epoch timestamps e.g. `timeframe[]=1498867200&timeframe[]=1498953600` * duration string e.g. `timeframe[]=24:hours or timeframe[]=7:days` filters: ['inner_example'], # Array | Limit the results to rows that match conditions from provided key:value pairs. Must be provided as an array query string parameter. To exclude rows that match a certain condition, prepend a `!` character to the dimension. Possible filter names are the same as returned by the List Filters endpoint. Example: * `filters[]=operating_system:windows&filters[]=!country:US` metric_filters: ['inner_example'], # Array | Limit the results to rows that match inequality conditions from provided metric comparison clauses. Must be provided as an array query string parameter. Possible filterable metrics are the same as the set of metric ids, with the exceptions of `exits_before_video_start`, `unique_viewers`, `video_startup_failure_percentage`, and `views`. Example: * `metric_filters[]=aggregate_startup_time>=1000` - measurement: '95th' # String | Measurement for the provided metric. If omitted, the default for the metric will be used. + measurement: '95th' # String | Measurement for the provided metric. If omitted, the default for the metric will be used. The default measurement for each metric is: \"sum\" : `ad_attempt_count`, `ad_break_count`, `ad_break_error_count`, `ad_error_count`, `ad_impression_count`, `playing_time` \"median\" : `ad_preroll_startup_time`, `ad_watch_time`, `aggregate_startup_time`, `content_startup_time`, `content_watch_time`, `max_downscale_percentage`, `max_upscale_percentage`, `page_load_time`, `player_average_live_latency`, `player_startup_time`, `rebuffer_count`, `rebuffer_duration`, `requests_for_first_preroll`, `video_startup_preroll_load_time`, `video_startup_preroll_request_time`, `video_startup_time`, `view_average_request_latency`, `view_average_request_throughput`, `view_max_request_latency`, `weighted_average_bitrate` \"avg\" : `ad_break_error_percentage`, `ad_error_percentage`, `ad_exit_before_start_count`, `ad_exit_before_start_percentage`, `ad_playback_failure_percentage`, `ad_startup_error_count`, `ad_startup_error_percentage`, `content_playback_failure_percentage`, `downscale_percentage`, `exits_before_video_start`, `playback_business_exception_percentage`, `playback_failure_percentage`, `playback_success_score`, `rebuffer_frequency`, `rebuffer_percentage`, `seek_latency`, `smoothness_score`, `startup_time_score`, `upscale_percentage`, `video_quality_score`, `video_startup_business_exception_percentage`, `video_startup_failure_percentage`, `viewer_experience_score` \"count\" : `started_views`, `unique_viewers` } begin @@ -159,7 +159,7 @@ end | **timeframe** | [**Array<String>**](String.md) | Timeframe window to limit results by. Must be provided as an array query string parameter (e.g. timeframe[]=). Accepted formats are... * array of epoch timestamps e.g. `timeframe[]=1498867200&timeframe[]=1498953600` * duration string e.g. `timeframe[]=24:hours or timeframe[]=7:days` | [optional] | | **filters** | [**Array<String>**](String.md) | Limit the results to rows that match conditions from provided key:value pairs. Must be provided as an array query string parameter. To exclude rows that match a certain condition, prepend a `!` character to the dimension. Possible filter names are the same as returned by the List Filters endpoint. Example: * `filters[]=operating_system:windows&filters[]=!country:US` | [optional] | | **metric_filters** | [**Array<String>**](String.md) | Limit the results to rows that match inequality conditions from provided metric comparison clauses. Must be provided as an array query string parameter. Possible filterable metrics are the same as the set of metric ids, with the exceptions of `exits_before_video_start`, `unique_viewers`, `video_startup_failure_percentage`, and `views`. Example: * `metric_filters[]=aggregate_startup_time>=1000` | [optional] | -| **measurement** | **String** | Measurement for the provided metric. If omitted, the default for the metric will be used. | [optional] | +| **measurement** | **String** | Measurement for the provided metric. If omitted, the default for the metric will be used. The default measurement for each metric is: \"sum\" : `ad_attempt_count`, `ad_break_count`, `ad_break_error_count`, `ad_error_count`, `ad_impression_count`, `playing_time` \"median\" : `ad_preroll_startup_time`, `ad_watch_time`, `aggregate_startup_time`, `content_startup_time`, `content_watch_time`, `max_downscale_percentage`, `max_upscale_percentage`, `page_load_time`, `player_average_live_latency`, `player_startup_time`, `rebuffer_count`, `rebuffer_duration`, `requests_for_first_preroll`, `video_startup_preroll_load_time`, `video_startup_preroll_request_time`, `video_startup_time`, `view_average_request_latency`, `view_average_request_throughput`, `view_max_request_latency`, `weighted_average_bitrate` \"avg\" : `ad_break_error_percentage`, `ad_error_percentage`, `ad_exit_before_start_count`, `ad_exit_before_start_percentage`, `ad_playback_failure_percentage`, `ad_startup_error_count`, `ad_startup_error_percentage`, `content_playback_failure_percentage`, `downscale_percentage`, `exits_before_video_start`, `playback_business_exception_percentage`, `playback_failure_percentage`, `playback_success_score`, `rebuffer_frequency`, `rebuffer_percentage`, `seek_latency`, `smoothness_score`, `startup_time_score`, `upscale_percentage`, `video_quality_score`, `video_startup_business_exception_percentage`, `video_startup_failure_percentage`, `viewer_experience_score` \"count\" : `started_views`, `unique_viewers` | [optional] | ### Return type @@ -279,7 +279,7 @@ api_instance = MuxRuby::MetricsApi.new metric_id = 'aggregate_startup_time' # String | ID of the Metric opts = { group_by: 'asn', # String | Breakdown value to group the results by - measurement: '95th', # String | Measurement for the provided metric. If omitted, the default for the metric will be used. + measurement: '95th', # String | Measurement for the provided metric. If omitted, the default for the metric will be used. The default measurement for each metric is: \"sum\" : `ad_attempt_count`, `ad_break_count`, `ad_break_error_count`, `ad_error_count`, `ad_impression_count`, `playing_time` \"median\" : `ad_preroll_startup_time`, `ad_watch_time`, `aggregate_startup_time`, `content_startup_time`, `content_watch_time`, `max_downscale_percentage`, `max_upscale_percentage`, `page_load_time`, `player_average_live_latency`, `player_startup_time`, `rebuffer_count`, `rebuffer_duration`, `requests_for_first_preroll`, `video_startup_preroll_load_time`, `video_startup_preroll_request_time`, `video_startup_time`, `view_average_request_latency`, `view_average_request_throughput`, `view_max_request_latency`, `weighted_average_bitrate` \"avg\" : `ad_break_error_percentage`, `ad_error_percentage`, `ad_exit_before_start_count`, `ad_exit_before_start_percentage`, `ad_playback_failure_percentage`, `ad_startup_error_count`, `ad_startup_error_percentage`, `content_playback_failure_percentage`, `downscale_percentage`, `exits_before_video_start`, `playback_business_exception_percentage`, `playback_failure_percentage`, `playback_success_score`, `rebuffer_frequency`, `rebuffer_percentage`, `seek_latency`, `smoothness_score`, `startup_time_score`, `upscale_percentage`, `video_quality_score`, `video_startup_business_exception_percentage`, `video_startup_failure_percentage`, `viewer_experience_score` \"count\" : `started_views`, `unique_viewers` filters: ['inner_example'], # Array | Limit the results to rows that match conditions from provided key:value pairs. Must be provided as an array query string parameter. To exclude rows that match a certain condition, prepend a `!` character to the dimension. Possible filter names are the same as returned by the List Filters endpoint. Example: * `filters[]=operating_system:windows&filters[]=!country:US` metric_filters: ['inner_example'], # Array | Limit the results to rows that match inequality conditions from provided metric comparison clauses. Must be provided as an array query string parameter. Possible filterable metrics are the same as the set of metric ids, with the exceptions of `exits_before_video_start`, `unique_viewers`, `video_startup_failure_percentage`, and `views`. Example: * `metric_filters[]=aggregate_startup_time>=1000` limit: 56, # Integer | Number of items to include in the response @@ -322,7 +322,7 @@ end | ---- | ---- | ----------- | ----- | | **metric_id** | **String** | ID of the Metric | | | **group_by** | **String** | Breakdown value to group the results by | [optional] | -| **measurement** | **String** | Measurement for the provided metric. If omitted, the default for the metric will be used. | [optional] | +| **measurement** | **String** | Measurement for the provided metric. If omitted, the default for the metric will be used. The default measurement for each metric is: \"sum\" : `ad_attempt_count`, `ad_break_count`, `ad_break_error_count`, `ad_error_count`, `ad_impression_count`, `playing_time` \"median\" : `ad_preroll_startup_time`, `ad_watch_time`, `aggregate_startup_time`, `content_startup_time`, `content_watch_time`, `max_downscale_percentage`, `max_upscale_percentage`, `page_load_time`, `player_average_live_latency`, `player_startup_time`, `rebuffer_count`, `rebuffer_duration`, `requests_for_first_preroll`, `video_startup_preroll_load_time`, `video_startup_preroll_request_time`, `video_startup_time`, `view_average_request_latency`, `view_average_request_throughput`, `view_max_request_latency`, `weighted_average_bitrate` \"avg\" : `ad_break_error_percentage`, `ad_error_percentage`, `ad_exit_before_start_count`, `ad_exit_before_start_percentage`, `ad_playback_failure_percentage`, `ad_startup_error_count`, `ad_startup_error_percentage`, `content_playback_failure_percentage`, `downscale_percentage`, `exits_before_video_start`, `playback_business_exception_percentage`, `playback_failure_percentage`, `playback_success_score`, `rebuffer_frequency`, `rebuffer_percentage`, `seek_latency`, `smoothness_score`, `startup_time_score`, `upscale_percentage`, `video_quality_score`, `video_startup_business_exception_percentage`, `video_startup_failure_percentage`, `viewer_experience_score` \"count\" : `started_views`, `unique_viewers` | [optional] | | **filters** | [**Array<String>**](String.md) | Limit the results to rows that match conditions from provided key:value pairs. Must be provided as an array query string parameter. To exclude rows that match a certain condition, prepend a `!` character to the dimension. Possible filter names are the same as returned by the List Filters endpoint. Example: * `filters[]=operating_system:windows&filters[]=!country:US` | [optional] | | **metric_filters** | [**Array<String>**](String.md) | Limit the results to rows that match inequality conditions from provided metric comparison clauses. Must be provided as an array query string parameter. Possible filterable metrics are the same as the set of metric ids, with the exceptions of `exits_before_video_start`, `unique_viewers`, `video_startup_failure_percentage`, and `views`. Example: * `metric_filters[]=aggregate_startup_time>=1000` | [optional] | | **limit** | **Integer** | Number of items to include in the response | [optional][default to 25] | @@ -368,7 +368,7 @@ end api_instance = MuxRuby::MetricsApi.new metric_id = 'aggregate_startup_time' # String | ID of the Metric opts = { - measurement: '95th', # String | Measurement for the provided metric. If omitted, the default for the metric will be used. + measurement: '95th', # String | Measurement for the provided metric. If omitted, the default for the metric will be used. The default measurement for each metric is: \"sum\" : `ad_attempt_count`, `ad_break_count`, `ad_break_error_count`, `ad_error_count`, `ad_impression_count`, `playing_time` \"median\" : `ad_preroll_startup_time`, `ad_watch_time`, `aggregate_startup_time`, `content_startup_time`, `content_watch_time`, `max_downscale_percentage`, `max_upscale_percentage`, `page_load_time`, `player_average_live_latency`, `player_startup_time`, `rebuffer_count`, `rebuffer_duration`, `requests_for_first_preroll`, `video_startup_preroll_load_time`, `video_startup_preroll_request_time`, `video_startup_time`, `view_average_request_latency`, `view_average_request_throughput`, `view_max_request_latency`, `weighted_average_bitrate` \"avg\" : `ad_break_error_percentage`, `ad_error_percentage`, `ad_exit_before_start_count`, `ad_exit_before_start_percentage`, `ad_playback_failure_percentage`, `ad_startup_error_count`, `ad_startup_error_percentage`, `content_playback_failure_percentage`, `downscale_percentage`, `exits_before_video_start`, `playback_business_exception_percentage`, `playback_failure_percentage`, `playback_success_score`, `rebuffer_frequency`, `rebuffer_percentage`, `seek_latency`, `smoothness_score`, `startup_time_score`, `upscale_percentage`, `video_quality_score`, `video_startup_business_exception_percentage`, `video_startup_failure_percentage`, `viewer_experience_score` \"count\" : `started_views`, `unique_viewers` order_direction: 'asc', # String | Sort order. timeframe: ['inner_example'], # Array | Timeframe window to limit results by. Must be provided as an array query string parameter (e.g. timeframe[]=). Accepted formats are... * array of epoch timestamps e.g. `timeframe[]=1498867200&timeframe[]=1498953600` * duration string e.g. `timeframe[]=24:hours or timeframe[]=7:days` filters: ['inner_example'], # Array | Limit the results to rows that match conditions from provided key:value pairs. Must be provided as an array query string parameter. To exclude rows that match a certain condition, prepend a `!` character to the dimension. Possible filter names are the same as returned by the List Filters endpoint. Example: * `filters[]=operating_system:windows&filters[]=!country:US` @@ -407,7 +407,7 @@ end | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | | **metric_id** | **String** | ID of the Metric | | -| **measurement** | **String** | Measurement for the provided metric. If omitted, the default for the metric will be used. | [optional] | +| **measurement** | **String** | Measurement for the provided metric. If omitted, the default for the metric will be used. The default measurement for each metric is: \"sum\" : `ad_attempt_count`, `ad_break_count`, `ad_break_error_count`, `ad_error_count`, `ad_impression_count`, `playing_time` \"median\" : `ad_preroll_startup_time`, `ad_watch_time`, `aggregate_startup_time`, `content_startup_time`, `content_watch_time`, `max_downscale_percentage`, `max_upscale_percentage`, `page_load_time`, `player_average_live_latency`, `player_startup_time`, `rebuffer_count`, `rebuffer_duration`, `requests_for_first_preroll`, `video_startup_preroll_load_time`, `video_startup_preroll_request_time`, `video_startup_time`, `view_average_request_latency`, `view_average_request_throughput`, `view_max_request_latency`, `weighted_average_bitrate` \"avg\" : `ad_break_error_percentage`, `ad_error_percentage`, `ad_exit_before_start_count`, `ad_exit_before_start_percentage`, `ad_playback_failure_percentage`, `ad_startup_error_count`, `ad_startup_error_percentage`, `content_playback_failure_percentage`, `downscale_percentage`, `exits_before_video_start`, `playback_business_exception_percentage`, `playback_failure_percentage`, `playback_success_score`, `rebuffer_frequency`, `rebuffer_percentage`, `seek_latency`, `smoothness_score`, `startup_time_score`, `upscale_percentage`, `video_quality_score`, `video_startup_business_exception_percentage`, `video_startup_failure_percentage`, `viewer_experience_score` \"count\" : `started_views`, `unique_viewers` | [optional] | | **order_direction** | **String** | Sort order. | [optional] | | **timeframe** | [**Array<String>**](String.md) | Timeframe window to limit results by. Must be provided as an array query string parameter (e.g. timeframe[]=). Accepted formats are... * array of epoch timestamps e.g. `timeframe[]=1498867200&timeframe[]=1498953600` * duration string e.g. `timeframe[]=24:hours or timeframe[]=7:days` | [optional] | | **filters** | [**Array<String>**](String.md) | Limit the results to rows that match conditions from provided key:value pairs. Must be provided as an array query string parameter. To exclude rows that match a certain condition, prepend a `!` character to the dimension. Possible filter names are the same as returned by the List Filters endpoint. Example: * `filters[]=operating_system:windows&filters[]=!country:US` | [optional] | diff --git a/docs/PlaybackID.md b/docs/PlaybackID.md index 3509a16..e77cab8 100644 --- a/docs/PlaybackID.md +++ b/docs/PlaybackID.md @@ -6,6 +6,7 @@ | ---- | ---- | ----------- | ----- | | **id** | **String** | Unique identifier for the PlaybackID | [optional] | | **policy** | [**PlaybackPolicy**](PlaybackPolicy.md) | | [optional] | +| **drm_configuration_id** | **String** | The DRM configuration used by this playback ID. Must only be set when `policy` is set to `drm`. | [optional] | ## Example @@ -14,7 +15,8 @@ require 'mux_ruby' instance = MuxRuby::PlaybackID.new( id: null, - policy: null + policy: null, + drm_configuration_id: null ) ``` diff --git a/gen/generator-config.json b/gen/generator-config.json index b624123..594a44d 100644 --- a/gen/generator-config.json +++ b/gen/generator-config.json @@ -8,5 +8,5 @@ "gemSourceLocation": "https://github.com/muxinc/mux-ruby", "gemLicense": "MIT", "moduleName": "MuxRuby", - "gemVersion": "3.16.0" + "gemVersion": "3.17.0" } diff --git a/lib/mux_ruby.rb b/lib/mux_ruby.rb index 6682944..8171d86 100644 --- a/lib/mux_ruby.rb +++ b/lib/mux_ruby.rb @@ -46,6 +46,8 @@ require 'mux_ruby/models/create_transcription_vocabulary_request' require 'mux_ruby/models/create_upload_request' require 'mux_ruby/models/create_web_input_request' +require 'mux_ruby/models/drm_configuration' +require 'mux_ruby/models/drm_configuration_response' require 'mux_ruby/models/delivery_report' require 'mux_ruby/models/delivery_report_delivered_seconds_by_resolution' require 'mux_ruby/models/dimension_value' @@ -90,6 +92,7 @@ require 'mux_ruby/models/list_assets_response' require 'mux_ruby/models/list_breakdown_values_response' require 'mux_ruby/models/list_breakdown_values_response_meta' +require 'mux_ruby/models/list_drm_configurations_response' require 'mux_ruby/models/list_delivery_usage_response' require 'mux_ruby/models/list_dimension_values_response' require 'mux_ruby/models/list_dimensions_response' @@ -181,6 +184,7 @@ # APIs require 'mux_ruby/api/assets_api' +require 'mux_ruby/api/drm_configurations_api' require 'mux_ruby/api/delivery_usage_api' require 'mux_ruby/api/dimensions_api' require 'mux_ruby/api/direct_uploads_api' diff --git a/lib/mux_ruby/api/drm_configurations_api.rb b/lib/mux_ruby/api/drm_configurations_api.rb new file mode 100644 index 0000000..52deaf3 --- /dev/null +++ b/lib/mux_ruby/api/drm_configurations_api.rb @@ -0,0 +1,148 @@ +=begin +#Mux API + +#Mux is how developers build online video. This API encompasses both Mux Video and Mux Data functionality to help you build your video-related projects better and faster than ever before. + +The version of the OpenAPI document: v1 +Contact: devex@mux.com +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.0.1 + +=end + +require 'cgi' + +module MuxRuby + class DRMConfigurationsApi + attr_accessor :api_client + + def initialize(api_client = ApiClient.default) + @api_client = api_client + end + # Retrieve a DRM Configuration + # Retrieves a single DRM Configuration. + # @param drm_configuration_id [String] The DRM Configuration ID. + # @param [Hash] opts the optional parameters + # @return [DRMConfigurationResponse] + def get_drm_configuration(drm_configuration_id, opts = {}) + data, _status_code, _headers = get_drm_configuration_with_http_info(drm_configuration_id, opts) + data + end + + # Retrieve a DRM Configuration + # Retrieves a single DRM Configuration. + # @param drm_configuration_id [String] The DRM Configuration ID. + # @param [Hash] opts the optional parameters + # @return [Array<(DRMConfigurationResponse, Integer, Hash)>] DRMConfigurationResponse data, response status code and response headers + def get_drm_configuration_with_http_info(drm_configuration_id, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: DRMConfigurationsApi.get_drm_configuration ...' + end + # verify the required parameter 'drm_configuration_id' is set + if @api_client.config.client_side_validation && drm_configuration_id.nil? + fail ArgumentError, "Missing the required parameter 'drm_configuration_id' when calling DRMConfigurationsApi.get_drm_configuration" + end + # resource path + local_var_path = '/video/v1/drm-configurations/{DRM_CONFIGURATION_ID}'.sub('{' + 'DRM_CONFIGURATION_ID' + '}', CGI.escape(drm_configuration_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] || 'DRMConfigurationResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['accessToken'] + + new_options = opts.merge( + :operation => :"DRMConfigurationsApi.get_drm_configuration", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: DRMConfigurationsApi#get_drm_configuration\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # List DRM Configurations + # Returns a list of DRM Configurations + # @param [Hash] opts the optional parameters + # @option opts [Integer] :page Offset by this many pages, of the size of `limit` (default to 1) + # @option opts [Integer] :limit Number of items to include in the response (default to 25) + # @return [ListDRMConfigurationsResponse] + def list_drm_configurations(opts = {}) + data, _status_code, _headers = list_drm_configurations_with_http_info(opts) + data + end + + # List DRM Configurations + # Returns a list of DRM Configurations + # @param [Hash] opts the optional parameters + # @option opts [Integer] :page Offset by this many pages, of the size of `limit` + # @option opts [Integer] :limit Number of items to include in the response + # @return [Array<(ListDRMConfigurationsResponse, Integer, Hash)>] ListDRMConfigurationsResponse data, response status code and response headers + def list_drm_configurations_with_http_info(opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: DRMConfigurationsApi.list_drm_configurations ...' + end + # resource path + local_var_path = '/video/v1/drm-configurations' + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil? + query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].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] || 'ListDRMConfigurationsResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['accessToken'] + + new_options = opts.merge( + :operation => :"DRMConfigurationsApi.list_drm_configurations", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: DRMConfigurationsApi#list_drm_configurations\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + end +end diff --git a/lib/mux_ruby/api/metrics_api.rb b/lib/mux_ruby/api/metrics_api.rb index a71ba02..0a53488 100644 --- a/lib/mux_ruby/api/metrics_api.rb +++ b/lib/mux_ruby/api/metrics_api.rb @@ -26,7 +26,7 @@ def initialize(api_client = ApiClient.default) # @option opts [Array] :timeframe Timeframe window to limit results by. Must be provided as an array query string parameter (e.g. timeframe[]=). Accepted formats are... * array of epoch timestamps e.g. `timeframe[]=1498867200&timeframe[]=1498953600` * duration string e.g. `timeframe[]=24:hours or timeframe[]=7:days` # @option opts [Array] :filters Limit the results to rows that match conditions from provided key:value pairs. Must be provided as an array query string parameter. To exclude rows that match a certain condition, prepend a `!` character to the dimension. Possible filter names are the same as returned by the List Filters endpoint. Example: * `filters[]=operating_system:windows&filters[]=!country:US` # @option opts [Array] :metric_filters Limit the results to rows that match inequality conditions from provided metric comparison clauses. Must be provided as an array query string parameter. Possible filterable metrics are the same as the set of metric ids, with the exceptions of `exits_before_video_start`, `unique_viewers`, `video_startup_failure_percentage`, and `views`. Example: * `metric_filters[]=aggregate_startup_time>=1000` - # @option opts [String] :measurement Measurement for the provided metric. If omitted, the default for the metric will be used. + # @option opts [String] :measurement Measurement for the provided metric. If omitted, the default for the metric will be used. The default measurement for each metric is: \"sum\" : `ad_attempt_count`, `ad_break_count`, `ad_break_error_count`, `ad_error_count`, `ad_impression_count`, `playing_time` \"median\" : `ad_preroll_startup_time`, `ad_watch_time`, `aggregate_startup_time`, `content_startup_time`, `content_watch_time`, `max_downscale_percentage`, `max_upscale_percentage`, `page_load_time`, `player_average_live_latency`, `player_startup_time`, `rebuffer_count`, `rebuffer_duration`, `requests_for_first_preroll`, `video_startup_preroll_load_time`, `video_startup_preroll_request_time`, `video_startup_time`, `view_average_request_latency`, `view_average_request_throughput`, `view_max_request_latency`, `weighted_average_bitrate` \"avg\" : `ad_break_error_percentage`, `ad_error_percentage`, `ad_exit_before_start_count`, `ad_exit_before_start_percentage`, `ad_playback_failure_percentage`, `ad_startup_error_count`, `ad_startup_error_percentage`, `content_playback_failure_percentage`, `downscale_percentage`, `exits_before_video_start`, `playback_business_exception_percentage`, `playback_failure_percentage`, `playback_success_score`, `rebuffer_frequency`, `rebuffer_percentage`, `seek_latency`, `smoothness_score`, `startup_time_score`, `upscale_percentage`, `video_quality_score`, `video_startup_business_exception_percentage`, `video_startup_failure_percentage`, `viewer_experience_score` \"count\" : `started_views`, `unique_viewers` # @option opts [String] :order_direction Sort order. # @option opts [String] :group_by Time granularity to group results by. If this value is omitted, a default granularity is chosen based on the timeframe. For timeframes of less than 90 minutes, the default granularity is `minute`. Between 90 minutes and 6 hours, the default granularity is `ten_minutes`. Between 6 hours and 15 days inclusive, the default granularity is `hour`. The granularity of timeframes that exceed 15 days is `day`. This default behavior is subject to change; it is strongly suggested that you explicitly specify the granularity. # @return [GetMetricTimeseriesDataResponse] @@ -42,7 +42,7 @@ def get_metric_timeseries_data(metric_id, opts = {}) # @option opts [Array] :timeframe Timeframe window to limit results by. Must be provided as an array query string parameter (e.g. timeframe[]=). Accepted formats are... * array of epoch timestamps e.g. `timeframe[]=1498867200&timeframe[]=1498953600` * duration string e.g. `timeframe[]=24:hours or timeframe[]=7:days` # @option opts [Array] :filters Limit the results to rows that match conditions from provided key:value pairs. Must be provided as an array query string parameter. To exclude rows that match a certain condition, prepend a `!` character to the dimension. Possible filter names are the same as returned by the List Filters endpoint. Example: * `filters[]=operating_system:windows&filters[]=!country:US` # @option opts [Array] :metric_filters Limit the results to rows that match inequality conditions from provided metric comparison clauses. Must be provided as an array query string parameter. Possible filterable metrics are the same as the set of metric ids, with the exceptions of `exits_before_video_start`, `unique_viewers`, `video_startup_failure_percentage`, and `views`. Example: * `metric_filters[]=aggregate_startup_time>=1000` - # @option opts [String] :measurement Measurement for the provided metric. If omitted, the default for the metric will be used. + # @option opts [String] :measurement Measurement for the provided metric. If omitted, the default for the metric will be used. The default measurement for each metric is: \"sum\" : `ad_attempt_count`, `ad_break_count`, `ad_break_error_count`, `ad_error_count`, `ad_impression_count`, `playing_time` \"median\" : `ad_preroll_startup_time`, `ad_watch_time`, `aggregate_startup_time`, `content_startup_time`, `content_watch_time`, `max_downscale_percentage`, `max_upscale_percentage`, `page_load_time`, `player_average_live_latency`, `player_startup_time`, `rebuffer_count`, `rebuffer_duration`, `requests_for_first_preroll`, `video_startup_preroll_load_time`, `video_startup_preroll_request_time`, `video_startup_time`, `view_average_request_latency`, `view_average_request_throughput`, `view_max_request_latency`, `weighted_average_bitrate` \"avg\" : `ad_break_error_percentage`, `ad_error_percentage`, `ad_exit_before_start_count`, `ad_exit_before_start_percentage`, `ad_playback_failure_percentage`, `ad_startup_error_count`, `ad_startup_error_percentage`, `content_playback_failure_percentage`, `downscale_percentage`, `exits_before_video_start`, `playback_business_exception_percentage`, `playback_failure_percentage`, `playback_success_score`, `rebuffer_frequency`, `rebuffer_percentage`, `seek_latency`, `smoothness_score`, `startup_time_score`, `upscale_percentage`, `video_quality_score`, `video_startup_business_exception_percentage`, `video_startup_failure_percentage`, `viewer_experience_score` \"count\" : `started_views`, `unique_viewers` # @option opts [String] :order_direction Sort order. # @option opts [String] :group_by Time granularity to group results by. If this value is omitted, a default granularity is chosen based on the timeframe. For timeframes of less than 90 minutes, the default granularity is `minute`. Between 90 minutes and 6 hours, the default granularity is `ten_minutes`. Between 6 hours and 15 days inclusive, the default granularity is `hour`. The granularity of timeframes that exceed 15 days is `day`. This default behavior is subject to change; it is strongly suggested that you explicitly specify the granularity. # @return [Array<(GetMetricTimeseriesDataResponse, Integer, Hash)>] GetMetricTimeseriesDataResponse data, response status code and response headers @@ -124,7 +124,7 @@ def get_metric_timeseries_data_with_http_info(metric_id, opts = {}) # @option opts [Array] :timeframe Timeframe window to limit results by. Must be provided as an array query string parameter (e.g. timeframe[]=). Accepted formats are... * array of epoch timestamps e.g. `timeframe[]=1498867200&timeframe[]=1498953600` * duration string e.g. `timeframe[]=24:hours or timeframe[]=7:days` # @option opts [Array] :filters Limit the results to rows that match conditions from provided key:value pairs. Must be provided as an array query string parameter. To exclude rows that match a certain condition, prepend a `!` character to the dimension. Possible filter names are the same as returned by the List Filters endpoint. Example: * `filters[]=operating_system:windows&filters[]=!country:US` # @option opts [Array] :metric_filters Limit the results to rows that match inequality conditions from provided metric comparison clauses. Must be provided as an array query string parameter. Possible filterable metrics are the same as the set of metric ids, with the exceptions of `exits_before_video_start`, `unique_viewers`, `video_startup_failure_percentage`, and `views`. Example: * `metric_filters[]=aggregate_startup_time>=1000` - # @option opts [String] :measurement Measurement for the provided metric. If omitted, the default for the metric will be used. + # @option opts [String] :measurement Measurement for the provided metric. If omitted, the default for the metric will be used. The default measurement for each metric is: \"sum\" : `ad_attempt_count`, `ad_break_count`, `ad_break_error_count`, `ad_error_count`, `ad_impression_count`, `playing_time` \"median\" : `ad_preroll_startup_time`, `ad_watch_time`, `aggregate_startup_time`, `content_startup_time`, `content_watch_time`, `max_downscale_percentage`, `max_upscale_percentage`, `page_load_time`, `player_average_live_latency`, `player_startup_time`, `rebuffer_count`, `rebuffer_duration`, `requests_for_first_preroll`, `video_startup_preroll_load_time`, `video_startup_preroll_request_time`, `video_startup_time`, `view_average_request_latency`, `view_average_request_throughput`, `view_max_request_latency`, `weighted_average_bitrate` \"avg\" : `ad_break_error_percentage`, `ad_error_percentage`, `ad_exit_before_start_count`, `ad_exit_before_start_percentage`, `ad_playback_failure_percentage`, `ad_startup_error_count`, `ad_startup_error_percentage`, `content_playback_failure_percentage`, `downscale_percentage`, `exits_before_video_start`, `playback_business_exception_percentage`, `playback_failure_percentage`, `playback_success_score`, `rebuffer_frequency`, `rebuffer_percentage`, `seek_latency`, `smoothness_score`, `startup_time_score`, `upscale_percentage`, `video_quality_score`, `video_startup_business_exception_percentage`, `video_startup_failure_percentage`, `viewer_experience_score` \"count\" : `started_views`, `unique_viewers` # @return [GetOverallValuesResponse] def get_overall_values(metric_id, opts = {}) data, _status_code, _headers = get_overall_values_with_http_info(metric_id, opts) @@ -138,7 +138,7 @@ def get_overall_values(metric_id, opts = {}) # @option opts [Array] :timeframe Timeframe window to limit results by. Must be provided as an array query string parameter (e.g. timeframe[]=). Accepted formats are... * array of epoch timestamps e.g. `timeframe[]=1498867200&timeframe[]=1498953600` * duration string e.g. `timeframe[]=24:hours or timeframe[]=7:days` # @option opts [Array] :filters Limit the results to rows that match conditions from provided key:value pairs. Must be provided as an array query string parameter. To exclude rows that match a certain condition, prepend a `!` character to the dimension. Possible filter names are the same as returned by the List Filters endpoint. Example: * `filters[]=operating_system:windows&filters[]=!country:US` # @option opts [Array] :metric_filters Limit the results to rows that match inequality conditions from provided metric comparison clauses. Must be provided as an array query string parameter. Possible filterable metrics are the same as the set of metric ids, with the exceptions of `exits_before_video_start`, `unique_viewers`, `video_startup_failure_percentage`, and `views`. Example: * `metric_filters[]=aggregate_startup_time>=1000` - # @option opts [String] :measurement Measurement for the provided metric. If omitted, the default for the metric will be used. + # @option opts [String] :measurement Measurement for the provided metric. If omitted, the default for the metric will be used. The default measurement for each metric is: \"sum\" : `ad_attempt_count`, `ad_break_count`, `ad_break_error_count`, `ad_error_count`, `ad_impression_count`, `playing_time` \"median\" : `ad_preroll_startup_time`, `ad_watch_time`, `aggregate_startup_time`, `content_startup_time`, `content_watch_time`, `max_downscale_percentage`, `max_upscale_percentage`, `page_load_time`, `player_average_live_latency`, `player_startup_time`, `rebuffer_count`, `rebuffer_duration`, `requests_for_first_preroll`, `video_startup_preroll_load_time`, `video_startup_preroll_request_time`, `video_startup_time`, `view_average_request_latency`, `view_average_request_throughput`, `view_max_request_latency`, `weighted_average_bitrate` \"avg\" : `ad_break_error_percentage`, `ad_error_percentage`, `ad_exit_before_start_count`, `ad_exit_before_start_percentage`, `ad_playback_failure_percentage`, `ad_startup_error_count`, `ad_startup_error_percentage`, `content_playback_failure_percentage`, `downscale_percentage`, `exits_before_video_start`, `playback_business_exception_percentage`, `playback_failure_percentage`, `playback_success_score`, `rebuffer_frequency`, `rebuffer_percentage`, `seek_latency`, `smoothness_score`, `startup_time_score`, `upscale_percentage`, `video_quality_score`, `video_startup_business_exception_percentage`, `video_startup_failure_percentage`, `viewer_experience_score` \"count\" : `started_views`, `unique_viewers` # @return [Array<(GetOverallValuesResponse, Integer, Hash)>] GetOverallValuesResponse data, response status code and response headers def get_overall_values_with_http_info(metric_id, opts = {}) if @api_client.config.debugging @@ -282,7 +282,7 @@ def list_all_metric_values_with_http_info(opts = {}) # @param metric_id [String] ID of the Metric # @param [Hash] opts the optional parameters # @option opts [String] :group_by Breakdown value to group the results by - # @option opts [String] :measurement Measurement for the provided metric. If omitted, the default for the metric will be used. + # @option opts [String] :measurement Measurement for the provided metric. If omitted, the default for the metric will be used. The default measurement for each metric is: \"sum\" : `ad_attempt_count`, `ad_break_count`, `ad_break_error_count`, `ad_error_count`, `ad_impression_count`, `playing_time` \"median\" : `ad_preroll_startup_time`, `ad_watch_time`, `aggregate_startup_time`, `content_startup_time`, `content_watch_time`, `max_downscale_percentage`, `max_upscale_percentage`, `page_load_time`, `player_average_live_latency`, `player_startup_time`, `rebuffer_count`, `rebuffer_duration`, `requests_for_first_preroll`, `video_startup_preroll_load_time`, `video_startup_preroll_request_time`, `video_startup_time`, `view_average_request_latency`, `view_average_request_throughput`, `view_max_request_latency`, `weighted_average_bitrate` \"avg\" : `ad_break_error_percentage`, `ad_error_percentage`, `ad_exit_before_start_count`, `ad_exit_before_start_percentage`, `ad_playback_failure_percentage`, `ad_startup_error_count`, `ad_startup_error_percentage`, `content_playback_failure_percentage`, `downscale_percentage`, `exits_before_video_start`, `playback_business_exception_percentage`, `playback_failure_percentage`, `playback_success_score`, `rebuffer_frequency`, `rebuffer_percentage`, `seek_latency`, `smoothness_score`, `startup_time_score`, `upscale_percentage`, `video_quality_score`, `video_startup_business_exception_percentage`, `video_startup_failure_percentage`, `viewer_experience_score` \"count\" : `started_views`, `unique_viewers` # @option opts [Array] :filters Limit the results to rows that match conditions from provided key:value pairs. Must be provided as an array query string parameter. To exclude rows that match a certain condition, prepend a `!` character to the dimension. Possible filter names are the same as returned by the List Filters endpoint. Example: * `filters[]=operating_system:windows&filters[]=!country:US` # @option opts [Array] :metric_filters Limit the results to rows that match inequality conditions from provided metric comparison clauses. Must be provided as an array query string parameter. Possible filterable metrics are the same as the set of metric ids, with the exceptions of `exits_before_video_start`, `unique_viewers`, `video_startup_failure_percentage`, and `views`. Example: * `metric_filters[]=aggregate_startup_time>=1000` # @option opts [Integer] :limit Number of items to include in the response (default to 25) @@ -301,7 +301,7 @@ def list_breakdown_values(metric_id, opts = {}) # @param metric_id [String] ID of the Metric # @param [Hash] opts the optional parameters # @option opts [String] :group_by Breakdown value to group the results by - # @option opts [String] :measurement Measurement for the provided metric. If omitted, the default for the metric will be used. + # @option opts [String] :measurement Measurement for the provided metric. If omitted, the default for the metric will be used. The default measurement for each metric is: \"sum\" : `ad_attempt_count`, `ad_break_count`, `ad_break_error_count`, `ad_error_count`, `ad_impression_count`, `playing_time` \"median\" : `ad_preroll_startup_time`, `ad_watch_time`, `aggregate_startup_time`, `content_startup_time`, `content_watch_time`, `max_downscale_percentage`, `max_upscale_percentage`, `page_load_time`, `player_average_live_latency`, `player_startup_time`, `rebuffer_count`, `rebuffer_duration`, `requests_for_first_preroll`, `video_startup_preroll_load_time`, `video_startup_preroll_request_time`, `video_startup_time`, `view_average_request_latency`, `view_average_request_throughput`, `view_max_request_latency`, `weighted_average_bitrate` \"avg\" : `ad_break_error_percentage`, `ad_error_percentage`, `ad_exit_before_start_count`, `ad_exit_before_start_percentage`, `ad_playback_failure_percentage`, `ad_startup_error_count`, `ad_startup_error_percentage`, `content_playback_failure_percentage`, `downscale_percentage`, `exits_before_video_start`, `playback_business_exception_percentage`, `playback_failure_percentage`, `playback_success_score`, `rebuffer_frequency`, `rebuffer_percentage`, `seek_latency`, `smoothness_score`, `startup_time_score`, `upscale_percentage`, `video_quality_score`, `video_startup_business_exception_percentage`, `video_startup_failure_percentage`, `viewer_experience_score` \"count\" : `started_views`, `unique_viewers` # @option opts [Array] :filters Limit the results to rows that match conditions from provided key:value pairs. Must be provided as an array query string parameter. To exclude rows that match a certain condition, prepend a `!` character to the dimension. Possible filter names are the same as returned by the List Filters endpoint. Example: * `filters[]=operating_system:windows&filters[]=!country:US` # @option opts [Array] :metric_filters Limit the results to rows that match inequality conditions from provided metric comparison clauses. Must be provided as an array query string parameter. Possible filterable metrics are the same as the set of metric ids, with the exceptions of `exits_before_video_start`, `unique_viewers`, `video_startup_failure_percentage`, and `views`. Example: * `metric_filters[]=aggregate_startup_time>=1000` # @option opts [Integer] :limit Number of items to include in the response @@ -392,7 +392,7 @@ def list_breakdown_values_with_http_info(metric_id, opts = {}) # Returns a list of insights for a metric. These are the worst performing values across all breakdowns sorted by how much they negatively impact a specific metric. # @param metric_id [String] ID of the Metric # @param [Hash] opts the optional parameters - # @option opts [String] :measurement Measurement for the provided metric. If omitted, the default for the metric will be used. + # @option opts [String] :measurement Measurement for the provided metric. If omitted, the default for the metric will be used. The default measurement for each metric is: \"sum\" : `ad_attempt_count`, `ad_break_count`, `ad_break_error_count`, `ad_error_count`, `ad_impression_count`, `playing_time` \"median\" : `ad_preroll_startup_time`, `ad_watch_time`, `aggregate_startup_time`, `content_startup_time`, `content_watch_time`, `max_downscale_percentage`, `max_upscale_percentage`, `page_load_time`, `player_average_live_latency`, `player_startup_time`, `rebuffer_count`, `rebuffer_duration`, `requests_for_first_preroll`, `video_startup_preroll_load_time`, `video_startup_preroll_request_time`, `video_startup_time`, `view_average_request_latency`, `view_average_request_throughput`, `view_max_request_latency`, `weighted_average_bitrate` \"avg\" : `ad_break_error_percentage`, `ad_error_percentage`, `ad_exit_before_start_count`, `ad_exit_before_start_percentage`, `ad_playback_failure_percentage`, `ad_startup_error_count`, `ad_startup_error_percentage`, `content_playback_failure_percentage`, `downscale_percentage`, `exits_before_video_start`, `playback_business_exception_percentage`, `playback_failure_percentage`, `playback_success_score`, `rebuffer_frequency`, `rebuffer_percentage`, `seek_latency`, `smoothness_score`, `startup_time_score`, `upscale_percentage`, `video_quality_score`, `video_startup_business_exception_percentage`, `video_startup_failure_percentage`, `viewer_experience_score` \"count\" : `started_views`, `unique_viewers` # @option opts [String] :order_direction Sort order. # @option opts [Array] :timeframe Timeframe window to limit results by. Must be provided as an array query string parameter (e.g. timeframe[]=). Accepted formats are... * array of epoch timestamps e.g. `timeframe[]=1498867200&timeframe[]=1498953600` * duration string e.g. `timeframe[]=24:hours or timeframe[]=7:days` # @option opts [Array] :filters Limit the results to rows that match conditions from provided key:value pairs. Must be provided as an array query string parameter. To exclude rows that match a certain condition, prepend a `!` character to the dimension. Possible filter names are the same as returned by the List Filters endpoint. Example: * `filters[]=operating_system:windows&filters[]=!country:US` @@ -407,7 +407,7 @@ def list_insights(metric_id, opts = {}) # Returns a list of insights for a metric. These are the worst performing values across all breakdowns sorted by how much they negatively impact a specific metric. # @param metric_id [String] ID of the Metric # @param [Hash] opts the optional parameters - # @option opts [String] :measurement Measurement for the provided metric. If omitted, the default for the metric will be used. + # @option opts [String] :measurement Measurement for the provided metric. If omitted, the default for the metric will be used. The default measurement for each metric is: \"sum\" : `ad_attempt_count`, `ad_break_count`, `ad_break_error_count`, `ad_error_count`, `ad_impression_count`, `playing_time` \"median\" : `ad_preroll_startup_time`, `ad_watch_time`, `aggregate_startup_time`, `content_startup_time`, `content_watch_time`, `max_downscale_percentage`, `max_upscale_percentage`, `page_load_time`, `player_average_live_latency`, `player_startup_time`, `rebuffer_count`, `rebuffer_duration`, `requests_for_first_preroll`, `video_startup_preroll_load_time`, `video_startup_preroll_request_time`, `video_startup_time`, `view_average_request_latency`, `view_average_request_throughput`, `view_max_request_latency`, `weighted_average_bitrate` \"avg\" : `ad_break_error_percentage`, `ad_error_percentage`, `ad_exit_before_start_count`, `ad_exit_before_start_percentage`, `ad_playback_failure_percentage`, `ad_startup_error_count`, `ad_startup_error_percentage`, `content_playback_failure_percentage`, `downscale_percentage`, `exits_before_video_start`, `playback_business_exception_percentage`, `playback_failure_percentage`, `playback_success_score`, `rebuffer_frequency`, `rebuffer_percentage`, `seek_latency`, `smoothness_score`, `startup_time_score`, `upscale_percentage`, `video_quality_score`, `video_startup_business_exception_percentage`, `video_startup_failure_percentage`, `viewer_experience_score` \"count\" : `started_views`, `unique_viewers` # @option opts [String] :order_direction Sort order. # @option opts [Array] :timeframe Timeframe window to limit results by. Must be provided as an array query string parameter (e.g. timeframe[]=). Accepted formats are... * array of epoch timestamps e.g. `timeframe[]=1498867200&timeframe[]=1498953600` * duration string e.g. `timeframe[]=24:hours or timeframe[]=7:days` # @option opts [Array] :filters Limit the results to rows that match conditions from provided key:value pairs. Must be provided as an array query string parameter. To exclude rows that match a certain condition, prepend a `!` character to the dimension. Possible filter names are the same as returned by the List Filters endpoint. Example: * `filters[]=operating_system:windows&filters[]=!country:US` diff --git a/lib/mux_ruby/models/create_asset_request.rb b/lib/mux_ruby/models/create_asset_request.rb index cdc28e6..d399432 100644 --- a/lib/mux_ruby/models/create_asset_request.rb +++ b/lib/mux_ruby/models/create_asset_request.rb @@ -18,9 +18,12 @@ class CreateAssetRequest # An array of objects that each describe an input file to be used to create the asset. As a shortcut, input can also be a string URL for a file when only one input file is used. See `input[].url` for requirements. attr_accessor :input - # An array of playback policy names that you want applied to this asset and available through `playback_ids`. Options include: `\"public\"` (anyone with the playback URL can stream the asset). And `\"signed\"` (an additional access token is required to play the asset). If no playback_policy is set, the asset will have no playback IDs and will therefore not be playable. For simplicity, a single string name can be used in place of the array in the case of only one playback policy. + # An array of playback policy names that you want applied to this asset and available through `playback_ids`. Options include: * `\"public\"` (anyone with the playback URL can stream the asset). * `\"signed\"` (an additional access token is required to play the asset). If no `playback_policy` is set, the asset will have no playback IDs and will therefore not be playable. For simplicity, a single string name can be used in place of the array in the case of only one playback policy. attr_accessor :playback_policy + # An array of playback policy objects that you want applied to this asset and available through `playback_ids`. `advanced_playback_policies` must be used instead of `playback_policy` when creating a DRM playback ID. + attr_accessor :advanced_playback_policies + attr_accessor :per_title_encode # Arbitrary user-supplied metadata that will be included in the asset details and related webhooks. Can be used to store your own ID for a video along with the asset. **Max: 255 characters**. @@ -71,6 +74,7 @@ def self.attribute_map { :'input' => :'input', :'playback_policy' => :'playback_policy', + :'advanced_playback_policies' => :'advanced_playback_policies', :'per_title_encode' => :'per_title_encode', :'passthrough' => :'passthrough', :'mp4_support' => :'mp4_support', @@ -92,6 +96,7 @@ def self.openapi_types { :'input' => :'Array', :'playback_policy' => :'Array', + :'advanced_playback_policies' => :'Array', :'per_title_encode' => :'Boolean', :'passthrough' => :'String', :'mp4_support' => :'String', @@ -136,6 +141,12 @@ def initialize(attributes = {}) end end + if attributes.key?(:'advanced_playback_policies') + if (value = attributes[:'advanced_playback_policies']).is_a?(Array) + self.advanced_playback_policies = value + end + end + if attributes.key?(:'per_title_encode') self.per_title_encode = attributes[:'per_title_encode'] end @@ -239,6 +250,7 @@ def ==(o) self.class == o.class && input == o.input && playback_policy == o.playback_policy && + advanced_playback_policies == o.advanced_playback_policies && per_title_encode == o.per_title_encode && passthrough == o.passthrough && mp4_support == o.mp4_support && @@ -258,7 +270,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [input, playback_policy, per_title_encode, passthrough, mp4_support, normalize_audio, master_access, test, max_resolution_tier, encoding_tier].hash + [input, playback_policy, advanced_playback_policies, per_title_encode, passthrough, mp4_support, normalize_audio, master_access, test, max_resolution_tier, encoding_tier].hash end # Builds the object from hash diff --git a/lib/mux_ruby/models/create_live_stream_request.rb b/lib/mux_ruby/models/create_live_stream_request.rb index 991d913..e00657e 100644 --- a/lib/mux_ruby/models/create_live_stream_request.rb +++ b/lib/mux_ruby/models/create_live_stream_request.rb @@ -17,6 +17,9 @@ module MuxRuby class CreateLiveStreamRequest attr_accessor :playback_policy + # An array of playback policy objects that you want applied to this asset and available through `playback_ids`. `advanced_playback_policies` must be used instead of `playback_policy` when creating a DRM playback ID. + attr_accessor :advanced_playback_policies + attr_accessor :new_asset_settings # When live streaming software disconnects from Mux, either intentionally or due to a drop in the network, the Reconnect Window is the time in seconds that Mux should wait for the streaming software to reconnect before considering the live stream finished and completing the recorded asset. Defaults to 60 seconds on the API if not specified. If not specified directly, Standard Latency streams have a Reconnect Window of 60 seconds; Reduced and Low Latency streams have a default of 0 seconds, or no Reconnect Window. For that reason, we suggest specifying a value other than zero for Reduced and Low Latency streams. Reduced and Low Latency streams with a Reconnect Window greater than zero will insert slate media into the recorded asset while waiting for the streaming software to reconnect or when there are brief interruptions in the live stream media. When using a Reconnect Window setting higher than 60 seconds with a Standard Latency stream, we highly recommend enabling slate with the `use_slate_for_standard_latency` option. @@ -82,6 +85,7 @@ def valid?(value) def self.attribute_map { :'playback_policy' => :'playback_policy', + :'advanced_playback_policies' => :'advanced_playback_policies', :'new_asset_settings' => :'new_asset_settings', :'reconnect_window' => :'reconnect_window', :'use_slate_for_standard_latency' => :'use_slate_for_standard_latency', @@ -108,6 +112,7 @@ def self.acceptable_attributes def self.openapi_types { :'playback_policy' => :'Array', + :'advanced_playback_policies' => :'Array', :'new_asset_settings' => :'CreateAssetRequest', :'reconnect_window' => :'Float', :'use_slate_for_standard_latency' => :'Boolean', @@ -152,6 +157,12 @@ def initialize(attributes = {}) end end + if attributes.key?(:'advanced_playback_policies') + if (value = attributes[:'advanced_playback_policies']).is_a?(Array) + self.advanced_playback_policies = value + end + end + if attributes.key?(:'new_asset_settings') self.new_asset_settings = attributes[:'new_asset_settings'] end @@ -300,6 +311,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && playback_policy == o.playback_policy && + advanced_playback_policies == o.advanced_playback_policies && new_asset_settings == o.new_asset_settings && reconnect_window == o.reconnect_window && use_slate_for_standard_latency == o.use_slate_for_standard_latency && @@ -325,7 +337,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [playback_policy, new_asset_settings, reconnect_window, use_slate_for_standard_latency, reconnect_slate_url, passthrough, audio_only, embedded_subtitles, generated_subtitles, reduced_latency, low_latency, latency_mode, test, simulcast_targets, max_continuous_duration].hash + [playback_policy, advanced_playback_policies, new_asset_settings, reconnect_window, use_slate_for_standard_latency, reconnect_slate_url, passthrough, audio_only, embedded_subtitles, generated_subtitles, reduced_latency, low_latency, latency_mode, test, simulcast_targets, max_continuous_duration].hash end # Builds the object from hash diff --git a/lib/mux_ruby/models/create_playback_id_request.rb b/lib/mux_ruby/models/create_playback_id_request.rb index d6e9733..44e33de 100644 --- a/lib/mux_ruby/models/create_playback_id_request.rb +++ b/lib/mux_ruby/models/create_playback_id_request.rb @@ -17,10 +17,14 @@ module MuxRuby class CreatePlaybackIDRequest attr_accessor :policy + # The DRM configuration used by this playback ID. Must only be set when `policy` is set to `drm`. + attr_accessor :drm_configuration_id + # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { - :'policy' => :'policy' + :'policy' => :'policy', + :'drm_configuration_id' => :'drm_configuration_id' } end @@ -32,7 +36,8 @@ def self.acceptable_attributes # Attribute type mapping. def self.openapi_types { - :'policy' => :'PlaybackPolicy' + :'policy' => :'PlaybackPolicy', + :'drm_configuration_id' => :'String' } end @@ -60,6 +65,10 @@ def initialize(attributes = {}) if attributes.key?(:'policy') self.policy = attributes[:'policy'] end + + if attributes.key?(:'drm_configuration_id') + self.drm_configuration_id = attributes[:'drm_configuration_id'] + end end # Show invalid properties with the reasons. Usually used together with valid? @@ -80,7 +89,8 @@ def valid? def ==(o) return true if self.equal?(o) self.class == o.class && - policy == o.policy + policy == o.policy && + drm_configuration_id == o.drm_configuration_id end # @see the `==` method @@ -92,7 +102,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [policy].hash + [policy, drm_configuration_id].hash end # Builds the object from hash diff --git a/lib/mux_ruby/models/create_upload_request.rb b/lib/mux_ruby/models/create_upload_request.rb index f228ca9..b11e6a5 100644 --- a/lib/mux_ruby/models/create_upload_request.rb +++ b/lib/mux_ruby/models/create_upload_request.rb @@ -23,6 +23,7 @@ class CreateUploadRequest attr_accessor :new_asset_settings + # Indicates if this is a test Direct Upload, in which case the Asset that gets created will be a `test` Asset. attr_accessor :test # Attribute mapping from ruby-style variable name to JSON key. diff --git a/lib/mux_ruby/models/drm_configuration.rb b/lib/mux_ruby/models/drm_configuration.rb new file mode 100644 index 0000000..c51ec73 --- /dev/null +++ b/lib/mux_ruby/models/drm_configuration.rb @@ -0,0 +1,219 @@ +=begin +#Mux API + +#Mux is how developers build online video. This API encompasses both Mux Video and Mux Data functionality to help you build your video-related projects better and faster than ever before. + +The version of the OpenAPI document: v1 +Contact: devex@mux.com +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.0.1 + +=end + +require 'date' +require 'time' + +module MuxRuby + class DRMConfiguration + # Unique identifier for the DRM Configuration. Max 255 characters. + attr_accessor :id + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'id' => :'id' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'id' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `MuxRuby::DRMConfiguration` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `MuxRuby::DRMConfiguration`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + id == o.id + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [id].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = MuxRuby.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/mux_ruby/models/drm_configuration_response.rb b/lib/mux_ruby/models/drm_configuration_response.rb new file mode 100644 index 0000000..afa2e2c --- /dev/null +++ b/lib/mux_ruby/models/drm_configuration_response.rb @@ -0,0 +1,218 @@ +=begin +#Mux API + +#Mux is how developers build online video. This API encompasses both Mux Video and Mux Data functionality to help you build your video-related projects better and faster than ever before. + +The version of the OpenAPI document: v1 +Contact: devex@mux.com +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.0.1 + +=end + +require 'date' +require 'time' + +module MuxRuby + class DRMConfigurationResponse + attr_accessor :data + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'data' => :'data' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'data' => :'DRMConfiguration' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `MuxRuby::DRMConfigurationResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `MuxRuby::DRMConfigurationResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'data') + self.data = attributes[:'data'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + data == o.data + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [data].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = MuxRuby.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/mux_ruby/models/list_drm_configurations_response.rb b/lib/mux_ruby/models/list_drm_configurations_response.rb new file mode 100644 index 0000000..0b5eed2 --- /dev/null +++ b/lib/mux_ruby/models/list_drm_configurations_response.rb @@ -0,0 +1,220 @@ +=begin +#Mux API + +#Mux is how developers build online video. This API encompasses both Mux Video and Mux Data functionality to help you build your video-related projects better and faster than ever before. + +The version of the OpenAPI document: v1 +Contact: devex@mux.com +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.0.1 + +=end + +require 'date' +require 'time' + +module MuxRuby + class ListDRMConfigurationsResponse + attr_accessor :data + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'data' => :'data' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'data' => :'Array' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `MuxRuby::ListDRMConfigurationsResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `MuxRuby::ListDRMConfigurationsResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'data') + if (value = attributes[:'data']).is_a?(Array) + self.data = value + end + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + data == o.data + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [data].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = MuxRuby.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/mux_ruby/models/playback_id.rb b/lib/mux_ruby/models/playback_id.rb index 1b4d20e..54f4f9d 100644 --- a/lib/mux_ruby/models/playback_id.rb +++ b/lib/mux_ruby/models/playback_id.rb @@ -20,11 +20,15 @@ class PlaybackID attr_accessor :policy + # The DRM configuration used by this playback ID. Must only be set when `policy` is set to `drm`. + attr_accessor :drm_configuration_id + # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { :'id' => :'id', - :'policy' => :'policy' + :'policy' => :'policy', + :'drm_configuration_id' => :'drm_configuration_id' } end @@ -37,7 +41,8 @@ def self.acceptable_attributes def self.openapi_types { :'id' => :'String', - :'policy' => :'PlaybackPolicy' + :'policy' => :'PlaybackPolicy', + :'drm_configuration_id' => :'String' } end @@ -69,6 +74,10 @@ def initialize(attributes = {}) if attributes.key?(:'policy') self.policy = attributes[:'policy'] end + + if attributes.key?(:'drm_configuration_id') + self.drm_configuration_id = attributes[:'drm_configuration_id'] + end end # Show invalid properties with the reasons. Usually used together with valid? @@ -90,7 +99,8 @@ def ==(o) return true if self.equal?(o) self.class == o.class && id == o.id && - policy == o.policy + policy == o.policy && + drm_configuration_id == o.drm_configuration_id end # @see the `==` method @@ -102,7 +112,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [id, policy].hash + [id, policy, drm_configuration_id].hash end # Builds the object from hash diff --git a/lib/mux_ruby/models/playback_policy.rb b/lib/mux_ruby/models/playback_policy.rb index 428a484..17e5197 100644 --- a/lib/mux_ruby/models/playback_policy.rb +++ b/lib/mux_ruby/models/playback_policy.rb @@ -17,6 +17,7 @@ module MuxRuby class PlaybackPolicy PUBLIC = "public".freeze SIGNED = "signed".freeze + DRM = "drm".freeze # Builds the enum from string # @param [String] The enum value in the form of the string diff --git a/lib/mux_ruby/version.rb b/lib/mux_ruby/version.rb index b8a4b75..65a6a74 100644 --- a/lib/mux_ruby/version.rb +++ b/lib/mux_ruby/version.rb @@ -11,5 +11,5 @@ =end module MuxRuby - VERSION = '3.16.0' + VERSION = '3.17.0' end diff --git a/spec/api/drm_configurations_api_spec.rb b/spec/api/drm_configurations_api_spec.rb new file mode 100644 index 0000000..5fbcffa --- /dev/null +++ b/spec/api/drm_configurations_api_spec.rb @@ -0,0 +1,60 @@ +=begin +#Mux API + +#Mux is how developers build online video. This API encompasses both Mux Video and Mux Data functionality to help you build your video-related projects better and faster than ever before. + +The version of the OpenAPI document: v1 +Contact: devex@mux.com +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.0.1 + +=end + +require 'spec_helper' +require 'json' + +# Unit tests for MuxRuby::DRMConfigurationsApi +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe 'DRMConfigurationsApi' do + before do + # run before each test + @api_instance = MuxRuby::DRMConfigurationsApi.new + end + + after do + # run after each test + end + + describe 'test an instance of DRMConfigurationsApi' do + it 'should create an instance of DRMConfigurationsApi' do + expect(@api_instance).to be_instance_of(MuxRuby::DRMConfigurationsApi) + end + end + + # unit tests for get_drm_configuration + # Retrieve a DRM Configuration + # Retrieves a single DRM Configuration. + # @param drm_configuration_id The DRM Configuration ID. + # @param [Hash] opts the optional parameters + # @return [DRMConfigurationResponse] + describe 'get_drm_configuration test' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + # unit tests for list_drm_configurations + # List DRM Configurations + # Returns a list of DRM Configurations + # @param [Hash] opts the optional parameters + # @option opts [Integer] :page Offset by this many pages, of the size of `limit` + # @option opts [Integer] :limit Number of items to include in the response + # @return [ListDRMConfigurationsResponse] + describe 'list_drm_configurations test' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/drm_configuration_response_spec.rb b/spec/models/drm_configuration_response_spec.rb new file mode 100644 index 0000000..f4af294 --- /dev/null +++ b/spec/models/drm_configuration_response_spec.rb @@ -0,0 +1,34 @@ +=begin +#Mux API + +#Mux is how developers build online video. This API encompasses both Mux Video and Mux Data functionality to help you build your video-related projects better and faster than ever before. + +The version of the OpenAPI document: v1 +Contact: devex@mux.com +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.0.1 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for MuxRuby::DRMConfigurationResponse +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe MuxRuby::DRMConfigurationResponse do + let(:instance) { MuxRuby::DRMConfigurationResponse.new } + + describe 'test an instance of DRMConfigurationResponse' do + it 'should create an instance of DRMConfigurationResponse' do + expect(instance).to be_instance_of(MuxRuby::DRMConfigurationResponse) + end + end + describe 'test attribute "data"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/drm_configuration_spec.rb b/spec/models/drm_configuration_spec.rb new file mode 100644 index 0000000..30a0f2c --- /dev/null +++ b/spec/models/drm_configuration_spec.rb @@ -0,0 +1,34 @@ +=begin +#Mux API + +#Mux is how developers build online video. This API encompasses both Mux Video and Mux Data functionality to help you build your video-related projects better and faster than ever before. + +The version of the OpenAPI document: v1 +Contact: devex@mux.com +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.0.1 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for MuxRuby::DRMConfiguration +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe MuxRuby::DRMConfiguration do + let(:instance) { MuxRuby::DRMConfiguration.new } + + describe 'test an instance of DRMConfiguration' do + it 'should create an instance of DRMConfiguration' do + expect(instance).to be_instance_of(MuxRuby::DRMConfiguration) + end + end + describe 'test attribute "id"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/list_drm_configurations_response_spec.rb b/spec/models/list_drm_configurations_response_spec.rb new file mode 100644 index 0000000..355ec39 --- /dev/null +++ b/spec/models/list_drm_configurations_response_spec.rb @@ -0,0 +1,34 @@ +=begin +#Mux API + +#Mux is how developers build online video. This API encompasses both Mux Video and Mux Data functionality to help you build your video-related projects better and faster than ever before. + +The version of the OpenAPI document: v1 +Contact: devex@mux.com +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.0.1 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for MuxRuby::ListDRMConfigurationsResponse +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe MuxRuby::ListDRMConfigurationsResponse do + let(:instance) { MuxRuby::ListDRMConfigurationsResponse.new } + + describe 'test an instance of ListDRMConfigurationsResponse' do + it 'should create an instance of ListDRMConfigurationsResponse' do + expect(instance).to be_instance_of(MuxRuby::ListDRMConfigurationsResponse) + end + end + describe 'test attribute "data"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end