Skip to content

Commit e856522

Browse files
authored
v5.6.0 (#58)
1 parent bbabb8b commit e856522

22 files changed

+336
-12
lines changed

api_drm_configurations.go

Lines changed: 179 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,179 @@
1+
// Mux Go - Copyright 2019 Mux Inc.
2+
// NOTE: This file is auto generated. Do not edit this file manually.
3+
4+
package muxgo
5+
6+
import (
7+
"fmt"
8+
"io/ioutil"
9+
"net/url"
10+
"strings"
11+
)
12+
13+
type DRMConfigurationsApiService service
14+
15+
func (a *DRMConfigurationsApiService) GetDrmConfiguration(dRMCONFIGURATIONID string, opts ...APIOption) (DrmConfigurationResponse, error) {
16+
var (
17+
localVarAPIOptions = new(APIOptions)
18+
localVarHttpMethod = strings.ToUpper("Get")
19+
localVarPostBody interface{}
20+
localVarFormFileName string
21+
localVarFileName string
22+
localVarFileBytes []byte
23+
localVarReturnValue DrmConfigurationResponse
24+
)
25+
26+
for _, opt := range opts {
27+
opt(localVarAPIOptions)
28+
}
29+
30+
// create path and map variables
31+
localVarPath := a.client.cfg.basePath + "/video/v1/drm-configurations/{DRM_CONFIGURATION_ID}"
32+
localVarPath = strings.Replace(localVarPath, "{"+"DRM_CONFIGURATION_ID"+"}", fmt.Sprintf("%v", dRMCONFIGURATIONID), -1)
33+
34+
localVarHeaderParams := make(map[string]string)
35+
localVarQueryParams := url.Values{}
36+
localVarFormParams := url.Values{}
37+
38+
// to determine the Content-Type header
39+
localVarHttpContentTypes := []string{}
40+
41+
// set Content-Type header
42+
localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes)
43+
if localVarHttpContentType != "" {
44+
localVarHeaderParams["Content-Type"] = localVarHttpContentType
45+
}
46+
47+
// to determine the Accept header
48+
localVarHttpHeaderAccepts := []string{"application/json"}
49+
50+
// set Accept header
51+
localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
52+
if localVarHttpHeaderAccept != "" {
53+
localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
54+
}
55+
56+
r, err := a.client.prepareRequest(localVarAPIOptions, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
57+
if err != nil {
58+
return localVarReturnValue, err
59+
}
60+
61+
localVarHttpResponse, err := a.client.callAPI(r)
62+
if err != nil || localVarHttpResponse == nil {
63+
return localVarReturnValue, err
64+
}
65+
66+
localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body)
67+
localVarHttpResponse.Body.Close()
68+
if err != nil {
69+
return localVarReturnValue, err
70+
}
71+
72+
// Check for common HTTP error status codes
73+
err = CheckForHttpError(localVarHttpResponse.StatusCode, localVarBody)
74+
if err != nil {
75+
return localVarReturnValue, err
76+
}
77+
78+
err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
79+
if err != nil {
80+
newErr := GenericOpenAPIError{
81+
body: localVarBody,
82+
error: err.Error(),
83+
}
84+
return localVarReturnValue, newErr
85+
}
86+
87+
return localVarReturnValue, nil
88+
}
89+
90+
type ListDrmConfigurationsParams struct {
91+
Page int32
92+
Limit int32
93+
}
94+
95+
// ListDrmConfigurations optionally accepts the APIOption of WithParams(*ListDrmConfigurationsParams).
96+
func (a *DRMConfigurationsApiService) ListDrmConfigurations(opts ...APIOption) (ListDrmConfigurationsResponse, error) {
97+
var (
98+
localVarAPIOptions = new(APIOptions)
99+
localVarHttpMethod = strings.ToUpper("Get")
100+
localVarPostBody interface{}
101+
localVarFormFileName string
102+
localVarFileName string
103+
localVarFileBytes []byte
104+
localVarReturnValue ListDrmConfigurationsResponse
105+
)
106+
107+
for _, opt := range opts {
108+
opt(localVarAPIOptions)
109+
}
110+
111+
localVarOptionals, ok := localVarAPIOptions.params.(*ListDrmConfigurationsParams)
112+
if localVarAPIOptions.params != nil && !ok {
113+
return localVarReturnValue, reportError("provided params were not of type *ListDrmConfigurationsParams")
114+
}
115+
116+
// create path and map variables
117+
localVarPath := a.client.cfg.basePath + "/video/v1/drm-configurations"
118+
119+
localVarHeaderParams := make(map[string]string)
120+
localVarQueryParams := url.Values{}
121+
localVarFormParams := url.Values{}
122+
123+
if localVarOptionals != nil && isSet(localVarOptionals.Page) {
124+
localVarQueryParams.Add("page", parameterToString(localVarOptionals.Page, ""))
125+
}
126+
if localVarOptionals != nil && isSet(localVarOptionals.Limit) {
127+
localVarQueryParams.Add("limit", parameterToString(localVarOptionals.Limit, ""))
128+
}
129+
// to determine the Content-Type header
130+
localVarHttpContentTypes := []string{}
131+
132+
// set Content-Type header
133+
localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes)
134+
if localVarHttpContentType != "" {
135+
localVarHeaderParams["Content-Type"] = localVarHttpContentType
136+
}
137+
138+
// to determine the Accept header
139+
localVarHttpHeaderAccepts := []string{"application/json"}
140+
141+
// set Accept header
142+
localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
143+
if localVarHttpHeaderAccept != "" {
144+
localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
145+
}
146+
147+
r, err := a.client.prepareRequest(localVarAPIOptions, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
148+
if err != nil {
149+
return localVarReturnValue, err
150+
}
151+
152+
localVarHttpResponse, err := a.client.callAPI(r)
153+
if err != nil || localVarHttpResponse == nil {
154+
return localVarReturnValue, err
155+
}
156+
157+
localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body)
158+
localVarHttpResponse.Body.Close()
159+
if err != nil {
160+
return localVarReturnValue, err
161+
}
162+
163+
// Check for common HTTP error status codes
164+
err = CheckForHttpError(localVarHttpResponse.StatusCode, localVarBody)
165+
if err != nil {
166+
return localVarReturnValue, err
167+
}
168+
169+
err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
170+
if err != nil {
171+
newErr := GenericOpenAPIError{
172+
body: localVarBody,
173+
error: err.Error(),
174+
}
175+
return localVarReturnValue, newErr
176+
}
177+
178+
return localVarReturnValue, nil
179+
}

