Skip to content

Commit 2fbc5da

Browse files
authored
Regen from latest OpenAPI spec (#77)
1 parent ede40da commit 2fbc5da

36 files changed

+964
-63
lines changed

.openapi-generator/FILES

+6
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,8 @@ docs/ExportFile.md
4646
docs/ExportsApi.md
4747
docs/FilterValue.md
4848
docs/FiltersApi.md
49+
docs/GenerateTrackSubtitlesRequest.md
50+
docs/GenerateTrackSubtitlesResponse.md
4951
docs/GetAssetInputInfoResponse.md
5052
docs/GetAssetOrLiveStreamIdResponse.md
5153
docs/GetAssetOrLiveStreamIdResponseData.md
@@ -240,6 +242,8 @@ mux_python/models/error.py
240242
mux_python/models/export_date.py
241243
mux_python/models/export_file.py
242244
mux_python/models/filter_value.py
245+
mux_python/models/generate_track_subtitles_request.py
246+
mux_python/models/generate_track_subtitles_response.py
243247
mux_python/models/get_asset_input_info_response.py
244248
mux_python/models/get_asset_or_live_stream_id_response.py
245249
mux_python/models/get_asset_or_live_stream_id_response_data.py
@@ -363,4 +367,6 @@ setup.cfg
363367
setup.py
364368
test-requirements.txt
365369
test/__init__.py
370+
test/test_generate_track_subtitles_request.py
371+
test/test_generate_track_subtitles_response.py
366372
tox.ini

docs/Asset.md

+1
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ Name | Type | Description | Notes
3030
**recording_times** | [**list[AssetRecordingTimes]**](AssetRecordingTimes.md) | An array of individual live stream recording sessions. A recording session is created on each encoder connection during the live stream. Additionally any time slate media is inserted during brief interruptions in the live stream media or times when the live streaming software disconnects, a recording session representing the slate media will be added with a \"slate\" type. | [optional]
3131
**non_standard_input_reasons** | [**AssetNonStandardInputReasons**](AssetNonStandardInputReasons.md) | | [optional]
3232
**test** | **bool** | True means this live stream is a test asset. A test asset can help evaluate the Mux Video APIs without incurring any cost. There is no limit on number of test assets created. Test assets are watermarked with the Mux logo, limited to 10 seconds, and deleted after 24 hrs. | [optional]
33+
**ingest_type** | **str** | The type of ingest used to create the asset. | [optional]
3334

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

docs/AssetsApi.md

+82-4
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,12 @@ Method | HTTP request | Description
1010
[**delete_asset**](AssetsApi.md#delete_asset) | **DELETE** /video/v1/assets/{ASSET_ID} | Delete an asset
1111
[**delete_asset_playback_id**](AssetsApi.md#delete_asset_playback_id) | **DELETE** /video/v1/assets/{ASSET_ID}/playback-ids/{PLAYBACK_ID} | Delete a playback ID
1212
[**delete_asset_track**](AssetsApi.md#delete_asset_track) | **DELETE** /video/v1/assets/{ASSET_ID}/tracks/{TRACK_ID} | Delete an asset track
13+
[**generate_asset_track_subtitles**](AssetsApi.md#generate_asset_track_subtitles) | **POST** /video/v1/assets/{ASSET_ID}/tracks/{TRACK_ID}/generate-subtitles | Generate track subtitles
1314
[**get_asset**](AssetsApi.md#get_asset) | **GET** /video/v1/assets/{ASSET_ID} | Retrieve an asset
1415
[**get_asset_input_info**](AssetsApi.md#get_asset_input_info) | **GET** /video/v1/assets/{ASSET_ID}/input-info | Retrieve asset input info
1516
[**get_asset_playback_id**](AssetsApi.md#get_asset_playback_id) | **GET** /video/v1/assets/{ASSET_ID}/playback-ids/{PLAYBACK_ID} | Retrieve a playback ID
1617
[**list_assets**](AssetsApi.md#list_assets) | **GET** /video/v1/assets | List assets
17-
[**update_asset**](AssetsApi.md#update_asset) | **PATCH** /video/v1/assets/{ASSET_ID} | Update an Asset
18+
[**update_asset**](AssetsApi.md#update_asset) | **PATCH** /video/v1/assets/{ASSET_ID} | Update an asset
1819
[**update_asset_master_access**](AssetsApi.md#update_asset_master_access) | **PUT** /video/v1/assets/{ASSET_ID}/master-access | Update master access
1920
[**update_asset_mp4_support**](AssetsApi.md#update_asset_mp4_support) | **PUT** /video/v1/assets/{ASSET_ID}/mp4-support | Update MP4 support
2021

@@ -56,7 +57,7 @@ configuration = mux_python.Configuration(
5657
with mux_python.ApiClient(configuration) as api_client:
5758
# Create an instance of the API class
5859
api_instance = mux_python.AssetsApi(api_client)
59-
create_asset_request = {"input":[{"url":"https://muxed.s3.amazonaws.com/leds.mp4"}],"playback_policy":["public"]} # CreateAssetRequest |
60+
create_asset_request = {"input":[{"url":"https://muxed.s3.amazonaws.com/leds.mp4"}],"playback_policy":["public"],"encoding_tier":"baseline"} # CreateAssetRequest |
6061

6162
try:
6263
# Create an asset
@@ -462,6 +463,83 @@ void (empty response body)
462463

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

466+
# **generate_asset_track_subtitles**
467+
> GenerateTrackSubtitlesResponse generate_asset_track_subtitles(asset_id, track_id, generate_track_subtitles_request)
468+
469+
Generate track subtitles
470+
471+
Generates subtitles (captions) for a given audio track. This API can be used for up to 7 days after an asset is created.
472+
473+
### Example
474+
475+
* Basic Authentication (accessToken):
476+
```python
477+
from __future__ import print_function
478+
import time
479+
import mux_python
480+
from mux_python.rest import ApiException
481+
from pprint import pprint
482+
# Defining the host is optional and defaults to https://api.mux.com
483+
# See configuration.py for a list of all supported configuration parameters.
484+
configuration = mux_python.Configuration(
485+
host = "https://api.mux.com"
486+
)
487+
488+
# The client must configure the authentication and authorization parameters
489+
# in accordance with the API server security policy.
490+
# Examples for each auth method are provided below, use the example that
491+
# satisfies your auth use case.
492+
493+
# Configure HTTP basic authorization: accessToken
494+
configuration = mux_python.Configuration(
495+
username = 'YOUR_USERNAME',
496+
password = 'YOUR_PASSWORD'
497+
)
498+
499+
# Enter a context with an instance of the API client
500+
with mux_python.ApiClient(configuration) as api_client:
501+
# Create an instance of the API class
502+
api_instance = mux_python.AssetsApi(api_client)
503+
asset_id = 'asset_id_example' # str | The asset ID.
504+
track_id = 'track_id_example' # str | The track ID.
505+
generate_track_subtitles_request = {"generated_subtitles":[{"language_code":"en","name":"English (generated)","passthrough":"English (generated)"}]} # GenerateTrackSubtitlesRequest |
506+
507+
try:
508+
# Generate track subtitles
509+
api_response = api_instance.generate_asset_track_subtitles(asset_id, track_id, generate_track_subtitles_request)
510+
pprint(api_response)
511+
except ApiException as e:
512+
print("Exception when calling AssetsApi->generate_asset_track_subtitles: %s\n" % e)
513+
```
514+
515+
### Parameters
516+
517+
Name | Type | Description | Notes
518+
------------- | ------------- | ------------- | -------------
519+
**asset_id** | **str**| The asset ID. |
520+
**track_id** | **str**| The track ID. |
521+
**generate_track_subtitles_request** | [**GenerateTrackSubtitlesRequest**](GenerateTrackSubtitlesRequest.md)| |
522+
523+
### Return type
524+
525+
[**GenerateTrackSubtitlesResponse**](GenerateTrackSubtitlesResponse.md)
526+
527+
### Authorization
528+
529+
[accessToken](../README.md#accessToken)
530+
531+
### HTTP request headers
532+
533+
- **Content-Type**: application/json
534+
- **Accept**: application/json
535+
536+
### HTTP response details
537+
| Status code | Description | Response headers |
538+
|-------------|-------------|------------------|
539+
**201** | Created | - |
540+
541+
[[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)
542+
465543
# **get_asset**
466544
> AssetResponse get_asset(asset_id)
467545
@@ -765,7 +843,7 @@ Name | Type | Description | Notes
765843
# **update_asset**
766844
> AssetResponse update_asset(asset_id, update_asset_request)
767845
768-
Update an Asset
846+
Update an asset
769847

770848
Updates the details of an already-created Asset with the provided Asset ID. This currently supports only the `passthrough` field.
771849

@@ -803,7 +881,7 @@ with mux_python.ApiClient(configuration) as api_client:
803881
update_asset_request = {"passthrough":"Example"} # UpdateAssetRequest |
804882

805883
try:
806-
# Update an Asset
884+
# Update an asset
807885
api_response = api_instance.update_asset(asset_id, update_asset_request)
808886
pprint(api_response)
809887
except ApiException as e:

docs/CreateSimulcastTargetRequest.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
Name | Type | Description | Notes
55
------------ | ------------- | ------------- | -------------
66
**passthrough** | **str** | Arbitrary user-supplied metadata set by you when creating a simulcast target. | [optional]
7-
**stream_key** | **str** | Stream Key represents a stream identifier on the third party live streaming service to send the parent live stream to. | [optional]
8-
**url** | **str** | RTMP hostname including application name for the third party live streaming service. Example: `rtmp://live.example.com/app`. | [optional]
7+
**stream_key** | **str** | Stream Key represents a stream identifier on the third party live streaming service to send the parent live stream to. Only used for RTMP(s) simulcast destinations. | [optional]
8+
**url** | **str** | The RTMP(s) or SRT endpoint for a simulcast destination. * For RTMP(s) destinations, this should include the application name for the third party live streaming service, for example: `rtmp://live.example.com/app`. * For SRT destinations, this should be a fully formed SRT connection string, for example: `srt://srt-live.example.com:1234?streamid={stream_key}&passphrase={srt_passphrase}`. Note: SRT simulcast targets can only be used when an source is connected over SRT. | [optional]
99

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

docs/DirectUploadsApi.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ configuration = mux_python.Configuration(
121121
with mux_python.ApiClient(configuration) as api_client:
122122
# Create an instance of the API class
123123
api_instance = mux_python.DirectUploadsApi(api_client)
124-
create_upload_request = {"cors_origin":"https://example.com/","new_asset_settings":{"playback_policy":["public"],"mp4_support":"standard"}} # CreateUploadRequest |
124+
create_upload_request = {"cors_origin":"https://example.com/","new_asset_settings":{"playback_policy":["public"]}} # CreateUploadRequest |
125125

126126
try:
127127
# Create a new direct upload URL

docs/Error.md

+1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ Name | Type | Description | Notes
1111
**description** | **str** | Description of the error. | [optional]
1212
**count** | **int** | The total number of views that experienced this error. | [optional]
1313
**code** | **int** | The error code | [optional]
14+
**player_error_code** | **str** | The string version of the error code | [optional]
1415

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

docs/GenerateTrackSubtitlesRequest.md

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# GenerateTrackSubtitlesRequest
2+
3+
## Properties
4+
Name | Type | Description | Notes
5+
------------ | ------------- | ------------- | -------------
6+
**generated_subtitles** | [**list[AssetGeneratedSubtitleSettings]**](AssetGeneratedSubtitleSettings.md) | Generate subtitle tracks using automatic speech recognition with this configuration. | [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+
+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# GenerateTrackSubtitlesResponse
2+
3+
## Properties
4+
Name | Type | Description | Notes
5+
------------ | ------------- | ------------- | -------------
6+
**data** | [**Track**](Track.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+

docs/InputSettings.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Name | Type | Description | Notes
66
------------ | ------------- | ------------- | -------------
77
**url** | **str** | 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]
88
**overlay_settings** | [**InputSettingsOverlaySettings**](InputSettingsOverlaySettings.md) | | [optional]
9-
**generated_subtitles** | [**list[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]
9+
**generated_subtitles** | [**list[AssetGeneratedSubtitleSettings]**](AssetGeneratedSubtitleSettings.md) | Generate subtitle tracks using automatic speech recognition with 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]
1010
**start_time** | **float** | 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]
1111
**end_time** | **float** | The time offset in seconds from the beginning of the video, indicating the clip's ending marker. The default value is the duration of the video when not included. This parameter is only applicable for creating clips when `input.url` has `mux://assets/{asset_id}` format. | [optional]
1212
**type** | **str** | This parameter is required for `text` type tracks. | [optional]

docs/LiveStream.md

+1
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ Name | Type | Description | Notes
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
**max_continuous_duration** | **int** | The time in seconds a live stream may be continuously active before being disconnected. Defaults to 12 hours. | [optional] [default to 43200]
2727
**srt_passphrase** | **str** | Unique key used for encrypting a stream to a Mux SRT endpoint. | [optional]
28+
**active_ingest_protocol** | **str** | The protocol used for the active ingest stream. This is only set when the live stream is active. | [optional]
2829

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

0 commit comments

Comments
 (0)