Skip to content

Commit

Permalink
v5.6.0
Browse files Browse the repository at this point in the history
  • Loading branch information
jsanford8 committed Jun 24, 2024
1 parent bbabb8b commit fea0c23
Show file tree
Hide file tree
Showing 22 changed files with 336 additions and 12 deletions.
179 changes: 179 additions & 0 deletions api_drm_configurations.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,179 @@
// Mux Go - Copyright 2019 Mux Inc.
// NOTE: This file is auto generated. Do not edit this file manually.

package muxgo

import (
"fmt"
"io/ioutil"
"net/url"
"strings"
)

type DRMConfigurationsApiService service

func (a *DRMConfigurationsApiService) GetDrmConfiguration(dRMCONFIGURATIONID string, opts ...APIOption) (DrmConfigurationResponse, error) {
var (
localVarAPIOptions = new(APIOptions)
localVarHttpMethod = strings.ToUpper("Get")
localVarPostBody interface{}
localVarFormFileName string
localVarFileName string
localVarFileBytes []byte
localVarReturnValue DrmConfigurationResponse
)

for _, opt := range opts {
opt(localVarAPIOptions)
}

// create path and map variables
localVarPath := a.client.cfg.basePath + "/video/v1/drm-configurations/{DRM_CONFIGURATION_ID}"
localVarPath = strings.Replace(localVarPath, "{"+"DRM_CONFIGURATION_ID"+"}", fmt.Sprintf("%v", dRMCONFIGURATIONID), -1)

localVarHeaderParams := make(map[string]string)
localVarQueryParams := url.Values{}
localVarFormParams := url.Values{}

// to determine the Content-Type header
localVarHttpContentTypes := []string{}

// set Content-Type header
localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes)
if localVarHttpContentType != "" {
localVarHeaderParams["Content-Type"] = localVarHttpContentType
}

// to determine the Accept header
localVarHttpHeaderAccepts := []string{"application/json"}

// set Accept header
localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
if localVarHttpHeaderAccept != "" {
localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
}

r, err := a.client.prepareRequest(localVarAPIOptions, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
if err != nil {
return localVarReturnValue, err
}

localVarHttpResponse, err := a.client.callAPI(r)
if err != nil || localVarHttpResponse == nil {
return localVarReturnValue, err
}

localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body)
localVarHttpResponse.Body.Close()
if err != nil {
return localVarReturnValue, err
}

// Check for common HTTP error status codes
err = CheckForHttpError(localVarHttpResponse.StatusCode, localVarBody)
if err != nil {
return localVarReturnValue, err
}

err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
if err != nil {
newErr := GenericOpenAPIError{
body: localVarBody,
error: err.Error(),
}
return localVarReturnValue, newErr
}

return localVarReturnValue, nil
}

type ListDrmConfigurationsParams struct {
Page int32
Limit int32
}

// ListDrmConfigurations optionally accepts the APIOption of WithParams(*ListDrmConfigurationsParams).
func (a *DRMConfigurationsApiService) ListDrmConfigurations(opts ...APIOption) (ListDrmConfigurationsResponse, error) {
var (
localVarAPIOptions = new(APIOptions)
localVarHttpMethod = strings.ToUpper("Get")
localVarPostBody interface{}
localVarFormFileName string
localVarFileName string
localVarFileBytes []byte
localVarReturnValue ListDrmConfigurationsResponse
)

for _, opt := range opts {
opt(localVarAPIOptions)
}

localVarOptionals, ok := localVarAPIOptions.params.(*ListDrmConfigurationsParams)
if localVarAPIOptions.params != nil && !ok {
return localVarReturnValue, reportError("provided params were not of type *ListDrmConfigurationsParams")
}

// create path and map variables
localVarPath := a.client.cfg.basePath + "/video/v1/drm-configurations"

localVarHeaderParams := make(map[string]string)
localVarQueryParams := url.Values{}
localVarFormParams := url.Values{}

if localVarOptionals != nil && isSet(localVarOptionals.Page) {
localVarQueryParams.Add("page", parameterToString(localVarOptionals.Page, ""))
}
if localVarOptionals != nil && isSet(localVarOptionals.Limit) {
localVarQueryParams.Add("limit", parameterToString(localVarOptionals.Limit, ""))
}
// to determine the Content-Type header
localVarHttpContentTypes := []string{}

// set Content-Type header
localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes)
if localVarHttpContentType != "" {
localVarHeaderParams["Content-Type"] = localVarHttpContentType
}

// to determine the Accept header
localVarHttpHeaderAccepts := []string{"application/json"}

// set Accept header
localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
if localVarHttpHeaderAccept != "" {
localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
}

r, err := a.client.prepareRequest(localVarAPIOptions, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
if err != nil {
return localVarReturnValue, err
}

localVarHttpResponse, err := a.client.callAPI(r)
if err != nil || localVarHttpResponse == nil {
return localVarReturnValue, err
}

localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body)
localVarHttpResponse.Body.Close()
if err != nil {
return localVarReturnValue, err
}

// Check for common HTTP error status codes
err = CheckForHttpError(localVarHttpResponse.StatusCode, localVarBody)
if err != nil {
return localVarReturnValue, err
}