client.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ type APIClient struct {
3838

3939
// API Services
4040
AssetsApi *AssetsApiService
41+
DRMConfigurationsApi *DRMConfigurationsApiService
4142
DeliveryUsageApi *DeliveryUsageApiService
4243
DimensionsApi *DimensionsApiService
4344
DirectUploadsApi *DirectUploadsApiService
@@ -74,6 +75,7 @@ func NewAPIClient(cfg *Configuration) *APIClient {
7475

7576
// API Services
7677
c.AssetsApi = (*AssetsApiService)(&c.common)
78+
c.DRMConfigurationsApi = (*DRMConfigurationsApiService)(&c.common)
7779
c.DeliveryUsageApi = (*DeliveryUsageApiService)(&c.common)
7880
c.DimensionsApi = (*DimensionsApiService)(&c.common)
7981
c.DirectUploadsApi = (*DirectUploadsApiService)(&c.common)

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.5.0",
25+
userAgent: "Mux Go | 5.6.0",
2626
}
2727
for _, opt := range opts {
2828
opt(cfg)

docs/CreateAssetRequest.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44
Name | Type | Description | Notes
55
------------ | ------------- | ------------- | -------------
66
**Input** | [**[]InputSettings**](InputSettings.md) | 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. | [optional]
7-
**PlaybackPolicy** | [**[]PlaybackPolicy**](PlaybackPolicy.md) | An array of playback policy names that you want applied to this asset and available through `playback_ids`. Options include: `\"public\"` (anyone with the playback URL can stream the asset). And `\"signed\"` (an additional access token is required to play the asset). If no playback_policy is set, the asset will have no playback IDs and will therefore not be playable. For simplicity, a single string name can be used in place of the array in the case of only one playback policy. | [optional]
7+
**PlaybackPolicy** | [**[]PlaybackPolicy**](PlaybackPolicy.md) | An array of playback policy names that you want applied to this asset and available through `playback_ids`. Options include: * `\"public\"` (anyone with the playback URL can stream the asset). * `\"signed\"` (an additional access token is required to play the asset). If no `playback_policy` is set, the asset will have no playback IDs and will therefore not be playable. For simplicity, a single string name can be used in place of the array in the case of only one playback policy. | [optional]
8+
**AdvancedPlaybackPolicies** | [**[]CreatePlaybackIdRequest**](CreatePlaybackIDRequest.md) | An array of playback policy objects that you want applied to this asset and available through `playback_ids`. `advanced_playback_policies` must be used instead of `playback_policy` when creating a DRM playback ID. | [optional]
89
**PerTitleEncode** | **bool** | | [optional]
910
**Passthrough** | **string** | Arbitrary user-supplied metadata that will be included in the asset details and related webhooks. Can be used to store your own ID for a video along with the asset. **Max: 255 characters**. | [optional]
1011
**Mp4Support** | **string** | Specify what level of support for mp4 playback. * 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). MP4 files are not produced for `none` (default). In most cases you should use our default HLS-based streaming playback (`{playback_id}.m3u8`) which can automatically adjust to viewers' connection speeds, but an mp4 can be useful for some legacy devices or downloading for offline playback. See the [Download your videos guide](https://docs.mux.com/guides/enable-static-mp4-renditions) for more information. | [optional]

docs/CreateLiveStreamRequest.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
**PlaybackPolicy** | [**[]PlaybackPolicy**](PlaybackPolicy.md) | | [optional]
7+
**AdvancedPlaybackPolicies** | [**[]CreatePlaybackIdRequest**](CreatePlaybackIDRequest.md) | An array of playback policy objects that you want applied to this asset and available through `playback_ids`. `advanced_playback_policies` must be used instead of `playback_policy` when creating a DRM playback ID. | [optional]
78
**NewAssetSettings** | [**CreateAssetRequest**](CreateAssetRequest.md) | | [optional]
89
**ReconnectWindow** | **float32** | When live streaming software disconnects from Mux, either intentionally or due to a drop in the network, the Reconnect Window is the time in seconds that Mux should wait for the streaming software to reconnect before considering the live stream finished and completing the recorded asset. Defaults to 60 seconds on the API if not specified. If not specified directly, Standard Latency streams have a Reconnect Window of 60 seconds; Reduced and Low Latency streams have a default of 0 seconds, or no Reconnect Window. For that reason, we suggest specifying a value other than zero for Reduced and Low Latency streams. Reduced and Low Latency streams with a Reconnect Window greater than zero will insert slate media into the recorded asset while waiting for the streaming software to reconnect or when there are brief interruptions in the live stream media. When using a Reconnect Window setting higher than 60 seconds with a Standard Latency stream, we highly recommend enabling slate with the `use_slate_for_standard_latency` option. | [optional] [default to 60]
910
**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]

