Skip to content

Commit

Permalink
v5.2.0 (#54)
Browse files Browse the repository at this point in the history
  • Loading branch information
jsanford8 authored Dec 19, 2023
1 parent 541c182 commit 8b1b71b
Show file tree
Hide file tree
Showing 23 changed files with 146 additions and 33 deletions.
16 changes: 12 additions & 4 deletions api_dimensions.go
Original file line number Diff line number Diff line change
Expand Up @@ -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).
Expand Down Expand Up @@ -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.
Expand Down
12 changes: 10 additions & 2 deletions api_errors.go
Original file line number Diff line number Diff line change
Expand Up @@ -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).
Expand Down Expand Up @@ -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.
Expand Down
62 changes: 55 additions & 7 deletions api_metrics.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ type MetricsApiService service
type GetMetricTimeseriesDataParams struct {
Timeframe []string
Filters []string
MetricFilters []string
Measurement string
OrderDirection string
GroupBy string
Expand Down Expand Up @@ -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, ""))
}
Expand Down Expand Up @@ -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).
Expand Down Expand Up @@ -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, ""))
}
Expand Down Expand Up @@ -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).
Expand Down Expand Up @@ -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, ""))
}
Expand Down Expand Up @@ -339,6 +363,7 @@ type ListBreakdownValuesParams struct {
GroupBy string
Measurement string
Filters []string
MetricFilters []string
Limit int32
Page int32
OrderBy string
Expand Down Expand Up @@ -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, ""))
}
Expand Down Expand Up @@ -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).
Expand Down Expand Up @@ -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{}

Expand Down
8 changes: 8 additions & 0 deletions api_video_views.go
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ type ListVideoViewsParams struct {
ErrorId int32
OrderDirection string
Filters []string
MetricFilters []string
Timeframe []string
}

Expand Down Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion configuration.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 2 additions & 0 deletions docs/AbridgedVideoView.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
1 change: 1 addition & 0 deletions docs/DimensionsApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions docs/ErrorsApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion docs/InputSettings.md
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
1 change: 1 addition & 0 deletions docs/LiveStream.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
Loading

0 comments on commit 8b1b71b

Please sign in to comment.