err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
if err != nil {
newErr := GenericOpenAPIError{
body: localVarBody,
error: err.Error(),
}
return localVarReturnValue, newErr
}

return localVarReturnValue, nil
}
2 changes: 2 additions & 0 deletions client.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ type APIClient struct {

// API Services
AssetsApi *AssetsApiService
DRMConfigurationsApi *DRMConfigurationsApiService
DeliveryUsageApi *DeliveryUsageApiService
DimensionsApi *DimensionsApiService
DirectUploadsApi *DirectUploadsApiService
Expand Down Expand Up @@ -74,6 +75,7 @@ func NewAPIClient(cfg *Configuration) *APIClient {

// API Services
c.AssetsApi = (*AssetsApiService)(&c.common)
c.DRMConfigurationsApi = (*DRMConfigurationsApiService)(&c.common)
c.DeliveryUsageApi = (*DeliveryUsageApiService)(&c.common)
c.DimensionsApi = (*DimensionsApiService)(&c.common)
c.DirectUploadsApi = (*DirectUploadsApiService)(&c.common)
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.5.0",
userAgent: "Mux Go | 5.6.0",
}
for _, opt := range opts {
opt(cfg)
Expand Down
3 changes: 2 additions & 1 deletion docs/CreateAssetRequest.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**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]
**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]
**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]
**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]
**PerTitleEncode** | **bool** | | [optional]
**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]
**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]
Expand Down
1 change: 1 addition & 0 deletions docs/CreateLiveStreamRequest.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**PlaybackPolicy** | [**[]PlaybackPolicy**](PlaybackPolicy.md) | | [optional]
**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]
**NewAssetSettings** | [**CreateAssetRequest**](CreateAssetRequest.md) | | [optional]
**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]
**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]
Expand Down
1 change: 1 addition & 0 deletions docs/CreatePlaybackIdRequest.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Policy** | [**PlaybackPolicy**](PlaybackPolicy.md) | | [optional]
**DrmConfigurationId** | **string** | The DRM configuration used by this playback ID. Must only be set when `policy` is set to `drm`. | [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
2 changes: 1 addition & 1 deletion docs/CreateUploadRequest.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Name | Type | Description | Notes
**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]
**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]
**NewAssetSettings** | [**CreateAssetRequest**](CreateAssetRequest.md) | | [optional]
**Test** | **bool** | | [optional]
**Test** | **bool** | Indicates if this is a test Direct Upload, in which case the Asset that gets created will be a `test` Asset. | [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
74 changes: 74 additions & 0 deletions docs/DRMConfigurationsApi.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
# \DRMConfigurationsApi

All URIs are relative to *https://api.mux.com*

Method | HTTP request | Description
------------- | ------------- | -------------
[**GetDrmConfiguration**](DRMConfigurationsApi.md#GetDrmConfiguration) | **Get** /video/v1/drm-configurations/{DRM_CONFIGURATION_ID} | Retrieve a DRM Configuration
[**ListDrmConfigurations**](DRMConfigurationsApi.md#ListDrmConfigurations) | **Get** /video/v1/drm-configurations | List DRM Configurations


# **GetDrmConfiguration**
> DrmConfigurationResponse GetDrmConfiguration(ctx, dRMCONFIGURATIONID)
Retrieve a DRM Configuration

Retrieves a single DRM Configuration.

### Required Parameters

Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
**dRMCONFIGURATIONID** | **string**| The DRM Configuration ID. |

### Return type

[**DrmConfigurationResponse**](DRMConfigurationResponse.md)

### Authorization

[accessToken](../README.md#accessToken)

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: application/json

[[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)

# **ListDrmConfigurations**
> ListDrmConfigurationsResponse ListDrmConfigurations(ctx, optional)
List DRM Configurations

Returns a list of DRM Configurations

### Required Parameters

Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
**optional** | ***ListDrmConfigurationsOpts** | optional parameters | nil if no parameters

### Optional Parameters
Optional parameters are passed through a pointer to a ListDrmConfigurationsOpts struct

Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**page** | **optional.Int32**| Offset by this many pages, of the size of `limit` | [default to 1]
**limit** | **optional.Int32**| Number of items to include in the response | [default to 25]

### Return type

[**ListDrmConfigurationsResponse**](ListDRMConfigurationsResponse.md)

### Authorization

[accessToken](../README.md#accessToken)

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: application/json

[[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)

10 changes: 10 additions & 0 deletions docs/DrmConfiguration.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# DrmConfiguration

## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Id** | **string** | Unique identifier for the DRM Configuration. Max 255 characters. | [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)


10 changes: 10 additions & 0 deletions docs/DrmConfigurationResponse.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# DrmConfigurationResponse

## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Data** | [**DrmConfiguration**](DRMConfiguration.md) | | [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)


10 changes: 10 additions & 0 deletions docs/ListDrmConfigurationsResponse.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# ListDrmConfigurationsResponse

## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Data** | [**[]DrmConfiguration**](DRMConfiguration.md) | | [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)


Loading

0 comments on commit fea0c23

Please sign in to comment.