docs/CreatePlaybackIdRequest.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
**Policy** | [**PlaybackPolicy**](PlaybackPolicy.md) | | [optional]
7+
**DrmConfigurationId** | **string** | The DRM configuration used by this playback ID. Must only be set when `policy` is set to `drm`. | [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/CreateUploadRequest.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Name | Type | Description | Notes
66
**Timeout** | **int32** | Max time in seconds for the signed upload URL to be valid. If a successful upload has not occurred before the timeout limit, the direct upload is marked `timed_out` | [optional] [default to 3600]
77
**CorsOrigin** | **string** | If the upload URL will be used in a browser, you must specify the origin in order for the signed URL to have the correct CORS headers. | [optional]
88
**NewAssetSettings** | [**CreateAssetRequest**](CreateAssetRequest.md) | | [optional]
9-
**Test** | **bool** | | [optional]
9+
**Test** | **bool** | Indicates if this is a test Direct Upload, in which case the Asset that gets created will be a `test` Asset. | [optional]
1010

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

docs/DRMConfigurationsApi.md

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
# \DRMConfigurationsApi
2+
3+
All URIs are relative to *https://api.mux.com*
4+
5+
Method | HTTP request | Description
6+
------------- | ------------- | -------------
7+
[**GetDrmConfiguration**](DRMConfigurationsApi.md#GetDrmConfiguration) | **Get** /video/v1/drm-configurations/{DRM_CONFIGURATION_ID} | Retrieve a DRM Configuration
8+
[**ListDrmConfigurations**](DRMConfigurationsApi.md#ListDrmConfigurations) | **Get** /video/v1/drm-configurations | List DRM Configurations
9+
10+
11+
# **GetDrmConfiguration**
12+
> DrmConfigurationResponse GetDrmConfiguration(ctx, dRMCONFIGURATIONID)
13+
Retrieve a DRM Configuration
14+
15+
Retrieves a single DRM Configuration.
16+
17+
### Required Parameters
18+
19+
Name | Type | Description | Notes
20+
------------- | ------------- | ------------- | -------------
21+
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
22+
**dRMCONFIGURATIONID** | **string**| The DRM Configuration ID. |
23+
24+
### Return type
25+
26+
[**DrmConfigurationResponse**](DRMConfigurationResponse.md)
27+
28+
### Authorization
29+
30+
[accessToken](../README.md#accessToken)
31+
32+
### HTTP request headers
33+
34+
- **Content-Type**: Not defined
35+
- **Accept**: application/json
36+
37+
[[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)
38+
39+
# **ListDrmConfigurations**
40+
> ListDrmConfigurationsResponse ListDrmConfigurations(ctx, optional)
41+
List DRM Configurations
42+
43+
Returns a list of DRM Configurations
44+
45+
### Required Parameters
46+
47+
Name | Type | Description | Notes
48+
------------- | ------------- | ------------- | -------------
49+
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
50+
**optional** | ***ListDrmConfigurationsOpts** | optional parameters | nil if no parameters
51+
52+
### Optional Parameters
53+
Optional parameters are passed through a pointer to a ListDrmConfigurationsOpts struct
54+
55+
Name | Type | Description | Notes
56+
------------- | ------------- | ------------- | -------------
57+
**page** | **optional.Int32**| Offset by this many pages, of the size of `limit` | [default to 1]
58+
**limit** | **optional.Int32**| Number of items to include in the response | [default to 25]
59+
60+
### Return type
61+
62+
[**ListDrmConfigurationsResponse**](ListDRMConfigurationsResponse.md)
63+
64+
### Authorization
65+
66+
[accessToken](../README.md#accessToken)
67+
68+
### HTTP request headers
69+
70+
- **Content-Type**: Not defined
71+
- **Accept**: application/json
72+
73+
[[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)
74+

docs/DrmConfiguration.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# DrmConfiguration
2+
3+
## Properties
4+
Name | Type | Description | Notes
5+
------------ | ------------- | ------------- | -------------
6+
**Id** | **string** | Unique identifier for the DRM Configuration. Max 255 characters. | [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/DrmConfigurationResponse.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# DrmConfigurationResponse
2+
3+
## Properties
4+
Name | Type | Description | Notes
5+
------------ | ------------- | ------------- | -------------
6+
**Data** | [**DrmConfiguration**](DRMConfiguration.md) | | [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+

0 commit comments

Comments
 (0)