Skip to content

Commit 8b1b71b

Browse files
authored
v5.2.0 (#54)
1 parent 541c182 commit 8b1b71b

23 files changed

+146
-33
lines changed

api_dimensions.go

+12-4
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,11 @@ import (
1313
type DimensionsApiService service
1414

1515
type ListDimensionValuesParams struct {
16-
Limit int32
17-
Page int32
18-
Filters []string
19-
Timeframe []string
16+
Limit int32
17+
Page int32
18+
Filters []string
19+
MetricFilters []string
20+
Timeframe []string
2021
}
2122

2223
// ListDimensionValues optionally accepts the APIOption of WithParams(*ListDimensionValuesParams).
@@ -61,6 +62,13 @@ func (a *DimensionsApiService) ListDimensionValues(dIMENSIONID string, opts ...A
6162
localVarQueryParams.Add("filters[]", v)
6263
}
6364
}
65+
if localVarOptionals != nil && isSet(localVarOptionals.MetricFilters) {
66+
// This will "always work" for Mux's use case, since we always treat collections in query params as "multi" types.
67+
// The first version of this code checked the collectionFormat, but that's just wasted CPU cycles right now.
68+
for _, v := range localVarOptionals.MetricFilters {
69+
localVarQueryParams.Add("metric_filters[]", v)
70+
}
71+
}
6472
if localVarOptionals != nil && isSet(localVarOptionals.Timeframe) {
6573
// This will "always work" for Mux's use case, since we always treat collections in query params as "multi" types.
6674
// The first version of this code checked the collectionFormat, but that's just wasted CPU cycles right now.

api_errors.go

+10-2
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,9 @@ import (
1212
type ErrorsApiService service
1313

1414
type ListErrorsParams struct {
15-
Filters []string
16-
Timeframe []string
15+
Filters []string
16+
MetricFilters []string
17+
Timeframe []string
1718
}
1819

1920
// ListErrors optionally accepts the APIOption of WithParams(*ListErrorsParams).
@@ -51,6 +52,13 @@ func (a *ErrorsApiService) ListErrors(opts ...APIOption) (ListErrorsResponse, er
5152
localVarQueryParams.Add("filters[]", v)
5253
}
5354
}
55+
if localVarOptionals != nil && isSet(localVarOptionals.MetricFilters) {
56+
// This will "always work" for Mux's use case, since we always treat collections in query params as "multi" types.
57+
// The first version of this code checked the collectionFormat, but that's just wasted CPU cycles right now.
58+
for _, v := range localVarOptionals.MetricFilters {
59+
localVarQueryParams.Add("metric_filters[]", v)
60+
}
61+
}
5462
if localVarOptionals != nil && isSet(localVarOptionals.Timeframe) {
5563
// This will "always work" for Mux's use case, since we always treat collections in query params as "multi" types.
5664
// The first version of this code checked the collectionFormat, but that's just wasted CPU cycles right now.

api_metrics.go

+55-7
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ type MetricsApiService service
1515
type GetMetricTimeseriesDataParams struct {
1616
Timeframe []string
1717
Filters []string
18+
MetricFilters []string
1819
Measurement string
1920
OrderDirection string
2021
GroupBy string
@@ -63,6 +64,13 @@ func (a *MetricsApiService) GetMetricTimeseriesData(mETRICID string, opts ...API
6364
localVarQueryParams.Add("filters[]", v)
6465
}
6566
}
67+
if localVarOptionals != nil && isSet(localVarOptionals.MetricFilters) {
68+
// This will "always work" for Mux's use case, since we always treat collections in query params as "multi" types.
69+
// The first version of this code checked the collectionFormat, but that's just wasted CPU cycles right now.
70+
for _, v := range localVarOptionals.MetricFilters {
71+
localVarQueryParams.Add("metric_filters[]", v)
72+
}
73+
}
6674
if localVarOptionals != nil && isSet(localVarOptionals.Measurement) {
6775
localVarQueryParams.Add("measurement", parameterToString(localVarOptionals.Measurement, ""))
6876
}
@@ -125,9 +133,10 @@ func (a *MetricsApiService) GetMetricTimeseriesData(mETRICID string, opts ...API
125133
}
126134

127135
type GetOverallValuesParams struct {
128-
Timeframe []string
129-
Filters []string
130-
Measurement string
136+
Timeframe []string
137+
Filters []string
138+
MetricFilters []string
139+
Measurement string
131140
}
132141

133142
// GetOverallValues optionally accepts the APIOption of WithParams(*GetOverallValuesParams).
@@ -173,6 +182,13 @@ func (a *MetricsApiService) GetOverallValues(mETRICID string, opts ...APIOption)
173182
localVarQueryParams.Add("filters[]", v)
174183
}
175184
}
185+
if localVarOptionals != nil && isSet(localVarOptionals.MetricFilters) {
186+
// This will "always work" for Mux's use case, since we always treat collections in query params as "multi" types.
187+
// The first version of this code checked the collectionFormat, but that's just wasted CPU cycles right now.
188+
for _, v := range localVarOptionals.MetricFilters {
189+
localVarQueryParams.Add("metric_filters[]", v)
190+
}
191+
}
176192
if localVarOptionals != nil && isSet(localVarOptionals.Measurement) {
177193
localVarQueryParams.Add("measurement", parameterToString(localVarOptionals.Measurement, ""))
178194
}
@@ -229,10 +245,11 @@ func (a *MetricsApiService) GetOverallValues(mETRICID string, opts ...APIOption)
229245
}
230246

