Skip to content

Commit bbabb8b

Browse files
authored
v5.5.0 (#57)
1 parent 8368488 commit bbabb8b

25 files changed

+225
-7
lines changed

api_playback_restrictions.go

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -395,3 +395,80 @@ func (a *PlaybackRestrictionsApiService) UpdateReferrerDomainRestriction(pLAYBAC
395395

396396
return localVarReturnValue, nil
397397
}
398+
399+
func (a *PlaybackRestrictionsApiService) UpdateUserAgentRestriction(pLAYBACKRESTRICTIONID string, updateUserAgentRestrictionRequest UpdateUserAgentRestrictionRequest, opts ...APIOption) (PlaybackRestrictionResponse, error) {
400+
var (
401+
localVarAPIOptions = new(APIOptions)
402+
localVarHttpMethod = strings.ToUpper("Put")
403+
localVarPostBody interface{}
404+
localVarFormFileName string
405+
localVarFileName string
406+
localVarFileBytes []byte
407+
localVarReturnValue PlaybackRestrictionResponse
408+
)
409+
410+
for _, opt := range opts {
411+
opt(localVarAPIOptions)
412+
}
413+
414+
// create path and map variables
415+
localVarPath := a.client.cfg.basePath + "/video/v1/playback-restrictions/{PLAYBACK_RESTRICTION_ID}/user_agent"
416+
localVarPath = strings.Replace(localVarPath, "{"+"PLAYBACK_RESTRICTION_ID"+"}", fmt.Sprintf("%v", pLAYBACKRESTRICTIONID), -1)
417+
418+
localVarHeaderParams := make(map[string]string)
419+
localVarQueryParams := url.Values{}
420+
localVarFormParams := url.Values{}
421+
422+
// to determine the Content-Type header
423+
localVarHttpContentTypes := []string{"application/json"}
424+
425+
// set Content-Type header
426+
localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes)
427+
if localVarHttpContentType != "" {
428+
localVarHeaderParams["Content-Type"] = localVarHttpContentType
429+
}
430+
431+
// to determine the Accept header
432+
localVarHttpHeaderAccepts := []string{"application/json"}
433+
434+
// set Accept header
435+
localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
436+
if localVarHttpHeaderAccept != "" {
437+
localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
438+
}
439+
// body params
440+
localVarPostBody = &updateUserAgentRestrictionRequest
441+
442+
r, err := a.client.prepareRequest(localVarAPIOptions, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
443+
if err != nil {
444+
return localVarReturnValue, err
445+
}
446+
447+
localVarHttpResponse, err := a.client.callAPI(r)
448+
if err != nil || localVarHttpResponse == nil {
449+
return localVarReturnValue, err
450+
}
451+
452+
localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body)
453+
localVarHttpResponse.Body.Close()
454+
if err != nil {
455+
return localVarReturnValue, err
456+
}
457+
458+
// Check for common HTTP error status codes
459+
err = CheckForHttpError(localVarHttpResponse.StatusCode, localVarBody)
460+
if err != nil {
461+
return localVarReturnValue, err
462+
}
463+
464+
err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
465+
if err != nil {
466+
newErr := GenericOpenAPIError{
467+
body: localVarBody,
468+
error: err.Error(),
469+
}
470+
return localVarReturnValue, newErr
471+
}
472+
473+
return localVarReturnValue, nil
474+
}

configuration.go

