From d4aec149c50434daf6d4bcdb3935cc1a9f3016f7 Mon Sep 17 00:00:00 2001 From: Justin Sanford Date: Wed, 13 Aug 2025 16:08:32 -0700 Subject: [PATCH 1/3] 5.1.0 --- .openapi-generator/FILES | 21 + README.md | 8 +- docs/Annotation.md | 24 ++ docs/AnnotationInput.md | 22 ++ docs/AnnotationResponse.md | 18 + docs/AnnotationsApi.md | 371 ++++++++++++++++++ docs/Asset.md | 4 +- docs/AssetProgress.md | 20 + docs/AssetsApi.md | 4 +- docs/CreateAssetRequest.md | 4 +- docs/CreateLiveStreamRequest.md | 4 +- docs/ListAnnotationsResponse.md | 22 ++ docs/ListAssetsResponse.md | 2 + docs/LiveStream.md | 8 +- docs/LiveStreamMetadata.md | 18 + docs/UpdateLiveStreamRequest.md | 4 +- gen/generator-config.json | 2 +- lib/mux_ruby.rb | 7 + lib/mux_ruby/api/annotations_api.rb | 355 +++++++++++++++++ lib/mux_ruby/api/assets_api.rb | 7 +- lib/mux_ruby/models/annotation.rb | 250 ++++++++++++ lib/mux_ruby/models/annotation_input.rb | 239 +++++++++++ lib/mux_ruby/models/annotation_response.rb | 218 ++++++++++ lib/mux_ruby/models/asset.rb | 17 +- lib/mux_ruby/models/asset_progress.rb | 288 ++++++++++++++ lib/mux_ruby/models/create_asset_request.rb | 20 +- .../models/create_live_stream_request.rb | 17 +- .../models/list_annotations_response.rb | 266 +++++++++++++ lib/mux_ruby/models/list_assets_response.rb | 13 +- lib/mux_ruby/models/live_stream.rb | 21 +- ...live_stream_generated_subtitle_settings.rb | 4 +- lib/mux_ruby/models/live_stream_metadata.rb | 235 +++++++++++ .../models/update_live_stream_request.rb | 17 +- lib/mux_ruby/version.rb | 2 +- spec/api/annotations_api_spec.rb | 99 +++++ spec/models/annotation_input_spec.rb | 46 +++ spec/models/annotation_response_spec.rb | 34 ++ spec/models/annotation_spec.rb | 52 +++ spec/models/asset_progress_spec.rb | 44 +++ spec/models/list_annotations_response_spec.rb | 46 +++ spec/models/live_stream_metadata_spec.rb | 34 ++ 41 files changed, 2846 insertions(+), 41 deletions(-) create mode 100644 docs/Annotation.md create mode 100644 docs/AnnotationInput.md create mode 100644 docs/AnnotationResponse.md create mode 100644 docs/AnnotationsApi.md create mode 100644 docs/AssetProgress.md create mode 100644 docs/ListAnnotationsResponse.md create mode 100644 docs/LiveStreamMetadata.md create mode 100644 lib/mux_ruby/api/annotations_api.rb create mode 100644 lib/mux_ruby/models/annotation.rb create mode 100644 lib/mux_ruby/models/annotation_input.rb create mode 100644 lib/mux_ruby/models/annotation_response.rb create mode 100644 lib/mux_ruby/models/asset_progress.rb create mode 100644 lib/mux_ruby/models/list_annotations_response.rb create mode 100644 lib/mux_ruby/models/live_stream_metadata.rb create mode 100644 spec/api/annotations_api_spec.rb create mode 100644 spec/models/annotation_input_spec.rb create mode 100644 spec/models/annotation_response_spec.rb create mode 100644 spec/models/annotation_spec.rb create mode 100644 spec/models/asset_progress_spec.rb create mode 100644 spec/models/list_annotations_response_spec.rb create mode 100644 spec/models/live_stream_metadata_spec.rb diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES index f3007c0..5329527 100644 --- a/.openapi-generator/FILES +++ b/.openapi-generator/FILES @@ -5,12 +5,17 @@ Gemfile README.md Rakefile docs/AbridgedVideoView.md +docs/Annotation.md +docs/AnnotationInput.md +docs/AnnotationResponse.md +docs/AnnotationsApi.md docs/Asset.md docs/AssetErrors.md docs/AssetGeneratedSubtitleSettings.md docs/AssetMaster.md docs/AssetMetadata.md docs/AssetNonStandardInputReasons.md +docs/AssetProgress.md docs/AssetRecordingTimes.md docs/AssetResponse.md docs/AssetStaticRenditions.md @@ -80,6 +85,7 @@ docs/InputTrack.md docs/Insight.md docs/LaunchWebInputResponse.md docs/ListAllMetricValuesResponse.md +docs/ListAnnotationsResponse.md docs/ListAssetsResponse.md docs/ListBreakdownValuesResponse.md docs/ListBreakdownValuesResponseMeta.md @@ -111,6 +117,7 @@ docs/ListWebInputsResponse.md docs/LiveStream.md docs/LiveStreamEmbeddedSubtitleSettings.md docs/LiveStreamGeneratedSubtitleSettings.md +docs/LiveStreamMetadata.md docs/LiveStreamResponse.md docs/LiveStreamStatus.md docs/LiveStreamsApi.md @@ -179,6 +186,7 @@ docs/WebInput.md docs/WebInputResponse.md docs/WebInputsApi.md lib/mux_ruby.rb +lib/mux_ruby/api/annotations_api.rb lib/mux_ruby/api/assets_api.rb lib/mux_ruby/api/delivery_usage_api.rb lib/mux_ruby/api/dimensions_api.rb @@ -204,12 +212,16 @@ lib/mux_ruby/api_error.rb lib/mux_ruby/configuration.rb lib/mux_ruby/configuration.rb lib/mux_ruby/models/abridged_video_view.rb +lib/mux_ruby/models/annotation.rb +lib/mux_ruby/models/annotation_input.rb +lib/mux_ruby/models/annotation_response.rb lib/mux_ruby/models/asset.rb lib/mux_ruby/models/asset_errors.rb lib/mux_ruby/models/asset_generated_subtitle_settings.rb lib/mux_ruby/models/asset_master.rb lib/mux_ruby/models/asset_metadata.rb lib/mux_ruby/models/asset_non_standard_input_reasons.rb +lib/mux_ruby/models/asset_progress.rb lib/mux_ruby/models/asset_recording_times.rb lib/mux_ruby/models/asset_response.rb lib/mux_ruby/models/asset_static_renditions.rb @@ -270,6 +282,7 @@ lib/mux_ruby/models/input_track.rb lib/mux_ruby/models/insight.rb lib/mux_ruby/models/launch_web_input_response.rb lib/mux_ruby/models/list_all_metric_values_response.rb +lib/mux_ruby/models/list_annotations_response.rb lib/mux_ruby/models/list_assets_response.rb lib/mux_ruby/models/list_breakdown_values_response.rb lib/mux_ruby/models/list_breakdown_values_response_meta.rb @@ -301,6 +314,7 @@ lib/mux_ruby/models/list_web_inputs_response.rb lib/mux_ruby/models/live_stream.rb lib/mux_ruby/models/live_stream_embedded_subtitle_settings.rb lib/mux_ruby/models/live_stream_generated_subtitle_settings.rb +lib/mux_ruby/models/live_stream_metadata.rb lib/mux_ruby/models/live_stream_response.rb lib/mux_ruby/models/live_stream_status.rb lib/mux_ruby/models/metric.rb @@ -359,6 +373,13 @@ 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/annotations_api_spec.rb spec/api_client_spec.rb spec/configuration_spec.rb +spec/models/annotation_input_spec.rb +spec/models/annotation_response_spec.rb +spec/models/annotation_spec.rb +spec/models/asset_progress_spec.rb +spec/models/list_annotations_response_spec.rb +spec/models/live_stream_metadata_spec.rb spec/spec_helper.rb diff --git a/README.md b/README.md index 2488d7e..ce9b811 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: 5.0.1 +- Package version: 5.1.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-5.0.1.gem +gem install ./mux_ruby-5.1.0.gem ``` -(for development, run `gem install --dev ./mux_ruby-5.0.1.gem` to install the development dependencies) +(for development, run `gem install --dev ./mux_ruby-5.1.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', '~> 5.0.1' + gem 'mux_ruby', '~> 5.1.0' ### Install from Git diff --git a/docs/Annotation.md b/docs/Annotation.md new file mode 100644 index 0000000..cf35fd8 --- /dev/null +++ b/docs/Annotation.md @@ -0,0 +1,24 @@ +# MuxRuby::Annotation + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **id** | **String** | Unique identifier for the annotation | [optional] | +| **note** | **String** | The annotation note content | [optional] | +| **date** | **Time** | Datetime when the annotation applies | [optional] | +| **sub_property_id** | **String** | Customer-defined sub-property identifier | [optional] | + +## Example + +```ruby +require 'mux_ruby' + +instance = MuxRuby::Annotation.new( + id: null, + note: null, + date: null, + sub_property_id: null +) +``` + diff --git a/docs/AnnotationInput.md b/docs/AnnotationInput.md new file mode 100644 index 0000000..4e5d4d2 --- /dev/null +++ b/docs/AnnotationInput.md @@ -0,0 +1,22 @@ +# MuxRuby::AnnotationInput + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **note** | **String** | The annotation note content | [optional] | +| **date** | **Integer** | Datetime when the annotation applies (Unix timestamp) | [optional] | +| **sub_property_id** | **String** | Customer-defined sub-property identifier | [optional] | + +## Example + +```ruby +require 'mux_ruby' + +instance = MuxRuby::AnnotationInput.new( + note: null, + date: null, + sub_property_id: null +) +``` + diff --git a/docs/AnnotationResponse.md b/docs/AnnotationResponse.md new file mode 100644 index 0000000..daaaa74 --- /dev/null +++ b/docs/AnnotationResponse.md @@ -0,0 +1,18 @@ +# MuxRuby::AnnotationResponse + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **data** | [**Annotation**](Annotation.md) | | [optional] | + +## Example + +```ruby +require 'mux_ruby' + +instance = MuxRuby::AnnotationResponse.new( + data: null +) +``` + diff --git a/docs/AnnotationsApi.md b/docs/AnnotationsApi.md new file mode 100644 index 0000000..121e6bf --- /dev/null +++ b/docs/AnnotationsApi.md @@ -0,0 +1,371 @@ +# MuxRuby::AnnotationsApi + +All URIs are relative to *https://api.mux.com* + +| Method | HTTP request | Description | +| ------ | ------------ | ----------- | +| [**create_annotation**](AnnotationsApi.md#create_annotation) | **POST** /data/v1/annotations | Create Annotation | +| [**delete_annotation**](AnnotationsApi.md#delete_annotation) | **DELETE** /data/v1/annotations/{ANNOTATION_ID} | Delete Annotation | +| [**get_annotation**](AnnotationsApi.md#get_annotation) | **GET** /data/v1/annotations/{ANNOTATION_ID} | Get Annotation | +| [**list_annotations**](AnnotationsApi.md#list_annotations) | **GET** /data/v1/annotations | List Annotations | +| [**update_annotation**](AnnotationsApi.md#update_annotation) | **PATCH** /data/v1/annotations/{ANNOTATION_ID} | Update Annotation | + + +## create_annotation + +> create_annotation(annotation_input) + +Create Annotation + +Creates a new annotation. + +### 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::AnnotationsApi.new +annotation_input = MuxRuby::AnnotationInput.new # AnnotationInput | + +begin + # Create Annotation + result = api_instance.create_annotation(annotation_input) + p result +rescue MuxRuby::ApiError => e + puts "Error when calling AnnotationsApi->create_annotation: #{e}" +end +``` + +#### Using the create_annotation_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> create_annotation_with_http_info(annotation_input) + +```ruby +begin + # Create Annotation + data, status_code, headers = api_instance.create_annotation_with_http_info(annotation_input) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue MuxRuby::ApiError => e + puts "Error when calling AnnotationsApi->create_annotation_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **annotation_input** | [**AnnotationInput**](AnnotationInput.md) | | | + +### Return type + +[**AnnotationResponse**](AnnotationResponse.md) + +### Authorization + +[accessToken](../README.md#accessToken) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + + +## delete_annotation + +> delete_annotation(annotation_id) + +Delete Annotation + +Deletes an annotation. + +### 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::AnnotationsApi.new +annotation_id = TODO # String | The annotation ID + +begin + # Delete Annotation + api_instance.delete_annotation(annotation_id) +rescue MuxRuby::ApiError => e + puts "Error when calling AnnotationsApi->delete_annotation: #{e}" +end +``` + +#### Using the delete_annotation_with_http_info variant + +This returns an Array which contains the response data (`nil` in this case), status code and headers. + +> delete_annotation_with_http_info(annotation_id) + +```ruby +begin + # Delete Annotation + data, status_code, headers = api_instance.delete_annotation_with_http_info(annotation_id) + p status_code # => 2xx + p headers # => { ... } + p data # => nil +rescue MuxRuby::ApiError => e + puts "Error when calling AnnotationsApi->delete_annotation_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **annotation_id** | [**String**](.md) | The annotation ID | | + +### Return type + +nil (empty response body) + +### Authorization + +[accessToken](../README.md#accessToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + + +## get_annotation + +> get_annotation(annotation_id) + +Get Annotation + +Returns the details of a specific annotation. + +### 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::AnnotationsApi.new +annotation_id = TODO # String | The annotation ID + +begin + # Get Annotation + result = api_instance.get_annotation(annotation_id) + p result +rescue MuxRuby::ApiError => e + puts "Error when calling AnnotationsApi->get_annotation: #{e}" +end +``` + +#### Using the get_annotation_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> get_annotation_with_http_info(annotation_id) + +```ruby +begin + # Get Annotation + data, status_code, headers = api_instance.get_annotation_with_http_info(annotation_id) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue MuxRuby::ApiError => e + puts "Error when calling AnnotationsApi->get_annotation_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **annotation_id** | [**String**](.md) | The annotation ID | | + +### Return type + +[**AnnotationResponse**](AnnotationResponse.md) + +### Authorization + +[accessToken](../README.md#accessToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## list_annotations + +> list_annotations(opts) + +List Annotations + +Returns a list of annotations. + +### 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::AnnotationsApi.new +opts = { + limit: 56, # Integer | Number of items to include in the response + page: 56, # Integer | Offset by this many pages, of the size of `limit` + 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` +} + +begin + # List Annotations + result = api_instance.list_annotations(opts) + p result +rescue MuxRuby::ApiError => e + puts "Error when calling AnnotationsApi->list_annotations: #{e}" +end +``` + +#### Using the list_annotations_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> list_annotations_with_http_info(opts) + +```ruby +begin + # List Annotations + data, status_code, headers = api_instance.list_annotations_with_http_info(opts) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue MuxRuby::ApiError => e + puts "Error when calling AnnotationsApi->list_annotations_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **limit** | **Integer** | Number of items to include in the response | [optional][default to 25] | +| **page** | **Integer** | Offset by this many pages, of the size of `limit` | [optional][default to 1] | +| **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] | + +### Return type + +[**ListAnnotationsResponse**](ListAnnotationsResponse.md) + +### Authorization + +[accessToken](../README.md#accessToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## update_annotation + +> update_annotation(annotation_id, annotation_input) + +Update Annotation + +Updates an existing annotation. + +### 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::AnnotationsApi.new +annotation_id = TODO # String | The annotation ID +annotation_input = MuxRuby::AnnotationInput.new # AnnotationInput | + +begin + # Update Annotation + result = api_instance.update_annotation(annotation_id, annotation_input) + p result +rescue MuxRuby::ApiError => e + puts "Error when calling AnnotationsApi->update_annotation: #{e}" +end +``` + +#### Using the update_annotation_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> update_annotation_with_http_info(annotation_id, annotation_input) + +```ruby +begin + # Update Annotation + data, status_code, headers = api_instance.update_annotation_with_http_info(annotation_id, annotation_input) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue MuxRuby::ApiError => e + puts "Error when calling AnnotationsApi->update_annotation_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **annotation_id** | [**String**](.md) | The annotation ID | | +| **annotation_input** | [**AnnotationInput**](AnnotationInput.md) | | | + +### Return type + +[**AnnotationResponse**](AnnotationResponse.md) + +### Authorization + +[accessToken](../README.md#accessToken) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + diff --git a/docs/Asset.md b/docs/Asset.md index f9f4aa1..8b1cc8f 100644 --- a/docs/Asset.md +++ b/docs/Asset.md @@ -34,6 +34,7 @@ | **test** | **Boolean** | True means this live stream is a test asset. A test asset can help evaluate the Mux Video APIs without incurring any cost. There is no limit on number of test assets created. Test assets are watermarked with the Mux logo, limited to 10 seconds, and deleted after 24 hrs. | [optional] | | **ingest_type** | **String** | The type of ingest used to create the asset. | [optional] | | **meta** | [**AssetMetadata**](AssetMetadata.md) | | [optional] | +| **progress** | [**AssetProgress**](AssetProgress.md) | | [optional] | ## Example @@ -70,7 +71,8 @@ instance = MuxRuby::Asset.new( non_standard_input_reasons: null, test: null, ingest_type: null, - meta: null + meta: null, + progress: null ) ``` diff --git a/docs/AssetProgress.md b/docs/AssetProgress.md new file mode 100644 index 0000000..73815cd --- /dev/null +++ b/docs/AssetProgress.md @@ -0,0 +1,20 @@ +# MuxRuby::AssetProgress + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **state** | **String** | The detailed state of the asset ingest process. This field is useful for relaying more granular processing information to end users when a [non-standard input is encountered](https://www.mux.com/docs/guides/minimize-processing-time#non-standard-input). - `ingesting`: Asset is being ingested (initial processing before or after transcoding). While in this state, the `progress` percentage will be 0. - `transcoding`: Asset is undergoing non-standard transcoding. - `completed`: Asset processing is complete (`status` is `ready`). While in this state, the `progress` percentage will be 100. - `live`: Asset is a live stream currently in progress. While in this state, the `progress` percentage will be -1. - `errored`: Asset has encountered an error (`status` is `errored`). While in this state, the `progress` percentage will be -1. | [optional] | +| **progress** | **Float** | Represents the estimated completion percentage. Returns `0 - 100` when in `ingesting`, `transcoding`, or `completed` state, and `-1` when in `live` or `errored` state. | [optional] | + +## Example + +```ruby +require 'mux_ruby' + +instance = MuxRuby::AssetProgress.new( + state: null, + progress: null +) +``` + diff --git a/docs/AssetsApi.md b/docs/AssetsApi.md index 39d1d1a..fb05fd3 100644 --- a/docs/AssetsApi.md +++ b/docs/AssetsApi.md @@ -525,7 +525,7 @@ nil (empty response body) Delete an asset track -Removes a text track from an asset. Audio and video tracks on assets cannot be removed. +Removes a text or additional audio track from an asset. Neither video nor the primary audio track can be removed. ### Examples @@ -900,6 +900,7 @@ api_instance = MuxRuby::AssetsApi.new opts = { limit: 56, # Integer | Number of items to include in the response page: 56, # Integer | Offset by this many pages, of the size of `limit` + cursor: 'cursor_example', # String | This parameter is used to request pages beyond the first. You can find the cursor value in the `next_cursor` field of paginated responses. live_stream_id: 'live_stream_id_example', # String | Filter response to return all the assets for this live stream only upload_id: 'upload_id_example' # String | Filter response to return an asset created from this direct upload only } @@ -937,6 +938,7 @@ end | ---- | ---- | ----------- | ----- | | **limit** | **Integer** | Number of items to include in the response | [optional][default to 25] | | **page** | **Integer** | Offset by this many pages, of the size of `limit` | [optional][default to 1] | +| **cursor** | **String** | This parameter is used to request pages beyond the first. You can find the cursor value in the `next_cursor` field of paginated responses. | [optional] | | **live_stream_id** | **String** | Filter response to return all the assets for this live stream only | [optional] | | **upload_id** | **String** | Filter response to return an asset created from this direct upload only | [optional] | diff --git a/docs/CreateAssetRequest.md b/docs/CreateAssetRequest.md index c5f6570..cdc128c 100644 --- a/docs/CreateAssetRequest.md +++ b/docs/CreateAssetRequest.md @@ -20,6 +20,7 @@ | **video_quality** | **String** | The video quality controls the cost, quality, and available platform features for the asset. The default video quality for an account can be set in the Mux Dashboard. This field replaces the deprecated `encoding_tier` value. [See the video quality guide for more details.](https://docs.mux.com/guides/use-video-quality-levels) | [optional] | | **static_renditions** | [**Array<CreateStaticRenditionRequest>**](CreateStaticRenditionRequest.md) | An array of static renditions to create for this asset. You may not enable both `static_renditions` and `mp4_support (the latter being deprecated)` | [optional] | | **meta** | [**AssetMetadata**](AssetMetadata.md) | | [optional] | +| **copy_overlays** | **Boolean** | If the created asset is a clip, this controls whether overlays are copied from the source asset. | [optional][default to true] | ## Example @@ -42,7 +43,8 @@ instance = MuxRuby::CreateAssetRequest.new( encoding_tier: null, video_quality: null, static_renditions: null, - meta: null + meta: null, + copy_overlays: null ) ``` diff --git a/docs/CreateLiveStreamRequest.md b/docs/CreateLiveStreamRequest.md index 2fa4346..2d8affc 100644 --- a/docs/CreateLiveStreamRequest.md +++ b/docs/CreateLiveStreamRequest.md @@ -21,6 +21,7 @@ | **test** | **Boolean** | Marks the live stream as a test live stream when the value is set to true. A test live stream can help evaluate the Mux Video APIs without incurring any cost. There is no limit on number of test live streams created. Test live streams are watermarked with the Mux logo and limited to 5 minutes. The test live stream is disabled after the stream is active for 5 mins and the recorded asset also deleted after 24 hours. | [optional] | | **simulcast_targets** | [**Array<CreateSimulcastTargetRequest>**](CreateSimulcastTargetRequest.md) | | [optional] | | **max_continuous_duration** | **Integer** | The time in seconds a live stream may be continuously active before being disconnected. Defaults to 12 hours. | [optional][default to 43200] | +| **meta** | [**LiveStreamMetadata**](LiveStreamMetadata.md) | | [optional] | ## Example @@ -44,7 +45,8 @@ instance = MuxRuby::CreateLiveStreamRequest.new( latency_mode: null, test: null, simulcast_targets: null, - max_continuous_duration: null + max_continuous_duration: null, + meta: null ) ``` diff --git a/docs/ListAnnotationsResponse.md b/docs/ListAnnotationsResponse.md new file mode 100644 index 0000000..30282fd --- /dev/null +++ b/docs/ListAnnotationsResponse.md @@ -0,0 +1,22 @@ +# MuxRuby::ListAnnotationsResponse + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **data** | [**Array<Annotation>**](Annotation.md) | | [optional] | +| **total_row_count** | **Integer** | Total number of annotations available | [optional] | +| **timeframe** | **Array<Integer>** | Start and end unix timestamps for the data range | [optional] | + +## Example + +```ruby +require 'mux_ruby' + +instance = MuxRuby::ListAnnotationsResponse.new( + data: null, + total_row_count: null, + timeframe: null +) +``` + diff --git a/docs/ListAssetsResponse.md b/docs/ListAssetsResponse.md index d46470b..f32044d 100644 --- a/docs/ListAssetsResponse.md +++ b/docs/ListAssetsResponse.md @@ -4,6 +4,7 @@ | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | +| **next_cursor** | **String** | If there are more pages of data, this field will contain a string that can be used with the `cursor` querystring parameter to fetch the next page of data. | [optional] | | **data** | [**Array<Asset>**](Asset.md) | | [optional] | ## Example @@ -12,6 +13,7 @@ require 'mux_ruby' instance = MuxRuby::ListAssetsResponse.new( + next_cursor: null, data: null ) ``` diff --git a/docs/LiveStream.md b/docs/LiveStream.md index b408657..5741756 100644 --- a/docs/LiveStream.md +++ b/docs/LiveStream.md @@ -6,7 +6,7 @@ | ---- | ---- | ----------- | ----- | | **id** | **String** | Unique identifier for the Live Stream. Max 255 characters. | [optional] | | **created_at** | **String** | Time the Live Stream was created, defined as a Unix timestamp (seconds since epoch). | [optional] | -| **stream_key** | **String** | Unique key used for streaming to a Mux RTMP endpoint. This should be considered as sensitive as credentials, anyone with this stream key can begin streaming. | [optional] | +| **stream_key** | **String** | Unique key used for streaming to a Mux RTMP endpoint. This should be considered as sensitive as credentials, anyone with this stream key can begin streaming. Max 64 characters. | [optional] | | **active_asset_id** | **String** | The Asset that is currently being created if there is an active broadcast. | [optional] | | **recent_asset_ids** | **Array<String>** | An array of strings with the most recent Asset IDs that were created from this Live Stream. The most recently generated Asset ID is the last entry in the list. | [optional] | | **status** | [**LiveStreamStatus**](LiveStreamStatus.md) | | [optional] | @@ -25,8 +25,9 @@ | **latency_mode** | **String** | Latency is the time from when the streamer transmits a frame of video to when you see it in the player. Set this as an alternative to setting low latency or reduced latency flags. | [optional] | | **test** | **Boolean** | True means this live stream is a test live stream. Test live streams can be used to help evaluate the Mux Video APIs for free. There is no limit on the number of test live streams, but they are watermarked with the Mux logo, and limited to 5 minutes. The test live stream is disabled after the stream is active for 5 mins and the recorded asset also deleted after 24 hours. | [optional] | | **max_continuous_duration** | **Integer** | The time in seconds a live stream may be continuously active before being disconnected. Defaults to 12 hours. | [optional][default to 43200] | -| **srt_passphrase** | **String** | Unique key used for encrypting a stream to a Mux SRT endpoint. | [optional] | +| **srt_passphrase** | **String** | Unique key used for encrypting a stream to a Mux SRT endpoint. Max 64 characters. | [optional] | | **active_ingest_protocol** | **String** | The protocol used for the active ingest stream. This is only set when the live stream is active. | [optional] | +| **meta** | [**LiveStreamMetadata**](LiveStreamMetadata.md) | | [optional] | ## Example @@ -56,7 +57,8 @@ instance = MuxRuby::LiveStream.new( test: null, max_continuous_duration: null, srt_passphrase: null, - active_ingest_protocol: null + active_ingest_protocol: null, + meta: null ) ``` diff --git a/docs/LiveStreamMetadata.md b/docs/LiveStreamMetadata.md new file mode 100644 index 0000000..fbc3dea --- /dev/null +++ b/docs/LiveStreamMetadata.md @@ -0,0 +1,18 @@ +# MuxRuby::LiveStreamMetadata + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **title** | **String** | The live stream title. Max 512 code points. | [optional] | + +## Example + +```ruby +require 'mux_ruby' + +instance = MuxRuby::LiveStreamMetadata.new( + title: null +) +``` + diff --git a/docs/UpdateLiveStreamRequest.md b/docs/UpdateLiveStreamRequest.md index 09ef11f..5d9c514 100644 --- a/docs/UpdateLiveStreamRequest.md +++ b/docs/UpdateLiveStreamRequest.md @@ -11,6 +11,7 @@ | **reconnect_slate_url** | **String** | The URL of the image file that Mux should download and use as slate media during interruptions of the live stream media. This file will be downloaded each time a new recorded asset is created from the live stream. Set this to a blank string to clear the value so that the default slate media will be used. | [optional] | | **max_continuous_duration** | **Integer** | The time in seconds a live stream may be continuously active before being disconnected. Defaults to 12 hours. | [optional][default to 43200] | | **new_asset_settings** | [**UpdateLiveStreamNewAssetSettings**](UpdateLiveStreamNewAssetSettings.md) | | [optional] | +| **meta** | [**LiveStreamMetadata**](LiveStreamMetadata.md) | | [optional] | ## Example @@ -24,7 +25,8 @@ instance = MuxRuby::UpdateLiveStreamRequest.new( use_slate_for_standard_latency: null, reconnect_slate_url: null, max_continuous_duration: null, - new_asset_settings: null + new_asset_settings: null, + meta: null ) ``` diff --git a/gen/generator-config.json b/gen/generator-config.json index a38b007..91a9e66 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": "5.0.1" + "gemVersion": "5.1.0" } diff --git a/lib/mux_ruby.rb b/lib/mux_ruby.rb index 1f2021c..f7bb0af 100644 --- a/lib/mux_ruby.rb +++ b/lib/mux_ruby.rb @@ -18,12 +18,16 @@ # Models require 'mux_ruby/models/abridged_video_view' +require 'mux_ruby/models/annotation' +require 'mux_ruby/models/annotation_input' +require 'mux_ruby/models/annotation_response' require 'mux_ruby/models/asset' require 'mux_ruby/models/asset_errors' require 'mux_ruby/models/asset_generated_subtitle_settings' require 'mux_ruby/models/asset_master' require 'mux_ruby/models/asset_metadata' require 'mux_ruby/models/asset_non_standard_input_reasons' +require 'mux_ruby/models/asset_progress' require 'mux_ruby/models/asset_recording_times' require 'mux_ruby/models/asset_response' require 'mux_ruby/models/asset_static_renditions' @@ -84,6 +88,7 @@ require 'mux_ruby/models/insight' require 'mux_ruby/models/launch_web_input_response' require 'mux_ruby/models/list_all_metric_values_response' +require 'mux_ruby/models/list_annotations_response' require 'mux_ruby/models/list_assets_response' require 'mux_ruby/models/list_breakdown_values_response' require 'mux_ruby/models/list_breakdown_values_response_meta' @@ -115,6 +120,7 @@ require 'mux_ruby/models/live_stream' require 'mux_ruby/models/live_stream_embedded_subtitle_settings' require 'mux_ruby/models/live_stream_generated_subtitle_settings' +require 'mux_ruby/models/live_stream_metadata' require 'mux_ruby/models/live_stream_response' require 'mux_ruby/models/live_stream_status' require 'mux_ruby/models/metric' @@ -173,6 +179,7 @@ require 'mux_ruby/models/web_input_response' # APIs +require 'mux_ruby/api/annotations_api' require 'mux_ruby/api/assets_api' require 'mux_ruby/api/drm_configurations_api' require 'mux_ruby/api/delivery_usage_api' diff --git a/lib/mux_ruby/api/annotations_api.rb b/lib/mux_ruby/api/annotations_api.rb new file mode 100644 index 0000000..e5269ff --- /dev/null +++ b/lib/mux_ruby/api/annotations_api.rb @@ -0,0 +1,355 @@ +=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 AnnotationsApi + attr_accessor :api_client + + def initialize(api_client = ApiClient.default) + @api_client = api_client + end + # Create Annotation + # Creates a new annotation. + # @param annotation_input [AnnotationInput] + # @param [Hash] opts the optional parameters + # @return [AnnotationResponse] + def create_annotation(annotation_input, opts = {}) + data, _status_code, _headers = create_annotation_with_http_info(annotation_input, opts) + data + end + + # Create Annotation + # Creates a new annotation. + # @param annotation_input [AnnotationInput] + # @param [Hash] opts the optional parameters + # @return [Array<(AnnotationResponse, Integer, Hash)>] AnnotationResponse data, response status code and response headers + def create_annotation_with_http_info(annotation_input, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: AnnotationsApi.create_annotation ...' + end + # verify the required parameter 'annotation_input' is set + if @api_client.config.client_side_validation && annotation_input.nil? + fail ArgumentError, "Missing the required parameter 'annotation_input' when calling AnnotationsApi.create_annotation" + end + # resource path + local_var_path = '/data/v1/annotations' + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + # HTTP header 'Content-Type' + header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] || @api_client.object_to_http_body(annotation_input) + + # return_type + return_type = opts[:debug_return_type] || 'AnnotationResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['accessToken'] + + new_options = opts.merge( + :operation => :"AnnotationsApi.create_annotation", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: AnnotationsApi#create_annotation\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Delete Annotation + # Deletes an annotation. + # @param annotation_id [String] The annotation ID + # @param [Hash] opts the optional parameters + # @return [nil] + def delete_annotation(annotation_id, opts = {}) + delete_annotation_with_http_info(annotation_id, opts) + nil + end + + # Delete Annotation + # Deletes an annotation. + # @param annotation_id [String] The annotation ID + # @param [Hash] opts the optional parameters + # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers + def delete_annotation_with_http_info(annotation_id, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: AnnotationsApi.delete_annotation ...' + end + # verify the required parameter 'annotation_id' is set + if @api_client.config.client_side_validation && annotation_id.nil? + fail ArgumentError, "Missing the required parameter 'annotation_id' when calling AnnotationsApi.delete_annotation" + end + # resource path + local_var_path = '/data/v1/annotations/{ANNOTATION_ID}'.sub('{' + 'ANNOTATION_ID' + '}', CGI.escape(annotation_id.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] + + # auth_names + auth_names = opts[:debug_auth_names] || ['accessToken'] + + new_options = opts.merge( + :operation => :"AnnotationsApi.delete_annotation", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: AnnotationsApi#delete_annotation\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Get Annotation + # Returns the details of a specific annotation. + # @param annotation_id [String] The annotation ID + # @param [Hash] opts the optional parameters + # @return [AnnotationResponse] + def get_annotation(annotation_id, opts = {}) + data, _status_code, _headers = get_annotation_with_http_info(annotation_id, opts) + data + end + + # Get Annotation + # Returns the details of a specific annotation. + # @param annotation_id [String] The annotation ID + # @param [Hash] opts the optional parameters + # @return [Array<(AnnotationResponse, Integer, Hash)>] AnnotationResponse data, response status code and response headers + def get_annotation_with_http_info(annotation_id, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: AnnotationsApi.get_annotation ...' + end + # verify the required parameter 'annotation_id' is set + if @api_client.config.client_side_validation && annotation_id.nil? + fail ArgumentError, "Missing the required parameter 'annotation_id' when calling AnnotationsApi.get_annotation" + end + # resource path + local_var_path = '/data/v1/annotations/{ANNOTATION_ID}'.sub('{' + 'ANNOTATION_ID' + '}', CGI.escape(annotation_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] || 'AnnotationResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['accessToken'] + + new_options = opts.merge( + :operation => :"AnnotationsApi.get_annotation", + :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: AnnotationsApi#get_annotation\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # List Annotations + # Returns a list of annotations. + # @param [Hash] opts the optional parameters + # @option opts [Integer] :limit Number of items to include in the response (default to 25) + # @option opts [Integer] :page Offset by this many pages, of the size of `limit` (default to 1) + # @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` + # @return [ListAnnotationsResponse] + def list_annotations(opts = {}) + data, _status_code, _headers = list_annotations_with_http_info(opts) + data + end + + # List Annotations + # Returns a list of annotations. + # @param [Hash] opts the optional parameters + # @option opts [Integer] :limit Number of items to include in the response + # @option opts [Integer] :page Offset by this many pages, of the size of `limit` + # @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` + # @return [Array<(ListAnnotationsResponse, Integer, Hash)>] ListAnnotationsResponse data, response status code and response headers + def list_annotations_with_http_info(opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: AnnotationsApi.list_annotations ...' + end + allowable_values = ["asc", "desc"] + if @api_client.config.client_side_validation && opts[:'order_direction'] && !allowable_values.include?(opts[:'order_direction']) + fail ArgumentError, "invalid value for \"order_direction\", must be one of #{allowable_values}" + end + # resource path + local_var_path = '/data/v1/annotations' + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? + query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil? + query_params[:'order_direction'] = opts[:'order_direction'] if !opts[:'order_direction'].nil? + query_params[:'timeframe[]'] = @api_client.build_collection_param(opts[:'timeframe'], :multi) if !opts[:'timeframe'].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] || 'ListAnnotationsResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['accessToken'] + + new_options = opts.merge( + :operation => :"AnnotationsApi.list_annotations", + :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: AnnotationsApi#list_annotations\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Update Annotation + # Updates an existing annotation. + # @param annotation_id [String] The annotation ID + # @param annotation_input [AnnotationInput] + # @param [Hash] opts the optional parameters + # @return [AnnotationResponse] + def update_annotation(annotation_id, annotation_input, opts = {}) + data, _status_code, _headers = update_annotation_with_http_info(annotation_id, annotation_input, opts) + data + end + + # Update Annotation + # Updates an existing annotation. + # @param annotation_id [String] The annotation ID + # @param annotation_input [AnnotationInput] + # @param [Hash] opts the optional parameters + # @return [Array<(AnnotationResponse, Integer, Hash)>] AnnotationResponse data, response status code and response headers + def update_annotation_with_http_info(annotation_id, annotation_input, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: AnnotationsApi.update_annotation ...' + end + # verify the required parameter 'annotation_id' is set + if @api_client.config.client_side_validation && annotation_id.nil? + fail ArgumentError, "Missing the required parameter 'annotation_id' when calling AnnotationsApi.update_annotation" + end + # verify the required parameter 'annotation_input' is set + if @api_client.config.client_side_validation && annotation_input.nil? + fail ArgumentError, "Missing the required parameter 'annotation_input' when calling AnnotationsApi.update_annotation" + end + # resource path + local_var_path = '/data/v1/annotations/{ANNOTATION_ID}'.sub('{' + 'ANNOTATION_ID' + '}', CGI.escape(annotation_id.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + # HTTP header 'Content-Type' + header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] || @api_client.object_to_http_body(annotation_input) + + # return_type + return_type = opts[:debug_return_type] || 'AnnotationResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['accessToken'] + + new_options = opts.merge( + :operation => :"AnnotationsApi.update_annotation", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: AnnotationsApi#update_annotation\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/assets_api.rb b/lib/mux_ruby/api/assets_api.rb index ec3edea..cfbf4a6 100644 --- a/lib/mux_ruby/api/assets_api.rb +++ b/lib/mux_ruby/api/assets_api.rb @@ -493,7 +493,7 @@ def delete_asset_static_rendition_with_http_info(asset_id, static_rendition_id, end # Delete an asset track - # Removes a text track from an asset. Audio and video tracks on assets cannot be removed. + # Removes a text or additional audio track from an asset. Neither video nor the primary audio track can be removed. # @param asset_id [String] The asset ID. # @param track_id [String] The track ID. # @param [Hash] opts the optional parameters @@ -504,7 +504,7 @@ def delete_asset_track(asset_id, track_id, opts = {}) end # Delete an asset track - # Removes a text track from an asset. Audio and video tracks on assets cannot be removed. + # Removes a text or additional audio track from an asset. Neither video nor the primary audio track can be removed. # @param asset_id [String] The asset ID. # @param track_id [String] The track ID. # @param [Hash] opts the optional parameters @@ -836,6 +836,7 @@ def get_asset_playback_id_with_http_info(asset_id, playback_id, opts = {}) # @param [Hash] opts the optional parameters # @option opts [Integer] :limit Number of items to include in the response (default to 25) # @option opts [Integer] :page Offset by this many pages, of the size of `limit` (default to 1) + # @option opts [String] :cursor This parameter is used to request pages beyond the first. You can find the cursor value in the `next_cursor` field of paginated responses. # @option opts [String] :live_stream_id Filter response to return all the assets for this live stream only # @option opts [String] :upload_id Filter response to return an asset created from this direct upload only # @return [ListAssetsResponse] @@ -849,6 +850,7 @@ def list_assets(opts = {}) # @param [Hash] opts the optional parameters # @option opts [Integer] :limit Number of items to include in the response # @option opts [Integer] :page Offset by this many pages, of the size of `limit` + # @option opts [String] :cursor This parameter is used to request pages beyond the first. You can find the cursor value in the `next_cursor` field of paginated responses. # @option opts [String] :live_stream_id Filter response to return all the assets for this live stream only # @option opts [String] :upload_id Filter response to return an asset created from this direct upload only # @return [Array<(ListAssetsResponse, Integer, Hash)>] ListAssetsResponse data, response status code and response headers @@ -863,6 +865,7 @@ def list_assets_with_http_info(opts = {}) query_params = opts[:query_params] || {} query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil? + query_params[:'cursor'] = opts[:'cursor'] if !opts[:'cursor'].nil? query_params[:'live_stream_id'] = opts[:'live_stream_id'] if !opts[:'live_stream_id'].nil? query_params[:'upload_id'] = opts[:'upload_id'] if !opts[:'upload_id'].nil? diff --git a/lib/mux_ruby/models/annotation.rb b/lib/mux_ruby/models/annotation.rb new file mode 100644 index 0000000..a4a68b5 --- /dev/null +++ b/lib/mux_ruby/models/annotation.rb @@ -0,0 +1,250 @@ +=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 Annotation + # Unique identifier for the annotation + attr_accessor :id + + # The annotation note content + attr_accessor :note + + # Datetime when the annotation applies + attr_accessor :date + + # Customer-defined sub-property identifier + attr_accessor :sub_property_id + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'id' => :'id', + :'note' => :'note', + :'date' => :'date', + :'sub_property_id' => :'sub_property_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', + :'note' => :'String', + :'date' => :'Time', + :'sub_property_id' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + :'sub_property_id' + ]) + 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::Annotation` 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::Annotation`. 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 + + if attributes.key?(:'note') + self.note = attributes[:'note'] + end + + if attributes.key?(:'date') + self.date = attributes[:'date'] + end + + if attributes.key?(:'sub_property_id') + self.sub_property_id = attributes[:'sub_property_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 && + note == o.note && + date == o.date && + sub_property_id == o.sub_property_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, note, date, sub_property_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/annotation_input.rb b/lib/mux_ruby/models/annotation_input.rb new file mode 100644 index 0000000..063ad46 --- /dev/null +++ b/lib/mux_ruby/models/annotation_input.rb @@ -0,0 +1,239 @@ +=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 AnnotationInput + # The annotation note content + attr_accessor :note + + # Datetime when the annotation applies (Unix timestamp) + attr_accessor :date + + # Customer-defined sub-property identifier + attr_accessor :sub_property_id + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'note' => :'note', + :'date' => :'date', + :'sub_property_id' => :'sub_property_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 + { + :'note' => :'String', + :'date' => :'Integer', + :'sub_property_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::AnnotationInput` 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::AnnotationInput`. 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?(:'note') + self.note = attributes[:'note'] + end + + if attributes.key?(:'date') + self.date = attributes[:'date'] + end + + if attributes.key?(:'sub_property_id') + self.sub_property_id = attributes[:'sub_property_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 && + note == o.note && + date == o.date && + sub_property_id == o.sub_property_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 + [note, date, sub_property_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/annotation_response.rb b/lib/mux_ruby/models/annotation_response.rb new file mode 100644 index 0000000..df8452d --- /dev/null +++ b/lib/mux_ruby/models/annotation_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 AnnotationResponse + 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' => :'Annotation' + } + 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::AnnotationResponse` 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::AnnotationResponse`. 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/asset.rb b/lib/mux_ruby/models/asset.rb index cc5b66b..1c571e7 100644 --- a/lib/mux_ruby/models/asset.rb +++ b/lib/mux_ruby/models/asset.rb @@ -97,6 +97,8 @@ class Asset attr_accessor :meta + attr_accessor :progress + class EnumAttributeValidator attr_reader :datatype attr_reader :allowable_values @@ -151,7 +153,8 @@ def self.attribute_map :'non_standard_input_reasons' => :'non_standard_input_reasons', :'test' => :'test', :'ingest_type' => :'ingest_type', - :'meta' => :'meta' + :'meta' => :'meta', + :'progress' => :'progress' } end @@ -192,7 +195,8 @@ def self.openapi_types :'non_standard_input_reasons' => :'AssetNonStandardInputReasons', :'test' => :'Boolean', :'ingest_type' => :'String', - :'meta' => :'AssetMetadata' + :'meta' => :'AssetMetadata', + :'progress' => :'AssetProgress' } end @@ -348,6 +352,10 @@ def initialize(attributes = {}) if attributes.key?(:'meta') self.meta = attributes[:'meta'] end + + if attributes.key?(:'progress') + self.progress = attributes[:'progress'] + end end # Show invalid properties with the reasons. Usually used together with valid? @@ -505,7 +513,8 @@ def ==(o) non_standard_input_reasons == o.non_standard_input_reasons && test == o.test && ingest_type == o.ingest_type && - meta == o.meta + meta == o.meta && + progress == o.progress end # @see the `==` method @@ -517,7 +526,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [id, created_at, status, duration, max_stored_resolution, resolution_tier, max_resolution_tier, encoding_tier, video_quality, max_stored_frame_rate, aspect_ratio, playback_ids, tracks, errors, per_title_encode, upload_id, is_live, passthrough, live_stream_id, master, master_access, mp4_support, source_asset_id, normalize_audio, static_renditions, recording_times, non_standard_input_reasons, test, ingest_type, meta].hash + [id, created_at, status, duration, max_stored_resolution, resolution_tier, max_resolution_tier, encoding_tier, video_quality, max_stored_frame_rate, aspect_ratio, playback_ids, tracks, errors, per_title_encode, upload_id, is_live, passthrough, live_stream_id, master, master_access, mp4_support, source_asset_id, normalize_audio, static_renditions, recording_times, non_standard_input_reasons, test, ingest_type, meta, progress].hash end # Builds the object from hash diff --git a/lib/mux_ruby/models/asset_progress.rb b/lib/mux_ruby/models/asset_progress.rb new file mode 100644 index 0000000..c76c2af --- /dev/null +++ b/lib/mux_ruby/models/asset_progress.rb @@ -0,0 +1,288 @@ +=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 + # Detailed state information about the asset ingest process. + class AssetProgress + # The detailed state of the asset ingest process. This field is useful for relaying more granular processing information to end users when a [non-standard input is encountered](https://www.mux.com/docs/guides/minimize-processing-time#non-standard-input). - `ingesting`: Asset is being ingested (initial processing before or after transcoding). While in this state, the `progress` percentage will be 0. - `transcoding`: Asset is undergoing non-standard transcoding. - `completed`: Asset processing is complete (`status` is `ready`). While in this state, the `progress` percentage will be 100. - `live`: Asset is a live stream currently in progress. While in this state, the `progress` percentage will be -1. - `errored`: Asset has encountered an error (`status` is `errored`). While in this state, the `progress` percentage will be -1. + attr_accessor :state + + # Represents the estimated completion percentage. Returns `0 - 100` when in `ingesting`, `transcoding`, or `completed` state, and `-1` when in `live` or `errored` state. + attr_accessor :progress + + class EnumAttributeValidator + attr_reader :datatype + attr_reader :allowable_values + + def initialize(datatype, allowable_values) + @allowable_values = allowable_values.map do |value| + case datatype.to_s + when /Integer/i + value.to_i + when /Float/i + value.to_f + else + value + end + end + end + + def valid?(value) + !value || allowable_values.include?(value) + end + end + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'state' => :'state', + :'progress' => :'progress' + } + 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 + { + :'state' => :'String', + :'progress' => :'Float' + } + 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::AssetProgress` 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::AssetProgress`. 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?(:'state') + self.state = attributes[:'state'] + end + + if attributes.key?(:'progress') + self.progress = attributes[:'progress'] + 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 + if !@progress.nil? && @progress > 100 + invalid_properties.push('invalid value for "progress", must be smaller than or equal to 100.') + end + + if !@progress.nil? && @progress < -1 + invalid_properties.push('invalid value for "progress", must be greater than or equal to -1.') + end + + 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? + state_validator = EnumAttributeValidator.new('String', ["ingesting", "transcoding", "completed", "live", "errored"]) + return false unless state_validator.valid?(@state) + return false if !@progress.nil? && @progress > 100 + return false if !@progress.nil? && @progress < -1 + true + end + + # Custom attribute writer method checking allowed values (enum). + # @param [Object] state Object to be assigned + def state=(state) + validator = EnumAttributeValidator.new('String', ["ingesting", "transcoding", "completed", "live", "errored"]) + unless validator.valid?(state) + fail ArgumentError, "invalid value for \"state\", must be one of #{validator.allowable_values}." + end + @state = state + end + + # Custom attribute writer method with validation + # @param [Object] progress Value to be assigned + def progress=(progress) + if !progress.nil? && progress > 100 + fail ArgumentError, 'invalid value for "progress", must be smaller than or equal to 100.' + end + + if !progress.nil? && progress < -1 + fail ArgumentError, 'invalid value for "progress", must be greater than or equal to -1.' + end + + @progress = progress + 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 && + state == o.state && + progress == o.progress + 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 + [state, progress].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/create_asset_request.rb b/lib/mux_ruby/models/create_asset_request.rb index a65dee1..597ec84 100644 --- a/lib/mux_ruby/models/create_asset_request.rb +++ b/lib/mux_ruby/models/create_asset_request.rb @@ -61,6 +61,9 @@ class CreateAssetRequest attr_accessor :meta + # If the created asset is a clip, this controls whether overlays are copied from the source asset. + attr_accessor :copy_overlays + class EnumAttributeValidator attr_reader :datatype attr_reader :allowable_values @@ -101,7 +104,8 @@ def self.attribute_map :'encoding_tier' => :'encoding_tier', :'video_quality' => :'video_quality', :'static_renditions' => :'static_renditions', - :'meta' => :'meta' + :'meta' => :'meta', + :'copy_overlays' => :'copy_overlays' } end @@ -128,7 +132,8 @@ def self.openapi_types :'encoding_tier' => :'String', :'video_quality' => :'String', :'static_renditions' => :'Array', - :'meta' => :'AssetMetadata' + :'meta' => :'AssetMetadata', + :'copy_overlays' => :'Boolean' } end @@ -230,6 +235,12 @@ def initialize(attributes = {}) if attributes.key?(:'meta') self.meta = attributes[:'meta'] end + + if attributes.key?(:'copy_overlays') + self.copy_overlays = attributes[:'copy_overlays'] + else + self.copy_overlays = true + end end # Show invalid properties with the reasons. Usually used together with valid? @@ -325,7 +336,8 @@ def ==(o) encoding_tier == o.encoding_tier && video_quality == o.video_quality && static_renditions == o.static_renditions && - meta == o.meta + meta == o.meta && + copy_overlays == o.copy_overlays end # @see the `==` method @@ -337,7 +349,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [input, inputs, playback_policy, playback_policies, advanced_playback_policies, per_title_encode, passthrough, mp4_support, normalize_audio, master_access, test, max_resolution_tier, encoding_tier, video_quality, static_renditions, meta].hash + [input, inputs, playback_policy, playback_policies, advanced_playback_policies, per_title_encode, passthrough, mp4_support, normalize_audio, master_access, test, max_resolution_tier, encoding_tier, video_quality, static_renditions, meta, copy_overlays].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 1e166e8..5cde3f8 100644 --- a/lib/mux_ruby/models/create_live_stream_request.rb +++ b/lib/mux_ruby/models/create_live_stream_request.rb @@ -63,6 +63,8 @@ class CreateLiveStreamRequest # The time in seconds a live stream may be continuously active before being disconnected. Defaults to 12 hours. attr_accessor :max_continuous_duration + attr_accessor :meta + class EnumAttributeValidator attr_reader :datatype attr_reader :allowable_values @@ -104,7 +106,8 @@ def self.attribute_map :'latency_mode' => :'latency_mode', :'test' => :'test', :'simulcast_targets' => :'simulcast_targets', - :'max_continuous_duration' => :'max_continuous_duration' + :'max_continuous_duration' => :'max_continuous_duration', + :'meta' => :'meta' } end @@ -132,7 +135,8 @@ def self.openapi_types :'latency_mode' => :'String', :'test' => :'Boolean', :'simulcast_targets' => :'Array', - :'max_continuous_duration' => :'Integer' + :'max_continuous_duration' => :'Integer', + :'meta' => :'LiveStreamMetadata' } end @@ -242,6 +246,10 @@ def initialize(attributes = {}) else self.max_continuous_duration = 43200 end + + if attributes.key?(:'meta') + self.meta = attributes[:'meta'] + end end # Show invalid properties with the reasons. Usually used together with valid? @@ -338,7 +346,8 @@ def ==(o) latency_mode == o.latency_mode && test == o.test && simulcast_targets == o.simulcast_targets && - max_continuous_duration == o.max_continuous_duration + max_continuous_duration == o.max_continuous_duration && + meta == o.meta end # @see the `==` method @@ -350,7 +359,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [playback_policy, playback_policies, 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 + [playback_policy, playback_policies, 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, meta].hash end # Builds the object from hash diff --git a/lib/mux_ruby/models/list_annotations_response.rb b/lib/mux_ruby/models/list_annotations_response.rb new file mode 100644 index 0000000..17f5863 --- /dev/null +++ b/lib/mux_ruby/models/list_annotations_response.rb @@ -0,0 +1,266 @@ +=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 ListAnnotationsResponse + attr_accessor :data + + # Total number of annotations available + attr_accessor :total_row_count + + # Start and end unix timestamps for the data range + attr_accessor :timeframe + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'data' => :'data', + :'total_row_count' => :'total_row_count', + :'timeframe' => :'timeframe' + } + 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', + :'total_row_count' => :'Integer', + :'timeframe' => :'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::ListAnnotationsResponse` 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::ListAnnotationsResponse`. 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 + + if attributes.key?(:'total_row_count') + self.total_row_count = attributes[:'total_row_count'] + end + + if attributes.key?(:'timeframe') + if (value = attributes[:'timeframe']).is_a?(Array) + self.timeframe = 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 + if !@timeframe.nil? && @timeframe.length > 2 + invalid_properties.push('invalid value for "timeframe", number of items must be less than or equal to 2.') + end + + if !@timeframe.nil? && @timeframe.length < 2 + invalid_properties.push('invalid value for "timeframe", number of items must be greater than or equal to 2.') + end + + 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? + return false if !@timeframe.nil? && @timeframe.length > 2 + return false if !@timeframe.nil? && @timeframe.length < 2 + true + end + + # Custom attribute writer method with validation + # @param [Object] timeframe Value to be assigned + def timeframe=(timeframe) + if !timeframe.nil? && timeframe.length > 2 + fail ArgumentError, 'invalid value for "timeframe", number of items must be less than or equal to 2.' + end + + if !timeframe.nil? && timeframe.length < 2 + fail ArgumentError, 'invalid value for "timeframe", number of items must be greater than or equal to 2.' + end + + @timeframe = timeframe + 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 && + total_row_count == o.total_row_count && + timeframe == o.timeframe + 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, total_row_count, timeframe].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_assets_response.rb b/lib/mux_ruby/models/list_assets_response.rb index 0eb97b9..88bb25c 100644 --- a/lib/mux_ruby/models/list_assets_response.rb +++ b/lib/mux_ruby/models/list_assets_response.rb @@ -15,11 +15,15 @@ module MuxRuby class ListAssetsResponse + # If there are more pages of data, this field will contain a string that can be used with the `cursor` querystring parameter to fetch the next page of data. + attr_accessor :next_cursor + attr_accessor :data # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { + :'next_cursor' => :'next_cursor', :'data' => :'data' } end @@ -32,6 +36,7 @@ def self.acceptable_attributes # Attribute type mapping. def self.openapi_types { + :'next_cursor' => :'String', :'data' => :'Array' } end @@ -39,6 +44,7 @@ def self.openapi_types # List of attributes with nullable: true def self.openapi_nullable Set.new([ + :'next_cursor', ]) end @@ -57,6 +63,10 @@ def initialize(attributes = {}) h[k.to_sym] = v } + if attributes.key?(:'next_cursor') + self.next_cursor = attributes[:'next_cursor'] + end + if attributes.key?(:'data') if (value = attributes[:'data']).is_a?(Array) self.data = value @@ -82,6 +92,7 @@ def valid? def ==(o) return true if self.equal?(o) self.class == o.class && + next_cursor == o.next_cursor && data == o.data end @@ -94,7 +105,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [data].hash + [next_cursor, data].hash end # Builds the object from hash diff --git a/lib/mux_ruby/models/live_stream.rb b/lib/mux_ruby/models/live_stream.rb index 5ae3769..e38900c 100644 --- a/lib/mux_ruby/models/live_stream.rb +++ b/lib/mux_ruby/models/live_stream.rb @@ -21,7 +21,7 @@ class LiveStream # Time the Live Stream was created, defined as a Unix timestamp (seconds since epoch). attr_accessor :created_at - # Unique key used for streaming to a Mux RTMP endpoint. This should be considered as sensitive as credentials, anyone with this stream key can begin streaming. + # Unique key used for streaming to a Mux RTMP endpoint. This should be considered as sensitive as credentials, anyone with this stream key can begin streaming. Max 64 characters. attr_accessor :stream_key # The Asset that is currently being created if there is an active broadcast. @@ -76,12 +76,14 @@ class LiveStream # The time in seconds a live stream may be continuously active before being disconnected. Defaults to 12 hours. attr_accessor :max_continuous_duration - # Unique key used for encrypting a stream to a Mux SRT endpoint. + # Unique key used for encrypting a stream to a Mux SRT endpoint. Max 64 characters. attr_accessor :srt_passphrase # The protocol used for the active ingest stream. This is only set when the live stream is active. attr_accessor :active_ingest_protocol + attr_accessor :meta + class EnumAttributeValidator attr_reader :datatype attr_reader :allowable_values @@ -129,7 +131,8 @@ def self.attribute_map :'test' => :'test', :'max_continuous_duration' => :'max_continuous_duration', :'srt_passphrase' => :'srt_passphrase', - :'active_ingest_protocol' => :'active_ingest_protocol' + :'active_ingest_protocol' => :'active_ingest_protocol', + :'meta' => :'meta' } end @@ -163,7 +166,8 @@ def self.openapi_types :'test' => :'Boolean', :'max_continuous_duration' => :'Integer', :'srt_passphrase' => :'String', - :'active_ingest_protocol' => :'String' + :'active_ingest_protocol' => :'String', + :'meta' => :'LiveStreamMetadata' } end @@ -295,6 +299,10 @@ def initialize(attributes = {}) if attributes.key?(:'active_ingest_protocol') self.active_ingest_protocol = attributes[:'active_ingest_protocol'] end + + if attributes.key?(:'meta') + self.meta = attributes[:'meta'] + end end # Show invalid properties with the reasons. Usually used together with valid? @@ -409,7 +417,8 @@ def ==(o) test == o.test && max_continuous_duration == o.max_continuous_duration && srt_passphrase == o.srt_passphrase && - active_ingest_protocol == o.active_ingest_protocol + active_ingest_protocol == o.active_ingest_protocol && + meta == o.meta end # @see the `==` method @@ -421,7 +430,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [id, created_at, stream_key, active_asset_id, recent_asset_ids, status, playback_ids, new_asset_settings, passthrough, audio_only, embedded_subtitles, generated_subtitles, reconnect_window, use_slate_for_standard_latency, reconnect_slate_url, reduced_latency, low_latency, simulcast_targets, latency_mode, test, max_continuous_duration, srt_passphrase, active_ingest_protocol].hash + [id, created_at, stream_key, active_asset_id, recent_asset_ids, status, playback_ids, new_asset_settings, passthrough, audio_only, embedded_subtitles, generated_subtitles, reconnect_window, use_slate_for_standard_latency, reconnect_slate_url, reduced_latency, low_latency, simulcast_targets, latency_mode, test, max_continuous_duration, srt_passphrase, active_ingest_protocol, meta].hash end # Builds the object from hash diff --git a/lib/mux_ruby/models/live_stream_generated_subtitle_settings.rb b/lib/mux_ruby/models/live_stream_generated_subtitle_settings.rb index 791d2dc..aefdffa 100644 --- a/lib/mux_ruby/models/live_stream_generated_subtitle_settings.rb +++ b/lib/mux_ruby/models/live_stream_generated_subtitle_settings.rb @@ -126,7 +126,7 @@ def list_invalid_properties # Check to see if the all the properties in the model are valid # @return true if the model is valid def valid? - language_code_validator = EnumAttributeValidator.new('String', ["en", "en-US"]) + language_code_validator = EnumAttributeValidator.new('String', ["en", "en-US", "es", "fr", "de", "pt", "it"]) return false unless language_code_validator.valid?(@language_code) true end @@ -134,7 +134,7 @@ def valid? # Custom attribute writer method checking allowed values (enum). # @param [Object] language_code Object to be assigned def language_code=(language_code) - validator = EnumAttributeValidator.new('String', ["en", "en-US"]) + validator = EnumAttributeValidator.new('String', ["en", "en-US", "es", "fr", "de", "pt", "it"]) unless validator.valid?(language_code) fail ArgumentError, "invalid value for \"language_code\", must be one of #{validator.allowable_values}." end diff --git a/lib/mux_ruby/models/live_stream_metadata.rb b/lib/mux_ruby/models/live_stream_metadata.rb new file mode 100644 index 0000000..145b3ae --- /dev/null +++ b/lib/mux_ruby/models/live_stream_metadata.rb @@ -0,0 +1,235 @@ +=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 + # Customer provided metadata about this live stream. Note: This metadata may be publicly available via the video player. Do not include PII or sensitive information. + class LiveStreamMetadata + # The live stream title. Max 512 code points. + attr_accessor :title + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'title' => :'title' + } + 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 + { + :'title' => :'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::LiveStreamMetadata` 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::LiveStreamMetadata`. 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?(:'title') + self.title = attributes[:'title'] + 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 + if !@title.nil? && @title.to_s.length > 512 + invalid_properties.push('invalid value for "title", the character length must be smaller than or equal to 512.') + end + + 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? + return false if !@title.nil? && @title.to_s.length > 512 + true + end + + # Custom attribute writer method with validation + # @param [Object] title Value to be assigned + def title=(title) + if !title.nil? && title.to_s.length > 512 + fail ArgumentError, 'invalid value for "title", the character length must be smaller than or equal to 512.' + end + + @title = title + 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 && + title == o.title + 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 + [title].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/update_live_stream_request.rb b/lib/mux_ruby/models/update_live_stream_request.rb index eb8ae16..df760bc 100644 --- a/lib/mux_ruby/models/update_live_stream_request.rb +++ b/lib/mux_ruby/models/update_live_stream_request.rb @@ -35,6 +35,8 @@ class UpdateLiveStreamRequest attr_accessor :new_asset_settings + attr_accessor :meta + class EnumAttributeValidator attr_reader :datatype attr_reader :allowable_values @@ -66,7 +68,8 @@ def self.attribute_map :'use_slate_for_standard_latency' => :'use_slate_for_standard_latency', :'reconnect_slate_url' => :'reconnect_slate_url', :'max_continuous_duration' => :'max_continuous_duration', - :'new_asset_settings' => :'new_asset_settings' + :'new_asset_settings' => :'new_asset_settings', + :'meta' => :'meta' } end @@ -84,7 +87,8 @@ def self.openapi_types :'use_slate_for_standard_latency' => :'Boolean', :'reconnect_slate_url' => :'String', :'max_continuous_duration' => :'Integer', - :'new_asset_settings' => :'UpdateLiveStreamNewAssetSettings' + :'new_asset_settings' => :'UpdateLiveStreamNewAssetSettings', + :'meta' => :'LiveStreamMetadata' } end @@ -142,6 +146,10 @@ def initialize(attributes = {}) if attributes.key?(:'new_asset_settings') self.new_asset_settings = attributes[:'new_asset_settings'] end + + if attributes.key?(:'meta') + self.meta = attributes[:'meta'] + end end # Show invalid properties with the reasons. Usually used together with valid? @@ -228,7 +236,8 @@ def ==(o) use_slate_for_standard_latency == o.use_slate_for_standard_latency && reconnect_slate_url == o.reconnect_slate_url && max_continuous_duration == o.max_continuous_duration && - new_asset_settings == o.new_asset_settings + new_asset_settings == o.new_asset_settings && + meta == o.meta end # @see the `==` method @@ -240,7 +249,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [passthrough, latency_mode, reconnect_window, use_slate_for_standard_latency, reconnect_slate_url, max_continuous_duration, new_asset_settings].hash + [passthrough, latency_mode, reconnect_window, use_slate_for_standard_latency, reconnect_slate_url, max_continuous_duration, new_asset_settings, meta].hash end # Builds the object from hash diff --git a/lib/mux_ruby/version.rb b/lib/mux_ruby/version.rb index 6266d06..10b23ae 100644 --- a/lib/mux_ruby/version.rb +++ b/lib/mux_ruby/version.rb @@ -11,5 +11,5 @@ =end module MuxRuby - VERSION = '5.0.1' + VERSION = '5.1.0' end diff --git a/spec/api/annotations_api_spec.rb b/spec/api/annotations_api_spec.rb new file mode 100644 index 0000000..a530e52 --- /dev/null +++ b/spec/api/annotations_api_spec.rb @@ -0,0 +1,99 @@ +=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::AnnotationsApi +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe 'AnnotationsApi' do + before do + # run before each test + @api_instance = MuxRuby::AnnotationsApi.new + end + + after do + # run after each test + end + + describe 'test an instance of AnnotationsApi' do + it 'should create an instance of AnnotationsApi' do + expect(@api_instance).to be_instance_of(MuxRuby::AnnotationsApi) + end + end + + # unit tests for create_annotation + # Create Annotation + # Creates a new annotation. + # @param annotation_input + # @param [Hash] opts the optional parameters + # @return [AnnotationResponse] + describe 'create_annotation 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 delete_annotation + # Delete Annotation + # Deletes an annotation. + # @param annotation_id The annotation ID + # @param [Hash] opts the optional parameters + # @return [nil] + describe 'delete_annotation 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 get_annotation + # Get Annotation + # Returns the details of a specific annotation. + # @param annotation_id The annotation ID + # @param [Hash] opts the optional parameters + # @return [AnnotationResponse] + describe 'get_annotation 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_annotations + # List Annotations + # Returns a list of annotations. + # @param [Hash] opts the optional parameters + # @option opts [Integer] :limit Number of items to include in the response + # @option opts [Integer] :page Offset by this many pages, of the size of `limit` + # @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` + # @return [ListAnnotationsResponse] + describe 'list_annotations 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 update_annotation + # Update Annotation + # Updates an existing annotation. + # @param annotation_id The annotation ID + # @param annotation_input + # @param [Hash] opts the optional parameters + # @return [AnnotationResponse] + describe 'update_annotation 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/annotation_input_spec.rb b/spec/models/annotation_input_spec.rb new file mode 100644 index 0000000..283ca1c --- /dev/null +++ b/spec/models/annotation_input_spec.rb @@ -0,0 +1,46 @@ +=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::AnnotationInput +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe MuxRuby::AnnotationInput do + let(:instance) { MuxRuby::AnnotationInput.new } + + describe 'test an instance of AnnotationInput' do + it 'should create an instance of AnnotationInput' do + expect(instance).to be_instance_of(MuxRuby::AnnotationInput) + end + end + describe 'test attribute "note"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "date"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "sub_property_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/annotation_response_spec.rb b/spec/models/annotation_response_spec.rb new file mode 100644 index 0000000..f8a98a6 --- /dev/null +++ b/spec/models/annotation_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::AnnotationResponse +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe MuxRuby::AnnotationResponse do + let(:instance) { MuxRuby::AnnotationResponse.new } + + describe 'test an instance of AnnotationResponse' do + it 'should create an instance of AnnotationResponse' do + expect(instance).to be_instance_of(MuxRuby::AnnotationResponse) + 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/annotation_spec.rb b/spec/models/annotation_spec.rb new file mode 100644 index 0000000..bbce4d8 --- /dev/null +++ b/spec/models/annotation_spec.rb @@ -0,0 +1,52 @@ +=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::Annotation +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe MuxRuby::Annotation do + let(:instance) { MuxRuby::Annotation.new } + + describe 'test an instance of Annotation' do + it 'should create an instance of Annotation' do + expect(instance).to be_instance_of(MuxRuby::Annotation) + 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 + + describe 'test attribute "note"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "date"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "sub_property_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/asset_progress_spec.rb b/spec/models/asset_progress_spec.rb new file mode 100644 index 0000000..152390b --- /dev/null +++ b/spec/models/asset_progress_spec.rb @@ -0,0 +1,44 @@ +=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::AssetProgress +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe MuxRuby::AssetProgress do + let(:instance) { MuxRuby::AssetProgress.new } + + describe 'test an instance of AssetProgress' do + it 'should create an instance of AssetProgress' do + expect(instance).to be_instance_of(MuxRuby::AssetProgress) + end + end + describe 'test attribute "state"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["ingesting", "transcoding", "completed", "live", "errored"]) + # validator.allowable_values.each do |value| + # expect { instance.state = value }.not_to raise_error + # end + end + end + + describe 'test attribute "progress"' 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_annotations_response_spec.rb b/spec/models/list_annotations_response_spec.rb new file mode 100644 index 0000000..b899319 --- /dev/null +++ b/spec/models/list_annotations_response_spec.rb @@ -0,0 +1,46 @@ +=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::ListAnnotationsResponse +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe MuxRuby::ListAnnotationsResponse do + let(:instance) { MuxRuby::ListAnnotationsResponse.new } + + describe 'test an instance of ListAnnotationsResponse' do + it 'should create an instance of ListAnnotationsResponse' do + expect(instance).to be_instance_of(MuxRuby::ListAnnotationsResponse) + 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 + + describe 'test attribute "total_row_count"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "timeframe"' 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/live_stream_metadata_spec.rb b/spec/models/live_stream_metadata_spec.rb new file mode 100644 index 0000000..67c1a12 --- /dev/null +++ b/spec/models/live_stream_metadata_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::LiveStreamMetadata +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe MuxRuby::LiveStreamMetadata do + let(:instance) { MuxRuby::LiveStreamMetadata.new } + + describe 'test an instance of LiveStreamMetadata' do + it 'should create an instance of LiveStreamMetadata' do + expect(instance).to be_instance_of(MuxRuby::LiveStreamMetadata) + end + end + describe 'test attribute "title"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end From 12ecb6849b018faa59f04ee13eb9b195edf9e0aa Mon Sep 17 00:00:00 2001 From: Justin Sanford Date: Wed, 13 Aug 2025 16:09:26 -0700 Subject: [PATCH 2/3] update gemfile.lock --- Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index 13c2a1a..fb443ec 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,7 +1,7 @@ PATH remote: . specs: - mux_ruby (5.0.1) + mux_ruby (5.1.0) typhoeus (~> 1.0, >= 1.0.1) GEM From 9e122a2920c2e144798bd0cdb24b48200e68b11b Mon Sep 17 00:00:00 2001 From: Justin Sanford Date: Fri, 15 Aug 2025 08:25:04 -0700 Subject: [PATCH 3/3] update --- .openapi-generator/FILES | 7 --- docs/DimensionsApi.md | 89 ++++++++++++++++++++++++++- docs/ErrorsApi.md | 4 +- docs/FiltersApi.md | 4 +- docs/MetricsApi.md | 20 +++---- docs/VideoView.md | 4 +- docs/VideoViewsApi.md | 4 +- lib/mux_ruby/api/dimensions_api.rb | 93 ++++++++++++++++++++++++++++- lib/mux_ruby/api/errors_api.rb | 4 +- lib/mux_ruby/api/filters_api.rb | 4 +- lib/mux_ruby/api/metrics_api.rb | 24 ++++---- lib/mux_ruby/api/video_views_api.rb | 4 +- lib/mux_ruby/configuration.rb | 6 ++ lib/mux_ruby/models/video_view.rb | 21 +++++-- 14 files changed, 237 insertions(+), 51 deletions(-) diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES index 5329527..db3d211 100644 --- a/.openapi-generator/FILES +++ b/.openapi-generator/FILES @@ -373,13 +373,6 @@ 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/annotations_api_spec.rb spec/api_client_spec.rb spec/configuration_spec.rb -spec/models/annotation_input_spec.rb -spec/models/annotation_response_spec.rb -spec/models/annotation_spec.rb -spec/models/asset_progress_spec.rb -spec/models/list_annotations_response_spec.rb -spec/models/live_stream_metadata_spec.rb spec/spec_helper.rb diff --git a/docs/DimensionsApi.md b/docs/DimensionsApi.md index dea4370..35ceaf9 100644 --- a/docs/DimensionsApi.md +++ b/docs/DimensionsApi.md @@ -4,10 +4,95 @@ All URIs are relative to *https://api.mux.com* | Method | HTTP request | Description | | ------ | ------------ | ----------- | +| [**list_dimension_elements**](DimensionsApi.md#list_dimension_elements) | **GET** /data/v1/dimensions/{DIMENSION_ID}/elements | Lists elements for a trace dimension | | [**list_dimension_values**](DimensionsApi.md#list_dimension_values) | **GET** /data/v1/dimensions/{DIMENSION_ID} | Lists the values for a specific dimension | | [**list_dimensions**](DimensionsApi.md#list_dimensions) | **GET** /data/v1/dimensions | List Dimensions | +## list_dimension_elements + +> list_dimension_elements(dimension_id, opts) + +Lists elements for a trace dimension + +Lists the elements (values) for a trace dimension along with their total counts. This endpoint is specifically designed for trace dimensions like video_cdn_trace that contain arrays of values. + +### 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::DimensionsApi.new +dimension_id = 'abcd1234' # String | ID of the Dimension +opts = { + limit: 56, # Integer | Number of items to include in the response + filters: ['inner_example'], # Array | Filter results using key:value pairs. Must be provided as an array query string parameter. **Basic filtering:** * `filters[]=dimension:value` - Include rows where dimension equals value * `filters[]=!dimension:value` - Exclude rows where dimension equals value **For trace dimensions (like video_cdn_trace):** * `filters[]=+dimension:value` - Include rows where trace contains value * `filters[]=-dimension:value` - Exclude rows where trace contains value * `filters[]=dimension:[value1,value2]` - Exact trace match **Examples:** * `filters[]=country:US` - US views only * `filters[]=+video_cdn_trace:fastly` - Views using Fastly CDN + 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`, `view_dropped_percentage`, and `views`. Example: * `metric_filters[]=aggregate_startup_time>=1000` + 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` + order_by: 'negative_impact', # String | Value to order the results by + order_direction: 'asc' # String | Sort order. +} + +begin + # Lists elements for a trace dimension + result = api_instance.list_dimension_elements(dimension_id, opts) + p result +rescue MuxRuby::ApiError => e + puts "Error when calling DimensionsApi->list_dimension_elements: #{e}" +end +``` + +#### Using the list_dimension_elements_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> list_dimension_elements_with_http_info(dimension_id, opts) + +```ruby +begin + # Lists elements for a trace dimension + data, status_code, headers = api_instance.list_dimension_elements_with_http_info(dimension_id, opts) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue MuxRuby::ApiError => e + puts "Error when calling DimensionsApi->list_dimension_elements_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **dimension_id** | **String** | ID of the Dimension | | +| **limit** | **Integer** | Number of items to include in the response | [optional][default to 25] | +| **filters** | [**Array<String>**](String.md) | Filter results using key:value pairs. Must be provided as an array query string parameter. **Basic filtering:** * `filters[]=dimension:value` - Include rows where dimension equals value * `filters[]=!dimension:value` - Exclude rows where dimension equals value **For trace dimensions (like video_cdn_trace):** * `filters[]=+dimension:value` - Include rows where trace contains value * `filters[]=-dimension:value` - Exclude rows where trace contains value * `filters[]=dimension:[value1,value2]` - Exact trace match **Examples:** * `filters[]=country:US` - US views only * `filters[]=+video_cdn_trace:fastly` - Views using Fastly CDN | [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`, `view_dropped_percentage`, and `views`. Example: * `metric_filters[]=aggregate_startup_time>=1000` | [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] | +| **order_by** | **String** | Value to order the results by | [optional] | +| **order_direction** | **String** | Sort order. | [optional] | + +### Return type + +[**ListDimensionValuesResponse**](ListDimensionValuesResponse.md) + +### Authorization + +[accessToken](../README.md#accessToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + ## list_dimension_values > list_dimension_values(dimension_id, opts) @@ -33,7 +118,7 @@ dimension_id = 'abcd1234' # String | ID of the Dimension opts = { limit: 56, # Integer | Number of items to include in the response page: 56, # Integer | Offset by this many pages, of the size of `limit` - 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` + filters: ['inner_example'], # Array | Filter results using key:value pairs. Must be provided as an array query string parameter. **Basic filtering:** * `filters[]=dimension:value` - Include rows where dimension equals value * `filters[]=!dimension:value` - Exclude rows where dimension equals value **For trace dimensions (like video_cdn_trace):** * `filters[]=+dimension:value` - Include rows where trace contains value * `filters[]=-dimension:value` - Exclude rows where trace contains value * `filters[]=dimension:[value1,value2]` - Exact trace match **Examples:** * `filters[]=country:US` - US views only * `filters[]=+video_cdn_trace:fastly` - Views using Fastly CDN 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`, `view_dropped_percentage`, and `views`. Example: * `metric_filters[]=aggregate_startup_time>=1000` 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` } @@ -72,7 +157,7 @@ end | **dimension_id** | **String** | ID of the Dimension | | | **limit** | **Integer** | Number of items to include in the response | [optional][default to 25] | | **page** | **Integer** | Offset by this many pages, of the size of `limit` | [optional][default to 1] | -| **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] | +| **filters** | [**Array<String>**](String.md) | Filter results using key:value pairs. Must be provided as an array query string parameter. **Basic filtering:** * `filters[]=dimension:value` - Include rows where dimension equals value * `filters[]=!dimension:value` - Exclude rows where dimension equals value **For trace dimensions (like video_cdn_trace):** * `filters[]=+dimension:value` - Include rows where trace contains value * `filters[]=-dimension:value` - Exclude rows where trace contains value * `filters[]=dimension:[value1,value2]` - Exact trace match **Examples:** * `filters[]=country:US` - US views only * `filters[]=+video_cdn_trace:fastly` - Views using Fastly CDN | [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`, `view_dropped_percentage`, and `views`. Example: * `metric_filters[]=aggregate_startup_time>=1000` | [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] | diff --git a/docs/ErrorsApi.md b/docs/ErrorsApi.md index aa31d86..fb3a1e6 100644 --- a/docs/ErrorsApi.md +++ b/docs/ErrorsApi.md @@ -29,7 +29,7 @@ end api_instance = MuxRuby::ErrorsApi.new opts = { - 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` + filters: ['inner_example'], # Array | Filter results using key:value pairs. Must be provided as an array query string parameter. **Basic filtering:** * `filters[]=dimension:value` - Include rows where dimension equals value * `filters[]=!dimension:value` - Exclude rows where dimension equals value **For trace dimensions (like video_cdn_trace):** * `filters[]=+dimension:value` - Include rows where trace contains value * `filters[]=-dimension:value` - Exclude rows where trace contains value * `filters[]=dimension:[value1,value2]` - Exact trace match **Examples:** * `filters[]=country:US` - US views only * `filters[]=+video_cdn_trace:fastly` - Views using Fastly CDN 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`, `view_dropped_percentage`, and `views`. Example: * `metric_filters[]=aggregate_startup_time>=1000` 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` } @@ -65,7 +65,7 @@ end | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | -| **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] | +| **filters** | [**Array<String>**](String.md) | Filter results using key:value pairs. Must be provided as an array query string parameter. **Basic filtering:** * `filters[]=dimension:value` - Include rows where dimension equals value * `filters[]=!dimension:value` - Exclude rows where dimension equals value **For trace dimensions (like video_cdn_trace):** * `filters[]=+dimension:value` - Include rows where trace contains value * `filters[]=-dimension:value` - Exclude rows where trace contains value * `filters[]=dimension:[value1,value2]` - Exact trace match **Examples:** * `filters[]=country:US` - US views only * `filters[]=+video_cdn_trace:fastly` - Views using Fastly CDN | [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`, `view_dropped_percentage`, and `views`. Example: * `metric_filters[]=aggregate_startup_time>=1000` | [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] | diff --git a/docs/FiltersApi.md b/docs/FiltersApi.md index 18fce36..95a3f6e 100644 --- a/docs/FiltersApi.md +++ b/docs/FiltersApi.md @@ -33,7 +33,7 @@ filter_id = 'abcd1234' # String | ID of the Filter opts = { limit: 56, # Integer | Number of items to include in the response page: 56, # Integer | Offset by this many pages, of the size of `limit` - 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` + filters: ['inner_example'], # Array | Filter results using key:value pairs. Must be provided as an array query string parameter. **Basic filtering:** * `filters[]=dimension:value` - Include rows where dimension equals value * `filters[]=!dimension:value` - Exclude rows where dimension equals value **For trace dimensions (like video_cdn_trace):** * `filters[]=+dimension:value` - Include rows where trace contains value * `filters[]=-dimension:value` - Exclude rows where trace contains value * `filters[]=dimension:[value1,value2]` - Exact trace match **Examples:** * `filters[]=country:US` - US views only * `filters[]=+video_cdn_trace:fastly` - Views using Fastly CDN 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` } @@ -71,7 +71,7 @@ end | **filter_id** | **String** | ID of the Filter | | | **limit** | **Integer** | Number of items to include in the response | [optional][default to 25] | | **page** | **Integer** | Offset by this many pages, of the size of `limit` | [optional][default to 1] | -| **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] | +| **filters** | [**Array<String>**](String.md) | Filter results using key:value pairs. Must be provided as an array query string parameter. **Basic filtering:** * `filters[]=dimension:value` - Include rows where dimension equals value * `filters[]=!dimension:value` - Exclude rows where dimension equals value **For trace dimensions (like video_cdn_trace):** * `filters[]=+dimension:value` - Include rows where trace contains value * `filters[]=-dimension:value` - Exclude rows where trace contains value * `filters[]=dimension:[value1,value2]` - Exact trace match **Examples:** * `filters[]=country:US` - US views only * `filters[]=+video_cdn_trace:fastly` - Views using Fastly CDN | [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] | ### Return type diff --git a/docs/MetricsApi.md b/docs/MetricsApi.md index ac46dca..9f9d831 100644 --- a/docs/MetricsApi.md +++ b/docs/MetricsApi.md @@ -35,7 +35,7 @@ api_instance = MuxRuby::MetricsApi.new metric_id = 'aggregate_startup_time' # String | ID of the Metric 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` + filters: ['inner_example'], # Array | Filter results using key:value pairs. Must be provided as an array query string parameter. **Basic filtering:** * `filters[]=dimension:value` - Include rows where dimension equals value * `filters[]=!dimension:value` - Exclude rows where dimension equals value **For trace dimensions (like video_cdn_trace):** * `filters[]=+dimension:value` - Include rows where trace contains value * `filters[]=-dimension:value` - Exclude rows where trace contains value * `filters[]=dimension:[value1,value2]` - Exact trace match **Examples:** * `filters[]=country:US` - US views only * `filters[]=+video_cdn_trace:fastly` - Views using Fastly CDN 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`, `view_dropped_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. 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`, `aggregate_startup_time`, `content_startup_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`, `view_dropped_percentage`, `viewer_experience_score` \"count\" : `started_views`, `unique_viewers` order_direction: 'asc', # String | Sort order. @@ -75,7 +75,7 @@ end | ---- | ---- | ----------- | ----- | | **metric_id** | **String** | ID of the Metric | | | **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] | +| **filters** | [**Array<String>**](String.md) | Filter results using key:value pairs. Must be provided as an array query string parameter. **Basic filtering:** * `filters[]=dimension:value` - Include rows where dimension equals value * `filters[]=!dimension:value` - Exclude rows where dimension equals value **For trace dimensions (like video_cdn_trace):** * `filters[]=+dimension:value` - Include rows where trace contains value * `filters[]=-dimension:value` - Exclude rows where trace contains value * `filters[]=dimension:[value1,value2]` - Exact trace match **Examples:** * `filters[]=country:US` - US views only * `filters[]=+video_cdn_trace:fastly` - Views using Fastly CDN | [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`, `view_dropped_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. 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`, `aggregate_startup_time`, `content_startup_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`, `view_dropped_percentage`, `viewer_experience_score` \"count\" : `started_views`, `unique_viewers` | [optional] | | **order_direction** | **String** | Sort order. | [optional] | @@ -119,7 +119,7 @@ api_instance = MuxRuby::MetricsApi.new metric_id = 'aggregate_startup_time' # String | ID of the Metric 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` + filters: ['inner_example'], # Array | Filter results using key:value pairs. Must be provided as an array query string parameter. **Basic filtering:** * `filters[]=dimension:value` - Include rows where dimension equals value * `filters[]=!dimension:value` - Exclude rows where dimension equals value **For trace dimensions (like video_cdn_trace):** * `filters[]=+dimension:value` - Include rows where trace contains value * `filters[]=-dimension:value` - Exclude rows where trace contains value * `filters[]=dimension:[value1,value2]` - Exact trace match **Examples:** * `filters[]=country:US` - US views only * `filters[]=+video_cdn_trace:fastly` - Views using Fastly CDN 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`, `view_dropped_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. 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`, `aggregate_startup_time`, `content_startup_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`, `view_dropped_percentage`, `viewer_experience_score` \"count\" : `started_views`, `unique_viewers` } @@ -157,7 +157,7 @@ end | ---- | ---- | ----------- | ----- | | **metric_id** | **String** | ID of the Metric | | | **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] | +| **filters** | [**Array<String>**](String.md) | Filter results using key:value pairs. Must be provided as an array query string parameter. **Basic filtering:** * `filters[]=dimension:value` - Include rows where dimension equals value * `filters[]=!dimension:value` - Exclude rows where dimension equals value **For trace dimensions (like video_cdn_trace):** * `filters[]=+dimension:value` - Include rows where trace contains value * `filters[]=-dimension:value` - Exclude rows where trace contains value * `filters[]=dimension:[value1,value2]` - Exact trace match **Examples:** * `filters[]=country:US` - US views only * `filters[]=+video_cdn_trace:fastly` - Views using Fastly CDN | [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`, `view_dropped_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. 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`, `aggregate_startup_time`, `content_startup_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`, `view_dropped_percentage`, `viewer_experience_score` \"count\" : `started_views`, `unique_viewers` | [optional] | @@ -198,7 +198,7 @@ end api_instance = MuxRuby::MetricsApi.new 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` + filters: ['inner_example'], # Array | Filter results using key:value pairs. Must be provided as an array query string parameter. **Basic filtering:** * `filters[]=dimension:value` - Include rows where dimension equals value * `filters[]=!dimension:value` - Exclude rows where dimension equals value **For trace dimensions (like video_cdn_trace):** * `filters[]=+dimension:value` - Include rows where trace contains value * `filters[]=-dimension:value` - Exclude rows where trace contains value * `filters[]=dimension:[value1,value2]` - Exact trace match **Examples:** * `filters[]=country:US` - US views only * `filters[]=+video_cdn_trace:fastly` - Views using Fastly CDN 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`, `view_dropped_percentage`, and `views`. Example: * `metric_filters[]=aggregate_startup_time>=1000` dimension: 'asn', # String | Dimension the specified value belongs to value: 'value_example' # String | Value to show all available metrics for @@ -236,7 +236,7 @@ end | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | | **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] | +| **filters** | [**Array<String>**](String.md) | Filter results using key:value pairs. Must be provided as an array query string parameter. **Basic filtering:** * `filters[]=dimension:value` - Include rows where dimension equals value * `filters[]=!dimension:value` - Exclude rows where dimension equals value **For trace dimensions (like video_cdn_trace):** * `filters[]=+dimension:value` - Include rows where trace contains value * `filters[]=-dimension:value` - Exclude rows where trace contains value * `filters[]=dimension:[value1,value2]` - Exact trace match **Examples:** * `filters[]=country:US` - US views only * `filters[]=+video_cdn_trace:fastly` - Views using Fastly CDN | [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`, `view_dropped_percentage`, and `views`. Example: * `metric_filters[]=aggregate_startup_time>=1000` | [optional] | | **dimension** | **String** | Dimension the specified value belongs to | [optional] | | **value** | **String** | Value to show all available metrics for | [optional] | @@ -280,7 +280,7 @@ 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. 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`, `aggregate_startup_time`, `content_startup_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`, `view_dropped_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` + filters: ['inner_example'], # Array | Filter results using key:value pairs. Must be provided as an array query string parameter. **Basic filtering:** * `filters[]=dimension:value` - Include rows where dimension equals value * `filters[]=!dimension:value` - Exclude rows where dimension equals value **For trace dimensions (like video_cdn_trace):** * `filters[]=+dimension:value` - Include rows where trace contains value * `filters[]=-dimension:value` - Exclude rows where trace contains value * `filters[]=dimension:[value1,value2]` - Exact trace match **Examples:** * `filters[]=country:US` - US views only * `filters[]=+video_cdn_trace:fastly` - Views using Fastly CDN 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`, `view_dropped_percentage`, and `views`. Example: * `metric_filters[]=aggregate_startup_time>=1000` limit: 56, # Integer | Number of items to include in the response page: 56, # Integer | Offset by this many pages, of the size of `limit` @@ -323,7 +323,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. 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`, `aggregate_startup_time`, `content_startup_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`, `view_dropped_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] | +| **filters** | [**Array<String>**](String.md) | Filter results using key:value pairs. Must be provided as an array query string parameter. **Basic filtering:** * `filters[]=dimension:value` - Include rows where dimension equals value * `filters[]=!dimension:value` - Exclude rows where dimension equals value **For trace dimensions (like video_cdn_trace):** * `filters[]=+dimension:value` - Include rows where trace contains value * `filters[]=-dimension:value` - Exclude rows where trace contains value * `filters[]=dimension:[value1,value2]` - Exact trace match **Examples:** * `filters[]=country:US` - US views only * `filters[]=+video_cdn_trace:fastly` - Views using Fastly CDN | [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`, `view_dropped_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] | | **page** | **Integer** | Offset by this many pages, of the size of `limit` | [optional][default to 1] | @@ -371,7 +371,7 @@ opts = { 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`, `aggregate_startup_time`, `content_startup_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`, `view_dropped_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` + filters: ['inner_example'], # Array | Filter results using key:value pairs. Must be provided as an array query string parameter. **Basic filtering:** * `filters[]=dimension:value` - Include rows where dimension equals value * `filters[]=!dimension:value` - Exclude rows where dimension equals value **For trace dimensions (like video_cdn_trace):** * `filters[]=+dimension:value` - Include rows where trace contains value * `filters[]=-dimension:value` - Exclude rows where trace contains value * `filters[]=dimension:[value1,value2]` - Exact trace match **Examples:** * `filters[]=country:US` - US views only * `filters[]=+video_cdn_trace:fastly` - Views using Fastly CDN 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`, `view_dropped_percentage`, and `views`. Example: * `metric_filters[]=aggregate_startup_time>=1000` } @@ -410,7 +410,7 @@ end | **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`, `aggregate_startup_time`, `content_startup_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`, `view_dropped_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] | +| **filters** | [**Array<String>**](String.md) | Filter results using key:value pairs. Must be provided as an array query string parameter. **Basic filtering:** * `filters[]=dimension:value` - Include rows where dimension equals value * `filters[]=!dimension:value` - Exclude rows where dimension equals value **For trace dimensions (like video_cdn_trace):** * `filters[]=+dimension:value` - Include rows where trace contains value * `filters[]=-dimension:value` - Exclude rows where trace contains value * `filters[]=dimension:[value1,value2]` - Exact trace match **Examples:** * `filters[]=country:US` - US views only * `filters[]=+video_cdn_trace:fastly` - Views using Fastly CDN | [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`, `view_dropped_percentage`, and `views`. Example: * `metric_filters[]=aggregate_startup_time>=1000` | [optional] | ### Return type diff --git a/docs/VideoView.md b/docs/VideoView.md index eb8464f..b476b04 100644 --- a/docs/VideoView.md +++ b/docs/VideoView.md @@ -183,6 +183,7 @@ | **view_cdn_edge_pop** | **String** | | [optional] | | **view_cdn_origin** | **String** | | [optional] | | **video_creator_id** | **String** | | [optional] | +| **video_cdn_trace** | **Array<String>** | | [optional] | ## Example @@ -368,7 +369,8 @@ instance = MuxRuby::VideoView.new( video_dynamic_range_type: null, view_cdn_edge_pop: null, view_cdn_origin: null, - video_creator_id: null + video_creator_id: null, + video_cdn_trace: null ) ``` diff --git a/docs/VideoViewsApi.md b/docs/VideoViewsApi.md index 8222647..b55c3dd 100644 --- a/docs/VideoViewsApi.md +++ b/docs/VideoViewsApi.md @@ -105,7 +105,7 @@ opts = { viewer_id: 'viewer_id_example', # String | Viewer ID to filter results by. This value may be provided by the integration, or may be created by Mux. error_id: 56, # Integer | Filter video views by the provided error ID (as returned in the error_type_id field in the list video views endpoint). If you provide any as the error ID, this will filter the results to those with any error. order_direction: 'asc', # String | Sort order. - 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` + filters: ['inner_example'], # Array | Filter results using key:value pairs. Must be provided as an array query string parameter. **Basic filtering:** * `filters[]=dimension:value` - Include rows where dimension equals value * `filters[]=!dimension:value` - Exclude rows where dimension equals value **For trace dimensions (like video_cdn_trace):** * `filters[]=+dimension:value` - Include rows where trace contains value * `filters[]=-dimension:value` - Exclude rows where trace contains value * `filters[]=dimension:[value1,value2]` - Exact trace match **Examples:** * `filters[]=country:US` - US views only * `filters[]=+video_cdn_trace:fastly` - Views using Fastly CDN 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`, `view_dropped_percentage`, and `views`. Example: * `metric_filters[]=aggregate_startup_time>=1000` 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` } @@ -146,7 +146,7 @@ end | **viewer_id** | **String** | Viewer ID to filter results by. This value may be provided by the integration, or may be created by Mux. | [optional] | | **error_id** | **Integer** | Filter video views by the provided error ID (as returned in the error_type_id field in the list video views endpoint). If you provide any as the error ID, this will filter the results to those with any error. | [optional] | | **order_direction** | **String** | Sort order. | [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] | +| **filters** | [**Array<String>**](String.md) | Filter results using key:value pairs. Must be provided as an array query string parameter. **Basic filtering:** * `filters[]=dimension:value` - Include rows where dimension equals value * `filters[]=!dimension:value` - Exclude rows where dimension equals value **For trace dimensions (like video_cdn_trace):** * `filters[]=+dimension:value` - Include rows where trace contains value * `filters[]=-dimension:value` - Exclude rows where trace contains value * `filters[]=dimension:[value1,value2]` - Exact trace match **Examples:** * `filters[]=country:US` - US views only * `filters[]=+video_cdn_trace:fastly` - Views using Fastly CDN | [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`, `view_dropped_percentage`, and `views`. Example: * `metric_filters[]=aggregate_startup_time>=1000` | [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] | diff --git a/lib/mux_ruby/api/dimensions_api.rb b/lib/mux_ruby/api/dimensions_api.rb index a603303..a95abe3 100644 --- a/lib/mux_ruby/api/dimensions_api.rb +++ b/lib/mux_ruby/api/dimensions_api.rb @@ -19,13 +19,102 @@ class DimensionsApi def initialize(api_client = ApiClient.default) @api_client = api_client end + # Lists elements for a trace dimension + # Lists the elements (values) for a trace dimension along with their total counts. This endpoint is specifically designed for trace dimensions like video_cdn_trace that contain arrays of values. + # @param dimension_id [String] ID of the Dimension + # @param [Hash] opts the optional parameters + # @option opts [Integer] :limit Number of items to include in the response (default to 25) + # @option opts [Array] :filters Filter results using key:value pairs. Must be provided as an array query string parameter. **Basic filtering:** * `filters[]=dimension:value` - Include rows where dimension equals value * `filters[]=!dimension:value` - Exclude rows where dimension equals value **For trace dimensions (like video_cdn_trace):** * `filters[]=+dimension:value` - Include rows where trace contains value * `filters[]=-dimension:value` - Exclude rows where trace contains value * `filters[]=dimension:[value1,value2]` - Exact trace match **Examples:** * `filters[]=country:US` - US views only * `filters[]=+video_cdn_trace:fastly` - Views using Fastly CDN + # @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`, `view_dropped_percentage`, and `views`. Example: * `metric_filters[]=aggregate_startup_time>=1000` + # @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 [String] :order_by Value to order the results by + # @option opts [String] :order_direction Sort order. + # @return [ListDimensionValuesResponse] + def list_dimension_elements(dimension_id, opts = {}) + data, _status_code, _headers = list_dimension_elements_with_http_info(dimension_id, opts) + data + end + + # Lists elements for a trace dimension + # Lists the elements (values) for a trace dimension along with their total counts. This endpoint is specifically designed for trace dimensions like video_cdn_trace that contain arrays of values. + # @param dimension_id [String] ID of the Dimension + # @param [Hash] opts the optional parameters + # @option opts [Integer] :limit Number of items to include in the response + # @option opts [Array] :filters Filter results using key:value pairs. Must be provided as an array query string parameter. **Basic filtering:** * `filters[]=dimension:value` - Include rows where dimension equals value * `filters[]=!dimension:value` - Exclude rows where dimension equals value **For trace dimensions (like video_cdn_trace):** * `filters[]=+dimension:value` - Include rows where trace contains value * `filters[]=-dimension:value` - Exclude rows where trace contains value * `filters[]=dimension:[value1,value2]` - Exact trace match **Examples:** * `filters[]=country:US` - US views only * `filters[]=+video_cdn_trace:fastly` - Views using Fastly CDN + # @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`, `view_dropped_percentage`, and `views`. Example: * `metric_filters[]=aggregate_startup_time>=1000` + # @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 [String] :order_by Value to order the results by + # @option opts [String] :order_direction Sort order. + # @return [Array<(ListDimensionValuesResponse, Integer, Hash)>] ListDimensionValuesResponse data, response status code and response headers + def list_dimension_elements_with_http_info(dimension_id, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: DimensionsApi.list_dimension_elements ...' + end + # verify the required parameter 'dimension_id' is set + if @api_client.config.client_side_validation && dimension_id.nil? + fail ArgumentError, "Missing the required parameter 'dimension_id' when calling DimensionsApi.list_dimension_elements" + end + allowable_values = ["negative_impact", "value", "views", "field"] + if @api_client.config.client_side_validation && opts[:'order_by'] && !allowable_values.include?(opts[:'order_by']) + fail ArgumentError, "invalid value for \"order_by\", must be one of #{allowable_values}" + end + allowable_values = ["asc", "desc"] + if @api_client.config.client_side_validation && opts[:'order_direction'] && !allowable_values.include?(opts[:'order_direction']) + fail ArgumentError, "invalid value for \"order_direction\", must be one of #{allowable_values}" + end + # resource path + local_var_path = '/data/v1/dimensions/{DIMENSION_ID}/elements'.sub('{' + 'DIMENSION_ID' + '}', CGI.escape(dimension_id.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? + query_params[:'filters[]'] = @api_client.build_collection_param(opts[:'filters'], :multi) if !opts[:'filters'].nil? + query_params[:'metric_filters[]'] = @api_client.build_collection_param(opts[:'metric_filters'], :multi) if !opts[:'metric_filters'].nil? + query_params[:'timeframe[]'] = @api_client.build_collection_param(opts[:'timeframe'], :multi) if !opts[:'timeframe'].nil? + query_params[:'order_by'] = opts[:'order_by'] if !opts[:'order_by'].nil? + query_params[:'order_direction'] = opts[:'order_direction'] if !opts[:'order_direction'].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] || 'ListDimensionValuesResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['accessToken'] + + new_options = opts.merge( + :operation => :"DimensionsApi.list_dimension_elements", + :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: DimensionsApi#list_dimension_elements\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + # Lists the values for a specific dimension # Lists the values for a dimension along with a total count of related views. Note: This API replaces the list-filter-values API call. # @param dimension_id [String] ID of the Dimension # @param [Hash] opts the optional parameters # @option opts [Integer] :limit Number of items to include in the response (default to 25) # @option opts [Integer] :page Offset by this many pages, of the size of `limit` (default to 1) - # @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] :filters Filter results using key:value pairs. Must be provided as an array query string parameter. **Basic filtering:** * `filters[]=dimension:value` - Include rows where dimension equals value * `filters[]=!dimension:value` - Exclude rows where dimension equals value **For trace dimensions (like video_cdn_trace):** * `filters[]=+dimension:value` - Include rows where trace contains value * `filters[]=-dimension:value` - Exclude rows where trace contains value * `filters[]=dimension:[value1,value2]` - Exact trace match **Examples:** * `filters[]=country:US` - US views only * `filters[]=+video_cdn_trace:fastly` - Views using Fastly CDN # @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`, `view_dropped_percentage`, and `views`. Example: * `metric_filters[]=aggregate_startup_time>=1000` # @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` # @return [ListDimensionValuesResponse] @@ -40,7 +129,7 @@ def list_dimension_values(dimension_id, opts = {}) # @param [Hash] opts the optional parameters # @option opts [Integer] :limit Number of items to include in the response # @option opts [Integer] :page Offset by this many pages, of the size of `limit` - # @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] :filters Filter results using key:value pairs. Must be provided as an array query string parameter. **Basic filtering:** * `filters[]=dimension:value` - Include rows where dimension equals value * `filters[]=!dimension:value` - Exclude rows where dimension equals value **For trace dimensions (like video_cdn_trace):** * `filters[]=+dimension:value` - Include rows where trace contains value * `filters[]=-dimension:value` - Exclude rows where trace contains value * `filters[]=dimension:[value1,value2]` - Exact trace match **Examples:** * `filters[]=country:US` - US views only * `filters[]=+video_cdn_trace:fastly` - Views using Fastly CDN # @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`, `view_dropped_percentage`, and `views`. Example: * `metric_filters[]=aggregate_startup_time>=1000` # @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` # @return [Array<(ListDimensionValuesResponse, Integer, Hash)>] ListDimensionValuesResponse data, response status code and response headers diff --git a/lib/mux_ruby/api/errors_api.rb b/lib/mux_ruby/api/errors_api.rb index 4ada453..5863484 100644 --- a/lib/mux_ruby/api/errors_api.rb +++ b/lib/mux_ruby/api/errors_api.rb @@ -22,7 +22,7 @@ def initialize(api_client = ApiClient.default) # List Errors # Returns a list of errors. # @param [Hash] opts the optional parameters - # @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] :filters Filter results using key:value pairs. Must be provided as an array query string parameter. **Basic filtering:** * `filters[]=dimension:value` - Include rows where dimension equals value * `filters[]=!dimension:value` - Exclude rows where dimension equals value **For trace dimensions (like video_cdn_trace):** * `filters[]=+dimension:value` - Include rows where trace contains value * `filters[]=-dimension:value` - Exclude rows where trace contains value * `filters[]=dimension:[value1,value2]` - Exact trace match **Examples:** * `filters[]=country:US` - US views only * `filters[]=+video_cdn_trace:fastly` - Views using Fastly CDN # @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`, `view_dropped_percentage`, and `views`. Example: * `metric_filters[]=aggregate_startup_time>=1000` # @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` # @return [ListErrorsResponse] @@ -34,7 +34,7 @@ def list_errors(opts = {}) # List Errors # Returns a list of errors. # @param [Hash] opts the optional parameters - # @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] :filters Filter results using key:value pairs. Must be provided as an array query string parameter. **Basic filtering:** * `filters[]=dimension:value` - Include rows where dimension equals value * `filters[]=!dimension:value` - Exclude rows where dimension equals value **For trace dimensions (like video_cdn_trace):** * `filters[]=+dimension:value` - Include rows where trace contains value * `filters[]=-dimension:value` - Exclude rows where trace contains value * `filters[]=dimension:[value1,value2]` - Exact trace match **Examples:** * `filters[]=country:US` - US views only * `filters[]=+video_cdn_trace:fastly` - Views using Fastly CDN # @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`, `view_dropped_percentage`, and `views`. Example: * `metric_filters[]=aggregate_startup_time>=1000` # @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` # @return [Array<(ListErrorsResponse, Integer, Hash)>] ListErrorsResponse data, response status code and response headers diff --git a/lib/mux_ruby/api/filters_api.rb b/lib/mux_ruby/api/filters_api.rb index 5f90d51..9175961 100644 --- a/lib/mux_ruby/api/filters_api.rb +++ b/lib/mux_ruby/api/filters_api.rb @@ -25,7 +25,7 @@ def initialize(api_client = ApiClient.default) # @param [Hash] opts the optional parameters # @option opts [Integer] :limit Number of items to include in the response (default to 25) # @option opts [Integer] :page Offset by this many pages, of the size of `limit` (default to 1) - # @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] :filters Filter results using key:value pairs. Must be provided as an array query string parameter. **Basic filtering:** * `filters[]=dimension:value` - Include rows where dimension equals value * `filters[]=!dimension:value` - Exclude rows where dimension equals value **For trace dimensions (like video_cdn_trace):** * `filters[]=+dimension:value` - Include rows where trace contains value * `filters[]=-dimension:value` - Exclude rows where trace contains value * `filters[]=dimension:[value1,value2]` - Exact trace match **Examples:** * `filters[]=country:US` - US views only * `filters[]=+video_cdn_trace:fastly` - Views using Fastly CDN # @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` # @return [ListFilterValuesResponse] def list_filter_values(filter_id, opts = {}) @@ -39,7 +39,7 @@ def list_filter_values(filter_id, opts = {}) # @param [Hash] opts the optional parameters # @option opts [Integer] :limit Number of items to include in the response # @option opts [Integer] :page Offset by this many pages, of the size of `limit` - # @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] :filters Filter results using key:value pairs. Must be provided as an array query string parameter. **Basic filtering:** * `filters[]=dimension:value` - Include rows where dimension equals value * `filters[]=!dimension:value` - Exclude rows where dimension equals value **For trace dimensions (like video_cdn_trace):** * `filters[]=+dimension:value` - Include rows where trace contains value * `filters[]=-dimension:value` - Exclude rows where trace contains value * `filters[]=dimension:[value1,value2]` - Exact trace match **Examples:** * `filters[]=country:US` - US views only * `filters[]=+video_cdn_trace:fastly` - Views using Fastly CDN # @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` # @return [Array<(ListFilterValuesResponse, Integer, Hash)>] ListFilterValuesResponse data, response status code and response headers def list_filter_values_with_http_info(filter_id, opts = {}) diff --git a/lib/mux_ruby/api/metrics_api.rb b/lib/mux_ruby/api/metrics_api.rb index 8c77f3e..5e29b35 100644 --- a/lib/mux_ruby/api/metrics_api.rb +++ b/lib/mux_ruby/api/metrics_api.rb @@ -24,7 +24,7 @@ def initialize(api_client = ApiClient.default) # @param metric_id [String] ID of the Metric # @param [Hash] opts the optional parameters # @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] :filters Filter results using key:value pairs. Must be provided as an array query string parameter. **Basic filtering:** * `filters[]=dimension:value` - Include rows where dimension equals value * `filters[]=!dimension:value` - Exclude rows where dimension equals value **For trace dimensions (like video_cdn_trace):** * `filters[]=+dimension:value` - Include rows where trace contains value * `filters[]=-dimension:value` - Exclude rows where trace contains value * `filters[]=dimension:[value1,value2]` - Exact trace match **Examples:** * `filters[]=country:US` - US views only * `filters[]=+video_cdn_trace:fastly` - Views using Fastly CDN # @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`, `view_dropped_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. 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`, `aggregate_startup_time`, `content_startup_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`, `view_dropped_percentage`, `viewer_experience_score` \"count\" : `started_views`, `unique_viewers` # @option opts [String] :order_direction Sort order. @@ -40,7 +40,7 @@ def get_metric_timeseries_data(metric_id, opts = {}) # @param metric_id [String] ID of the Metric # @param [Hash] opts the optional parameters # @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] :filters Filter results using key:value pairs. Must be provided as an array query string parameter. **Basic filtering:** * `filters[]=dimension:value` - Include rows where dimension equals value * `filters[]=!dimension:value` - Exclude rows where dimension equals value **For trace dimensions (like video_cdn_trace):** * `filters[]=+dimension:value` - Include rows where trace contains value * `filters[]=-dimension:value` - Exclude rows where trace contains value * `filters[]=dimension:[value1,value2]` - Exact trace match **Examples:** * `filters[]=country:US` - US views only * `filters[]=+video_cdn_trace:fastly` - Views using Fastly CDN # @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`, `view_dropped_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. 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`, `aggregate_startup_time`, `content_startup_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`, `view_dropped_percentage`, `viewer_experience_score` \"count\" : `started_views`, `unique_viewers` # @option opts [String] :order_direction Sort order. @@ -122,7 +122,7 @@ def get_metric_timeseries_data_with_http_info(metric_id, opts = {}) # @param metric_id [String] ID of the Metric # @param [Hash] opts the optional parameters # @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] :filters Filter results using key:value pairs. Must be provided as an array query string parameter. **Basic filtering:** * `filters[]=dimension:value` - Include rows where dimension equals value * `filters[]=!dimension:value` - Exclude rows where dimension equals value **For trace dimensions (like video_cdn_trace):** * `filters[]=+dimension:value` - Include rows where trace contains value * `filters[]=-dimension:value` - Exclude rows where trace contains value * `filters[]=dimension:[value1,value2]` - Exact trace match **Examples:** * `filters[]=country:US` - US views only * `filters[]=+video_cdn_trace:fastly` - Views using Fastly CDN # @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`, `view_dropped_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. 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`, `aggregate_startup_time`, `content_startup_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`, `view_dropped_percentage`, `viewer_experience_score` \"count\" : `started_views`, `unique_viewers` # @return [GetOverallValuesResponse] @@ -136,7 +136,7 @@ def get_overall_values(metric_id, opts = {}) # @param metric_id [String] ID of the Metric # @param [Hash] opts the optional parameters # @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] :filters Filter results using key:value pairs. Must be provided as an array query string parameter. **Basic filtering:** * `filters[]=dimension:value` - Include rows where dimension equals value * `filters[]=!dimension:value` - Exclude rows where dimension equals value **For trace dimensions (like video_cdn_trace):** * `filters[]=+dimension:value` - Include rows where trace contains value * `filters[]=-dimension:value` - Exclude rows where trace contains value * `filters[]=dimension:[value1,value2]` - Exact trace match **Examples:** * `filters[]=country:US` - US views only * `filters[]=+video_cdn_trace:fastly` - Views using Fastly CDN # @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`, `view_dropped_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. 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`, `aggregate_startup_time`, `content_startup_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`, `view_dropped_percentage`, `viewer_experience_score` \"count\" : `started_views`, `unique_viewers` # @return [Array<(GetOverallValuesResponse, Integer, Hash)>] GetOverallValuesResponse data, response status code and response headers @@ -205,7 +205,7 @@ def get_overall_values_with_http_info(metric_id, opts = {}) # List all of the values across every breakdown for a specific metric. # @param [Hash] opts the optional parameters # @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] :filters Filter results using key:value pairs. Must be provided as an array query string parameter. **Basic filtering:** * `filters[]=dimension:value` - Include rows where dimension equals value * `filters[]=!dimension:value` - Exclude rows where dimension equals value **For trace dimensions (like video_cdn_trace):** * `filters[]=+dimension:value` - Include rows where trace contains value * `filters[]=-dimension:value` - Exclude rows where trace contains value * `filters[]=dimension:[value1,value2]` - Exact trace match **Examples:** * `filters[]=country:US` - US views only * `filters[]=+video_cdn_trace:fastly` - Views using Fastly CDN # @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`, `view_dropped_percentage`, and `views`. Example: * `metric_filters[]=aggregate_startup_time>=1000` # @option opts [String] :dimension Dimension the specified value belongs to # @option opts [String] :value Value to show all available metrics for @@ -219,7 +219,7 @@ def list_all_metric_values(opts = {}) # List all of the values across every breakdown for a specific metric. # @param [Hash] opts the optional parameters # @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] :filters Filter results using key:value pairs. Must be provided as an array query string parameter. **Basic filtering:** * `filters[]=dimension:value` - Include rows where dimension equals value * `filters[]=!dimension:value` - Exclude rows where dimension equals value **For trace dimensions (like video_cdn_trace):** * `filters[]=+dimension:value` - Include rows where trace contains value * `filters[]=-dimension:value` - Exclude rows where trace contains value * `filters[]=dimension:[value1,value2]` - Exact trace match **Examples:** * `filters[]=country:US` - US views only * `filters[]=+video_cdn_trace:fastly` - Views using Fastly CDN # @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`, `view_dropped_percentage`, and `views`. Example: * `metric_filters[]=aggregate_startup_time>=1000` # @option opts [String] :dimension Dimension the specified value belongs to # @option opts [String] :value Value to show all available metrics for @@ -228,7 +228,7 @@ def list_all_metric_values_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: MetricsApi.list_all_metric_values ...' end - allowable_values = ["asn", "asset_id", "browser", "browser_version", "cdn", "continent_code", "country", "custom_1", "custom_2", "custom_3", "custom_4", "custom_5", "custom_6", "custom_7", "custom_8", "custom_9", "custom_10", "exit_before_video_start", "experiment_name", "live_stream_id", "operating_system", "operating_system_version", "page_type", "playback_failure", "playback_business_exception", "playback_id", "player_autoplay", "player_error_code", "player_mux_plugin_name", "player_mux_plugin_version", "player_name", "player_preload", "player_remote_played", "player_software", "player_software_version", "player_version", "preroll_ad_asset_hostname", "preroll_ad_tag_hostname", "preroll_played", "preroll_requested", "region", "source_hostname", "source_type", "stream_type", "sub_property_id", "video_content_type", "video_encoding_variant", "video_id", "video_series", "video_startup_failure", "video_startup_business_exception", "video_title", "view_drm_type", "view_has_ad", "view_session_id", "viewer_connection_type", "viewer_device_category", "viewer_device_manufacturer", "viewer_device_model", "viewer_device_name", "viewer_user_id", "ad_playback_failure", "content_playback_failure", "view_dropped", "client_application_name", "client_application_version", "video_affiliate", "viewer_plan", "viewer_plan_status", "viewer_plan_category", "view_drm_level", "video_brand", "used_pip", "time_shift_enabled", "used_captions", "video_codec", "audio_codec", "video_dynamic_range_type", "view_cdn_edge_pop", "view_cdn_origin", "video_creator_id"] + allowable_values = ["asn", "asset_id", "browser", "browser_version", "cdn", "continent_code", "country", "custom_1", "custom_2", "custom_3", "custom_4", "custom_5", "custom_6", "custom_7", "custom_8", "custom_9", "custom_10", "exit_before_video_start", "experiment_name", "live_stream_id", "operating_system", "operating_system_version", "page_type", "playback_failure", "playback_business_exception", "playback_id", "player_autoplay", "player_error_code", "player_mux_plugin_name", "player_mux_plugin_version", "player_name", "player_preload", "player_remote_played", "player_software", "player_software_version", "player_version", "preroll_ad_asset_hostname", "preroll_ad_tag_hostname", "preroll_played", "preroll_requested", "region", "source_hostname", "source_type", "stream_type", "sub_property_id", "video_content_type", "video_encoding_variant", "video_id", "video_series", "video_startup_failure", "video_startup_business_exception", "video_title", "view_drm_type", "view_has_ad", "view_session_id", "viewer_connection_type", "viewer_device_category", "viewer_device_manufacturer", "viewer_device_model", "viewer_device_name", "viewer_user_id", "ad_playback_failure", "content_playback_failure", "view_dropped", "client_application_name", "client_application_version", "video_affiliate", "viewer_plan", "viewer_plan_status", "viewer_plan_category", "view_drm_level", "video_brand", "used_pip", "time_shift_enabled", "used_captions", "video_codec", "audio_codec", "video_dynamic_range_type", "view_cdn_edge_pop", "view_cdn_origin", "video_creator_id", "video_cdn_trace"] if @api_client.config.client_side_validation && opts[:'dimension'] && !allowable_values.include?(opts[:'dimension']) fail ArgumentError, "invalid value for \"dimension\", must be one of #{allowable_values}" end @@ -283,7 +283,7 @@ def list_all_metric_values_with_http_info(opts = {}) # @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. 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`, `aggregate_startup_time`, `content_startup_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`, `view_dropped_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] :filters Filter results using key:value pairs. Must be provided as an array query string parameter. **Basic filtering:** * `filters[]=dimension:value` - Include rows where dimension equals value * `filters[]=!dimension:value` - Exclude rows where dimension equals value **For trace dimensions (like video_cdn_trace):** * `filters[]=+dimension:value` - Include rows where trace contains value * `filters[]=-dimension:value` - Exclude rows where trace contains value * `filters[]=dimension:[value1,value2]` - Exact trace match **Examples:** * `filters[]=country:US` - US views only * `filters[]=+video_cdn_trace:fastly` - Views using Fastly CDN # @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`, `view_dropped_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) # @option opts [Integer] :page Offset by this many pages, of the size of `limit` (default to 1) @@ -302,7 +302,7 @@ def list_breakdown_values(metric_id, opts = {}) # @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. 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`, `aggregate_startup_time`, `content_startup_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`, `view_dropped_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] :filters Filter results using key:value pairs. Must be provided as an array query string parameter. **Basic filtering:** * `filters[]=dimension:value` - Include rows where dimension equals value * `filters[]=!dimension:value` - Exclude rows where dimension equals value **For trace dimensions (like video_cdn_trace):** * `filters[]=+dimension:value` - Include rows where trace contains value * `filters[]=-dimension:value` - Exclude rows where trace contains value * `filters[]=dimension:[value1,value2]` - Exact trace match **Examples:** * `filters[]=country:US` - US views only * `filters[]=+video_cdn_trace:fastly` - Views using Fastly CDN # @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`, `view_dropped_percentage`, and `views`. Example: * `metric_filters[]=aggregate_startup_time>=1000` # @option opts [Integer] :limit Number of items to include in the response # @option opts [Integer] :page Offset by this many pages, of the size of `limit` @@ -323,7 +323,7 @@ def list_breakdown_values_with_http_info(metric_id, opts = {}) if @api_client.config.client_side_validation && !allowable_values.include?(metric_id) fail ArgumentError, "invalid value for \"metric_id\", must be one of #{allowable_values}" end - allowable_values = ["asn", "asset_id", "browser", "browser_version", "cdn", "continent_code", "country", "custom_1", "custom_2", "custom_3", "custom_4", "custom_5", "custom_6", "custom_7", "custom_8", "custom_9", "custom_10", "exit_before_video_start", "experiment_name", "live_stream_id", "operating_system", "operating_system_version", "page_type", "playback_failure", "playback_business_exception", "playback_id", "player_autoplay", "player_error_code", "player_mux_plugin_name", "player_mux_plugin_version", "player_name", "player_preload", "player_remote_played", "player_software", "player_software_version", "player_version", "preroll_ad_asset_hostname", "preroll_ad_tag_hostname", "preroll_played", "preroll_requested", "region", "source_hostname", "source_type", "stream_type", "sub_property_id", "video_content_type", "video_encoding_variant", "video_id", "video_series", "video_startup_business_exception", "video_startup_failure", "video_title", "view_drm_type", "view_has_ad", "view_session_id", "viewer_connection_type", "viewer_device_category", "viewer_device_manufacturer", "viewer_device_model", "viewer_device_name", "viewer_user_id", "ad_playback_failure", "content_playback_failure", "view_dropped", "client_application_name", "client_application_version", "video_affiliate", "viewer_plan", "viewer_plan_status", "viewer_plan_category", "view_drm_level", "video_brand", "used_pip", "time_shift_enabled", "used_captions", "video_codec", "audio_codec", "video_dynamic_range_type", "view_cdn_edge_pop", "view_cdn_origin", "video_creator_id"] + allowable_values = ["asn", "asset_id", "browser", "browser_version", "cdn", "continent_code", "country", "custom_1", "custom_2", "custom_3", "custom_4", "custom_5", "custom_6", "custom_7", "custom_8", "custom_9", "custom_10", "exit_before_video_start", "experiment_name", "live_stream_id", "operating_system", "operating_system_version", "page_type", "playback_failure", "playback_business_exception", "playback_id", "player_autoplay", "player_error_code", "player_mux_plugin_name", "player_mux_plugin_version", "player_name", "player_preload", "player_remote_played", "player_software", "player_software_version", "player_version", "preroll_ad_asset_hostname", "preroll_ad_tag_hostname", "preroll_played", "preroll_requested", "region", "source_hostname", "source_type", "stream_type", "sub_property_id", "video_content_type", "video_encoding_variant", "video_id", "video_series", "video_startup_business_exception", "video_startup_failure", "video_title", "view_drm_type", "view_has_ad", "view_session_id", "viewer_connection_type", "viewer_device_category", "viewer_device_manufacturer", "viewer_device_model", "viewer_device_name", "viewer_user_id", "ad_playback_failure", "content_playback_failure", "view_dropped", "client_application_name", "client_application_version", "video_affiliate", "viewer_plan", "viewer_plan_status", "viewer_plan_category", "view_drm_level", "video_brand", "used_pip", "time_shift_enabled", "used_captions", "video_codec", "audio_codec", "video_dynamic_range_type", "view_cdn_edge_pop", "view_cdn_origin", "video_creator_id", "video_cdn_trace"] if @api_client.config.client_side_validation && opts[:'group_by'] && !allowable_values.include?(opts[:'group_by']) fail ArgumentError, "invalid value for \"group_by\", must be one of #{allowable_values}" end @@ -395,7 +395,7 @@ def list_breakdown_values_with_http_info(metric_id, opts = {}) # @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`, `aggregate_startup_time`, `content_startup_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`, `view_dropped_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` + # @option opts [Array] :filters Filter results using key:value pairs. Must be provided as an array query string parameter. **Basic filtering:** * `filters[]=dimension:value` - Include rows where dimension equals value * `filters[]=!dimension:value` - Exclude rows where dimension equals value **For trace dimensions (like video_cdn_trace):** * `filters[]=+dimension:value` - Include rows where trace contains value * `filters[]=-dimension:value` - Exclude rows where trace contains value * `filters[]=dimension:[value1,value2]` - Exact trace match **Examples:** * `filters[]=country:US` - US views only * `filters[]=+video_cdn_trace:fastly` - Views using Fastly CDN # @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`, `view_dropped_percentage`, and `views`. Example: * `metric_filters[]=aggregate_startup_time>=1000` # @return [ListInsightsResponse] def list_insights(metric_id, opts = {}) @@ -410,7 +410,7 @@ def list_insights(metric_id, opts = {}) # @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`, `aggregate_startup_time`, `content_startup_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`, `view_dropped_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` + # @option opts [Array] :filters Filter results using key:value pairs. Must be provided as an array query string parameter. **Basic filtering:** * `filters[]=dimension:value` - Include rows where dimension equals value * `filters[]=!dimension:value` - Exclude rows where dimension equals value **For trace dimensions (like video_cdn_trace):** * `filters[]=+dimension:value` - Include rows where trace contains value * `filters[]=-dimension:value` - Exclude rows where trace contains value * `filters[]=dimension:[value1,value2]` - Exact trace match **Examples:** * `filters[]=country:US` - US views only * `filters[]=+video_cdn_trace:fastly` - Views using Fastly CDN # @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`, `view_dropped_percentage`, and `views`. Example: * `metric_filters[]=aggregate_startup_time>=1000` # @return [Array<(ListInsightsResponse, Integer, Hash)>] ListInsightsResponse data, response status code and response headers def list_insights_with_http_info(metric_id, opts = {}) diff --git a/lib/mux_ruby/api/video_views_api.rb b/lib/mux_ruby/api/video_views_api.rb index c8e07c8..eb82a2c 100644 --- a/lib/mux_ruby/api/video_views_api.rb +++ b/lib/mux_ruby/api/video_views_api.rb @@ -90,7 +90,7 @@ def get_video_view_with_http_info(video_view_id, opts = {}) # @option opts [String] :viewer_id Viewer ID to filter results by. This value may be provided by the integration, or may be created by Mux. # @option opts [Integer] :error_id Filter video views by the provided error ID (as returned in the error_type_id field in the list video views endpoint). If you provide any as the error ID, this will filter the results to those with any error. # @option opts [String] :order_direction Sort order. - # @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] :filters Filter results using key:value pairs. Must be provided as an array query string parameter. **Basic filtering:** * `filters[]=dimension:value` - Include rows where dimension equals value * `filters[]=!dimension:value` - Exclude rows where dimension equals value **For trace dimensions (like video_cdn_trace):** * `filters[]=+dimension:value` - Include rows where trace contains value * `filters[]=-dimension:value` - Exclude rows where trace contains value * `filters[]=dimension:[value1,value2]` - Exact trace match **Examples:** * `filters[]=country:US` - US views only * `filters[]=+video_cdn_trace:fastly` - Views using Fastly CDN # @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`, `view_dropped_percentage`, and `views`. Example: * `metric_filters[]=aggregate_startup_time>=1000` # @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` # @return [ListVideoViewsResponse] @@ -107,7 +107,7 @@ def list_video_views(opts = {}) # @option opts [String] :viewer_id Viewer ID to filter results by. This value may be provided by the integration, or may be created by Mux. # @option opts [Integer] :error_id Filter video views by the provided error ID (as returned in the error_type_id field in the list video views endpoint). If you provide any as the error ID, this will filter the results to those with any error. # @option opts [String] :order_direction Sort order. - # @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] :filters Filter results using key:value pairs. Must be provided as an array query string parameter. **Basic filtering:** * `filters[]=dimension:value` - Include rows where dimension equals value * `filters[]=!dimension:value` - Exclude rows where dimension equals value **For trace dimensions (like video_cdn_trace):** * `filters[]=+dimension:value` - Include rows where trace contains value * `filters[]=-dimension:value` - Exclude rows where trace contains value * `filters[]=dimension:[value1,value2]` - Exact trace match **Examples:** * `filters[]=country:US` - US views only * `filters[]=+video_cdn_trace:fastly` - Views using Fastly CDN # @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`, `view_dropped_percentage`, and `views`. Example: * `metric_filters[]=aggregate_startup_time>=1000` # @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` # @return [Array<(ListVideoViewsResponse, Integer, Hash)>] ListVideoViewsResponse data, response status code and response headers diff --git a/lib/mux_ruby/configuration.rb b/lib/mux_ruby/configuration.rb index 6513cf2..6b32cc7 100644 --- a/lib/mux_ruby/configuration.rb +++ b/lib/mux_ruby/configuration.rb @@ -237,6 +237,12 @@ def server_settings def operation_server_settings { + "DimensionsApi.list_dimension_elements": [ + { + url: "https://api.mux.com", + description: "No description provided", + } + ], } end diff --git a/lib/mux_ruby/models/video_view.rb b/lib/mux_ruby/models/video_view.rb index 22a1023..33cb80e 100644 --- a/lib/mux_ruby/models/video_view.rb +++ b/lib/mux_ruby/models/video_view.rb @@ -373,6 +373,8 @@ class VideoView attr_accessor :video_creator_id + attr_accessor :video_cdn_trace + # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { @@ -554,7 +556,8 @@ def self.attribute_map :'video_dynamic_range_type' => :'video_dynamic_range_type', :'view_cdn_edge_pop' => :'view_cdn_edge_pop', :'view_cdn_origin' => :'view_cdn_origin', - :'video_creator_id' => :'video_creator_id' + :'video_creator_id' => :'video_creator_id', + :'video_cdn_trace' => :'video_cdn_trace' } end @@ -744,7 +747,8 @@ def self.openapi_types :'video_dynamic_range_type' => :'String', :'view_cdn_edge_pop' => :'String', :'view_cdn_origin' => :'String', - :'video_creator_id' => :'String' + :'video_creator_id' => :'String', + :'video_cdn_trace' => :'Array' } end @@ -902,7 +906,7 @@ def self.openapi_nullable :'video_dynamic_range_type', :'view_cdn_edge_pop', :'view_cdn_origin', - :'video_creator_id' + :'video_creator_id', ]) end @@ -1638,6 +1642,12 @@ def initialize(attributes = {}) if attributes.key?(:'video_creator_id') self.video_creator_id = attributes[:'video_creator_id'] end + + if attributes.key?(:'video_cdn_trace') + if (value = attributes[:'video_cdn_trace']).is_a?(Array) + self.video_cdn_trace = value + end + end end # Show invalid properties with the reasons. Usually used together with valid? @@ -1836,7 +1846,8 @@ def ==(o) video_dynamic_range_type == o.video_dynamic_range_type && view_cdn_edge_pop == o.view_cdn_edge_pop && view_cdn_origin == o.view_cdn_origin && - video_creator_id == o.video_creator_id + video_creator_id == o.video_creator_id && + video_cdn_trace == o.video_cdn_trace end # @see the `==` method @@ -1848,7 +1859,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [view_total_upscaling, preroll_ad_asset_hostname, player_source_domain, region, viewer_user_agent, preroll_requested, page_type, startup_score, view_seek_duration, country_name, player_source_height, longitude, buffering_count, video_duration, player_source_type, city, view_id, platform_description, video_startup_preroll_request_time, viewer_device_name, video_series, viewer_application_name, updated_at, view_total_content_playback_time, cdn, player_instance_id, video_language, player_source_width, player_error_message, player_mux_plugin_version, watched, playback_score, page_url, metro, view_max_request_latency, requests_for_first_preroll, view_total_downscaling, latitude, player_source_host_name, inserted_at, view_end, mux_embed_version, player_language, page_load_time, viewer_device_category, video_startup_preroll_load_time, player_version, watch_time, player_source_stream_type, preroll_ad_tag_hostname, viewer_device_manufacturer, rebuffering_score, experiment_name, viewer_os_version, player_preload, buffering_duration, player_view_count, player_software, player_load_time, platform_summary, video_encoding_variant, player_width, view_seek_count, viewer_experience_score, view_error_id, video_variant_name, preroll_played, viewer_application_engine, viewer_os_architecture, player_error_code, buffering_rate, events, player_name, view_start, view_average_request_throughput, video_producer, error_type_id, mux_viewer_id, video_id, continent_code, session_id, exit_before_video_start, video_content_type, viewer_os_family, player_poster, view_average_request_latency, video_variant_id, player_source_duration, player_source_url, mux_api_version, video_title, id, short_time, rebuffer_percentage, time_to_first_frame, viewer_user_id, video_stream_type, player_startup_time, viewer_application_version, view_max_downscale_percentage, view_max_upscale_percentage, country_code, used_fullscreen, isp, property_id, player_autoplay, player_height, asn, asn_name, quality_score, player_software_version, player_mux_plugin_name, sub_property_id, player_remote_played, view_max_playhead_position, view_playing_time, view_session_id, viewer_connection_type, viewer_device_model, weighted_average_bitrate, custom_1, custom_2, custom_3, custom_4, custom_5, custom_6, custom_7, custom_8, custom_9, custom_10, live_stream_latency, asset_id, environment_id, live_stream_id, mux_embed, playback_id, player_error_context, view_drm_type, view_dropped_frame_count, view_has_ad, video_startup_failure, ad_attempt_count, ad_break_count, ad_break_error_count, ad_break_error_percentage, ad_error_count, ad_error_percentage, ad_impression_count, ad_startup_error_count, ad_startup_error_percentage, ad_exit_before_start_count, ad_exit_before_start_percentage, long_resume, long_rebuffering, playback_failure_error_type_id, playback_business_exception_error_type_id, video_startup_business_exception_error_type_id, playback_failure, ad_playback_failure_error_type_id, view_content_startup_time, ad_preroll_startup_time, view_dropped, client_application_name, client_application_version, video_affiliate, viewer_plan, viewer_plan_status, viewer_plan_category, view_drm_level, video_brand, used_pip, time_shift_enabled, used_captions, video_codec, audio_codec, video_dynamic_range_type, view_cdn_edge_pop, view_cdn_origin, video_creator_id].hash + [view_total_upscaling, preroll_ad_asset_hostname, player_source_domain, region, viewer_user_agent, preroll_requested, page_type, startup_score, view_seek_duration, country_name, player_source_height, longitude, buffering_count, video_duration, player_source_type, city, view_id, platform_description, video_startup_preroll_request_time, viewer_device_name, video_series, viewer_application_name, updated_at, view_total_content_playback_time, cdn, player_instance_id, video_language, player_source_width, player_error_message, player_mux_plugin_version, watched, playback_score, page_url, metro, view_max_request_latency, requests_for_first_preroll, view_total_downscaling, latitude, player_source_host_name, inserted_at, view_end, mux_embed_version, player_language, page_load_time, viewer_device_category, video_startup_preroll_load_time, player_version, watch_time, player_source_stream_type, preroll_ad_tag_hostname, viewer_device_manufacturer, rebuffering_score, experiment_name, viewer_os_version, player_preload, buffering_duration, player_view_count, player_software, player_load_time, platform_summary, video_encoding_variant, player_width, view_seek_count, viewer_experience_score, view_error_id, video_variant_name, preroll_played, viewer_application_engine, viewer_os_architecture, player_error_code, buffering_rate, events, player_name, view_start, view_average_request_throughput, video_producer, error_type_id, mux_viewer_id, video_id, continent_code, session_id, exit_before_video_start, video_content_type, viewer_os_family, player_poster, view_average_request_latency, video_variant_id, player_source_duration, player_source_url, mux_api_version, video_title, id, short_time, rebuffer_percentage, time_to_first_frame, viewer_user_id, video_stream_type, player_startup_time, viewer_application_version, view_max_downscale_percentage, view_max_upscale_percentage, country_code, used_fullscreen, isp, property_id, player_autoplay, player_height, asn, asn_name, quality_score, player_software_version, player_mux_plugin_name, sub_property_id, player_remote_played, view_max_playhead_position, view_playing_time, view_session_id, viewer_connection_type, viewer_device_model, weighted_average_bitrate, custom_1, custom_2, custom_3, custom_4, custom_5, custom_6, custom_7, custom_8, custom_9, custom_10, live_stream_latency, asset_id, environment_id, live_stream_id, mux_embed, playback_id, player_error_context, view_drm_type, view_dropped_frame_count, view_has_ad, video_startup_failure, ad_attempt_count, ad_break_count, ad_break_error_count, ad_break_error_percentage, ad_error_count, ad_error_percentage, ad_impression_count, ad_startup_error_count, ad_startup_error_percentage, ad_exit_before_start_count, ad_exit_before_start_percentage, long_resume, long_rebuffering, playback_failure_error_type_id, playback_business_exception_error_type_id, video_startup_business_exception_error_type_id, playback_failure, ad_playback_failure_error_type_id, view_content_startup_time, ad_preroll_startup_time, view_dropped, client_application_name, client_application_version, video_affiliate, viewer_plan, viewer_plan_status, viewer_plan_category, view_drm_level, video_brand, used_pip, time_shift_enabled, used_captions, video_codec, audio_codec, video_dynamic_range_type, view_cdn_edge_pop, view_cdn_origin, video_creator_id, video_cdn_trace].hash end # Builds the object from hash