231247
type ListAllMetricValuesParams struct {
232-
Timeframe []string
233-
Filters []string
234-
Dimension string
235-
Value string
248+
Timeframe []string
249+
Filters []string
250+
MetricFilters []string
251+
Dimension string
252+
Value string
236253
}
237254

238255
// ListAllMetricValues optionally accepts the APIOption of WithParams(*ListAllMetricValuesParams).
@@ -277,6 +294,13 @@ func (a *MetricsApiService) ListAllMetricValues(opts ...APIOption) (ListAllMetri
277294
localVarQueryParams.Add("filters[]", v)
278295
}
279296
}
297+
if localVarOptionals != nil && isSet(localVarOptionals.MetricFilters) {
298+
// This will "always work" for Mux's use case, since we always treat collections in query params as "multi" types.
299+
// The first version of this code checked the collectionFormat, but that's just wasted CPU cycles right now.
300+
for _, v := range localVarOptionals.MetricFilters {
301+
localVarQueryParams.Add("metric_filters[]", v)
302+
}
303+
}
280304
if localVarOptionals != nil && isSet(localVarOptionals.Dimension) {
281305
localVarQueryParams.Add("dimension", parameterToString(localVarOptionals.Dimension, ""))
282306
}
@@ -339,6 +363,7 @@ type ListBreakdownValuesParams struct {
339363
GroupBy string
340364
Measurement string
341365
Filters []string
366+
MetricFilters []string
342367
Limit int32
343368
Page int32
344369
OrderBy string
@@ -388,6 +413,13 @@ func (a *MetricsApiService) ListBreakdownValues(mETRICID string, opts ...APIOpti
388413
localVarQueryParams.Add("filters[]", v)
389414
}
390415
}
416+
if localVarOptionals != nil && isSet(localVarOptionals.MetricFilters) {
417+
// This will "always work" for Mux's use case, since we always treat collections in query params as "multi" types.
418+
// The first version of this code checked the collectionFormat, but that's just wasted CPU cycles right now.
419+
for _, v := range localVarOptionals.MetricFilters {
420+
localVarQueryParams.Add("metric_filters[]", v)
421+
}
422+
}
391423
if localVarOptionals != nil && isSet(localVarOptionals.Limit) {
392424
localVarQueryParams.Add("limit", parameterToString(localVarOptionals.Limit, ""))
393425
}
@@ -463,6 +495,8 @@ type ListInsightsParams struct {
463495
Measurement string
464496
OrderDirection string
465497
Timeframe []string
498+
Filters []string
499+
MetricFilters []string
466500
}
467501