Lines changed: 1 addition & 1 deletion
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.4.0",
25+
userAgent: "Mux Go | 5.5.0",
2626
}
2727
for _, opt := range opts {
2828
opt(cfg)

docs/AbridgedVideoView.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ Name | Type | Description | Notes
1616
**ViewEnd** | **string** | | [optional]
1717
**ViewerExperienceScore** | **float32** | | [optional]
1818
**WatchTime** | **int32** | | [optional]
19+
**PlaybackFailure** | **bool** | | [optional]
1920

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

docs/CreatePlaybackRestrictionRequest.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
Name | Type | Description | Notes
55
------------ | ------------- | ------------- | -------------
66
**Referrer** | [**ReferrerDomainRestriction**](ReferrerDomainRestriction.md) | | [optional]
7+
**UserAgent** | [**UserAgentRestrictionRequest**](UserAgentRestrictionRequest.md) | | [optional]
78

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

docs/DeliveryReport.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ Name | Type | Description | Notes
1111
**AssetState** | **string** | The state of the asset. | [optional]
1212
**AssetDuration** | **float64** | The duration of the asset in seconds. | [optional]
1313
**AssetResolutionTier** | **string** | The resolution tier that the asset was ingested at, affecting billing for ingest & storage | [optional]
14+
**AssetEncodingTier** | **string** | The encoding tier that the asset was ingested at. [See the encoding tiers guide for more details.](https://docs.mux.com/guides/use-encoding-tiers) | [optional]
1415
**DeliveredSeconds** | **float64** | Total number of delivered seconds during this time window. | [optional]
1516
**DeliveredSecondsByResolution** | [**DeliveryReportDeliveredSecondsByResolution**](DeliveryReport_delivered_seconds_by_resolution.md) | | [optional]
1617

docs/GenerateTrackSubtitlesResponse.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
## Properties
44
Name | Type | Description | Notes
55
------------ | ------------- | ------------- | -------------
6-
**Data** | [**Track**](Track.md) | | [optional]
6+
**Data** | [**[]Track**](Track.md) | | [optional]
77

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

docs/PlaybackRestriction.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ Name | Type | Description | Notes
77
**CreatedAt** | **string** | Time the Playback Restriction was created, defined as a Unix timestamp (seconds since epoch). | [optional]
88
**UpdatedAt** | **string** | Time the Playback Restriction was last updated, defined as a Unix timestamp (seconds since epoch). | [optional]
99
**Referrer** | [**ReferrerDomainRestriction**](ReferrerDomainRestriction.md) | | [optional]
10+
**UserAgent** | [**UserAgentRestrictionSettings**](UserAgentRestrictionSettings.md) | | [optional]
1011

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

docs/PlaybackRestrictionsApi.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ Method | HTTP request | Description
99
[**GetPlaybackRestriction**](PlaybackRestrictionsApi.md#GetPlaybackRestriction) | **Get** /video/v1/playback-restrictions/{PLAYBACK_RESTRICTION_ID} | Retrieve a Playback Restriction
1010
[**ListPlaybackRestrictions**](PlaybackRestrictionsApi.md#ListPlaybackRestrictions) | **Get** /video/v1/playback-restrictions | List Playback Restrictions
1111
[**UpdateReferrerDomainRestriction**](PlaybackRestrictionsApi.md#UpdateReferrerDomainRestriction) | **Put** /video/v1/playback-restrictions/{PLAYBACK_RESTRICTION_ID}/referrer | Update the Referrer Playback Restriction
12+
[**UpdateUserAgentRestriction**](PlaybackRestrictionsApi.md#UpdateUserAgentRestriction) | **Put** /video/v1/playback-restrictions/{PLAYBACK_RESTRICTION_ID}/user_agent | Update the User Agent Restriction
1213

1314

1415
# **CreatePlaybackRestriction**
@@ -160,3 +161,32 @@ Name | Type | Description | Notes
160161

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

164+
# **UpdateUserAgentRestriction**
165+
> PlaybackRestrictionResponse UpdateUserAgentRestriction(ctx, pLAYBACKRESTRICTIONID, updateUserAgentRestrictionRequest)
166+
Update the User Agent Restriction
167+
168+
Allows you to modify how Mux validates playback requests with different user agents. Please see [Using User-Agent HTTP header for validation](https://docs.mux.com/guides/secure-video-playback#using-user-agent-http-header-for-validation) for more details on this feature.
169+
170+
### Required Parameters
171+
172+
Name | Type | Description | Notes
173+
------------- | ------------- | ------------- | -------------
174+
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
175+
**pLAYBACKRESTRICTIONID** | **string**| ID of the Playback Restriction. |
176+
**updateUserAgentRestrictionRequest** | [**UpdateUserAgentRestrictionRequest**](UpdateUserAgentRestrictionRequest.md)| |
177+
178+
### Return type
179+
180+
[**PlaybackRestrictionResponse**](PlaybackRestrictionResponse.md)
181+
182+
### Authorization
183+
184+
[accessToken](../README.md#accessToken)
185+
186+
### HTTP request headers
187+
188+
- **Content-Type**: application/json
189+
- **Accept**: application/json
190+
191+
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
192+
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# UpdateLiveStreamNewAssetSettings
2+
3+
## Properties
4+
Name | Type | Description | Notes
5+
------------ | ------------- | ------------- | -------------
6+
**Mp4Support** | **string** | Specify what level of support for mp4 playback should be added to new assets generated from this live stream. * The `none` option disables MP4 support for new assets. MP4 files will not be produced for an asset generated from this live stream. * The `capped-1080p` option produces a single MP4 file, called `capped-1080p.mp4`, with the video resolution capped at 1080p. This option produces an `audio.m4a` file for an audio-only asset. * The `audio-only` option produces a single M4A file, called `audio.m4a` for a video or an audio-only asset. MP4 generation will error when this option is specified for a video-only asset. * The `audio-only,capped-1080p` option produces both the `audio.m4a` and `capped-1080p.mp4` files. Only the `capped-1080p.mp4` file is produced for a video-only asset, while only the `audio.m4a` file is produced for an audio-only asset. * The `standard`(deprecated) option produces up to three MP4 files with different levels of resolution (`high.mp4`, `medium.mp4`, `low.mp4`, or `audio.m4a` for an audio-only asset). | [optional]
7+
8+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
9+
10+

docs/UpdateLiveStreamRequest.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ Name | Type | Description | Notes
99
**UseSlateForStandardLatency** | **bool** | By default, Standard Latency live streams do not have slate media inserted while waiting for live streaming software to reconnect to Mux. Setting this to true enables slate insertion on a Standard Latency stream. | [optional] [default to false]
1010
**ReconnectSlateUrl** | **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]
1111
**MaxContinuousDuration** | **int32** | The time in seconds a live stream may be continuously active before being disconnected. Defaults to 12 hours. | [optional] [default to 43200]
12+
**NewAssetSettings** | [**UpdateLiveStreamNewAssetSettings**](UpdateLiveStreamNewAssetSettings.md) | | [optional]
1213

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

0 commit comments

Comments
 (0)