From 8b1b71b0450675c9c1a27e4ea097ff1f5f1d12d2 Mon Sep 17 00:00:00 2001 From: Justin Sanford Date: Tue, 19 Dec 2023 10:11:02 -0800 Subject: [PATCH] v5.2.0 (#54) --- api_dimensions.go | 16 +++-- api_errors.go | 12 +++- api_metrics.go | 62 ++++++++++++++++--- api_video_views.go | 8 +++ configuration.go | 2 +- docs/AbridgedVideoView.md | 2 + docs/DimensionsApi.md | 1 + docs/ErrorsApi.md | 1 + docs/InputSettings.md | 2 +- docs/LiveStream.md | 1 + docs/MetricsApi.md | 6 ++ docs/ReferrerDomainRestriction.md | 2 +- docs/Track.md | 1 + .../UpdateReferrerDomainRestrictionRequest.md | 2 +- docs/VideoView.md | 13 +++- docs/VideoViewsApi.md | 1 + model_abridged_video_view.go | 24 +++---- model_input_settings.go | 2 +- model_live_stream.go | 2 + model_referrer_domain_restriction.go | 2 +- model_track.go | 2 + ...ate_referrer_domain_restriction_request.go | 2 +- model_video_view.go | 13 +++- 23 files changed, 146 insertions(+), 33 deletions(-) diff --git a/api_dimensions.go b/api_dimensions.go index 537e02f..431f936 100644 --- a/api_dimensions.go +++ b/api_dimensions.go @@ -13,10 +13,11 @@ import ( type DimensionsApiService service type ListDimensionValuesParams struct { - Limit int32 - Page int32 - Filters []string - Timeframe []string + Limit int32 + Page int32 + Filters []string + MetricFilters []string + Timeframe []string } // ListDimensionValues optionally accepts the APIOption of WithParams(*ListDimensionValuesParams). @@ -61,6 +62,13 @@ func (a *DimensionsApiService) ListDimensionValues(dIMENSIONID string, opts ...A localVarQueryParams.Add("filters[]", v) } } + if localVarOptionals != nil && isSet(localVarOptionals.MetricFilters) { + // This will "always work" for Mux's use case, since we always treat collections in query params as "multi" types. + // The first version of this code checked the collectionFormat, but that's just wasted CPU cycles right now. + for _, v := range localVarOptionals.MetricFilters { + localVarQueryParams.Add("metric_filters[]", v) + } + } if localVarOptionals != nil && isSet(localVarOptionals.Timeframe) { // This will "always work" for Mux's use case, since we always treat collections in query params as "multi" types. // The first version of this code checked the collectionFormat, but that's just wasted CPU cycles right now. diff --git a/api_errors.go b/api_errors.go index 2168f55..127e1c6 100644 --- a/api_errors.go +++ b/api_errors.go @@ -12,8 +12,9 @@ import ( type ErrorsApiService service type ListErrorsParams struct { - Filters []string - Timeframe []string + Filters []string + MetricFilters []string + Timeframe []string } // ListErrors optionally accepts the APIOption of WithParams(*ListErrorsParams). @@ -51,6 +52,13 @@ func (a *ErrorsApiService) ListErrors(opts ...APIOption) (ListErrorsResponse, er localVarQueryParams.Add("filters[]", v) } } + if localVarOptionals != nil && isSet(localVarOptionals.MetricFilters) { + // This will "always work" for Mux's use case, since we always treat collections in query params as "multi" types. + // The first version of this code checked the collectionFormat, but that's just wasted CPU cycles right now. + for _, v := range localVarOptionals.MetricFilters { + localVarQueryParams.Add("metric_filters[]", v) + } + } if localVarOptionals != nil && isSet(localVarOptionals.Timeframe) { // This will "always work" for Mux's use case, since we always treat collections in query params as "multi" types. // The first version of this code checked the collectionFormat, but that's just wasted CPU cycles right now. diff --git a/api_metrics.go b/api_metrics.go index 85c399f..718caeb 100644 --- a/api_metrics.go +++ b/api_metrics.go @@ -15,6 +15,7 @@ type MetricsApiService service type GetMetricTimeseriesDataParams struct { Timeframe []string Filters []string + MetricFilters []string Measurement string OrderDirection string GroupBy string @@ -63,6 +64,13 @@ func (a *MetricsApiService) GetMetricTimeseriesData(mETRICID string, opts ...API localVarQueryParams.Add("filters[]", v) } } + if localVarOptionals != nil && isSet(localVarOptionals.MetricFilters) { + // This will "always work" for Mux's use case, since we always treat collections in query params as "multi" types. + // The first version of this code checked the collectionFormat, but that's just wasted CPU cycles right now. + for _, v := range localVarOptionals.MetricFilters { + localVarQueryParams.Add("metric_filters[]", v) + } + } if localVarOptionals != nil && isSet(localVarOptionals.Measurement) { localVarQueryParams.Add("measurement", parameterToString(localVarOptionals.Measurement, "")) } @@ -125,9 +133,10 @@ func (a *MetricsApiService) GetMetricTimeseriesData(mETRICID string, opts ...API } type GetOverallValuesParams struct { - Timeframe []string - Filters []string - Measurement string + Timeframe []string + Filters []string + MetricFilters []string + Measurement string } // GetOverallValues optionally accepts the APIOption of WithParams(*GetOverallValuesParams). @@ -173,6 +182,13 @@ func (a *MetricsApiService) GetOverallValues(mETRICID string, opts ...APIOption) localVarQueryParams.Add("filters[]", v) } } + if localVarOptionals != nil && isSet(localVarOptionals.MetricFilters) { + // This will "always work" for Mux's use case, since we always treat collections in query params as "multi" types. + // The first version of this code checked the collectionFormat, but that's just wasted CPU cycles right now. + for _, v := range localVarOptionals.MetricFilters { + localVarQueryParams.Add("metric_filters[]", v) + } + } if localVarOptionals != nil && isSet(localVarOptionals.Measurement) { localVarQueryParams.Add("measurement", parameterToString(localVarOptionals.Measurement, "")) } @@ -229,10 +245,11 @@ func (a *MetricsApiService) GetOverallValues(mETRICID string, opts ...APIOption) } type ListAllMetricValuesParams struct { - Timeframe []string - Filters []string - Dimension string - Value string + Timeframe []string + Filters []string + MetricFilters []string + Dimension string + Value string } // ListAllMetricValues optionally accepts the APIOption of WithParams(*ListAllMetricValuesParams). @@ -277,6 +294,13 @@ func (a *MetricsApiService) ListAllMetricValues(opts ...APIOption) (ListAllMetri localVarQueryParams.Add("filters[]", v) } } + if localVarOptionals != nil && isSet(localVarOptionals.MetricFilters) { + // This will "always work" for Mux's use case, since we always treat collections in query params as "multi" types. + // The first version of this code checked the collectionFormat, but that's just wasted CPU cycles right now. + for _, v := range localVarOptionals.MetricFilters { + localVarQueryParams.Add("metric_filters[]", v) + } + } if localVarOptionals != nil && isSet(localVarOptionals.Dimension) { localVarQueryParams.Add("dimension", parameterToString(localVarOptionals.Dimension, "")) } @@ -339,6 +363,7 @@ type ListBreakdownValuesParams struct { GroupBy string Measurement string Filters []string + MetricFilters []string Limit int32 Page int32 OrderBy string @@ -388,6 +413,13 @@ func (a *MetricsApiService) ListBreakdownValues(mETRICID string, opts ...APIOpti localVarQueryParams.Add("filters[]", v) } } + if localVarOptionals != nil && isSet(localVarOptionals.MetricFilters) { + // This will "always work" for Mux's use case, since we always treat collections in query params as "multi" types. + // The first version of this code checked the collectionFormat, but that's just wasted CPU cycles right now. + for _, v := range localVarOptionals.MetricFilters { + localVarQueryParams.Add("metric_filters[]", v) + } + } if localVarOptionals != nil && isSet(localVarOptionals.Limit) { localVarQueryParams.Add("limit", parameterToString(localVarOptionals.Limit, "")) } @@ -463,6 +495,8 @@ type ListInsightsParams struct { Measurement string OrderDirection string Timeframe []string + Filters []string + MetricFilters []string } // ListInsights optionally accepts the APIOption of WithParams(*ListInsightsParams). @@ -507,6 +541,20 @@ func (a *MetricsApiService) ListInsights(mETRICID string, opts ...APIOption) (Li localVarQueryParams.Add("timeframe[]", v) } } + if localVarOptionals != nil && isSet(localVarOptionals.Filters) { + // This will "always work" for Mux's use case, since we always treat collections in query params as "multi" types. + // The first version of this code checked the collectionFormat, but that's just wasted CPU cycles right now. + for _, v := range localVarOptionals.Filters { + localVarQueryParams.Add("filters[]", v) + } + } + if localVarOptionals != nil && isSet(localVarOptionals.MetricFilters) { + // This will "always work" for Mux's use case, since we always treat collections in query params as "multi" types. + // The first version of this code checked the collectionFormat, but that's just wasted CPU cycles right now. + for _, v := range localVarOptionals.MetricFilters { + localVarQueryParams.Add("metric_filters[]", v) + } + } // to determine the Content-Type header localVarHttpContentTypes := []string{} diff --git a/api_video_views.go b/api_video_views.go index 09bbd51..73f2855 100644 --- a/api_video_views.go +++ b/api_video_views.go @@ -94,6 +94,7 @@ type ListVideoViewsParams struct { ErrorId int32 OrderDirection string Filters []string + MetricFilters []string Timeframe []string } @@ -147,6 +148,13 @@ func (a *VideoViewsApiService) ListVideoViews(opts ...APIOption) (ListVideoViews localVarQueryParams.Add("filters[]", v) } } + if localVarOptionals != nil && isSet(localVarOptionals.MetricFilters) { + // This will "always work" for Mux's use case, since we always treat collections in query params as "multi" types. + // The first version of this code checked the collectionFormat, but that's just wasted CPU cycles right now. + for _, v := range localVarOptionals.MetricFilters { + localVarQueryParams.Add("metric_filters[]", v) + } + } if localVarOptionals != nil && isSet(localVarOptionals.Timeframe) { // This will "always work" for Mux's use case, since we always treat collections in query params as "multi" types. // The first version of this code checked the collectionFormat, but that's just wasted CPU cycles right now. diff --git a/configuration.go b/configuration.go index 9bf249c..eada07f 100644 --- a/configuration.go +++ b/configuration.go @@ -22,7 +22,7 @@ type ConfigurationOption func(*Configuration) func NewConfiguration(opts ...ConfigurationOption) *Configuration { cfg := &Configuration{ basePath: "https://api.mux.com", - userAgent: "Mux Go | 5.1.0", + userAgent: "Mux Go | 5.2.0", } for _, opt := range opts { opt(cfg) diff --git a/docs/AbridgedVideoView.md b/docs/AbridgedVideoView.md index 661d404..036609b 100644 --- a/docs/AbridgedVideoView.md +++ b/docs/AbridgedVideoView.md @@ -14,6 +14,8 @@ Name | Type | Description | Notes **CountryCode** | **string** | | [optional] **ViewStart** | **string** | | [optional] **ViewEnd** | **string** | | [optional] +**ViewerExperienceScore** | **float32** | | [optional] +**WatchTime** | **int32** | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/DimensionsApi.md b/docs/DimensionsApi.md index 9ecb21a..193c21d 100644 --- a/docs/DimensionsApi.md +++ b/docs/DimensionsApi.md @@ -31,6 +31,7 @@ Name | Type | Description | Notes **limit** | **optional.Int32**| Number of items to include in the response | [default to 25] **page** | **optional.Int32**| Offset by this many pages, of the size of `limit` | [default to 1] **filters** | [**optional.Interface of []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` | + **metricFilters** | [**optional.Interface of []string**](string.md)| Limit the results to rows that match inequality conditions from provided metric comparison clauses. Must be provided as an array query string parameter. Possible filterable metrics are the same as the set of metric ids, with the exceptions of `exits_before_video_start`, `unique_viewers`, `video_startup_failure_percentage`, and `views`. Example: * `metric_filters[]=aggregate_startup_time>=1000` | **timeframe** | [**optional.Interface of []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` | ### Return type diff --git a/docs/ErrorsApi.md b/docs/ErrorsApi.md index 06f8316..00e064e 100644 --- a/docs/ErrorsApi.md +++ b/docs/ErrorsApi.md @@ -26,6 +26,7 @@ Optional parameters are passed through a pointer to a ListErrorsOpts struct Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **filters** | [**optional.Interface of []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` | + **metricFilters** | [**optional.Interface of []string**](string.md)| Limit the results to rows that match inequality conditions from provided metric comparison clauses. Must be provided as an array query string parameter. Possible filterable metrics are the same as the set of metric ids, with the exceptions of `exits_before_video_start`, `unique_viewers`, `video_startup_failure_percentage`, and `views`. Example: * `metric_filters[]=aggregate_startup_time>=1000` | **timeframe** | [**optional.Interface of []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` | ### Return type diff --git a/docs/InputSettings.md b/docs/InputSettings.md index 11417c9..3629ce3 100644 --- a/docs/InputSettings.md +++ b/docs/InputSettings.md @@ -3,7 +3,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Url** | **string** | The URL of the file that Mux should download and use. * For the main input file, this should be the URL to the muxed file for Mux to download, for example an MP4, MOV, MKV, or TS file. Mux supports most audio/video file formats and codecs, but for fastest processing, you should [use standard inputs wherever possible](https://docs.mux.com/guides/minimize-processing-time). * For `audio` tracks, the URL is the location of the audio file for Mux to download, for example an M4A, WAV, or MP3 file. Mux supports most audio file formats and codecs, but for fastest processing, you should [use standard inputs wherever possible](https://docs.mux.com/guides/minimize-processing-time). * For `text` tracks, the URL is the location of subtitle/captions file. Mux supports [SubRip Text (SRT)](https://en.wikipedia.org/wiki/SubRip) and [Web Video Text Tracks](https://www.w3.org/TR/webvtt1/) formats for ingesting Subtitles and Closed Captions. * For Watermarking or Overlay, the URL is the location of the watermark image. * When creating clips from existing Mux assets, the URL is defined with `mux://assets/{asset_id}` template where `asset_id` is the Asset Identifier for creating the clip from. The url property may be omitted on the first input object when providing asset settings for LiveStream and Upload objects, in order to configure settings related to the primary (live stream or direct upload) input. | [optional] +**Url** | **string** | The URL of the file that Mux should download and use. * For the main input file, this should be the URL to the muxed file for Mux to download, for example an MP4, MOV, MKV, or TS file. Mux supports most audio/video file formats and codecs, but for fastest processing, you should [use standard inputs wherever possible](https://docs.mux.com/guides/minimize-processing-time). * For `audio` tracks, the URL is the location of the audio file for Mux to download, for example an M4A, WAV, or MP3 file. Mux supports most audio file formats and codecs, but for fastest processing, you should [use standard inputs wherever possible](https://docs.mux.com/guides/minimize-processing-time). * For `text` tracks, the URL is the location of subtitle/captions file. Mux supports [SubRip Text (SRT)](https://en.wikipedia.org/wiki/SubRip) and [Web Video Text Tracks](https://www.w3.org/TR/webvtt1/) formats for ingesting Subtitles and Closed Captions. * For Watermarking or Overlay, the URL is the location of the watermark image. The maximum size is 4096x4096. * When creating clips from existing Mux assets, the URL is defined with `mux://assets/{asset_id}` template where `asset_id` is the Asset Identifier for creating the clip from. The url property may be omitted on the first input object when providing asset settings for LiveStream and Upload objects, in order to configure settings related to the primary (live stream or direct upload) input. | [optional] **OverlaySettings** | [**InputSettingsOverlaySettings**](InputSettings_overlay_settings.md) | | [optional] **GeneratedSubtitles** | [**[]AssetGeneratedSubtitleSettings**](AssetGeneratedSubtitleSettings.md) | Generate subtitle tracks using automatic speech recognition using this configuration. This may only be provided for the first input object (the main input file). For direct uploads, this first input should omit the url parameter, as the main input file is provided via the direct upload. This will create subtitles based on the audio track ingested from that main input file. Note that subtitle generation happens after initial ingest, so the generated tracks will be in the `preparing` state when the asset transitions to `ready`. | [optional] **StartTime** | **float64** | The time offset in seconds from the beginning of the video indicating the clip's starting marker. The default value is 0 when not included. This parameter is only applicable for creating clips when `input.url` has `mux://assets/{asset_id}` format. | [optional] diff --git a/docs/LiveStream.md b/docs/LiveStream.md index 7a25d32..e0c2d88 100644 --- a/docs/LiveStream.md +++ b/docs/LiveStream.md @@ -24,6 +24,7 @@ Name | Type | Description | Notes **LatencyMode** | **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** | **bool** | 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] **MaxContinuousDuration** | **int32** | The time in seconds a live stream may be continuously active before being disconnected. Defaults to 12 hours. | [optional] [default to 43200] +**SrtPassphrase** | **string** | Unique key used for encrypting a stream to a Mux SRT endpoint. | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/MetricsApi.md b/docs/MetricsApi.md index 294644c..7b83120 100644 --- a/docs/MetricsApi.md +++ b/docs/MetricsApi.md @@ -33,6 +33,7 @@ Name | Type | Description | Notes **timeframe** | [**optional.Interface of []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` | **filters** | [**optional.Interface of []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` | + **metricFilters** | [**optional.Interface of []string**](string.md)| Limit the results to rows that match inequality conditions from provided metric comparison clauses. Must be provided as an array query string parameter. Possible filterable metrics are the same as the set of metric ids, with the exceptions of `exits_before_video_start`, `unique_viewers`, `video_startup_failure_percentage`, and `views`. Example: * `metric_filters[]=aggregate_startup_time>=1000` | **measurement** | **optional.String**| Measurement for the provided metric. If omitted, the default for the metric will be used. | **orderDirection** | **optional.String**| Sort order. | **groupBy** | **optional.String**| Time granularity to group results by. If this value is omitted, a default granularity is chosen based on the timeframe. For timeframes of less than 90 minutes, the default granularity is `minute`. Between 90 minutes and 6 hours, the default granularity is `ten_minutes`. Between 6 hours and 15 days inclusive, the default granularity is `hour`. The granularity of timeframes that exceed 15 days is `day`. This default behavior is subject to change; it is strongly suggested that you explicitly specify the granularity. | @@ -74,6 +75,7 @@ Name | Type | Description | Notes **timeframe** | [**optional.Interface of []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` | **filters** | [**optional.Interface of []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` | + **metricFilters** | [**optional.Interface of []string**](string.md)| Limit the results to rows that match inequality conditions from provided metric comparison clauses. Must be provided as an array query string parameter. Possible filterable metrics are the same as the set of metric ids, with the exceptions of `exits_before_video_start`, `unique_viewers`, `video_startup_failure_percentage`, and `views`. Example: * `metric_filters[]=aggregate_startup_time>=1000` | **measurement** | **optional.String**| Measurement for the provided metric. If omitted, the default for the metric will be used. | ### Return type @@ -111,6 +113,7 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **timeframe** | [**optional.Interface of []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` | **filters** | [**optional.Interface of []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` | + **metricFilters** | [**optional.Interface of []string**](string.md)| Limit the results to rows that match inequality conditions from provided metric comparison clauses. Must be provided as an array query string parameter. Possible filterable metrics are the same as the set of metric ids, with the exceptions of `exits_before_video_start`, `unique_viewers`, `video_startup_failure_percentage`, and `views`. Example: * `metric_filters[]=aggregate_startup_time>=1000` | **dimension** | **optional.String**| Dimension the specified value belongs to | **value** | **optional.String**| Value to show all available metrics for | @@ -152,6 +155,7 @@ Name | Type | Description | Notes **groupBy** | **optional.String**| Breakdown value to group the results by | **measurement** | **optional.String**| Measurement for the provided metric. If omitted, the default for the metric will be used. | **filters** | [**optional.Interface of []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` | + **metricFilters** | [**optional.Interface of []string**](string.md)| Limit the results to rows that match inequality conditions from provided metric comparison clauses. Must be provided as an array query string parameter. Possible filterable metrics are the same as the set of metric ids, with the exceptions of `exits_before_video_start`, `unique_viewers`, `video_startup_failure_percentage`, and `views`. Example: * `metric_filters[]=aggregate_startup_time>=1000` | **limit** | **optional.Int32**| Number of items to include in the response | [default to 25] **page** | **optional.Int32**| Offset by this many pages, of the size of `limit` | [default to 1] **orderBy** | **optional.String**| Value to order the results by | @@ -196,6 +200,8 @@ Name | Type | Description | Notes **measurement** | **optional.String**| Measurement for the provided metric. If omitted, the default for the metric will be used. | **orderDirection** | **optional.String**| Sort order. | **timeframe** | [**optional.Interface of []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` | + **filters** | [**optional.Interface of []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` | + **metricFilters** | [**optional.Interface of []string**](string.md)| Limit the results to rows that match inequality conditions from provided metric comparison clauses. Must be provided as an array query string parameter. Possible filterable metrics are the same as the set of metric ids, with the exceptions of `exits_before_video_start`, `unique_viewers`, `video_startup_failure_percentage`, and `views`. Example: * `metric_filters[]=aggregate_startup_time>=1000` | ### Return type diff --git a/docs/ReferrerDomainRestriction.md b/docs/ReferrerDomainRestriction.md index 62048c6..3e7f5e5 100644 --- a/docs/ReferrerDomainRestriction.md +++ b/docs/ReferrerDomainRestriction.md @@ -3,7 +3,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**AllowedDomains** | **[]string** | List of domains allowed to play videos. Possible values are * `[]` Empty Array indicates deny video playback requests for all domains * `[\"*\"]` A Single Wildcard `*` entry means allow video playback requests from any domain * `[\"*.example.com\", \"foo.com\"]` A list of up to 10 domains or valid dns-style wildcards | [optional] +**AllowedDomains** | **[]string** | List of domains allowed to play videos. Possible values are * `[]` Empty Array indicates deny video playback requests for all domains * `[\"*\"]` A Single Wildcard `*` entry means allow video playback requests from any domain * `[\"*.example.com\", \"foo.com\"]` A list of up to 10 domains or valid dns-style wildcards | [optional] **AllowNoReferrer** | **bool** | A boolean to determine whether to allow or deny HTTP requests without `Referer` HTTP request header. Playback requests coming from non-web/native applications like iOS, Android or smart TVs will not have a `Referer` HTTP header. Set this value to `true` to allow these playback requests. | [optional] [default to false] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/Track.md b/docs/Track.md index e04f3cb..7b2a2c7 100644 --- a/docs/Track.md +++ b/docs/Track.md @@ -18,6 +18,7 @@ Name | Type | Description | Notes **ClosedCaptions** | **bool** | Indicates the track provides Subtitles for the Deaf or Hard-of-hearing (SDH). This parameter is only set tracks where `type` is `text` and `text_type` is `subtitles`. | [optional] **Passthrough** | **string** | Arbitrary user-supplied metadata set for the track either when creating the asset or track. This parameter is only set for `text` type tracks. Max 255 characters. | [optional] **Status** | **string** | The status of the track. This parameter is only set for `text` type tracks. | [optional] +**Primary** | **bool** | For an audio track, indicates that this is the primary audio track, ingested from the main input for this asset. The primary audio track cannot be deleted. | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/UpdateReferrerDomainRestrictionRequest.md b/docs/UpdateReferrerDomainRestrictionRequest.md index 9fae7c3..a48281c 100644 --- a/docs/UpdateReferrerDomainRestrictionRequest.md +++ b/docs/UpdateReferrerDomainRestrictionRequest.md @@ -3,7 +3,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**AllowedDomains** | **[]string** | List of domains allowed to play videos. Possible values are * `[]` Empty Array indicates deny video playback requests for all domains * `[\"*\"]` A Single Wildcard `*` entry means allow video playback requests from any domain * `[\"*.example.com\", \"foo.com\"]` A list of up to 10 domains or valid dns-style wildcards | [optional] +**AllowedDomains** | **[]string** | List of domains allowed to play videos. Possible values are * `[]` Empty Array indicates deny video playback requests for all domains * `[\"*\"]` A Single Wildcard `*` entry means allow video playback requests from any domain * `[\"*.example.com\", \"foo.com\"]` A list of up to 10 domains or valid dns-style wildcards | [optional] **AllowNoReferrer** | **bool** | A boolean to determine whether to allow or deny HTTP requests without `Referer` HTTP request header. Playback requests coming from non-web/native applications like iOS, Android or smart TVs will not have a `Referer` HTTP header. Set this value to `true` to allow these playback requests. | [optional] [default to false] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/VideoView.md b/docs/VideoView.md index c30ab91..60f6679 100644 --- a/docs/VideoView.md +++ b/docs/VideoView.md @@ -122,7 +122,7 @@ Name | Type | Description | Notes **ViewSessionId** | **string** | | [optional] **ViewerConnectionType** | **string** | | [optional] **ViewerDeviceModel** | **string** | | [optional] -**WeightedAverageBitrate** | **int64** | | [optional] +**WeightedAverageBitrate** | **float64** | | [optional] **Custom1** | **string** | | [optional] **Custom2** | **string** | | [optional] **Custom3** | **string** | | [optional] @@ -144,6 +144,17 @@ Name | Type | Description | Notes **ViewDroppedFrameCount** | **int64** | | [optional] **ViewHasAd** | **bool** | | [optional] **VideoStartupFailure** | **bool** | | [optional] +**AdAttemptCount** | **int32** | | [optional] +**AdBreakCount** | **int32** | | [optional] +**AdBreakErrorCount** | **int32** | | [optional] +**AdBreakErrorPercentage** | **string** | | [optional] +**AdErrorCount** | **int32** | | [optional] +**AdErrorPercentage** | **string** | | [optional] +**AdImpressionCount** | **int32** | | [optional] +**AdStartupErrorCount** | **int32** | | [optional] +**AdStartupErrorPercentage** | **string** | | [optional] +**AdExitBeforeStartCount** | **int32** | | [optional] +**AdExitBeforeStartPercentage** | **string** | | [optional] **LongResume** | **bool** | | [optional] **LongRebuffering** | **bool** | | [optional] diff --git a/docs/VideoViewsApi.md b/docs/VideoViewsApi.md index 0769e01..27f32a2 100644 --- a/docs/VideoViewsApi.md +++ b/docs/VideoViewsApi.md @@ -60,6 +60,7 @@ Name | Type | Description | Notes **errorId** | **optional.Int32**| 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. | **orderDirection** | **optional.String**| Sort order. | **filters** | [**optional.Interface of []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` | + **metricFilters** | [**optional.Interface of []string**](string.md)| Limit the results to rows that match inequality conditions from provided metric comparison clauses. Must be provided as an array query string parameter. Possible filterable metrics are the same as the set of metric ids, with the exceptions of `exits_before_video_start`, `unique_viewers`, `video_startup_failure_percentage`, and `views`. Example: * `metric_filters[]=aggregate_startup_time>=1000` | **timeframe** | [**optional.Interface of []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` | ### Return type diff --git a/model_abridged_video_view.go b/model_abridged_video_view.go index b26d647..429b5f3 100644 --- a/model_abridged_video_view.go +++ b/model_abridged_video_view.go @@ -4,15 +4,17 @@ package muxgo type AbridgedVideoView struct { - Id string `json:"id,omitempty"` - ViewerOsFamily string `json:"viewer_os_family,omitempty"` - ViewerApplicationName string `json:"viewer_application_name,omitempty"` - VideoTitle string `json:"video_title,omitempty"` - TotalRowCount int64 `json:"total_row_count,omitempty"` - PlayerErrorMessage string `json:"player_error_message,omitempty"` - PlayerErrorCode string `json:"player_error_code,omitempty"` - ErrorTypeId int32 `json:"error_type_id,omitempty"` - CountryCode string `json:"country_code,omitempty"` - ViewStart string `json:"view_start,omitempty"` - ViewEnd string `json:"view_end,omitempty"` + Id string `json:"id,omitempty"` + ViewerOsFamily string `json:"viewer_os_family,omitempty"` + ViewerApplicationName string `json:"viewer_application_name,omitempty"` + VideoTitle string `json:"video_title,omitempty"` + TotalRowCount int64 `json:"total_row_count,omitempty"` + PlayerErrorMessage string `json:"player_error_message,omitempty"` + PlayerErrorCode string `json:"player_error_code,omitempty"` + ErrorTypeId int32 `json:"error_type_id,omitempty"` + CountryCode string `json:"country_code,omitempty"` + ViewStart string `json:"view_start,omitempty"` + ViewEnd string `json:"view_end,omitempty"` + ViewerExperienceScore float32 `json:"viewer_experience_score,omitempty"` + WatchTime int32 `json:"watch_time,omitempty"` } diff --git a/model_input_settings.go b/model_input_settings.go index 50f9b2c..814e8c7 100644 --- a/model_input_settings.go +++ b/model_input_settings.go @@ -5,7 +5,7 @@ package muxgo // An array of objects that each describe an input file to be used to create the asset. As a shortcut, `input` can also be a string URL for a file when only one input file is used. See `input[].url` for requirements. type InputSettings struct { - // The URL of the file that Mux should download and use. * For the main input file, this should be the URL to the muxed file for Mux to download, for example an MP4, MOV, MKV, or TS file. Mux supports most audio/video file formats and codecs, but for fastest processing, you should [use standard inputs wherever possible](https://docs.mux.com/guides/minimize-processing-time). * For `audio` tracks, the URL is the location of the audio file for Mux to download, for example an M4A, WAV, or MP3 file. Mux supports most audio file formats and codecs, but for fastest processing, you should [use standard inputs wherever possible](https://docs.mux.com/guides/minimize-processing-time). * For `text` tracks, the URL is the location of subtitle/captions file. Mux supports [SubRip Text (SRT)](https://en.wikipedia.org/wiki/SubRip) and [Web Video Text Tracks](https://www.w3.org/TR/webvtt1/) formats for ingesting Subtitles and Closed Captions. * For Watermarking or Overlay, the URL is the location of the watermark image. * When creating clips from existing Mux assets, the URL is defined with `mux://assets/{asset_id}` template where `asset_id` is the Asset Identifier for creating the clip from. The url property may be omitted on the first input object when providing asset settings for LiveStream and Upload objects, in order to configure settings related to the primary (live stream or direct upload) input. + // The URL of the file that Mux should download and use. * For the main input file, this should be the URL to the muxed file for Mux to download, for example an MP4, MOV, MKV, or TS file. Mux supports most audio/video file formats and codecs, but for fastest processing, you should [use standard inputs wherever possible](https://docs.mux.com/guides/minimize-processing-time). * For `audio` tracks, the URL is the location of the audio file for Mux to download, for example an M4A, WAV, or MP3 file. Mux supports most audio file formats and codecs, but for fastest processing, you should [use standard inputs wherever possible](https://docs.mux.com/guides/minimize-processing-time). * For `text` tracks, the URL is the location of subtitle/captions file. Mux supports [SubRip Text (SRT)](https://en.wikipedia.org/wiki/SubRip) and [Web Video Text Tracks](https://www.w3.org/TR/webvtt1/) formats for ingesting Subtitles and Closed Captions. * For Watermarking or Overlay, the URL is the location of the watermark image. The maximum size is 4096x4096. * When creating clips from existing Mux assets, the URL is defined with `mux://assets/{asset_id}` template where `asset_id` is the Asset Identifier for creating the clip from. The url property may be omitted on the first input object when providing asset settings for LiveStream and Upload objects, in order to configure settings related to the primary (live stream or direct upload) input. Url string `json:"url,omitempty"` OverlaySettings InputSettingsOverlaySettings `json:"overlay_settings,omitempty"` // Generate subtitle tracks using automatic speech recognition using this configuration. This may only be provided for the first input object (the main input file). For direct uploads, this first input should omit the url parameter, as the main input file is provided via the direct upload. This will create subtitles based on the audio track ingested from that main input file. Note that subtitle generation happens after initial ingest, so the generated tracks will be in the `preparing` state when the asset transitions to `ready`. diff --git a/model_live_stream.go b/model_live_stream.go index 90f06b4..e9334cf 100644 --- a/model_live_stream.go +++ b/model_live_stream.go @@ -44,4 +44,6 @@ type LiveStream struct { Test bool `json:"test,omitempty"` // The time in seconds a live stream may be continuously active before being disconnected. Defaults to 12 hours. MaxContinuousDuration int32 `json:"max_continuous_duration,omitempty"` + // Unique key used for encrypting a stream to a Mux SRT endpoint. + SrtPassphrase string `json:"srt_passphrase,omitempty"` } diff --git a/model_referrer_domain_restriction.go b/model_referrer_domain_restriction.go index c3cd1a2..1aec177 100644 --- a/model_referrer_domain_restriction.go +++ b/model_referrer_domain_restriction.go @@ -5,7 +5,7 @@ package muxgo // A list of domains allowed to play your videos. type ReferrerDomainRestriction struct { - // List of domains allowed to play videos. Possible values are * `[]` Empty Array indicates deny video playback requests for all domains * `[\"*\"]` A Single Wildcard `*` entry means allow video playback requests from any domain * `[\"*.example.com\", \"foo.com\"]` A list of up to 10 domains or valid dns-style wildcards + // List of domains allowed to play videos. Possible values are * `[]` Empty Array indicates deny video playback requests for all domains * `[\"*\"]` A Single Wildcard `*` entry means allow video playback requests from any domain * `[\"*.example.com\", \"foo.com\"]` A list of up to 10 domains or valid dns-style wildcards AllowedDomains []string `json:"allowed_domains,omitempty"` // A boolean to determine whether to allow or deny HTTP requests without `Referer` HTTP request header. Playback requests coming from non-web/native applications like iOS, Android or smart TVs will not have a `Referer` HTTP header. Set this value to `true` to allow these playback requests. AllowNoReferrer bool `json:"allow_no_referrer,omitempty"` diff --git a/model_track.go b/model_track.go index 5d6b144..595bf7f 100644 --- a/model_track.go +++ b/model_track.go @@ -34,4 +34,6 @@ type Track struct { Passthrough string `json:"passthrough,omitempty"` // The status of the track. This parameter is only set for `text` type tracks. Status string `json:"status,omitempty"` + // For an audio track, indicates that this is the primary audio track, ingested from the main input for this asset. The primary audio track cannot be deleted. + Primary bool `json:"primary,omitempty"` } diff --git a/model_update_referrer_domain_restriction_request.go b/model_update_referrer_domain_restriction_request.go index 94831d8..878d2b4 100644 --- a/model_update_referrer_domain_restriction_request.go +++ b/model_update_referrer_domain_restriction_request.go @@ -4,7 +4,7 @@ package muxgo type UpdateReferrerDomainRestrictionRequest struct { - // List of domains allowed to play videos. Possible values are * `[]` Empty Array indicates deny video playback requests for all domains * `[\"*\"]` A Single Wildcard `*` entry means allow video playback requests from any domain * `[\"*.example.com\", \"foo.com\"]` A list of up to 10 domains or valid dns-style wildcards + // List of domains allowed to play videos. Possible values are * `[]` Empty Array indicates deny video playback requests for all domains * `[\"*\"]` A Single Wildcard `*` entry means allow video playback requests from any domain * `[\"*.example.com\", \"foo.com\"]` A list of up to 10 domains or valid dns-style wildcards AllowedDomains []string `json:"allowed_domains,omitempty"` // A boolean to determine whether to allow or deny HTTP requests without `Referer` HTTP request header. Playback requests coming from non-web/native applications like iOS, Android or smart TVs will not have a `Referer` HTTP header. Set this value to `true` to allow these playback requests. AllowNoReferrer bool `json:"allow_no_referrer,omitempty"` diff --git a/model_video_view.go b/model_video_view.go index 950f7c8..fe83fc2 100644 --- a/model_video_view.go +++ b/model_video_view.go @@ -123,7 +123,7 @@ type VideoView struct { ViewSessionId string `json:"view_session_id,omitempty"` ViewerConnectionType string `json:"viewer_connection_type,omitempty"` ViewerDeviceModel string `json:"viewer_device_model,omitempty"` - WeightedAverageBitrate int64 `json:"weighted_average_bitrate,omitempty"` + WeightedAverageBitrate float64 `json:"weighted_average_bitrate,omitempty"` Custom1 string `json:"custom_1,omitempty"` Custom2 string `json:"custom_2,omitempty"` Custom3 string `json:"custom_3,omitempty"` @@ -145,6 +145,17 @@ type VideoView struct { ViewDroppedFrameCount int64 `json:"view_dropped_frame_count,omitempty"` ViewHasAd bool `json:"view_has_ad,omitempty"` VideoStartupFailure bool `json:"video_startup_failure,omitempty"` + AdAttemptCount int32 `json:"ad_attempt_count,omitempty"` + AdBreakCount int32 `json:"ad_break_count,omitempty"` + AdBreakErrorCount int32 `json:"ad_break_error_count,omitempty"` + AdBreakErrorPercentage string `json:"ad_break_error_percentage,omitempty"` + AdErrorCount int32 `json:"ad_error_count,omitempty"` + AdErrorPercentage string `json:"ad_error_percentage,omitempty"` + AdImpressionCount int32 `json:"ad_impression_count,omitempty"` + AdStartupErrorCount int32 `json:"ad_startup_error_count,omitempty"` + AdStartupErrorPercentage string `json:"ad_startup_error_percentage,omitempty"` + AdExitBeforeStartCount int32 `json:"ad_exit_before_start_count,omitempty"` + AdExitBeforeStartPercentage string `json:"ad_exit_before_start_percentage,omitempty"` LongResume bool `json:"long_resume,omitempty"` LongRebuffering bool `json:"long_rebuffering,omitempty"` }