468502
// ListInsights optionally accepts the APIOption of WithParams(*ListInsightsParams).
@@ -507,6 +541,20 @@ func (a *MetricsApiService) ListInsights(mETRICID string, opts ...APIOption) (Li
507541
localVarQueryParams.Add("timeframe[]", v)
508542
}
509543
}
544+
if localVarOptionals != nil && isSet(localVarOptionals.Filters) {
545+
// This will "always work" for Mux's use case, since we always treat collections in query params as "multi" types.
546+
// The first version of this code checked the collectionFormat, but that's just wasted CPU cycles right now.
547+
for _, v := range localVarOptionals.Filters {
548+
localVarQueryParams.Add("filters[]", v)
549+
}
550+
}
551+
if localVarOptionals != nil && isSet(localVarOptionals.MetricFilters) {
552+
// This will "always work" for Mux's use case, since we always treat collections in query params as "multi" types.
553+
// The first version of this code checked the collectionFormat, but that's just wasted CPU cycles right now.
554+
for _, v := range localVarOptionals.MetricFilters {
555+
localVarQueryParams.Add("metric_filters[]", v)
556+
}
557+
}
510558
// to determine the Content-Type header
511559
localVarHttpContentTypes := []string{}
512560

api_video_views.go

+8
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,7 @@ type ListVideoViewsParams struct {
9494
ErrorId int32
9595
OrderDirection string
9696
Filters []string
97+
MetricFilters []string
9798
Timeframe []string
9899
}
99100

@@ -147,6 +148,13 @@ func (a *VideoViewsApiService) ListVideoViews(opts ...APIOption) (ListVideoViews
147148
localVarQueryParams.Add("filters[]", v)
148149
}
149150
}
151+
if localVarOptionals != nil && isSet(localVarOptionals.MetricFilters) {
152+
// This will "always work" for Mux's use case, since we always treat collections in query params as "multi" types.
153+
// The first version of this code checked the collectionFormat, but that's just wasted CPU cycles right now.
154+
for _, v := range localVarOptionals.MetricFilters {
155+
localVarQueryParams.Add("metric_filters[]", v)
156+
}
157+
}
150158
if localVarOptionals != nil && isSet(localVarOptionals.Timeframe) {
151159
// This will "always work" for Mux's use case, since we always treat collections in query params as "multi" types.
152160
// The first version of this code checked the collectionFormat, but that's just wasted CPU cycles right now.

configuration.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ type ConfigurationOption func(*Configuration)
2222
func NewConfiguration(opts ...ConfigurationOption) *Configuration {
2323
cfg := &Configuration{
2424
basePath: "https://api.mux.com",
25-
userAgent: "Mux Go | 5.1.0",
25+
userAgent: "Mux Go | 5.2.0",
2626
}
2727
for _, opt := range opts {
2828
opt(cfg)

docs/AbridgedVideoView.md

+2
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ Name | Type | Description | Notes
1414
**CountryCode** | **string** | | [optional]
1515
**ViewStart** | **string** | | [optional]
1616
**ViewEnd** | **string** | | [optional]
17+
**ViewerExperienceScore** | **float32** | | [optional]
18+
**WatchTime** | **int32** | | [optional]
1719

1820
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
1921

docs/DimensionsApi.md

+1
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ Name | Type | Description | Notes
3131
**limit** | **optional.Int32**| Number of items to include in the response | [default to 25]
3232
**page** | **optional.Int32**| Offset by this many pages, of the size of `limit` | [default to 1]
3333
**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` |
34+
**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` |
3435
**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` |
3536

3637
### Return type

docs/ErrorsApi.md

+1
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ Optional parameters are passed through a pointer to a ListErrorsOpts struct
2626
Name | Type | Description | Notes
2727
------------- | ------------- | ------------- | -------------
2828
**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` |
29+
**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` |
2930
**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` |
3031

3132
### Return type

docs/InputSettings.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
## Properties
44
Name | Type | Description | Notes
55
------------ | ------------- | ------------- | -------------
6-
**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]
6+
**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]
77
**OverlaySettings** | [**InputSettingsOverlaySettings**](InputSettings_overlay_settings.md) | | [optional]
88
**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]
99
**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]

docs/LiveStream.md

+1
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ Name | Type | Description | Notes
2424
**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]
2525
**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]
2626
**MaxContinuousDuration** | **int32** | The time in seconds a live stream may be continuously active before being disconnected. Defaults to 12 hours. | [optional] [default to 43200]
27+
**SrtPassphrase** | **string** | Unique key used for encrypting a stream to a Mux SRT endpoint. | [optional]
2728

2829
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
2930

0 commit comments

Comments
 (0)