diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES index 58d505d..83896fc 100644 --- a/.openapi-generator/FILES +++ b/.openapi-generator/FILES @@ -16,6 +16,7 @@ docs/CreateAssetRequest.md docs/CreateLiveStreamRequest.md docs/CreatePlaybackIDRequest.md docs/CreatePlaybackIDResponse.md +docs/CreatePlaybackRestrictionRequest.md docs/CreateSimulcastTargetRequest.md docs/CreateTrackRequest.md docs/CreateTrackResponse.md @@ -91,12 +92,16 @@ docs/OverallValues.md docs/PlaybackID.md docs/PlaybackIDApi.md docs/PlaybackPolicy.md +docs/PlaybackRestriction.md +docs/PlaybackRestrictionResponse.md +docs/PlaybackRestrictionsApi.md docs/RealTimeApi.md docs/RealTimeBreakdownValue.md docs/RealTimeHistogramTimeseriesBucket.md docs/RealTimeHistogramTimeseriesBucketValues.md docs/RealTimeHistogramTimeseriesDatapoint.md docs/RealTimeTimeseriesDatapoint.md +docs/ReferrerDomainRestriction.md docs/Score.md docs/SignalLiveStreamCompleteResponse.md docs/SigningKey.md @@ -107,7 +112,10 @@ docs/Track.md docs/URLSigningKeysApi.md docs/UpdateAssetMP4SupportRequest.md docs/UpdateAssetMasterAccessRequest.md +docs/UpdateAssetRequest.md docs/UpdateLiveStreamEmbeddedSubtitlesRequest.md +docs/UpdateLiveStreamRequest.md +docs/UpdateReferrerDomainRestrictionRequest.md docs/Upload.md docs/UploadError.md docs/UploadResponse.md @@ -128,6 +136,7 @@ mux_python/api/incidents_api.py mux_python/api/live_streams_api.py mux_python/api/metrics_api.py mux_python/api/playback_id_api.py +mux_python/api/playback_restrictions_api.py mux_python/api/real_time_api.py mux_python/api/url_signing_keys_api.py mux_python/api/video_views_api.py @@ -149,6 +158,7 @@ mux_python/models/create_asset_request.py mux_python/models/create_live_stream_request.py mux_python/models/create_playback_id_request.py mux_python/models/create_playback_id_response.py +mux_python/models/create_playback_restriction_request.py mux_python/models/create_simulcast_target_request.py mux_python/models/create_track_request.py mux_python/models/create_track_response.py @@ -214,11 +224,14 @@ mux_python/models/notification_rule.py mux_python/models/overall_values.py mux_python/models/playback_id.py mux_python/models/playback_policy.py +mux_python/models/playback_restriction.py +mux_python/models/playback_restriction_response.py mux_python/models/real_time_breakdown_value.py mux_python/models/real_time_histogram_timeseries_bucket.py mux_python/models/real_time_histogram_timeseries_bucket_values.py mux_python/models/real_time_histogram_timeseries_datapoint.py mux_python/models/real_time_timeseries_datapoint.py +mux_python/models/referrer_domain_restriction.py mux_python/models/score.py mux_python/models/signal_live_stream_complete_response.py mux_python/models/signing_key.py @@ -228,7 +241,10 @@ mux_python/models/simulcast_target_response.py mux_python/models/track.py mux_python/models/update_asset_master_access_request.py mux_python/models/update_asset_mp4_support_request.py +mux_python/models/update_asset_request.py mux_python/models/update_live_stream_embedded_subtitles_request.py +mux_python/models/update_live_stream_request.py +mux_python/models/update_referrer_domain_restriction_request.py mux_python/models/upload.py mux_python/models/upload_error.py mux_python/models/upload_response.py @@ -241,4 +257,12 @@ setup.cfg setup.py test-requirements.txt test/__init__.py +test/test_create_playback_restriction_request.py +test/test_playback_restriction.py +test/test_playback_restriction_response.py +test/test_playback_restrictions_api.py +test/test_referrer_domain_restriction.py +test/test_update_asset_request.py +test/test_update_live_stream_request.py +test/test_update_referrer_domain_restriction_request.py tox.ini diff --git a/docs/Asset.md b/docs/Asset.md index 54517cc..bde2e3e 100644 --- a/docs/Asset.md +++ b/docs/Asset.md @@ -16,7 +16,7 @@ Name | Type | Description | Notes **per_title_encode** | **bool** | | [optional] **upload_id** | **str** | Unique identifier for the Direct Upload. This is an optional parameter added when the asset is created from a direct upload. | [optional] **is_live** | **bool** | Whether the asset is created from a live stream and the live stream is currently `active` and not in `idle` state. | [optional] -**passthrough** | **str** | Arbitrary metadata set for the asset. Max 255 characters. | [optional] +**passthrough** | **str** | Arbitrary user-supplied metadata set for the asset. Max 255 characters. | [optional] **live_stream_id** | **str** | Unique identifier for the live stream. This is an optional parameter added when the asset is created from a live stream. | [optional] **master** | [**AssetMaster**](AssetMaster.md) | | [optional] **master_access** | **str** | | [optional] [default to 'none'] diff --git a/docs/AssetsApi.md b/docs/AssetsApi.md index 9d346f1..fefbec4 100644 --- a/docs/AssetsApi.md +++ b/docs/AssetsApi.md @@ -14,6 +14,7 @@ Method | HTTP request | Description [**get_asset_input_info**](AssetsApi.md#get_asset_input_info) | **GET** /video/v1/assets/{ASSET_ID}/input-info | Retrieve asset input info [**get_asset_playback_id**](AssetsApi.md#get_asset_playback_id) | **GET** /video/v1/assets/{ASSET_ID}/playback-ids/{PLAYBACK_ID} | Retrieve a playback ID [**list_assets**](AssetsApi.md#list_assets) | **GET** /video/v1/assets | List assets +[**update_asset**](AssetsApi.md#update_asset) | **PATCH** /video/v1/assets/{ASSET_ID} | Update an Asset [**update_asset_master_access**](AssetsApi.md#update_asset_master_access) | **PUT** /video/v1/assets/{ASSET_ID}/master-access | Update master access [**update_asset_mp4_support**](AssetsApi.md#update_asset_mp4_support) | **PUT** /video/v1/assets/{ASSET_ID}/mp4-support | Update MP4 support @@ -753,6 +754,81 @@ Name | Type | Description | Notes [[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) +# **update_asset** +> AssetResponse update_asset(asset_id, update_asset_request) + +Update an Asset + +Updates the details of an already-created Asset with the provided Asset ID. This currently supports only the `passthrough` field. + +### Example + +* Basic Authentication (accessToken): +```python +from __future__ import print_function +import time +import mux_python +from mux_python.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to https://api.mux.com +# See configuration.py for a list of all supported configuration parameters. +configuration = mux_python.Configuration( + host = "https://api.mux.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure HTTP basic authorization: accessToken +configuration = mux_python.Configuration( + username = 'YOUR_USERNAME', + password = 'YOUR_PASSWORD' +) + +# Enter a context with an instance of the API client +with mux_python.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = mux_python.AssetsApi(api_client) + asset_id = 'asset_id_example' # str | The asset ID. +update_asset_request = {"passthrough":"Example"} # UpdateAssetRequest | + + try: + # Update an Asset + api_response = api_instance.update_asset(asset_id, update_asset_request) + pprint(api_response) + except ApiException as e: + print("Exception when calling AssetsApi->update_asset: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **asset_id** | **str**| The asset ID. | + **update_asset_request** | [**UpdateAssetRequest**](UpdateAssetRequest.md)| | + +### Return type + +[**AssetResponse**](AssetResponse.md) + +### Authorization + +[accessToken](../README.md#accessToken) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | + +[[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) + # **update_asset_master_access** > AssetResponse update_asset_master_access(asset_id, update_asset_master_access_request) diff --git a/docs/CreateAssetRequest.md b/docs/CreateAssetRequest.md index 01039fb..598d44b 100644 --- a/docs/CreateAssetRequest.md +++ b/docs/CreateAssetRequest.md @@ -6,7 +6,7 @@ Name | Type | Description | Notes **input** | [**list[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] **playback_policy** | [**list[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] **per_title_encode** | **bool** | | [optional] -**passthrough** | **str** | Arbitrary 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] +**passthrough** | **str** | 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] **mp4_support** | **str** | Specify what level (if any) of support for mp4 playback. 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](/guides/video/download-your-videos) for more information. | [optional] **normalize_audio** | **bool** | Normalize the audio track loudness level. This parameter is only applicable to on-demand (not live) assets. | [optional] [default to False] **master_access** | **str** | Specify what level (if any) of support for master access. Master access can be enabled temporarily for your asset to be downloaded. See the [Download your videos guide](/guides/video/download-your-videos) for more information. | [optional] diff --git a/docs/CreateLiveStreamRequest.md b/docs/CreateLiveStreamRequest.md index da5bc27..56e5d50 100644 --- a/docs/CreateLiveStreamRequest.md +++ b/docs/CreateLiveStreamRequest.md @@ -9,8 +9,9 @@ Name | Type | Description | Notes **passthrough** | **str** | | [optional] **audio_only** | **bool** | Force the live stream to only process the audio track when the value is set to true. Mux drops the video track if broadcasted. | [optional] **embedded_subtitles** | [**list[LiveStreamEmbeddedSubtitleSettings]**](LiveStreamEmbeddedSubtitleSettings.md) | Describe the embedded closed caption contents of the incoming live stream. | [optional] -**reduced_latency** | **bool** | Latency is the time from when the streamer does something in real life to when you see it happen in the player. Set this if you want lower latency for your live stream. Note: Reconnect windows are incompatible with Reduced Latency and will always be set to zero (0) seconds. Read more here: https://mux.com/blog/reduced-latency-for-mux-live-streaming-now-available/ | [optional] -**low_latency** | **bool** | Latency is the time from when the streamer does something in real life to when you see it happen in the player. Setting this option will enable compatibility with the LL-HLS specification for low-latency streaming. This typically has lower latency than Reduced Latency streams, and cannot be combined with Reduced Latency. Note: Reconnect windows are incompatible with Low Latency and will always be set to zero (0) seconds. | [optional] +**reduced_latency** | **bool** | This field is deprecated. Please use latency_mode instead. Latency is the time from when the streamer transmits a frame of video to when you see it in the player. Set this if you want lower latency for your live stream. Note: Reconnect windows are incompatible with Reduced Latency and will always be set to zero (0) seconds. Read more here: https://mux.com/blog/reduced-latency-for-mux-live-streaming-now-available/ | [optional] +**low_latency** | **bool** | This field is deprecated. Please use latency_mode instead. Latency is the time from when the streamer transmits a frame of video to when you see it in the player. Setting this option will enable compatibility with the LL-HLS specification for low-latency streaming. This typically has lower latency than Reduced Latency streams, and cannot be combined with Reduced Latency. Note: Reconnect windows are incompatible with Low Latency and will always be set to zero (0) seconds. | [optional] +**latency_mode** | **str** | 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. The Low Latency value is a beta feature. Note: Reconnect windows are incompatible with Reduced Latency and Low Latency and will always be set to zero (0) seconds. Read more here: https://mux.com/blog/introducing-low-latency-live-streaming/ | [optional] **test** | **bool** | Marks the live stream as a test live stream when the value is set to true. A test live stream can help evaluate the Mux Video APIs without incurring any cost. There is no limit on number of test live streams created. Test live streams 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] **simulcast_targets** | [**list[CreateSimulcastTargetRequest]**](CreateSimulcastTargetRequest.md) | | [optional] diff --git a/docs/CreatePlaybackRestrictionRequest.md b/docs/CreatePlaybackRestrictionRequest.md new file mode 100644 index 0000000..b199127 --- /dev/null +++ b/docs/CreatePlaybackRestrictionRequest.md @@ -0,0 +1,10 @@ +# CreatePlaybackRestrictionRequest + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**referrer** | [**ReferrerDomainRestriction**](.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) + + diff --git a/docs/CreateSimulcastTargetRequest.md b/docs/CreateSimulcastTargetRequest.md index d1e809d..e754122 100644 --- a/docs/CreateSimulcastTargetRequest.md +++ b/docs/CreateSimulcastTargetRequest.md @@ -3,7 +3,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**passthrough** | **str** | Arbitrary metadata set by you when creating a simulcast target. | [optional] +**passthrough** | **str** | Arbitrary user-supplied metadata set by you when creating a simulcast target. | [optional] **stream_key** | **str** | Stream Key represents a stream identifier on the third party live streaming service to send the parent live stream to. | [optional] **url** | **str** | RTMP hostname including application name for the third party live streaming service. Example: 'rtmp://live.example.com/app'. | diff --git a/docs/CreateTrackRequest.md b/docs/CreateTrackRequest.md index 7199137..4ac4b65 100644 --- a/docs/CreateTrackRequest.md +++ b/docs/CreateTrackRequest.md @@ -9,7 +9,7 @@ Name | Type | Description | Notes **language_code** | **str** | The language code value must be a valid BCP 47 specification compliant value. For example, en for English or en-US for the US version of English. | **name** | **str** | The name of the track containing a human-readable description. This value must be unique across all the text type and subtitles text type tracks. HLS manifest will associate subtitle text track with this value. For example, set the value to \"English\" for subtitles text track with language_code as en-US. If this parameter is not included, Mux will auto-populate based on the language_code value. | [optional] **closed_captions** | **bool** | Indicates the track provides Subtitles for the Deaf or Hard-of-hearing (SDH). | [optional] -**passthrough** | **str** | Arbitrary metadata set for the track either when creating the asset or track. | [optional] +**passthrough** | **str** | Arbitrary user-supplied metadata set for the track either when creating the asset or track. | [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) diff --git a/docs/DeliveryUsageApi.md b/docs/DeliveryUsageApi.md index ded81fb..e4da830 100644 --- a/docs/DeliveryUsageApi.md +++ b/docs/DeliveryUsageApi.md @@ -8,7 +8,7 @@ Method | HTTP request | Description # **list_delivery_usage** -> ListDeliveryUsageResponse list_delivery_usage(page=page, limit=limit, asset_id=asset_id, timeframe=timeframe) +> ListDeliveryUsageResponse list_delivery_usage(page=page, limit=limit, asset_id=asset_id, live_stream_id=live_stream_id, timeframe=timeframe) List Usage @@ -46,12 +46,13 @@ with mux_python.ApiClient(configuration) as api_client: api_instance = mux_python.DeliveryUsageApi(api_client) page = 1 # int | Offset by this many pages, of the size of `limit` (optional) (default to 1) limit = 100 # int | Number of items to include in the response (optional) (default to 100) -asset_id = 'asset_id_example' # str | Filter response to return delivery usage for this asset only. (optional) +asset_id = 'asset_id_example' # str | Filter response to return delivery usage for this asset only. You cannot specify both the `asset_id` and `live_stream_id` parameters together. (optional) +live_stream_id = 'live_stream_id_example' # str | Filter response to return delivery usage for assets for this live stream. You cannot specify both the `asset_id` and `live_stream_id` parameters together. (optional) timeframe = ['timeframe_example'] # list[str] | Time window to get delivery usage information. timeframe[0] indicates the start time, timeframe[1] indicates the end time in seconds since the Unix epoch. Default time window is 1 hour representing usage from 13th to 12th hour from when the request is made. (optional) try: # List Usage - api_response = api_instance.list_delivery_usage(page=page, limit=limit, asset_id=asset_id, timeframe=timeframe) + api_response = api_instance.list_delivery_usage(page=page, limit=limit, asset_id=asset_id, live_stream_id=live_stream_id, timeframe=timeframe) pprint(api_response) except ApiException as e: print("Exception when calling DeliveryUsageApi->list_delivery_usage: %s\n" % e) @@ -63,7 +64,8 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **page** | **int**| Offset by this many pages, of the size of `limit` | [optional] [default to 1] **limit** | **int**| Number of items to include in the response | [optional] [default to 100] - **asset_id** | **str**| Filter response to return delivery usage for this asset only. | [optional] + **asset_id** | **str**| Filter response to return delivery usage for this asset only. You cannot specify both the `asset_id` and `live_stream_id` parameters together. | [optional] + **live_stream_id** | **str**| Filter response to return delivery usage for assets for this live stream. You cannot specify both the `asset_id` and `live_stream_id` parameters together. | [optional] **timeframe** | [**list[str]**](str.md)| Time window to get delivery usage information. timeframe[0] indicates the start time, timeframe[1] indicates the end time in seconds since the Unix epoch. Default time window is 1 hour representing usage from 13th to 12th hour from when the request is made. | [optional] ### Return type diff --git a/docs/DimensionsApi.md b/docs/DimensionsApi.md index d0c0ac8..da03dc5 100644 --- a/docs/DimensionsApi.md +++ b/docs/DimensionsApi.md @@ -48,8 +48,8 @@ with mux_python.ApiClient(configuration) as api_client: dimension_id = 'abcd1234' # str | ID of the Dimension limit = 25 # int | Number of items to include in the response (optional) (default to 25) page = 1 # int | Offset by this many pages, of the size of `limit` (optional) (default to 1) -filters = ['filters_example'] # list[str] | Filter key:value pairs. Must be provided as an array query string parameter (e.g. filters[]=operating_system:windows&filters[]=country:US). Possible filter names are the same as returned by the List Filters endpoint. (optional) -timeframe = ['timeframe_example'] # list[str] | 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. (optional) +filters = ['filters_example'] # list[str] | 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` (optional) +timeframe = ['timeframe_example'] # list[str] | 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` (optional) try: # Lists the values for a specific dimension @@ -66,8 +66,8 @@ Name | Type | Description | Notes **dimension_id** | **str**| ID of the Dimension | **limit** | **int**| Number of items to include in the response | [optional] [default to 25] **page** | **int**| Offset by this many pages, of the size of `limit` | [optional] [default to 1] - **filters** | [**list[str]**](str.md)| Filter key:value pairs. Must be provided as an array query string parameter (e.g. filters[]=operating_system:windows&filters[]=country:US). Possible filter names are the same as returned by the List Filters endpoint. | [optional] - **timeframe** | [**list[str]**](str.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. | [optional] + **filters** | [**list[str]**](str.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` | [optional] + **timeframe** | [**list[str]**](str.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` | [optional] ### Return type diff --git a/docs/ErrorsApi.md b/docs/ErrorsApi.md index d423ed1..dfb3525 100644 --- a/docs/ErrorsApi.md +++ b/docs/ErrorsApi.md @@ -44,8 +44,8 @@ configuration = mux_python.Configuration( with mux_python.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = mux_python.ErrorsApi(api_client) - filters = ['filters_example'] # list[str] | Filter key:value pairs. Must be provided as an array query string parameter (e.g. filters[]=operating_system:windows&filters[]=country:US). Possible filter names are the same as returned by the List Filters endpoint. (optional) -timeframe = ['timeframe_example'] # list[str] | 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. (optional) + filters = ['filters_example'] # list[str] | 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` (optional) +timeframe = ['timeframe_example'] # list[str] | 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` (optional) try: # List Errors @@ -59,8 +59,8 @@ timeframe = ['timeframe_example'] # list[str] | Timeframe window to limit result Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **filters** | [**list[str]**](str.md)| Filter key:value pairs. Must be provided as an array query string parameter (e.g. filters[]=operating_system:windows&filters[]=country:US). Possible filter names are the same as returned by the List Filters endpoint. | [optional] - **timeframe** | [**list[str]**](str.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. | [optional] + **filters** | [**list[str]**](str.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` | [optional] + **timeframe** | [**list[str]**](str.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` | [optional] ### Return type diff --git a/docs/FiltersApi.md b/docs/FiltersApi.md index 76996d7..c5bc95c 100644 --- a/docs/FiltersApi.md +++ b/docs/FiltersApi.md @@ -48,8 +48,8 @@ with mux_python.ApiClient(configuration) as api_client: filter_id = 'abcd1234' # str | ID of the Filter limit = 25 # int | Number of items to include in the response (optional) (default to 25) page = 1 # int | Offset by this many pages, of the size of `limit` (optional) (default to 1) -filters = ['filters_example'] # list[str] | Filter key:value pairs. Must be provided as an array query string parameter (e.g. filters[]=operating_system:windows&filters[]=country:US). Possible filter names are the same as returned by the List Filters endpoint. (optional) -timeframe = ['timeframe_example'] # list[str] | 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. (optional) +filters = ['filters_example'] # list[str] | 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` (optional) +timeframe = ['timeframe_example'] # list[str] | 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` (optional) try: # Lists values for a specific filter @@ -66,8 +66,8 @@ Name | Type | Description | Notes **filter_id** | **str**| ID of the Filter | **limit** | **int**| Number of items to include in the response | [optional] [default to 25] **page** | **int**| Offset by this many pages, of the size of `limit` | [optional] [default to 1] - **filters** | [**list[str]**](str.md)| Filter key:value pairs. Must be provided as an array query string parameter (e.g. filters[]=operating_system:windows&filters[]=country:US). Possible filter names are the same as returned by the List Filters endpoint. | [optional] - **timeframe** | [**list[str]**](str.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. | [optional] + **filters** | [**list[str]**](str.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` | [optional] + **timeframe** | [**list[str]**](str.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` | [optional] ### Return type diff --git a/docs/InputSettings.md b/docs/InputSettings.md index e00e58c..2cf3ffc 100644 --- a/docs/InputSettings.md +++ b/docs/InputSettings.md @@ -4,7 +4,7 @@ An array of objects that each describe an input file to be used to create the as ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**url** | **str** | The web address of the file that Mux should download and use. * For subtitles 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/) format 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. | [optional] +**url** | **str** | The URL of the file that Mux should download and use. * For subtitles 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/) format 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. | [optional] **overlay_settings** | [**InputSettingsOverlaySettings**](InputSettingsOverlaySettings.md) | | [optional] **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] **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] diff --git a/docs/InputSettingsOverlaySettings.md b/docs/InputSettingsOverlaySettings.md index 5a6dc44..cf180a1 100644 --- a/docs/InputSettingsOverlaySettings.md +++ b/docs/InputSettingsOverlaySettings.md @@ -1,6 +1,6 @@ # InputSettingsOverlaySettings -An object that describes how the image file referenced in url should be placed over the video (i.e. watermarking). +An object that describes how the image file referenced in URL should be placed over the video (i.e. watermarking). Ensure that the URL is active and persists the entire lifespan of the video object. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- diff --git a/docs/LiveStream.md b/docs/LiveStream.md index ad68588..f096572 100644 --- a/docs/LiveStream.md +++ b/docs/LiveStream.md @@ -11,12 +11,14 @@ Name | Type | Description | Notes **status** | **str** | `idle` indicates that there is no active broadcast. `active` indicates that there is an active broadcast and `disabled` status indicates that no future RTMP streams can be published. | [optional] **playback_ids** | [**list[PlaybackID]**](PlaybackID.md) | An array of Playback ID objects. Use these to create HLS playback URLs. See [Play your videos](https://docs.mux.com/guides/video/play-your-videos) for more details. | [optional] **new_asset_settings** | [**CreateAssetRequest**](CreateAssetRequest.md) | | [optional] -**passthrough** | **str** | Arbitrary metadata set for the asset. Max 255 characters. | [optional] +**passthrough** | **str** | Arbitrary user-supplied metadata set for the asset. Max 255 characters. | [optional] **audio_only** | **bool** | The live stream only processes the audio track if the value is set to true. Mux drops the video track if broadcasted. | [optional] +**embedded_subtitles** | [**list[LiveStreamEmbeddedSubtitleSettings]**](LiveStreamEmbeddedSubtitleSettings.md) | Describes the embedded closed caption configuration of the incoming live stream. | [optional] **reconnect_window** | **float** | 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. **Min**: 0.1s. **Max**: 300s (5 minutes). | [optional] [default to 60] -**reduced_latency** | **bool** | Latency is the time from when the streamer does something in real life to when you see it happen in the player. Set this if you want lower latency for your live stream. **Note**: Reconnect windows are incompatible with Reduced Latency and will always be set to zero (0) seconds. See the [Reduce live stream latency guide](https://docs.mux.com/guides/video/reduce-live-stream-latency) to understand the tradeoffs. | [optional] -**low_latency** | **bool** | Latency is the time from when the streamer does something in real life to when you see it happen in the player. Setting this option will enable compatibility with the LL-HLS specification for low-latency streaming. This typically has lower latency than Reduced Latency streams, and cannot be combined with Reduced Latency. Note: Reconnect windows are incompatible with Low Latency and will always be set to zero (0) seconds. | [optional] +**reduced_latency** | **bool** | This field is deprecated. Please use latency_mode instead. Latency is the time from when the streamer transmits a frame of video to when you see it in the player. Set this if you want lower latency for your live stream. **Note**: Reconnect windows are incompatible with Reduced Latency and will always be set to zero (0) seconds. See the [Reduce live stream latency guide](https://docs.mux.com/guides/video/reduce-live-stream-latency) to understand the tradeoffs. | [optional] +**low_latency** | **bool** | This field is deprecated. Please use latency_mode instead. Latency is the time from when the streamer transmits a frame of video to when you see it in the player. Setting this option will enable compatibility with the LL-HLS specification for low-latency streaming. This typically has lower latency than Reduced Latency streams, and cannot be combined with Reduced Latency. Note: Reconnect windows are incompatible with Low Latency and will always be set to zero (0) seconds. | [optional] **simulcast_targets** | [**list[SimulcastTarget]**](SimulcastTarget.md) | Each Simulcast Target contains configuration details to broadcast (or \"restream\") a live stream to a third-party streaming service. [See the Stream live to 3rd party platforms guide](https://docs.mux.com/guides/video/stream-live-to-3rd-party-platforms). | [optional] +**latency_mode** | **str** | 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. The Low Latency value is a beta feature. Note: Reconnect windows are incompatible with Reduced Latency and Low Latency and will always be set to zero (0) seconds. Read more here: https://mux.com/blog/introducing-low-latency-live-streaming/ | [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] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/LiveStreamEmbeddedSubtitleSettings.md b/docs/LiveStreamEmbeddedSubtitleSettings.md index b6da6af..d0e615e 100644 --- a/docs/LiveStreamEmbeddedSubtitleSettings.md +++ b/docs/LiveStreamEmbeddedSubtitleSettings.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **name** | **str** | A name for this live stream closed caption track. | [optional] -**passthrough** | **str** | Arbitrary metadata set for the live stream closed caption track. Max 255 characters. | [optional] +**passthrough** | **str** | Arbitrary user-supplied metadata set for the live stream closed caption track. Max 255 characters. | [optional] **language_code** | **str** | The language of the closed caption stream. Value must be BCP 47 compliant. | [optional] [default to 'en'] **language_channel** | **str** | CEA-608 caption channel to read data from. | [optional] [default to 'cc1'] diff --git a/docs/LiveStreamsApi.md b/docs/LiveStreamsApi.md index 02ba0f8..58e1245 100644 --- a/docs/LiveStreamsApi.md +++ b/docs/LiveStreamsApi.md @@ -18,6 +18,7 @@ Method | HTTP request | Description [**list_live_streams**](LiveStreamsApi.md#list_live_streams) | **GET** /video/v1/live-streams | List live streams [**reset_stream_key**](LiveStreamsApi.md#reset_stream_key) | **POST** /video/v1/live-streams/{LIVE_STREAM_ID}/reset-stream-key | Reset a live stream’s stream key [**signal_live_stream_complete**](LiveStreamsApi.md#signal_live_stream_complete) | **PUT** /video/v1/live-streams/{LIVE_STREAM_ID}/complete | Signal a live stream is finished +[**update_live_stream**](LiveStreamsApi.md#update_live_stream) | **PATCH** /video/v1/live-streams/{LIVE_STREAM_ID} | Update a live stream [**update_live_stream_embedded_subtitles**](LiveStreamsApi.md#update_live_stream_embedded_subtitles) | **PUT** /video/v1/live-streams/{LIVE_STREAM_ID}/embedded-subtitles | Update a live stream's embedded subtitles @@ -1044,6 +1045,81 @@ Name | Type | Description | Notes [[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) +# **update_live_stream** +> LiveStreamResponse update_live_stream(live_stream_id, update_live_stream_request) + +Update a live stream + +Updates the parameters of a previously-created live stream. This currently supports a subset of variables. Supply the live stream ID and the updated parameters and Mux will return the corresponding live stream information. The information returned will be the same after update as for subsequent get live stream requests. + +### Example + +* Basic Authentication (accessToken): +```python +from __future__ import print_function +import time +import mux_python +from mux_python.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to https://api.mux.com +# See configuration.py for a list of all supported configuration parameters. +configuration = mux_python.Configuration( + host = "https://api.mux.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure HTTP basic authorization: accessToken +configuration = mux_python.Configuration( + username = 'YOUR_USERNAME', + password = 'YOUR_PASSWORD' +) + +# Enter a context with an instance of the API client +with mux_python.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = mux_python.LiveStreamsApi(api_client) + live_stream_id = 'live_stream_id_example' # str | The live stream ID +update_live_stream_request = {"latency_mode":"standard","reconnect_window":30} # UpdateLiveStreamRequest | + + try: + # Update a live stream + api_response = api_instance.update_live_stream(live_stream_id, update_live_stream_request) + pprint(api_response) + except ApiException as e: + print("Exception when calling LiveStreamsApi->update_live_stream: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **live_stream_id** | **str**| The live stream ID | + **update_live_stream_request** | [**UpdateLiveStreamRequest**](UpdateLiveStreamRequest.md)| | + +### Return type + +[**LiveStreamResponse**](LiveStreamResponse.md) + +### Authorization + +[accessToken](../README.md#accessToken) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | + +[[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) + # **update_live_stream_embedded_subtitles** > LiveStreamResponse update_live_stream_embedded_subtitles(live_stream_id, update_live_stream_embedded_subtitles_request) diff --git a/docs/MetricsApi.md b/docs/MetricsApi.md index e73d954..fef3b21 100644 --- a/docs/MetricsApi.md +++ b/docs/MetricsApi.md @@ -49,8 +49,8 @@ with mux_python.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = mux_python.MetricsApi(api_client) metric_id = 'video_startup_time' # str | ID of the Metric -timeframe = ['timeframe_example'] # list[str] | 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. (optional) -filters = ['filters_example'] # list[str] | Filter key:value pairs. Must be provided as an array query string parameter (e.g. filters[]=operating_system:windows&filters[]=country:US). Possible filter names are the same as returned by the List Filters endpoint. (optional) +timeframe = ['timeframe_example'] # list[str] | 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` (optional) +filters = ['filters_example'] # list[str] | 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` (optional) measurement = 'measurement_example' # str | Measurement for the provided metric. If omitted, the default for the metric will be used. (optional) order_direction = 'order_direction_example' # str | Sort order. (optional) group_by = 'group_by_example' # str | Time granularity to group results by. If this value is omitted, a default granularity is chosen based on the timeframe. For timeframes of 6 hours or less, the default granularity is `ten_minutes`. Between 6 hours and 15 hours inclusive, the default granularity is `hour`. The granularity of timeframes that exceed 15 hours is `day`. This default behaviour is subject to change; it is strongly suggested that you explicitly specify the granularity. (optional) @@ -68,8 +68,8 @@ group_by = 'group_by_example' # str | Time granularity to group results by. If t Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **metric_id** | **str**| ID of the Metric | - **timeframe** | [**list[str]**](str.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. | [optional] - **filters** | [**list[str]**](str.md)| Filter key:value pairs. Must be provided as an array query string parameter (e.g. filters[]=operating_system:windows&filters[]=country:US). Possible filter names are the same as returned by the List Filters endpoint. | [optional] + **timeframe** | [**list[str]**](str.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` | [optional] + **filters** | [**list[str]**](str.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` | [optional] **measurement** | **str**| Measurement for the provided metric. If omitted, the default for the metric will be used. | [optional] **order_direction** | **str**| Sort order. | [optional] **group_by** | **str**| Time granularity to group results by. If this value is omitted, a default granularity is chosen based on the timeframe. For timeframes of 6 hours or less, the default granularity is `ten_minutes`. Between 6 hours and 15 hours inclusive, the default granularity is `hour`. The granularity of timeframes that exceed 15 hours is `day`. This default behaviour is subject to change; it is strongly suggested that you explicitly specify the granularity. | [optional] @@ -132,8 +132,8 @@ with mux_python.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = mux_python.MetricsApi(api_client) metric_id = 'video_startup_time' # str | ID of the Metric -timeframe = ['timeframe_example'] # list[str] | 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. (optional) -filters = ['filters_example'] # list[str] | Filter key:value pairs. Must be provided as an array query string parameter (e.g. filters[]=operating_system:windows&filters[]=country:US). Possible filter names are the same as returned by the List Filters endpoint. (optional) +timeframe = ['timeframe_example'] # list[str] | 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` (optional) +filters = ['filters_example'] # list[str] | 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` (optional) measurement = 'measurement_example' # str | Measurement for the provided metric. If omitted, the default for the metric will be used. (optional) try: @@ -149,8 +149,8 @@ measurement = 'measurement_example' # str | Measurement for the provided metric. Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **metric_id** | **str**| ID of the Metric | - **timeframe** | [**list[str]**](str.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. | [optional] - **filters** | [**list[str]**](str.md)| Filter key:value pairs. Must be provided as an array query string parameter (e.g. filters[]=operating_system:windows&filters[]=country:US). Possible filter names are the same as returned by the List Filters endpoint. | [optional] + **timeframe** | [**list[str]**](str.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` | [optional] + **filters** | [**list[str]**](str.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` | [optional] **measurement** | **str**| Measurement for the provided metric. If omitted, the default for the metric will be used. | [optional] ### Return type @@ -210,8 +210,8 @@ configuration = mux_python.Configuration( with mux_python.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = mux_python.MetricsApi(api_client) - timeframe = ['timeframe_example'] # list[str] | 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. (optional) -filters = ['filters_example'] # list[str] | Filter key:value pairs. Must be provided as an array query string parameter (e.g. filters[]=operating_system:windows&filters[]=country:US). Possible filter names are the same as returned by the List Filters endpoint. (optional) + timeframe = ['timeframe_example'] # list[str] | 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` (optional) +filters = ['filters_example'] # list[str] | 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` (optional) dimension = 'dimension_example' # str | Dimension the specified value belongs to (optional) value = 'value_example' # str | Value to show all available metrics for (optional) @@ -227,8 +227,8 @@ value = 'value_example' # str | Value to show all available metrics for (optiona Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **timeframe** | [**list[str]**](str.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. | [optional] - **filters** | [**list[str]**](str.md)| Filter key:value pairs. Must be provided as an array query string parameter (e.g. filters[]=operating_system:windows&filters[]=country:US). Possible filter names are the same as returned by the List Filters endpoint. | [optional] + **timeframe** | [**list[str]**](str.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` | [optional] + **filters** | [**list[str]**](str.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` | [optional] **dimension** | **str**| Dimension the specified value belongs to | [optional] **value** | **str**| Value to show all available metrics for | [optional] @@ -292,12 +292,12 @@ with mux_python.ApiClient(configuration) as api_client: metric_id = 'video_startup_time' # str | ID of the Metric group_by = 'group_by_example' # str | Breakdown value to group the results by (optional) measurement = 'measurement_example' # str | Measurement for the provided metric. If omitted, the default for the metric will be used. (optional) -filters = ['filters_example'] # list[str] | Filter key:value pairs. Must be provided as an array query string parameter (e.g. filters[]=operating_system:windows&filters[]=country:US). Possible filter names are the same as returned by the List Filters endpoint. (optional) +filters = ['filters_example'] # list[str] | 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` (optional) limit = 25 # int | Number of items to include in the response (optional) (default to 25) page = 1 # int | Offset by this many pages, of the size of `limit` (optional) (default to 1) order_by = 'order_by_example' # str | Value to order the results by (optional) order_direction = 'order_direction_example' # str | Sort order. (optional) -timeframe = ['timeframe_example'] # list[str] | 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. (optional) +timeframe = ['timeframe_example'] # list[str] | 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` (optional) try: # List breakdown values @@ -314,12 +314,12 @@ Name | Type | Description | Notes **metric_id** | **str**| ID of the Metric | **group_by** | **str**| Breakdown value to group the results by | [optional] **measurement** | **str**| Measurement for the provided metric. If omitted, the default for the metric will be used. | [optional] - **filters** | [**list[str]**](str.md)| Filter key:value pairs. Must be provided as an array query string parameter (e.g. filters[]=operating_system:windows&filters[]=country:US). Possible filter names are the same as returned by the List Filters endpoint. | [optional] + **filters** | [**list[str]**](str.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` | [optional] **limit** | **int**| Number of items to include in the response | [optional] [default to 25] **page** | **int**| Offset by this many pages, of the size of `limit` | [optional] [default to 1] **order_by** | **str**| Value to order the results by | [optional] **order_direction** | **str**| Sort order. | [optional] - **timeframe** | [**list[str]**](str.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. | [optional] + **timeframe** | [**list[str]**](str.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` | [optional] ### Return type @@ -381,7 +381,7 @@ with mux_python.ApiClient(configuration) as api_client: metric_id = 'video_startup_time' # str | ID of the Metric measurement = 'measurement_example' # str | Measurement for the provided metric. If omitted, the default for the metric will be used. (optional) order_direction = 'order_direction_example' # str | Sort order. (optional) -timeframe = ['timeframe_example'] # list[str] | 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. (optional) +timeframe = ['timeframe_example'] # list[str] | 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` (optional) try: # List Insights @@ -398,7 +398,7 @@ Name | Type | Description | Notes **metric_id** | **str**| ID of the Metric | **measurement** | **str**| Measurement for the provided metric. If omitted, the default for the metric will be used. | [optional] **order_direction** | **str**| Sort order. | [optional] - **timeframe** | [**list[str]**](str.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. | [optional] + **timeframe** | [**list[str]**](str.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` | [optional] ### Return type diff --git a/docs/PlaybackPolicy.md b/docs/PlaybackPolicy.md index fe0ea0a..93eaac3 100644 --- a/docs/PlaybackPolicy.md +++ b/docs/PlaybackPolicy.md @@ -1,6 +1,6 @@ # PlaybackPolicy -* `public` playback IDs are accessible by constructing an HLS url like `https://stream.mux.com/${PLAYBACK_ID}` * `signed` playback IDS should be used with tokens `https://stream.mux.com/${PLAYBACK_ID}?token={TOKEN}`. See [Secure video playback](https://docs.mux.com/guides/video/secure-video-playback) for details about creating tokens. +* `public` playback IDs are accessible by constructing an HLS URL like `https://stream.mux.com/${PLAYBACK_ID}` * `signed` playback IDS should be used with tokens `https://stream.mux.com/${PLAYBACK_ID}?token={TOKEN}`. See [Secure video playback](https://docs.mux.com/guides/video/secure-video-playback) for details about creating tokens. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- diff --git a/docs/PlaybackRestriction.md b/docs/PlaybackRestriction.md new file mode 100644 index 0000000..202fd63 --- /dev/null +++ b/docs/PlaybackRestriction.md @@ -0,0 +1,13 @@ +# PlaybackRestriction + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | Unique identifier for the Playback Restriction. Max 255 characters. | [optional] +**created_at** | **str** | Time the Playback Restriction was created, defined as a Unix timestamp (seconds since epoch). | [optional] +**updated_at** | **str** | Time the Playback Restriction was last updated, defined as a Unix timestamp (seconds since epoch). | [optional] +**referrer** | [**ReferrerDomainRestriction**](ReferrerDomainRestriction.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) + + diff --git a/docs/PlaybackRestrictionResponse.md b/docs/PlaybackRestrictionResponse.md new file mode 100644 index 0000000..1e12741 --- /dev/null +++ b/docs/PlaybackRestrictionResponse.md @@ -0,0 +1,9 @@ +# PlaybackRestrictionResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/PlaybackRestrictionsApi.md b/docs/PlaybackRestrictionsApi.md new file mode 100644 index 0000000..736597d --- /dev/null +++ b/docs/PlaybackRestrictionsApi.md @@ -0,0 +1,381 @@ +# mux_python.PlaybackRestrictionsApi + +All URIs are relative to *https://api.mux.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**create_playback_restriction**](PlaybackRestrictionsApi.md#create_playback_restriction) | **POST** /video/v1/playback-restrictions | Create a Playback Restriction +[**delete_playback_restriction**](PlaybackRestrictionsApi.md#delete_playback_restriction) | **DELETE** /video/v1/playback-restrictions/{PLAYBACK_RESTRICTION_ID} | Delete a Playback Restriction +[**get_playback_restriction**](PlaybackRestrictionsApi.md#get_playback_restriction) | **GET** /video/v1/playback-restrictions/{PLAYBACK_RESTRICTION_ID} | Retrieve a Playback Restriction +[**list_playback_restrictions**](PlaybackRestrictionsApi.md#list_playback_restrictions) | **GET** /video/v1/playback-restrictions | List Playback Restrictions +[**update_referrer_domain_restriction**](PlaybackRestrictionsApi.md#update_referrer_domain_restriction) | **PUT** /video/v1/playback-restrictions/{PLAYBACK_RESTRICTION_ID}/referrer | Update the Referrer Playback Restriction + + +# **create_playback_restriction** +> PlaybackRestriction create_playback_restriction(create_playback_restriction_request) + +Create a Playback Restriction + +Create a new Playback Restriction. + +### Example + +* Basic Authentication (accessToken): +```python +from __future__ import print_function +import time +import mux_python +from mux_python.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to https://api.mux.com +# See configuration.py for a list of all supported configuration parameters. +configuration = mux_python.Configuration( + host = "https://api.mux.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure HTTP basic authorization: accessToken +configuration = mux_python.Configuration( + username = 'YOUR_USERNAME', + password = 'YOUR_PASSWORD' +) + +# Enter a context with an instance of the API client +with mux_python.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = mux_python.PlaybackRestrictionsApi(api_client) + create_playback_restriction_request = {"referrer":{"allowed_domains":["*.example.com"],"allow_no_referrer":true}} # CreatePlaybackRestrictionRequest | + + try: + # Create a Playback Restriction + api_response = api_instance.create_playback_restriction(create_playback_restriction_request) + pprint(api_response) + except ApiException as e: + print("Exception when calling PlaybackRestrictionsApi->create_playback_restriction: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **create_playback_restriction_request** | [**CreatePlaybackRestrictionRequest**](CreatePlaybackRestrictionRequest.md)| | + +### Return type + +[**PlaybackRestriction**](PlaybackRestriction.md) + +### Authorization + +[accessToken](../README.md#accessToken) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | Created | - | + +[[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) + +# **delete_playback_restriction** +> delete_playback_restriction(playback_restriction_id) + +Delete a Playback Restriction + +Deletes a single Playback Restriction. + +### Example + +* Basic Authentication (accessToken): +```python +from __future__ import print_function +import time +import mux_python +from mux_python.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to https://api.mux.com +# See configuration.py for a list of all supported configuration parameters. +configuration = mux_python.Configuration( + host = "https://api.mux.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure HTTP basic authorization: accessToken +configuration = mux_python.Configuration( + username = 'YOUR_USERNAME', + password = 'YOUR_PASSWORD' +) + +# Enter a context with an instance of the API client +with mux_python.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = mux_python.PlaybackRestrictionsApi(api_client) + playback_restriction_id = 'playback_restriction_id_example' # str | ID of the Playback Restriction. + + try: + # Delete a Playback Restriction + api_instance.delete_playback_restriction(playback_restriction_id) + except ApiException as e: + print("Exception when calling PlaybackRestrictionsApi->delete_playback_restriction: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **playback_restriction_id** | **str**| ID of the Playback Restriction. | + +### Return type + +void (empty response body) + +### Authorization + +[accessToken](../README.md#accessToken) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | No Content | - | + +[[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) + +# **get_playback_restriction** +> PlaybackRestriction get_playback_restriction(playback_restriction_id) + +Retrieve a Playback Restriction + +Retrieves a Playback Restriction associated with the unique identifier. + +### Example + +* Basic Authentication (accessToken): +```python +from __future__ import print_function +import time +import mux_python +from mux_python.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to https://api.mux.com +# See configuration.py for a list of all supported configuration parameters. +configuration = mux_python.Configuration( + host = "https://api.mux.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure HTTP basic authorization: accessToken +configuration = mux_python.Configuration( + username = 'YOUR_USERNAME', + password = 'YOUR_PASSWORD' +) + +# Enter a context with an instance of the API client +with mux_python.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = mux_python.PlaybackRestrictionsApi(api_client) + playback_restriction_id = 'playback_restriction_id_example' # str | ID of the Playback Restriction. + + try: + # Retrieve a Playback Restriction + api_response = api_instance.get_playback_restriction(playback_restriction_id) + pprint(api_response) + except ApiException as e: + print("Exception when calling PlaybackRestrictionsApi->get_playback_restriction: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **playback_restriction_id** | **str**| ID of the Playback Restriction. | + +### Return type + +[**PlaybackRestriction**](PlaybackRestriction.md) + +### Authorization + +[accessToken](../README.md#accessToken) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | + +[[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) + +# **list_playback_restrictions** +> list[PlaybackRestriction] list_playback_restrictions(page=page, limit=limit) + +List Playback Restrictions + +Returns a list of all Playback Restrictions. + +### Example + +* Basic Authentication (accessToken): +```python +from __future__ import print_function +import time +import mux_python +from mux_python.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to https://api.mux.com +# See configuration.py for a list of all supported configuration parameters. +configuration = mux_python.Configuration( + host = "https://api.mux.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure HTTP basic authorization: accessToken +configuration = mux_python.Configuration( + username = 'YOUR_USERNAME', + password = 'YOUR_PASSWORD' +) + +# Enter a context with an instance of the API client +with mux_python.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = mux_python.PlaybackRestrictionsApi(api_client) + page = 1 # int | Offset by this many pages, of the size of `limit` (optional) (default to 1) +limit = 25 # int | Number of items to include in the response (optional) (default to 25) + + try: + # List Playback Restrictions + api_response = api_instance.list_playback_restrictions(page=page, limit=limit) + pprint(api_response) + except ApiException as e: + print("Exception when calling PlaybackRestrictionsApi->list_playback_restrictions: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **page** | **int**| Offset by this many pages, of the size of `limit` | [optional] [default to 1] + **limit** | **int**| Number of items to include in the response | [optional] [default to 25] + +### Return type + +[**list[PlaybackRestriction]**](PlaybackRestriction.md) + +### Authorization + +[accessToken](../README.md#accessToken) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | + +[[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) + +# **update_referrer_domain_restriction** +> PlaybackRestriction update_referrer_domain_restriction(playback_restriction_id, body) + +Update the Referrer Playback Restriction + +Allows you to modify the list of domians or change how Mux validates playback requests without the `Referer` HTTP header. The Referrer restriction fully replaces the old list with this new list of domains. + +### Example + +* Basic Authentication (accessToken): +```python +from __future__ import print_function +import time +import mux_python +from mux_python.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to https://api.mux.com +# See configuration.py for a list of all supported configuration parameters. +configuration = mux_python.Configuration( + host = "https://api.mux.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure HTTP basic authorization: accessToken +configuration = mux_python.Configuration( + username = 'YOUR_USERNAME', + password = 'YOUR_PASSWORD' +) + +# Enter a context with an instance of the API client +with mux_python.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = mux_python.PlaybackRestrictionsApi(api_client) + playback_restriction_id = 'playback_restriction_id_example' # str | ID of the Playback Restriction. +body = {"allowed_domains":["*.example.com"],"allow_no_referrer":true} # ReferrerDomainRestriction | + + try: + # Update the Referrer Playback Restriction + api_response = api_instance.update_referrer_domain_restriction(playback_restriction_id, body) + pprint(api_response) + except ApiException as e: + print("Exception when calling PlaybackRestrictionsApi->update_referrer_domain_restriction: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **playback_restriction_id** | **str**| ID of the Playback Restriction. | + **body** | **ReferrerDomainRestriction**| | + +### Return type + +[**PlaybackRestriction**](PlaybackRestriction.md) + +### Authorization + +[accessToken](../README.md#accessToken) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | + +[[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) + diff --git a/docs/RealTimeApi.md b/docs/RealTimeApi.md index 51571bc..ccc88ed 100644 --- a/docs/RealTimeApi.md +++ b/docs/RealTimeApi.md @@ -51,7 +51,7 @@ with mux_python.ApiClient(configuration) as api_client: realtime_metric_id = 'current-concurrent-viewers' # str | ID of the Realtime Metric dimension = 'dimension_example' # str | Dimension the specified value belongs to (optional) timestamp = 3.4 # float | Timestamp to limit results by. This value must be provided as a unix timestamp. Defaults to the current unix timestamp. (optional) -filters = ['filters_example'] # list[str] | Filter key:value pairs. Must be provided as an array query string parameter (e.g. filters[]=operating_system:windows&filters[]=country:US). Possible filter names are the same as returned by the List Filters endpoint. (optional) +filters = ['filters_example'] # list[str] | 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` (optional) order_by = 'order_by_example' # str | Value to order the results by (optional) order_direction = 'order_direction_example' # str | Sort order. (optional) @@ -70,7 +70,7 @@ Name | Type | Description | Notes **realtime_metric_id** | **str**| ID of the Realtime Metric | **dimension** | **str**| Dimension the specified value belongs to | [optional] **timestamp** | **float**| Timestamp to limit results by. This value must be provided as a unix timestamp. Defaults to the current unix timestamp. | [optional] - **filters** | [**list[str]**](str.md)| Filter key:value pairs. Must be provided as an array query string parameter (e.g. filters[]=operating_system:windows&filters[]=country:US). Possible filter names are the same as returned by the List Filters endpoint. | [optional] + **filters** | [**list[str]**](str.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` | [optional] **order_by** | **str**| Value to order the results by | [optional] **order_direction** | **str**| Sort order. | [optional] @@ -132,7 +132,7 @@ with mux_python.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = mux_python.RealTimeApi(api_client) realtime_histogram_metric_id = 'video-startup-time' # str | ID of the Realtime Histogram Metric -filters = ['filters_example'] # list[str] | Filter key:value pairs. Must be provided as an array query string parameter (e.g. filters[]=operating_system:windows&filters[]=country:US). Possible filter names are the same as returned by the List Filters endpoint. (optional) +filters = ['filters_example'] # list[str] | 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` (optional) try: # Get Real-Time Histogram Timeseries @@ -147,7 +147,7 @@ filters = ['filters_example'] # list[str] | Filter key:value pairs. Must be prov Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **realtime_histogram_metric_id** | **str**| ID of the Realtime Histogram Metric | - **filters** | [**list[str]**](str.md)| Filter key:value pairs. Must be provided as an array query string parameter (e.g. filters[]=operating_system:windows&filters[]=country:US). Possible filter names are the same as returned by the List Filters endpoint. | [optional] + **filters** | [**list[str]**](str.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` | [optional] ### Return type @@ -207,7 +207,7 @@ with mux_python.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = mux_python.RealTimeApi(api_client) realtime_metric_id = 'current-concurrent-viewers' # str | ID of the Realtime Metric -filters = ['filters_example'] # list[str] | Filter key:value pairs. Must be provided as an array query string parameter (e.g. filters[]=operating_system:windows&filters[]=country:US). Possible filter names are the same as returned by the List Filters endpoint. (optional) +filters = ['filters_example'] # list[str] | 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` (optional) try: # Get Real-Time Timeseries @@ -222,7 +222,7 @@ filters = ['filters_example'] # list[str] | Filter key:value pairs. Must be prov Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **realtime_metric_id** | **str**| ID of the Realtime Metric | - **filters** | [**list[str]**](str.md)| Filter key:value pairs. Must be provided as an array query string parameter (e.g. filters[]=operating_system:windows&filters[]=country:US). Possible filter names are the same as returned by the List Filters endpoint. | [optional] + **filters** | [**list[str]**](str.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` | [optional] ### Return type diff --git a/docs/ReferrerDomainRestriction.md b/docs/ReferrerDomainRestriction.md new file mode 100644 index 0000000..ecbc9be --- /dev/null +++ b/docs/ReferrerDomainRestriction.md @@ -0,0 +1,12 @@ +# ReferrerDomainRestriction + +A list of domains allowed to play your videos. +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**allowed_domains** | **list[str]** | List of domains allowed to play videos. Possible values are * `[]` Empty Array indicates deny video playback requests for all domains * `[\"*\"]` A Single Wildcard `*` entry means allow video playback requests from any domain * `[\"*.example.com\", \"foo.com\"]` A list of up to 10 domains or valid dns-style wildcards | [optional] +**allow_no_referrer** | **bool** | A boolean to determine whether to allow or deny HTTP requests without `Referer` HTTP request header. Playback requests coming from non-web/native applications like iOS, Android or smart TVs will not have a `Referer` HTTP header. Set this value to `true` to allow these playback requests. | [optional] [default to False] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/SimulcastTarget.md b/docs/SimulcastTarget.md index 3380953..1ea8951 100644 --- a/docs/SimulcastTarget.md +++ b/docs/SimulcastTarget.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **id** | **str** | ID of the Simulcast Target | [optional] -**passthrough** | **str** | Arbitrary Metadata set when creating a simulcast target. | [optional] +**passthrough** | **str** | Arbitrary user-supplied metadata set when creating a simulcast target. | [optional] **status** | **str** | The current status of the simulcast target. See Statuses below for detailed description. * `idle`: Default status. When the parent live stream is in disconnected status, simulcast targets will be idle state. * `starting`: The simulcast target transitions into this state when the parent live stream transition into connected state. * `broadcasting`: The simulcast target has successfully connected to the third party live streaming service and is pushing video to that service. * `errored`: The simulcast target encountered an error either while attempting to connect to the third party live streaming service, or mid-broadcasting. Compared to other errored statuses in the Mux Video API, a simulcast may transition back into the broadcasting state if a connection with the service can be re-established. | [optional] **stream_key** | **str** | Stream Key represents an stream identifier for the third party live streaming service to simulcast the parent live stream too. | [optional] **url** | **str** | RTMP hostname including the application name for the third party live streaming service. | [optional] diff --git a/docs/Track.md b/docs/Track.md index 8f987b4..4fa40c9 100644 --- a/docs/Track.md +++ b/docs/Track.md @@ -15,7 +15,7 @@ Name | Type | Description | Notes **language_code** | **str** | The language code value represents [BCP 47](https://tools.ietf.org/html/bcp47) specification compliant value. For example, `en` for English or `en-US` for the US version of English. This parameter is set for `text` type and `subtitles` text type track. | [optional] **name** | **str** | The name of the track containing a human-readable description. The hls manifest will associate a subtitle text track with this value. For example, the value is \"English\" for subtitles text track for the `language_code` value of `en-US`. This parameter is set for the `text` type and `subtitles` text type track. | [optional] **closed_captions** | **bool** | Indicates the track provides Subtitles for the Deaf or Hard-of-hearing (SDH). This parameter is set for the `text` type and `subtitles` text type track. | [optional] -**passthrough** | **str** | Arbitrary metadata set for the track either when creating the asset or track. This parameter is set for `text` type and `subtitles` text type track. Max 255 characters. | [optional] +**passthrough** | **str** | Arbitrary user-supplied metadata set for the track either when creating the asset or track. This parameter is set for `text` type and `subtitles` text type track. 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) diff --git a/docs/UpdateAssetRequest.md b/docs/UpdateAssetRequest.md new file mode 100644 index 0000000..f56ff65 --- /dev/null +++ b/docs/UpdateAssetRequest.md @@ -0,0 +1,10 @@ +# UpdateAssetRequest + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**passthrough** | **str** | Arbitrary metadata set for the Asset. Max 255 characters. In order to clear this value, the field should be included with an empty string value. | [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) + + diff --git a/docs/UpdateLiveStreamRequest.md b/docs/UpdateLiveStreamRequest.md new file mode 100644 index 0000000..5ae7e4f --- /dev/null +++ b/docs/UpdateLiveStreamRequest.md @@ -0,0 +1,12 @@ +# UpdateLiveStreamRequest + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**passthrough** | **str** | Arbitrary user-supplied metadata set for the live stream. Max 255 characters. In order to clear this value, the field should be included with an empty-string value. | [optional] +**latency_mode** | **str** | 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. The Low Latency value is a beta feature. Note: Reconnect windows are incompatible with Reduced Latency and Low Latency and will always be set to zero (0) seconds. Read more here: https://mux.com/blog/introducing-low-latency-live-streaming/ | [optional] +**reconnect_window** | **float** | 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. | [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) + + diff --git a/docs/UpdateReferrerDomainRestrictionRequest.md b/docs/UpdateReferrerDomainRestrictionRequest.md new file mode 100644 index 0000000..141a21a --- /dev/null +++ b/docs/UpdateReferrerDomainRestrictionRequest.md @@ -0,0 +1,9 @@ +# UpdateReferrerDomainRestrictionRequest + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/VideoViewsApi.md b/docs/VideoViewsApi.md index f98676d..30fa21c 100644 --- a/docs/VideoViewsApi.md +++ b/docs/VideoViewsApi.md @@ -123,8 +123,8 @@ page = 1 # int | Offset by this many pages, of the size of `limit` (optional) (d viewer_id = 'viewer_id_example' # str | Viewer ID to filter results by. This value may be provided by the integration, or may be created by Mux. (optional) error_id = 56 # int | Filter video views by the provided error ID (as returned in the error_type_id field in the list video views endpoint). If you provide any as the error ID, this will filter the results to those with any error. (optional) order_direction = 'order_direction_example' # str | Sort order. (optional) -filters = ['filters_example'] # list[str] | Filter key:value pairs. Must be provided as an array query string parameter (e.g. filters[]=operating_system:windows&filters[]=country:US). Possible filter names are the same as returned by the List Filters endpoint. (optional) -timeframe = ['timeframe_example'] # list[str] | 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. (optional) +filters = ['filters_example'] # list[str] | 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` (optional) +timeframe = ['timeframe_example'] # list[str] | 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` (optional) try: # List Video Views @@ -143,8 +143,8 @@ Name | Type | Description | Notes **viewer_id** | **str**| Viewer ID to filter results by. This value may be provided by the integration, or may be created by Mux. | [optional] **error_id** | **int**| Filter video views by the provided error ID (as returned in the error_type_id field in the list video views endpoint). If you provide any as the error ID, this will filter the results to those with any error. | [optional] **order_direction** | **str**| Sort order. | [optional] - **filters** | [**list[str]**](str.md)| Filter key:value pairs. Must be provided as an array query string parameter (e.g. filters[]=operating_system:windows&filters[]=country:US). Possible filter names are the same as returned by the List Filters endpoint. | [optional] - **timeframe** | [**list[str]**](str.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. | [optional] + **filters** | [**list[str]**](str.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` | [optional] + **timeframe** | [**list[str]**](str.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` | [optional] ### Return type diff --git a/gen/generator-config.json b/gen/generator-config.json index 82ba408..22b5292 100644 --- a/gen/generator-config.json +++ b/gen/generator-config.json @@ -2,5 +2,5 @@ "!!source": "https://github.com/OpenAPITools/openapi-generator/blob/master/docs/generators/python.md", "packageName": "mux_python", "projectName": "mux_python", - "packageVersion": "3.1.0" + "packageVersion": "3.2.0" } diff --git a/mux_python/__init__.py b/mux_python/__init__.py index 3fcffab..0d35b78 100644 --- a/mux_python/__init__.py +++ b/mux_python/__init__.py @@ -15,7 +15,7 @@ from __future__ import absolute_import -__version__ = "3.0.0" +__version__ = "3.2.0" # import apis into sdk package from mux_python.api.assets_api import AssetsApi @@ -29,6 +29,7 @@ from mux_python.api.live_streams_api import LiveStreamsApi from mux_python.api.metrics_api import MetricsApi from mux_python.api.playback_id_api import PlaybackIDApi +from mux_python.api.playback_restrictions_api import PlaybackRestrictionsApi from mux_python.api.real_time_api import RealTimeApi from mux_python.api.url_signing_keys_api import URLSigningKeysApi from mux_python.api.video_views_api import VideoViewsApi @@ -57,6 +58,7 @@ from mux_python.models.create_live_stream_request import CreateLiveStreamRequest from mux_python.models.create_playback_id_request import CreatePlaybackIDRequest from mux_python.models.create_playback_id_response import CreatePlaybackIDResponse +from mux_python.models.create_playback_restriction_request import CreatePlaybackRestrictionRequest from mux_python.models.create_simulcast_target_request import CreateSimulcastTargetRequest from mux_python.models.create_track_request import CreateTrackRequest from mux_python.models.create_track_response import CreateTrackResponse @@ -122,11 +124,14 @@ from mux_python.models.overall_values import OverallValues from mux_python.models.playback_id import PlaybackID from mux_python.models.playback_policy import PlaybackPolicy +from mux_python.models.playback_restriction import PlaybackRestriction +from mux_python.models.playback_restriction_response import PlaybackRestrictionResponse from mux_python.models.real_time_breakdown_value import RealTimeBreakdownValue from mux_python.models.real_time_histogram_timeseries_bucket import RealTimeHistogramTimeseriesBucket from mux_python.models.real_time_histogram_timeseries_bucket_values import RealTimeHistogramTimeseriesBucketValues from mux_python.models.real_time_histogram_timeseries_datapoint import RealTimeHistogramTimeseriesDatapoint from mux_python.models.real_time_timeseries_datapoint import RealTimeTimeseriesDatapoint +from mux_python.models.referrer_domain_restriction import ReferrerDomainRestriction from mux_python.models.score import Score from mux_python.models.signal_live_stream_complete_response import SignalLiveStreamCompleteResponse from mux_python.models.signing_key import SigningKey @@ -136,7 +141,10 @@ from mux_python.models.track import Track from mux_python.models.update_asset_mp4_support_request import UpdateAssetMP4SupportRequest from mux_python.models.update_asset_master_access_request import UpdateAssetMasterAccessRequest +from mux_python.models.update_asset_request import UpdateAssetRequest from mux_python.models.update_live_stream_embedded_subtitles_request import UpdateLiveStreamEmbeddedSubtitlesRequest +from mux_python.models.update_live_stream_request import UpdateLiveStreamRequest +from mux_python.models.update_referrer_domain_restriction_request import UpdateReferrerDomainRestrictionRequest from mux_python.models.upload import Upload from mux_python.models.upload_error import UploadError from mux_python.models.upload_response import UploadResponse diff --git a/mux_python/api/__init__.py b/mux_python/api/__init__.py index 7030ad2..f8fe82f 100644 --- a/mux_python/api/__init__.py +++ b/mux_python/api/__init__.py @@ -14,6 +14,7 @@ from mux_python.api.live_streams_api import LiveStreamsApi from mux_python.api.metrics_api import MetricsApi from mux_python.api.playback_id_api import PlaybackIDApi +from mux_python.api.playback_restrictions_api import PlaybackRestrictionsApi from mux_python.api.real_time_api import RealTimeApi from mux_python.api.url_signing_keys_api import URLSigningKeysApi from mux_python.api.video_views_api import VideoViewsApi diff --git a/mux_python/api/assets_api.py b/mux_python/api/assets_api.py index 7da7213..a06db3b 100644 --- a/mux_python/api/assets_api.py +++ b/mux_python/api/assets_api.py @@ -1445,6 +1445,156 @@ def list_assets_with_http_info(self, **kwargs): # noqa: E501 collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth')) + def update_asset(self, asset_id, update_asset_request, **kwargs): # noqa: E501 + """Update an Asset # noqa: E501 + + Updates the details of an already-created Asset with the provided Asset ID. This currently supports only the `passthrough` field. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.update_asset(asset_id, update_asset_request, async_req=True) + >>> result = thread.get() + + :param asset_id: The asset ID. (required) + :type asset_id: str + :param update_asset_request: (required) + :type update_asset_request: UpdateAssetRequest + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: AssetResponse + """ + kwargs['_return_http_data_only'] = True + return self.update_asset_with_http_info(asset_id, update_asset_request, **kwargs) # noqa: E501 + + def update_asset_with_http_info(self, asset_id, update_asset_request, **kwargs): # noqa: E501 + """Update an Asset # noqa: E501 + + Updates the details of an already-created Asset with the provided Asset ID. This currently supports only the `passthrough` field. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.update_asset_with_http_info(asset_id, update_asset_request, async_req=True) + >>> result = thread.get() + + :param asset_id: The asset ID. (required) + :type asset_id: str + :param update_asset_request: (required) + :type update_asset_request: UpdateAssetRequest + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(AssetResponse, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'asset_id', + 'update_asset_request' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method update_asset" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'asset_id' is set + if self.api_client.client_side_validation and ('asset_id' not in local_var_params or # noqa: E501 + local_var_params['asset_id'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `asset_id` when calling `update_asset`") # noqa: E501 + # verify the required parameter 'update_asset_request' is set + if self.api_client.client_side_validation and ('update_asset_request' not in local_var_params or # noqa: E501 + local_var_params['update_asset_request'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `update_asset_request` when calling `update_asset`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'asset_id' in local_var_params: + path_params['ASSET_ID'] = local_var_params['asset_id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'update_asset_request' in local_var_params: + body_params = local_var_params['update_asset_request'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['accessToken'] # noqa: E501 + + response_types_map = { + 200: "AssetResponse", + } + + return self.api_client.call_api( + '/video/v1/assets/{ASSET_ID}', 'PATCH', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + def update_asset_master_access(self, asset_id, update_asset_master_access_request, **kwargs): # noqa: E501 """Update master access # noqa: E501 diff --git a/mux_python/api/delivery_usage_api.py b/mux_python/api/delivery_usage_api.py index 4c5b52f..a8d9720 100644 --- a/mux_python/api/delivery_usage_api.py +++ b/mux_python/api/delivery_usage_api.py @@ -51,8 +51,10 @@ def list_delivery_usage(self, **kwargs): # noqa: E501 :type page: int :param limit: Number of items to include in the response :type limit: int - :param asset_id: Filter response to return delivery usage for this asset only. + :param asset_id: Filter response to return delivery usage for this asset only. You cannot specify both the `asset_id` and `live_stream_id` parameters together. :type asset_id: str + :param live_stream_id: Filter response to return delivery usage for assets for this live stream. You cannot specify both the `asset_id` and `live_stream_id` parameters together. + :type live_stream_id: str :param timeframe: Time window to get delivery usage information. timeframe[0] indicates the start time, timeframe[1] indicates the end time in seconds since the Unix epoch. Default time window is 1 hour representing usage from 13th to 12th hour from when the request is made. :type timeframe: list[str] :param async_req: Whether to execute the request asynchronously. @@ -87,8 +89,10 @@ def list_delivery_usage_with_http_info(self, **kwargs): # noqa: E501 :type page: int :param limit: Number of items to include in the response :type limit: int - :param asset_id: Filter response to return delivery usage for this asset only. + :param asset_id: Filter response to return delivery usage for this asset only. You cannot specify both the `asset_id` and `live_stream_id` parameters together. :type asset_id: str + :param live_stream_id: Filter response to return delivery usage for assets for this live stream. You cannot specify both the `asset_id` and `live_stream_id` parameters together. + :type live_stream_id: str :param timeframe: Time window to get delivery usage information. timeframe[0] indicates the start time, timeframe[1] indicates the end time in seconds since the Unix epoch. Default time window is 1 hour representing usage from 13th to 12th hour from when the request is made. :type timeframe: list[str] :param async_req: Whether to execute the request asynchronously. @@ -120,6 +124,7 @@ def list_delivery_usage_with_http_info(self, **kwargs): # noqa: E501 'page', 'limit', 'asset_id', + 'live_stream_id', 'timeframe' ] all_params.extend( @@ -152,6 +157,8 @@ def list_delivery_usage_with_http_info(self, **kwargs): # noqa: E501 query_params.append(('limit', local_var_params['limit'])) # noqa: E501 if 'asset_id' in local_var_params and local_var_params['asset_id'] is not None: # noqa: E501 query_params.append(('asset_id', local_var_params['asset_id'])) # noqa: E501 + if 'live_stream_id' in local_var_params and local_var_params['live_stream_id'] is not None: # noqa: E501 + query_params.append(('live_stream_id', local_var_params['live_stream_id'])) # noqa: E501 if 'timeframe' in local_var_params and local_var_params['timeframe'] is not None: # noqa: E501 query_params.append(('timeframe[]', local_var_params['timeframe'])) # noqa: E501 collection_formats['timeframe[]'] = 'multi' # noqa: E501 diff --git a/mux_python/api/dimensions_api.py b/mux_python/api/dimensions_api.py index 28ac5e3..56fcca4 100644 --- a/mux_python/api/dimensions_api.py +++ b/mux_python/api/dimensions_api.py @@ -53,9 +53,9 @@ def list_dimension_values(self, dimension_id, **kwargs): # noqa: E501 :type limit: int :param page: Offset by this many pages, of the size of `limit` :type page: int - :param filters: Filter key:value pairs. Must be provided as an array query string parameter (e.g. filters[]=operating_system:windows&filters[]=country:US). Possible filter names are the same as returned by the List Filters endpoint. + :param filters: 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` :type filters: list[str] - :param timeframe: 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. + :param timeframe: 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` :type timeframe: list[str] :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional @@ -91,9 +91,9 @@ def list_dimension_values_with_http_info(self, dimension_id, **kwargs): # noqa: :type limit: int :param page: Offset by this many pages, of the size of `limit` :type page: int - :param filters: Filter key:value pairs. Must be provided as an array query string parameter (e.g. filters[]=operating_system:windows&filters[]=country:US). Possible filter names are the same as returned by the List Filters endpoint. + :param filters: 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` :type filters: list[str] - :param timeframe: 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. + :param timeframe: 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` :type timeframe: list[str] :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional diff --git a/mux_python/api/errors_api.py b/mux_python/api/errors_api.py index 4698396..6291373 100644 --- a/mux_python/api/errors_api.py +++ b/mux_python/api/errors_api.py @@ -47,9 +47,9 @@ def list_errors(self, **kwargs): # noqa: E501 >>> thread = api.list_errors(async_req=True) >>> result = thread.get() - :param filters: Filter key:value pairs. Must be provided as an array query string parameter (e.g. filters[]=operating_system:windows&filters[]=country:US). Possible filter names are the same as returned by the List Filters endpoint. + :param filters: 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` :type filters: list[str] - :param timeframe: 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. + :param timeframe: 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` :type timeframe: list[str] :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional @@ -79,9 +79,9 @@ def list_errors_with_http_info(self, **kwargs): # noqa: E501 >>> thread = api.list_errors_with_http_info(async_req=True) >>> result = thread.get() - :param filters: Filter key:value pairs. Must be provided as an array query string parameter (e.g. filters[]=operating_system:windows&filters[]=country:US). Possible filter names are the same as returned by the List Filters endpoint. + :param filters: 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` :type filters: list[str] - :param timeframe: 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. + :param timeframe: 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` :type timeframe: list[str] :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional diff --git a/mux_python/api/filters_api.py b/mux_python/api/filters_api.py index faaa5c7..abab22a 100644 --- a/mux_python/api/filters_api.py +++ b/mux_python/api/filters_api.py @@ -53,9 +53,9 @@ def list_filter_values(self, filter_id, **kwargs): # noqa: E501 :type limit: int :param page: Offset by this many pages, of the size of `limit` :type page: int - :param filters: Filter key:value pairs. Must be provided as an array query string parameter (e.g. filters[]=operating_system:windows&filters[]=country:US). Possible filter names are the same as returned by the List Filters endpoint. + :param filters: 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` :type filters: list[str] - :param timeframe: 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. + :param timeframe: 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` :type timeframe: list[str] :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional @@ -91,9 +91,9 @@ def list_filter_values_with_http_info(self, filter_id, **kwargs): # noqa: E501 :type limit: int :param page: Offset by this many pages, of the size of `limit` :type page: int - :param filters: Filter key:value pairs. Must be provided as an array query string parameter (e.g. filters[]=operating_system:windows&filters[]=country:US). Possible filter names are the same as returned by the List Filters endpoint. + :param filters: 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` :type filters: list[str] - :param timeframe: 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. + :param timeframe: 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` :type timeframe: list[str] :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional diff --git a/mux_python/api/live_streams_api.py b/mux_python/api/live_streams_api.py index cb92090..6621e94 100644 --- a/mux_python/api/live_streams_api.py +++ b/mux_python/api/live_streams_api.py @@ -1985,6 +1985,156 @@ def signal_live_stream_complete_with_http_info(self, live_stream_id, **kwargs): collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth')) + def update_live_stream(self, live_stream_id, update_live_stream_request, **kwargs): # noqa: E501 + """Update a live stream # noqa: E501 + + Updates the parameters of a previously-created live stream. This currently supports a subset of variables. Supply the live stream ID and the updated parameters and Mux will return the corresponding live stream information. The information returned will be the same after update as for subsequent get live stream requests. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.update_live_stream(live_stream_id, update_live_stream_request, async_req=True) + >>> result = thread.get() + + :param live_stream_id: The live stream ID (required) + :type live_stream_id: str + :param update_live_stream_request: (required) + :type update_live_stream_request: UpdateLiveStreamRequest + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: LiveStreamResponse + """ + kwargs['_return_http_data_only'] = True + return self.update_live_stream_with_http_info(live_stream_id, update_live_stream_request, **kwargs) # noqa: E501 + + def update_live_stream_with_http_info(self, live_stream_id, update_live_stream_request, **kwargs): # noqa: E501 + """Update a live stream # noqa: E501 + + Updates the parameters of a previously-created live stream. This currently supports a subset of variables. Supply the live stream ID and the updated parameters and Mux will return the corresponding live stream information. The information returned will be the same after update as for subsequent get live stream requests. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.update_live_stream_with_http_info(live_stream_id, update_live_stream_request, async_req=True) + >>> result = thread.get() + + :param live_stream_id: The live stream ID (required) + :type live_stream_id: str + :param update_live_stream_request: (required) + :type update_live_stream_request: UpdateLiveStreamRequest + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(LiveStreamResponse, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'live_stream_id', + 'update_live_stream_request' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method update_live_stream" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'live_stream_id' is set + if self.api_client.client_side_validation and ('live_stream_id' not in local_var_params or # noqa: E501 + local_var_params['live_stream_id'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `live_stream_id` when calling `update_live_stream`") # noqa: E501 + # verify the required parameter 'update_live_stream_request' is set + if self.api_client.client_side_validation and ('update_live_stream_request' not in local_var_params or # noqa: E501 + local_var_params['update_live_stream_request'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `update_live_stream_request` when calling `update_live_stream`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'live_stream_id' in local_var_params: + path_params['LIVE_STREAM_ID'] = local_var_params['live_stream_id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'update_live_stream_request' in local_var_params: + body_params = local_var_params['update_live_stream_request'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['accessToken'] # noqa: E501 + + response_types_map = { + 200: "LiveStreamResponse", + } + + return self.api_client.call_api( + '/video/v1/live-streams/{LIVE_STREAM_ID}', 'PATCH', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + def update_live_stream_embedded_subtitles(self, live_stream_id, update_live_stream_embedded_subtitles_request, **kwargs): # noqa: E501 """Update a live stream's embedded subtitles # noqa: E501 diff --git a/mux_python/api/metrics_api.py b/mux_python/api/metrics_api.py index 05c3825..e5c69c8 100644 --- a/mux_python/api/metrics_api.py +++ b/mux_python/api/metrics_api.py @@ -49,9 +49,9 @@ def get_metric_timeseries_data(self, metric_id, **kwargs): # noqa: E501 :param metric_id: ID of the Metric (required) :type metric_id: str - :param timeframe: 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. + :param timeframe: 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` :type timeframe: list[str] - :param filters: Filter key:value pairs. Must be provided as an array query string parameter (e.g. filters[]=operating_system:windows&filters[]=country:US). Possible filter names are the same as returned by the List Filters endpoint. + :param filters: 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` :type filters: list[str] :param measurement: Measurement for the provided metric. If omitted, the default for the metric will be used. :type measurement: str @@ -89,9 +89,9 @@ def get_metric_timeseries_data_with_http_info(self, metric_id, **kwargs): # noq :param metric_id: ID of the Metric (required) :type metric_id: str - :param timeframe: 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. + :param timeframe: 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` :type timeframe: list[str] - :param filters: Filter key:value pairs. Must be provided as an array query string parameter (e.g. filters[]=operating_system:windows&filters[]=country:US). Possible filter names are the same as returned by the List Filters endpoint. + :param filters: 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` :type filters: list[str] :param measurement: Measurement for the provided metric. If omitted, the default for the metric will be used. :type measurement: str @@ -221,9 +221,9 @@ def get_overall_values(self, metric_id, **kwargs): # noqa: E501 :param metric_id: ID of the Metric (required) :type metric_id: str - :param timeframe: 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. + :param timeframe: 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` :type timeframe: list[str] - :param filters: Filter key:value pairs. Must be provided as an array query string parameter (e.g. filters[]=operating_system:windows&filters[]=country:US). Possible filter names are the same as returned by the List Filters endpoint. + :param filters: 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` :type filters: list[str] :param measurement: Measurement for the provided metric. If omitted, the default for the metric will be used. :type measurement: str @@ -257,9 +257,9 @@ def get_overall_values_with_http_info(self, metric_id, **kwargs): # noqa: E501 :param metric_id: ID of the Metric (required) :type metric_id: str - :param timeframe: 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. + :param timeframe: 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` :type timeframe: list[str] - :param filters: Filter key:value pairs. Must be provided as an array query string parameter (e.g. filters[]=operating_system:windows&filters[]=country:US). Possible filter names are the same as returned by the List Filters endpoint. + :param filters: 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` :type filters: list[str] :param measurement: Measurement for the provided metric. If omitted, the default for the metric will be used. :type measurement: str @@ -377,9 +377,9 @@ def list_all_metric_values(self, **kwargs): # noqa: E501 >>> thread = api.list_all_metric_values(async_req=True) >>> result = thread.get() - :param timeframe: 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. + :param timeframe: 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` :type timeframe: list[str] - :param filters: Filter key:value pairs. Must be provided as an array query string parameter (e.g. filters[]=operating_system:windows&filters[]=country:US). Possible filter names are the same as returned by the List Filters endpoint. + :param filters: 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` :type filters: list[str] :param dimension: Dimension the specified value belongs to :type dimension: str @@ -413,9 +413,9 @@ def list_all_metric_values_with_http_info(self, **kwargs): # noqa: E501 >>> thread = api.list_all_metric_values_with_http_info(async_req=True) >>> result = thread.get() - :param timeframe: 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. + :param timeframe: 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` :type timeframe: list[str] - :param filters: Filter key:value pairs. Must be provided as an array query string parameter (e.g. filters[]=operating_system:windows&filters[]=country:US). Possible filter names are the same as returned by the List Filters endpoint. + :param filters: 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` :type filters: list[str] :param dimension: Dimension the specified value belongs to :type dimension: str @@ -537,7 +537,7 @@ def list_breakdown_values(self, metric_id, **kwargs): # noqa: E501 :type group_by: str :param measurement: Measurement for the provided metric. If omitted, the default for the metric will be used. :type measurement: str - :param filters: Filter key:value pairs. Must be provided as an array query string parameter (e.g. filters[]=operating_system:windows&filters[]=country:US). Possible filter names are the same as returned by the List Filters endpoint. + :param filters: 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` :type filters: list[str] :param limit: Number of items to include in the response :type limit: int @@ -547,7 +547,7 @@ def list_breakdown_values(self, metric_id, **kwargs): # noqa: E501 :type order_by: str :param order_direction: Sort order. :type order_direction: str - :param timeframe: 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. + :param timeframe: 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` :type timeframe: list[str] :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional @@ -583,7 +583,7 @@ def list_breakdown_values_with_http_info(self, metric_id, **kwargs): # noqa: E5 :type group_by: str :param measurement: Measurement for the provided metric. If omitted, the default for the metric will be used. :type measurement: str - :param filters: Filter key:value pairs. Must be provided as an array query string parameter (e.g. filters[]=operating_system:windows&filters[]=country:US). Possible filter names are the same as returned by the List Filters endpoint. + :param filters: 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` :type filters: list[str] :param limit: Number of items to include in the response :type limit: int @@ -593,7 +593,7 @@ def list_breakdown_values_with_http_info(self, metric_id, **kwargs): # noqa: E5 :type order_by: str :param order_direction: Sort order. :type order_direction: str - :param timeframe: 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. + :param timeframe: 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` :type timeframe: list[str] :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional @@ -730,7 +730,7 @@ def list_insights(self, metric_id, **kwargs): # noqa: E501 :type measurement: str :param order_direction: Sort order. :type order_direction: str - :param timeframe: 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. + :param timeframe: 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` :type timeframe: list[str] :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional @@ -766,7 +766,7 @@ def list_insights_with_http_info(self, metric_id, **kwargs): # noqa: E501 :type measurement: str :param order_direction: Sort order. :type order_direction: str - :param timeframe: 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. + :param timeframe: 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` :type timeframe: list[str] :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional diff --git a/mux_python/api/playback_restrictions_api.py b/mux_python/api/playback_restrictions_api.py new file mode 100644 index 0000000..8dec7dd --- /dev/null +++ b/mux_python/api/playback_restrictions_api.py @@ -0,0 +1,729 @@ +# coding: utf-8 + +""" + Mux API + + Mux is how developers build online video. This API encompasses both Mux Video and Mux Data functionality to help you build your video-related projects better and faster than ever before. # noqa: E501 + + The version of the OpenAPI document: v1 + Contact: devex@mux.com + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import re # noqa: F401 + +# python 2 and python 3 compatibility library +import six + +from mux_python.api_client import ApiClient +from mux_python.exceptions import ( # noqa: F401 + ApiTypeError, + ApiValueError +) + + +class PlaybackRestrictionsApi(object): + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient() + self.api_client = api_client + + def create_playback_restriction(self, create_playback_restriction_request, **kwargs): # noqa: E501 + """Create a Playback Restriction # noqa: E501 + + Create a new Playback Restriction. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.create_playback_restriction(create_playback_restriction_request, async_req=True) + >>> result = thread.get() + + :param create_playback_restriction_request: (required) + :type create_playback_restriction_request: CreatePlaybackRestrictionRequest + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: PlaybackRestriction + """ + kwargs['_return_http_data_only'] = True + return self.create_playback_restriction_with_http_info(create_playback_restriction_request, **kwargs) # noqa: E501 + + def create_playback_restriction_with_http_info(self, create_playback_restriction_request, **kwargs): # noqa: E501 + """Create a Playback Restriction # noqa: E501 + + Create a new Playback Restriction. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.create_playback_restriction_with_http_info(create_playback_restriction_request, async_req=True) + >>> result = thread.get() + + :param create_playback_restriction_request: (required) + :type create_playback_restriction_request: CreatePlaybackRestrictionRequest + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(PlaybackRestriction, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'create_playback_restriction_request' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method create_playback_restriction" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'create_playback_restriction_request' is set + if self.api_client.client_side_validation and ('create_playback_restriction_request' not in local_var_params or # noqa: E501 + local_var_params['create_playback_restriction_request'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `create_playback_restriction_request` when calling `create_playback_restriction`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'create_playback_restriction_request' in local_var_params: + body_params = local_var_params['create_playback_restriction_request'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['accessToken'] # noqa: E501 + + response_types_map = { + 201: "PlaybackRestriction", + } + + return self.api_client.call_api( + '/video/v1/playback-restrictions', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def delete_playback_restriction(self, playback_restriction_id, **kwargs): # noqa: E501 + """Delete a Playback Restriction # noqa: E501 + + Deletes a single Playback Restriction. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_playback_restriction(playback_restriction_id, async_req=True) + >>> result = thread.get() + + :param playback_restriction_id: ID of the Playback Restriction. (required) + :type playback_restriction_id: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + kwargs['_return_http_data_only'] = True + return self.delete_playback_restriction_with_http_info(playback_restriction_id, **kwargs) # noqa: E501 + + def delete_playback_restriction_with_http_info(self, playback_restriction_id, **kwargs): # noqa: E501 + """Delete a Playback Restriction # noqa: E501 + + Deletes a single Playback Restriction. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.delete_playback_restriction_with_http_info(playback_restriction_id, async_req=True) + >>> result = thread.get() + + :param playback_restriction_id: ID of the Playback Restriction. (required) + :type playback_restriction_id: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + + local_var_params = locals() + + all_params = [ + 'playback_restriction_id' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method delete_playback_restriction" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'playback_restriction_id' is set + if self.api_client.client_side_validation and ('playback_restriction_id' not in local_var_params or # noqa: E501 + local_var_params['playback_restriction_id'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `playback_restriction_id` when calling `delete_playback_restriction`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'playback_restriction_id' in local_var_params: + path_params['PLAYBACK_RESTRICTION_ID'] = local_var_params['playback_restriction_id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # Authentication setting + auth_settings = ['accessToken'] # noqa: E501 + + response_types_map = {} + + return self.api_client.call_api( + '/video/v1/playback-restrictions/{PLAYBACK_RESTRICTION_ID}', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def get_playback_restriction(self, playback_restriction_id, **kwargs): # noqa: E501 + """Retrieve a Playback Restriction # noqa: E501 + + Retrieves a Playback Restriction associated with the unique identifier. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_playback_restriction(playback_restriction_id, async_req=True) + >>> result = thread.get() + + :param playback_restriction_id: ID of the Playback Restriction. (required) + :type playback_restriction_id: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: PlaybackRestriction + """ + kwargs['_return_http_data_only'] = True + return self.get_playback_restriction_with_http_info(playback_restriction_id, **kwargs) # noqa: E501 + + def get_playback_restriction_with_http_info(self, playback_restriction_id, **kwargs): # noqa: E501 + """Retrieve a Playback Restriction # noqa: E501 + + Retrieves a Playback Restriction associated with the unique identifier. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_playback_restriction_with_http_info(playback_restriction_id, async_req=True) + >>> result = thread.get() + + :param playback_restriction_id: ID of the Playback Restriction. (required) + :type playback_restriction_id: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(PlaybackRestriction, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'playback_restriction_id' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_playback_restriction" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'playback_restriction_id' is set + if self.api_client.client_side_validation and ('playback_restriction_id' not in local_var_params or # noqa: E501 + local_var_params['playback_restriction_id'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `playback_restriction_id` when calling `get_playback_restriction`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'playback_restriction_id' in local_var_params: + path_params['PLAYBACK_RESTRICTION_ID'] = local_var_params['playback_restriction_id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['accessToken'] # noqa: E501 + + response_types_map = { + 200: "PlaybackRestriction", + } + + return self.api_client.call_api( + '/video/v1/playback-restrictions/{PLAYBACK_RESTRICTION_ID}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def list_playback_restrictions(self, **kwargs): # noqa: E501 + """List Playback Restrictions # noqa: E501 + + Returns a list of all Playback Restrictions. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.list_playback_restrictions(async_req=True) + >>> result = thread.get() + + :param page: Offset by this many pages, of the size of `limit` + :type page: int + :param limit: Number of items to include in the response + :type limit: int + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: list[PlaybackRestriction] + """ + kwargs['_return_http_data_only'] = True + return self.list_playback_restrictions_with_http_info(**kwargs) # noqa: E501 + + def list_playback_restrictions_with_http_info(self, **kwargs): # noqa: E501 + """List Playback Restrictions # noqa: E501 + + Returns a list of all Playback Restrictions. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.list_playback_restrictions_with_http_info(async_req=True) + >>> result = thread.get() + + :param page: Offset by this many pages, of the size of `limit` + :type page: int + :param limit: Number of items to include in the response + :type limit: int + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(list[PlaybackRestriction], status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'page', + 'limit' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method list_playback_restrictions" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'page' in local_var_params and local_var_params['page'] is not None: # noqa: E501 + query_params.append(('page', local_var_params['page'])) # noqa: E501 + if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 + query_params.append(('limit', local_var_params['limit'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['accessToken'] # noqa: E501 + + response_types_map = { + 200: "list[PlaybackRestriction]", + } + + return self.api_client.call_api( + '/video/v1/playback-restrictions', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + + def update_referrer_domain_restriction(self, playback_restriction_id, body, **kwargs): # noqa: E501 + """Update the Referrer Playback Restriction # noqa: E501 + + Allows you to modify the list of domians or change how Mux validates playback requests without the `Referer` HTTP header. The Referrer restriction fully replaces the old list with this new list of domains. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.update_referrer_domain_restriction(playback_restriction_id, body, async_req=True) + >>> result = thread.get() + + :param playback_restriction_id: ID of the Playback Restriction. (required) + :type playback_restriction_id: str + :param body: (required) + :type body: ReferrerDomainRestriction + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: PlaybackRestriction + """ + kwargs['_return_http_data_only'] = True + return self.update_referrer_domain_restriction_with_http_info(playback_restriction_id, body, **kwargs) # noqa: E501 + + def update_referrer_domain_restriction_with_http_info(self, playback_restriction_id, body, **kwargs): # noqa: E501 + """Update the Referrer Playback Restriction # noqa: E501 + + Allows you to modify the list of domians or change how Mux validates playback requests without the `Referer` HTTP header. The Referrer restriction fully replaces the old list with this new list of domains. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.update_referrer_domain_restriction_with_http_info(playback_restriction_id, body, async_req=True) + >>> result = thread.get() + + :param playback_restriction_id: ID of the Playback Restriction. (required) + :type playback_restriction_id: str + :param body: (required) + :type body: ReferrerDomainRestriction + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _return_http_data_only: response data without head status code + and headers + :type _return_http_data_only: bool, optional + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :type _preload_content: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(PlaybackRestriction, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'playback_restriction_id', + 'body' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method update_referrer_domain_restriction" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'playback_restriction_id' is set + if self.api_client.client_side_validation and ('playback_restriction_id' not in local_var_params or # noqa: E501 + local_var_params['playback_restriction_id'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `playback_restriction_id` when calling `update_referrer_domain_restriction`") # noqa: E501 + # verify the required parameter 'body' is set + if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 + local_var_params['body'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `body` when calling `update_referrer_domain_restriction`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'playback_restriction_id' in local_var_params: + path_params['PLAYBACK_RESTRICTION_ID'] = local_var_params['playback_restriction_id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'body' in local_var_params: + body_params = local_var_params['body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['accessToken'] # noqa: E501 + + response_types_map = { + 200: "PlaybackRestriction", + } + + return self.api_client.call_api( + '/video/v1/playback-restrictions/{PLAYBACK_RESTRICTION_ID}/referrer', 'PUT', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) diff --git a/mux_python/api/real_time_api.py b/mux_python/api/real_time_api.py index 1babe3b..e680ad2 100644 --- a/mux_python/api/real_time_api.py +++ b/mux_python/api/real_time_api.py @@ -53,7 +53,7 @@ def get_realtime_breakdown(self, realtime_metric_id, **kwargs): # noqa: E501 :type dimension: str :param timestamp: Timestamp to limit results by. This value must be provided as a unix timestamp. Defaults to the current unix timestamp. :type timestamp: float - :param filters: Filter key:value pairs. Must be provided as an array query string parameter (e.g. filters[]=operating_system:windows&filters[]=country:US). Possible filter names are the same as returned by the List Filters endpoint. + :param filters: 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` :type filters: list[str] :param order_by: Value to order the results by :type order_by: str @@ -93,7 +93,7 @@ def get_realtime_breakdown_with_http_info(self, realtime_metric_id, **kwargs): :type dimension: str :param timestamp: Timestamp to limit results by. This value must be provided as a unix timestamp. Defaults to the current unix timestamp. :type timestamp: float - :param filters: Filter key:value pairs. Must be provided as an array query string parameter (e.g. filters[]=operating_system:windows&filters[]=country:US). Possible filter names are the same as returned by the List Filters endpoint. + :param filters: 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` :type filters: list[str] :param order_by: Value to order the results by :type order_by: str @@ -220,7 +220,7 @@ def get_realtime_histogram_timeseries(self, realtime_histogram_metric_id, **kwar :param realtime_histogram_metric_id: ID of the Realtime Histogram Metric (required) :type realtime_histogram_metric_id: str - :param filters: Filter key:value pairs. Must be provided as an array query string parameter (e.g. filters[]=operating_system:windows&filters[]=country:US). Possible filter names are the same as returned by the List Filters endpoint. + :param filters: 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` :type filters: list[str] :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional @@ -252,7 +252,7 @@ def get_realtime_histogram_timeseries_with_http_info(self, realtime_histogram_me :param realtime_histogram_metric_id: ID of the Realtime Histogram Metric (required) :type realtime_histogram_metric_id: str - :param filters: Filter key:value pairs. Must be provided as an array query string parameter (e.g. filters[]=operating_system:windows&filters[]=country:US). Possible filter names are the same as returned by the List Filters endpoint. + :param filters: 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` :type filters: list[str] :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional @@ -363,7 +363,7 @@ def get_realtime_timeseries(self, realtime_metric_id, **kwargs): # noqa: E501 :param realtime_metric_id: ID of the Realtime Metric (required) :type realtime_metric_id: str - :param filters: Filter key:value pairs. Must be provided as an array query string parameter (e.g. filters[]=operating_system:windows&filters[]=country:US). Possible filter names are the same as returned by the List Filters endpoint. + :param filters: 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` :type filters: list[str] :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional @@ -395,7 +395,7 @@ def get_realtime_timeseries_with_http_info(self, realtime_metric_id, **kwargs): :param realtime_metric_id: ID of the Realtime Metric (required) :type realtime_metric_id: str - :param filters: Filter key:value pairs. Must be provided as an array query string parameter (e.g. filters[]=operating_system:windows&filters[]=country:US). Possible filter names are the same as returned by the List Filters endpoint. + :param filters: 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` :type filters: list[str] :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional diff --git a/mux_python/api/video_views_api.py b/mux_python/api/video_views_api.py index 584415d..dfc4eb7 100644 --- a/mux_python/api/video_views_api.py +++ b/mux_python/api/video_views_api.py @@ -192,9 +192,9 @@ def list_video_views(self, **kwargs): # noqa: E501 :type error_id: int :param order_direction: Sort order. :type order_direction: str - :param filters: Filter key:value pairs. Must be provided as an array query string parameter (e.g. filters[]=operating_system:windows&filters[]=country:US). Possible filter names are the same as returned by the List Filters endpoint. + :param filters: 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` :type filters: list[str] - :param timeframe: 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. + :param timeframe: 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` :type timeframe: list[str] :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional @@ -234,9 +234,9 @@ def list_video_views_with_http_info(self, **kwargs): # noqa: E501 :type error_id: int :param order_direction: Sort order. :type order_direction: str - :param filters: Filter key:value pairs. Must be provided as an array query string parameter (e.g. filters[]=operating_system:windows&filters[]=country:US). Possible filter names are the same as returned by the List Filters endpoint. + :param filters: 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` :type filters: list[str] - :param timeframe: 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. + :param timeframe: 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` :type timeframe: list[str] :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional diff --git a/mux_python/api_client.py b/mux_python/api_client.py index 77a7391..856cf59 100644 --- a/mux_python/api_client.py +++ b/mux_python/api_client.py @@ -79,7 +79,7 @@ def __init__(self, configuration=None, header_name=None, header_value=None, self.default_headers[header_name] = header_value self.cookie = cookie # Set default User-Agent. - self.user_agent = 'OpenAPI-Generator/3.0.0/python' + self.user_agent = 'OpenAPI-Generator/3.2.0/python' self.client_side_validation = configuration.client_side_validation def __enter__(self): diff --git a/mux_python/configuration.py b/mux_python/configuration.py index 92a1e90..c36f687 100644 --- a/mux_python/configuration.py +++ b/mux_python/configuration.py @@ -406,7 +406,7 @@ def to_debug_report(self): "OS: {env}\n"\ "Python Version: {pyversion}\n"\ "Version of the API: v1\n"\ - "SDK Package Version: 3.0.0".\ + "SDK Package Version: 3.2.0".\ format(env=sys.platform, pyversion=sys.version) def get_host_settings(self): diff --git a/mux_python/models/__init__.py b/mux_python/models/__init__.py index 0c353d7..2109ebc 100644 --- a/mux_python/models/__init__.py +++ b/mux_python/models/__init__.py @@ -29,6 +29,7 @@ from mux_python.models.create_live_stream_request import CreateLiveStreamRequest from mux_python.models.create_playback_id_request import CreatePlaybackIDRequest from mux_python.models.create_playback_id_response import CreatePlaybackIDResponse +from mux_python.models.create_playback_restriction_request import CreatePlaybackRestrictionRequest from mux_python.models.create_simulcast_target_request import CreateSimulcastTargetRequest from mux_python.models.create_track_request import CreateTrackRequest from mux_python.models.create_track_response import CreateTrackResponse @@ -94,11 +95,14 @@ from mux_python.models.overall_values import OverallValues from mux_python.models.playback_id import PlaybackID from mux_python.models.playback_policy import PlaybackPolicy +from mux_python.models.playback_restriction import PlaybackRestriction +from mux_python.models.playback_restriction_response import PlaybackRestrictionResponse from mux_python.models.real_time_breakdown_value import RealTimeBreakdownValue from mux_python.models.real_time_histogram_timeseries_bucket import RealTimeHistogramTimeseriesBucket from mux_python.models.real_time_histogram_timeseries_bucket_values import RealTimeHistogramTimeseriesBucketValues from mux_python.models.real_time_histogram_timeseries_datapoint import RealTimeHistogramTimeseriesDatapoint from mux_python.models.real_time_timeseries_datapoint import RealTimeTimeseriesDatapoint +from mux_python.models.referrer_domain_restriction import ReferrerDomainRestriction from mux_python.models.score import Score from mux_python.models.signal_live_stream_complete_response import SignalLiveStreamCompleteResponse from mux_python.models.signing_key import SigningKey @@ -108,7 +112,10 @@ from mux_python.models.track import Track from mux_python.models.update_asset_mp4_support_request import UpdateAssetMP4SupportRequest from mux_python.models.update_asset_master_access_request import UpdateAssetMasterAccessRequest +from mux_python.models.update_asset_request import UpdateAssetRequest from mux_python.models.update_live_stream_embedded_subtitles_request import UpdateLiveStreamEmbeddedSubtitlesRequest +from mux_python.models.update_live_stream_request import UpdateLiveStreamRequest +from mux_python.models.update_referrer_domain_restriction_request import UpdateReferrerDomainRestrictionRequest from mux_python.models.upload import Upload from mux_python.models.upload_error import UploadError from mux_python.models.upload_response import UploadResponse diff --git a/mux_python/models/asset.py b/mux_python/models/asset.py index c2f7262..05e0aa4 100644 --- a/mux_python/models/asset.py +++ b/mux_python/models/asset.py @@ -479,7 +479,7 @@ def is_live(self, is_live): def passthrough(self): """Gets the passthrough of this Asset. # noqa: E501 - Arbitrary metadata set for the asset. Max 255 characters. # noqa: E501 + Arbitrary user-supplied metadata set for the asset. Max 255 characters. # noqa: E501 :return: The passthrough of this Asset. # noqa: E501 :rtype: str @@ -490,7 +490,7 @@ def passthrough(self): def passthrough(self, passthrough): """Sets the passthrough of this Asset. - Arbitrary metadata set for the asset. Max 255 characters. # noqa: E501 + Arbitrary user-supplied metadata set for the asset. Max 255 characters. # noqa: E501 :param passthrough: The passthrough of this Asset. # noqa: E501 :type passthrough: str diff --git a/mux_python/models/create_asset_request.py b/mux_python/models/create_asset_request.py index 55a96df..57998da 100644 --- a/mux_python/models/create_asset_request.py +++ b/mux_python/models/create_asset_request.py @@ -159,7 +159,7 @@ def per_title_encode(self, per_title_encode): def passthrough(self): """Gets the passthrough of this CreateAssetRequest. # noqa: E501 - Arbitrary 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**. # noqa: E501 + 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**. # noqa: E501 :return: The passthrough of this CreateAssetRequest. # noqa: E501 :rtype: str @@ -170,7 +170,7 @@ def passthrough(self): def passthrough(self, passthrough): """Sets the passthrough of this CreateAssetRequest. - Arbitrary 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**. # noqa: E501 + 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**. # noqa: E501 :param passthrough: The passthrough of this CreateAssetRequest. # noqa: E501 :type passthrough: str diff --git a/mux_python/models/create_live_stream_request.py b/mux_python/models/create_live_stream_request.py index 0353fbb..19499fe 100644 --- a/mux_python/models/create_live_stream_request.py +++ b/mux_python/models/create_live_stream_request.py @@ -42,6 +42,7 @@ class CreateLiveStreamRequest(object): 'embedded_subtitles': 'list[LiveStreamEmbeddedSubtitleSettings]', 'reduced_latency': 'bool', 'low_latency': 'bool', + 'latency_mode': 'str', 'test': 'bool', 'simulcast_targets': 'list[CreateSimulcastTargetRequest]' } @@ -55,11 +56,12 @@ class CreateLiveStreamRequest(object): 'embedded_subtitles': 'embedded_subtitles', 'reduced_latency': 'reduced_latency', 'low_latency': 'low_latency', + 'latency_mode': 'latency_mode', 'test': 'test', 'simulcast_targets': 'simulcast_targets' } - def __init__(self, playback_policy=None, new_asset_settings=None, reconnect_window=None, passthrough=None, audio_only=None, embedded_subtitles=None, reduced_latency=None, low_latency=None, test=None, simulcast_targets=None, local_vars_configuration=None): # noqa: E501 + def __init__(self, playback_policy=None, new_asset_settings=None, reconnect_window=None, passthrough=None, audio_only=None, embedded_subtitles=None, reduced_latency=None, low_latency=None, latency_mode=None, test=None, simulcast_targets=None, local_vars_configuration=None): # noqa: E501 """CreateLiveStreamRequest - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration.get_default_copy() @@ -73,6 +75,7 @@ def __init__(self, playback_policy=None, new_asset_settings=None, reconnect_wind self._embedded_subtitles = None self._reduced_latency = None self._low_latency = None + self._latency_mode = None self._test = None self._simulcast_targets = None self.discriminator = None @@ -93,6 +96,8 @@ def __init__(self, playback_policy=None, new_asset_settings=None, reconnect_wind self.reduced_latency = reduced_latency if low_latency is not None: self.low_latency = low_latency + if latency_mode is not None: + self.latency_mode = latency_mode if test is not None: self.test = test if simulcast_targets is not None: @@ -240,7 +245,7 @@ def embedded_subtitles(self, embedded_subtitles): def reduced_latency(self): """Gets the reduced_latency of this CreateLiveStreamRequest. # noqa: E501 - Latency is the time from when the streamer does something in real life to when you see it happen in the player. Set this if you want lower latency for your live stream. Note: Reconnect windows are incompatible with Reduced Latency and will always be set to zero (0) seconds. Read more here: https://mux.com/blog/reduced-latency-for-mux-live-streaming-now-available/ # noqa: E501 + This field is deprecated. Please use latency_mode instead. Latency is the time from when the streamer transmits a frame of video to when you see it in the player. Set this if you want lower latency for your live stream. Note: Reconnect windows are incompatible with Reduced Latency and will always be set to zero (0) seconds. Read more here: https://mux.com/blog/reduced-latency-for-mux-live-streaming-now-available/ # noqa: E501 :return: The reduced_latency of this CreateLiveStreamRequest. # noqa: E501 :rtype: bool @@ -251,7 +256,7 @@ def reduced_latency(self): def reduced_latency(self, reduced_latency): """Sets the reduced_latency of this CreateLiveStreamRequest. - Latency is the time from when the streamer does something in real life to when you see it happen in the player. Set this if you want lower latency for your live stream. Note: Reconnect windows are incompatible with Reduced Latency and will always be set to zero (0) seconds. Read more here: https://mux.com/blog/reduced-latency-for-mux-live-streaming-now-available/ # noqa: E501 + This field is deprecated. Please use latency_mode instead. Latency is the time from when the streamer transmits a frame of video to when you see it in the player. Set this if you want lower latency for your live stream. Note: Reconnect windows are incompatible with Reduced Latency and will always be set to zero (0) seconds. Read more here: https://mux.com/blog/reduced-latency-for-mux-live-streaming-now-available/ # noqa: E501 :param reduced_latency: The reduced_latency of this CreateLiveStreamRequest. # noqa: E501 :type reduced_latency: bool @@ -263,7 +268,7 @@ def reduced_latency(self, reduced_latency): def low_latency(self): """Gets the low_latency of this CreateLiveStreamRequest. # noqa: E501 - Latency is the time from when the streamer does something in real life to when you see it happen in the player. Setting this option will enable compatibility with the LL-HLS specification for low-latency streaming. This typically has lower latency than Reduced Latency streams, and cannot be combined with Reduced Latency. Note: Reconnect windows are incompatible with Low Latency and will always be set to zero (0) seconds. # noqa: E501 + This field is deprecated. Please use latency_mode instead. Latency is the time from when the streamer transmits a frame of video to when you see it in the player. Setting this option will enable compatibility with the LL-HLS specification for low-latency streaming. This typically has lower latency than Reduced Latency streams, and cannot be combined with Reduced Latency. Note: Reconnect windows are incompatible with Low Latency and will always be set to zero (0) seconds. # noqa: E501 :return: The low_latency of this CreateLiveStreamRequest. # noqa: E501 :rtype: bool @@ -274,7 +279,7 @@ def low_latency(self): def low_latency(self, low_latency): """Sets the low_latency of this CreateLiveStreamRequest. - Latency is the time from when the streamer does something in real life to when you see it happen in the player. Setting this option will enable compatibility with the LL-HLS specification for low-latency streaming. This typically has lower latency than Reduced Latency streams, and cannot be combined with Reduced Latency. Note: Reconnect windows are incompatible with Low Latency and will always be set to zero (0) seconds. # noqa: E501 + This field is deprecated. Please use latency_mode instead. Latency is the time from when the streamer transmits a frame of video to when you see it in the player. Setting this option will enable compatibility with the LL-HLS specification for low-latency streaming. This typically has lower latency than Reduced Latency streams, and cannot be combined with Reduced Latency. Note: Reconnect windows are incompatible with Low Latency and will always be set to zero (0) seconds. # noqa: E501 :param low_latency: The low_latency of this CreateLiveStreamRequest. # noqa: E501 :type low_latency: bool @@ -282,6 +287,35 @@ def low_latency(self, low_latency): self._low_latency = low_latency + @property + def latency_mode(self): + """Gets the latency_mode of this CreateLiveStreamRequest. # noqa: E501 + + 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. The Low Latency value is a beta feature. Note: Reconnect windows are incompatible with Reduced Latency and Low Latency and will always be set to zero (0) seconds. Read more here: https://mux.com/blog/introducing-low-latency-live-streaming/ # noqa: E501 + + :return: The latency_mode of this CreateLiveStreamRequest. # noqa: E501 + :rtype: str + """ + return self._latency_mode + + @latency_mode.setter + def latency_mode(self, latency_mode): + """Sets the latency_mode of this CreateLiveStreamRequest. + + 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. The Low Latency value is a beta feature. Note: Reconnect windows are incompatible with Reduced Latency and Low Latency and will always be set to zero (0) seconds. Read more here: https://mux.com/blog/introducing-low-latency-live-streaming/ # noqa: E501 + + :param latency_mode: The latency_mode of this CreateLiveStreamRequest. # noqa: E501 + :type latency_mode: str + """ + allowed_values = ["low", "reduced", "standard"] # noqa: E501 + if self.local_vars_configuration.client_side_validation and latency_mode not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `latency_mode` ({0}), must be one of {1}" # noqa: E501 + .format(latency_mode, allowed_values) + ) + + self._latency_mode = latency_mode + @property def test(self): """Gets the test of this CreateLiveStreamRequest. # noqa: E501 diff --git a/mux_python/models/create_playback_restriction_request.py b/mux_python/models/create_playback_restriction_request.py new file mode 100644 index 0000000..cf44566 --- /dev/null +++ b/mux_python/models/create_playback_restriction_request.py @@ -0,0 +1,129 @@ +# coding: utf-8 + +""" + Mux API + + Mux is how developers build online video. This API encompasses both Mux Video and Mux Data functionality to help you build your video-related projects better and faster than ever before. # noqa: E501 + + The version of the OpenAPI document: v1 + Contact: devex@mux.com + Generated by: https://openapi-generator.tech +""" + + +import inspect +import pprint +import re # noqa: F401 +import six + +from mux_python.configuration import Configuration + + +class CreatePlaybackRestrictionRequest(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'referrer': 'ReferrerDomainRestriction' + } + + attribute_map = { + 'referrer': 'referrer' + } + + def __init__(self, referrer=None, local_vars_configuration=None): # noqa: E501 + """CreatePlaybackRestrictionRequest - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration + + self._referrer = None + self.discriminator = None + + if referrer is not None: + self.referrer = referrer + + @property + def referrer(self): + """Gets the referrer of this CreatePlaybackRestrictionRequest. # noqa: E501 + + + :return: The referrer of this CreatePlaybackRestrictionRequest. # noqa: E501 + :rtype: ReferrerDomainRestriction + """ + return self._referrer + + @referrer.setter + def referrer(self, referrer): + """Sets the referrer of this CreatePlaybackRestrictionRequest. + + + :param referrer: The referrer of this CreatePlaybackRestrictionRequest. # noqa: E501 + :type referrer: ReferrerDomainRestriction + """ + + self._referrer = referrer + + def to_dict(self, serialize=False): + """Returns the model properties as a dict""" + result = {} + + def convert(x): + if hasattr(x, "to_dict"): + args = inspect.getargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr + if isinstance(value, list): + result[attr] = list(map( + lambda x: convert(x), + value + )) + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) + else: + result[attr] = convert(value) + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, CreatePlaybackRestrictionRequest): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, CreatePlaybackRestrictionRequest): + return True + + return self.to_dict() != other.to_dict() diff --git a/mux_python/models/create_simulcast_target_request.py b/mux_python/models/create_simulcast_target_request.py index 5e14b5b..f15b238 100644 --- a/mux_python/models/create_simulcast_target_request.py +++ b/mux_python/models/create_simulcast_target_request.py @@ -66,7 +66,7 @@ def __init__(self, passthrough=None, stream_key=None, url=None, local_vars_confi def passthrough(self): """Gets the passthrough of this CreateSimulcastTargetRequest. # noqa: E501 - Arbitrary metadata set by you when creating a simulcast target. # noqa: E501 + Arbitrary user-supplied metadata set by you when creating a simulcast target. # noqa: E501 :return: The passthrough of this CreateSimulcastTargetRequest. # noqa: E501 :rtype: str @@ -77,7 +77,7 @@ def passthrough(self): def passthrough(self, passthrough): """Sets the passthrough of this CreateSimulcastTargetRequest. - Arbitrary metadata set by you when creating a simulcast target. # noqa: E501 + Arbitrary user-supplied metadata set by you when creating a simulcast target. # noqa: E501 :param passthrough: The passthrough of this CreateSimulcastTargetRequest. # noqa: E501 :type passthrough: str diff --git a/mux_python/models/create_track_request.py b/mux_python/models/create_track_request.py index cef8ace..6db1d17 100644 --- a/mux_python/models/create_track_request.py +++ b/mux_python/models/create_track_request.py @@ -235,7 +235,7 @@ def closed_captions(self, closed_captions): def passthrough(self): """Gets the passthrough of this CreateTrackRequest. # noqa: E501 - Arbitrary metadata set for the track either when creating the asset or track. # noqa: E501 + Arbitrary user-supplied metadata set for the track either when creating the asset or track. # noqa: E501 :return: The passthrough of this CreateTrackRequest. # noqa: E501 :rtype: str @@ -246,7 +246,7 @@ def passthrough(self): def passthrough(self, passthrough): """Sets the passthrough of this CreateTrackRequest. - Arbitrary metadata set for the track either when creating the asset or track. # noqa: E501 + Arbitrary user-supplied metadata set for the track either when creating the asset or track. # noqa: E501 :param passthrough: The passthrough of this CreateTrackRequest. # noqa: E501 :type passthrough: str diff --git a/mux_python/models/input_settings.py b/mux_python/models/input_settings.py index 3973c59..a8da028 100644 --- a/mux_python/models/input_settings.py +++ b/mux_python/models/input_settings.py @@ -102,7 +102,7 @@ def __init__(self, url=None, overlay_settings=None, start_time=None, end_time=No def url(self): """Gets the url of this InputSettings. # noqa: E501 - The web address of the file that Mux should download and use. * For subtitles 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/) format 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. # noqa: E501 + The URL of the file that Mux should download and use. * For subtitles 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/) format 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. # noqa: E501 :return: The url of this InputSettings. # noqa: E501 :rtype: str @@ -113,7 +113,7 @@ def url(self): def url(self, url): """Sets the url of this InputSettings. - The web address of the file that Mux should download and use. * For subtitles 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/) format 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. # noqa: E501 + The URL of the file that Mux should download and use. * For subtitles 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/) format 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. # noqa: E501 :param url: The url of this InputSettings. # noqa: E501 :type url: str diff --git a/mux_python/models/live_stream.py b/mux_python/models/live_stream.py index 904b1b9..8316011 100644 --- a/mux_python/models/live_stream.py +++ b/mux_python/models/live_stream.py @@ -44,10 +44,12 @@ class LiveStream(object): 'new_asset_settings': 'CreateAssetRequest', 'passthrough': 'str', 'audio_only': 'bool', + 'embedded_subtitles': 'list[LiveStreamEmbeddedSubtitleSettings]', 'reconnect_window': 'float', 'reduced_latency': 'bool', 'low_latency': 'bool', 'simulcast_targets': 'list[SimulcastTarget]', + 'latency_mode': 'str', 'test': 'bool' } @@ -62,14 +64,16 @@ class LiveStream(object): 'new_asset_settings': 'new_asset_settings', 'passthrough': 'passthrough', 'audio_only': 'audio_only', + 'embedded_subtitles': 'embedded_subtitles', 'reconnect_window': 'reconnect_window', 'reduced_latency': 'reduced_latency', 'low_latency': 'low_latency', 'simulcast_targets': 'simulcast_targets', + 'latency_mode': 'latency_mode', 'test': 'test' } - def __init__(self, id=None, created_at=None, stream_key=None, active_asset_id=None, recent_asset_ids=None, status=None, playback_ids=None, new_asset_settings=None, passthrough=None, audio_only=None, reconnect_window=60, reduced_latency=None, low_latency=None, simulcast_targets=None, test=None, local_vars_configuration=None): # noqa: E501 + def __init__(self, id=None, created_at=None, stream_key=None, active_asset_id=None, recent_asset_ids=None, status=None, playback_ids=None, new_asset_settings=None, passthrough=None, audio_only=None, embedded_subtitles=None, reconnect_window=60, reduced_latency=None, low_latency=None, simulcast_targets=None, latency_mode=None, test=None, local_vars_configuration=None): # noqa: E501 """LiveStream - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration.get_default_copy() @@ -85,10 +89,12 @@ def __init__(self, id=None, created_at=None, stream_key=None, active_asset_id=No self._new_asset_settings = None self._passthrough = None self._audio_only = None + self._embedded_subtitles = None self._reconnect_window = None self._reduced_latency = None self._low_latency = None self._simulcast_targets = None + self._latency_mode = None self._test = None self.discriminator = None @@ -112,6 +118,8 @@ def __init__(self, id=None, created_at=None, stream_key=None, active_asset_id=No self.passthrough = passthrough if audio_only is not None: self.audio_only = audio_only + if embedded_subtitles is not None: + self.embedded_subtitles = embedded_subtitles if reconnect_window is not None: self.reconnect_window = reconnect_window if reduced_latency is not None: @@ -120,6 +128,8 @@ def __init__(self, id=None, created_at=None, stream_key=None, active_asset_id=No self.low_latency = low_latency if simulcast_targets is not None: self.simulcast_targets = simulcast_targets + if latency_mode is not None: + self.latency_mode = latency_mode if test is not None: self.test = test @@ -315,7 +325,7 @@ def new_asset_settings(self, new_asset_settings): def passthrough(self): """Gets the passthrough of this LiveStream. # noqa: E501 - Arbitrary metadata set for the asset. Max 255 characters. # noqa: E501 + Arbitrary user-supplied metadata set for the asset. Max 255 characters. # noqa: E501 :return: The passthrough of this LiveStream. # noqa: E501 :rtype: str @@ -326,7 +336,7 @@ def passthrough(self): def passthrough(self, passthrough): """Sets the passthrough of this LiveStream. - Arbitrary metadata set for the asset. Max 255 characters. # noqa: E501 + Arbitrary user-supplied metadata set for the asset. Max 255 characters. # noqa: E501 :param passthrough: The passthrough of this LiveStream. # noqa: E501 :type passthrough: str @@ -357,6 +367,29 @@ def audio_only(self, audio_only): self._audio_only = audio_only + @property + def embedded_subtitles(self): + """Gets the embedded_subtitles of this LiveStream. # noqa: E501 + + Describes the embedded closed caption configuration of the incoming live stream. # noqa: E501 + + :return: The embedded_subtitles of this LiveStream. # noqa: E501 + :rtype: list[LiveStreamEmbeddedSubtitleSettings] + """ + return self._embedded_subtitles + + @embedded_subtitles.setter + def embedded_subtitles(self, embedded_subtitles): + """Sets the embedded_subtitles of this LiveStream. + + Describes the embedded closed caption configuration of the incoming live stream. # noqa: E501 + + :param embedded_subtitles: The embedded_subtitles of this LiveStream. # noqa: E501 + :type embedded_subtitles: list[LiveStreamEmbeddedSubtitleSettings] + """ + + self._embedded_subtitles = embedded_subtitles + @property def reconnect_window(self): """Gets the reconnect_window of this LiveStream. # noqa: E501 @@ -384,7 +417,7 @@ def reconnect_window(self, reconnect_window): def reduced_latency(self): """Gets the reduced_latency of this LiveStream. # noqa: E501 - Latency is the time from when the streamer does something in real life to when you see it happen in the player. Set this if you want lower latency for your live stream. **Note**: Reconnect windows are incompatible with Reduced Latency and will always be set to zero (0) seconds. See the [Reduce live stream latency guide](https://docs.mux.com/guides/video/reduce-live-stream-latency) to understand the tradeoffs. # noqa: E501 + This field is deprecated. Please use latency_mode instead. Latency is the time from when the streamer transmits a frame of video to when you see it in the player. Set this if you want lower latency for your live stream. **Note**: Reconnect windows are incompatible with Reduced Latency and will always be set to zero (0) seconds. See the [Reduce live stream latency guide](https://docs.mux.com/guides/video/reduce-live-stream-latency) to understand the tradeoffs. # noqa: E501 :return: The reduced_latency of this LiveStream. # noqa: E501 :rtype: bool @@ -395,7 +428,7 @@ def reduced_latency(self): def reduced_latency(self, reduced_latency): """Sets the reduced_latency of this LiveStream. - Latency is the time from when the streamer does something in real life to when you see it happen in the player. Set this if you want lower latency for your live stream. **Note**: Reconnect windows are incompatible with Reduced Latency and will always be set to zero (0) seconds. See the [Reduce live stream latency guide](https://docs.mux.com/guides/video/reduce-live-stream-latency) to understand the tradeoffs. # noqa: E501 + This field is deprecated. Please use latency_mode instead. Latency is the time from when the streamer transmits a frame of video to when you see it in the player. Set this if you want lower latency for your live stream. **Note**: Reconnect windows are incompatible with Reduced Latency and will always be set to zero (0) seconds. See the [Reduce live stream latency guide](https://docs.mux.com/guides/video/reduce-live-stream-latency) to understand the tradeoffs. # noqa: E501 :param reduced_latency: The reduced_latency of this LiveStream. # noqa: E501 :type reduced_latency: bool @@ -407,7 +440,7 @@ def reduced_latency(self, reduced_latency): def low_latency(self): """Gets the low_latency of this LiveStream. # noqa: E501 - Latency is the time from when the streamer does something in real life to when you see it happen in the player. Setting this option will enable compatibility with the LL-HLS specification for low-latency streaming. This typically has lower latency than Reduced Latency streams, and cannot be combined with Reduced Latency. Note: Reconnect windows are incompatible with Low Latency and will always be set to zero (0) seconds. # noqa: E501 + This field is deprecated. Please use latency_mode instead. Latency is the time from when the streamer transmits a frame of video to when you see it in the player. Setting this option will enable compatibility with the LL-HLS specification for low-latency streaming. This typically has lower latency than Reduced Latency streams, and cannot be combined with Reduced Latency. Note: Reconnect windows are incompatible with Low Latency and will always be set to zero (0) seconds. # noqa: E501 :return: The low_latency of this LiveStream. # noqa: E501 :rtype: bool @@ -418,7 +451,7 @@ def low_latency(self): def low_latency(self, low_latency): """Sets the low_latency of this LiveStream. - Latency is the time from when the streamer does something in real life to when you see it happen in the player. Setting this option will enable compatibility with the LL-HLS specification for low-latency streaming. This typically has lower latency than Reduced Latency streams, and cannot be combined with Reduced Latency. Note: Reconnect windows are incompatible with Low Latency and will always be set to zero (0) seconds. # noqa: E501 + This field is deprecated. Please use latency_mode instead. Latency is the time from when the streamer transmits a frame of video to when you see it in the player. Setting this option will enable compatibility with the LL-HLS specification for low-latency streaming. This typically has lower latency than Reduced Latency streams, and cannot be combined with Reduced Latency. Note: Reconnect windows are incompatible with Low Latency and will always be set to zero (0) seconds. # noqa: E501 :param low_latency: The low_latency of this LiveStream. # noqa: E501 :type low_latency: bool @@ -449,6 +482,35 @@ def simulcast_targets(self, simulcast_targets): self._simulcast_targets = simulcast_targets + @property + def latency_mode(self): + """Gets the latency_mode of this LiveStream. # noqa: E501 + + 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. The Low Latency value is a beta feature. Note: Reconnect windows are incompatible with Reduced Latency and Low Latency and will always be set to zero (0) seconds. Read more here: https://mux.com/blog/introducing-low-latency-live-streaming/ # noqa: E501 + + :return: The latency_mode of this LiveStream. # noqa: E501 + :rtype: str + """ + return self._latency_mode + + @latency_mode.setter + def latency_mode(self, latency_mode): + """Sets the latency_mode of this LiveStream. + + 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. The Low Latency value is a beta feature. Note: Reconnect windows are incompatible with Reduced Latency and Low Latency and will always be set to zero (0) seconds. Read more here: https://mux.com/blog/introducing-low-latency-live-streaming/ # noqa: E501 + + :param latency_mode: The latency_mode of this LiveStream. # noqa: E501 + :type latency_mode: str + """ + allowed_values = ["low", "reduced", "standard"] # noqa: E501 + if self.local_vars_configuration.client_side_validation and latency_mode not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `latency_mode` ({0}), must be one of {1}" # noqa: E501 + .format(latency_mode, allowed_values) + ) + + self._latency_mode = latency_mode + @property def test(self): """Gets the test of this LiveStream. # noqa: E501 diff --git a/mux_python/models/live_stream_embedded_subtitle_settings.py b/mux_python/models/live_stream_embedded_subtitle_settings.py index a85c040..0ace26a 100644 --- a/mux_python/models/live_stream_embedded_subtitle_settings.py +++ b/mux_python/models/live_stream_embedded_subtitle_settings.py @@ -95,7 +95,7 @@ def name(self, name): def passthrough(self): """Gets the passthrough of this LiveStreamEmbeddedSubtitleSettings. # noqa: E501 - Arbitrary metadata set for the live stream closed caption track. Max 255 characters. # noqa: E501 + Arbitrary user-supplied metadata set for the live stream closed caption track. Max 255 characters. # noqa: E501 :return: The passthrough of this LiveStreamEmbeddedSubtitleSettings. # noqa: E501 :rtype: str @@ -106,7 +106,7 @@ def passthrough(self): def passthrough(self, passthrough): """Sets the passthrough of this LiveStreamEmbeddedSubtitleSettings. - Arbitrary metadata set for the live stream closed caption track. Max 255 characters. # noqa: E501 + Arbitrary user-supplied metadata set for the live stream closed caption track. Max 255 characters. # noqa: E501 :param passthrough: The passthrough of this LiveStreamEmbeddedSubtitleSettings. # noqa: E501 :type passthrough: str diff --git a/mux_python/models/playback_restriction.py b/mux_python/models/playback_restriction.py new file mode 100644 index 0000000..349d4b5 --- /dev/null +++ b/mux_python/models/playback_restriction.py @@ -0,0 +1,213 @@ +# coding: utf-8 + +""" + Mux API + + Mux is how developers build online video. This API encompasses both Mux Video and Mux Data functionality to help you build your video-related projects better and faster than ever before. # noqa: E501 + + The version of the OpenAPI document: v1 + Contact: devex@mux.com + Generated by: https://openapi-generator.tech +""" + + +import inspect +import pprint +import re # noqa: F401 +import six + +from mux_python.configuration import Configuration + + +class PlaybackRestriction(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'id': 'str', + 'created_at': 'str', + 'updated_at': 'str', + 'referrer': 'ReferrerDomainRestriction' + } + + attribute_map = { + 'id': 'id', + 'created_at': 'created_at', + 'updated_at': 'updated_at', + 'referrer': 'referrer' + } + + def __init__(self, id=None, created_at=None, updated_at=None, referrer=None, local_vars_configuration=None): # noqa: E501 + """PlaybackRestriction - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration + + self._id = None + self._created_at = None + self._updated_at = None + self._referrer = None + self.discriminator = None + + if id is not None: + self.id = id + if created_at is not None: + self.created_at = created_at + if updated_at is not None: + self.updated_at = updated_at + if referrer is not None: + self.referrer = referrer + + @property + def id(self): + """Gets the id of this PlaybackRestriction. # noqa: E501 + + Unique identifier for the Playback Restriction. Max 255 characters. # noqa: E501 + + :return: The id of this PlaybackRestriction. # noqa: E501 + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this PlaybackRestriction. + + Unique identifier for the Playback Restriction. Max 255 characters. # noqa: E501 + + :param id: The id of this PlaybackRestriction. # noqa: E501 + :type id: str + """ + + self._id = id + + @property + def created_at(self): + """Gets the created_at of this PlaybackRestriction. # noqa: E501 + + Time the Playback Restriction was created, defined as a Unix timestamp (seconds since epoch). # noqa: E501 + + :return: The created_at of this PlaybackRestriction. # noqa: E501 + :rtype: str + """ + return self._created_at + + @created_at.setter + def created_at(self, created_at): + """Sets the created_at of this PlaybackRestriction. + + Time the Playback Restriction was created, defined as a Unix timestamp (seconds since epoch). # noqa: E501 + + :param created_at: The created_at of this PlaybackRestriction. # noqa: E501 + :type created_at: str + """ + + self._created_at = created_at + + @property + def updated_at(self): + """Gets the updated_at of this PlaybackRestriction. # noqa: E501 + + Time the Playback Restriction was last updated, defined as a Unix timestamp (seconds since epoch). # noqa: E501 + + :return: The updated_at of this PlaybackRestriction. # noqa: E501 + :rtype: str + """ + return self._updated_at + + @updated_at.setter + def updated_at(self, updated_at): + """Sets the updated_at of this PlaybackRestriction. + + Time the Playback Restriction was last updated, defined as a Unix timestamp (seconds since epoch). # noqa: E501 + + :param updated_at: The updated_at of this PlaybackRestriction. # noqa: E501 + :type updated_at: str + """ + + self._updated_at = updated_at + + @property + def referrer(self): + """Gets the referrer of this PlaybackRestriction. # noqa: E501 + + + :return: The referrer of this PlaybackRestriction. # noqa: E501 + :rtype: ReferrerDomainRestriction + """ + return self._referrer + + @referrer.setter + def referrer(self, referrer): + """Sets the referrer of this PlaybackRestriction. + + + :param referrer: The referrer of this PlaybackRestriction. # noqa: E501 + :type referrer: ReferrerDomainRestriction + """ + + self._referrer = referrer + + def to_dict(self, serialize=False): + """Returns the model properties as a dict""" + result = {} + + def convert(x): + if hasattr(x, "to_dict"): + args = inspect.getargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr + if isinstance(value, list): + result[attr] = list(map( + lambda x: convert(x), + value + )) + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) + else: + result[attr] = convert(value) + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, PlaybackRestriction): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, PlaybackRestriction): + return True + + return self.to_dict() != other.to_dict() diff --git a/mux_python/models/playback_restriction_response.py b/mux_python/models/playback_restriction_response.py new file mode 100644 index 0000000..e8a1638 --- /dev/null +++ b/mux_python/models/playback_restriction_response.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Mux API + + Mux is how developers build online video. This API encompasses both Mux Video and Mux Data functionality to help you build your video-related projects better and faster than ever before. # noqa: E501 + + The version of the OpenAPI document: v1 + Contact: devex@mux.com + Generated by: https://openapi-generator.tech +""" + + +import inspect +import pprint +import re # noqa: F401 +import six + +from mux_python.configuration import Configuration + + +class PlaybackRestrictionResponse(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + } + + attribute_map = { + } + + def __init__(self, local_vars_configuration=None): # noqa: E501 + """PlaybackRestrictionResponse - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration + self.discriminator = None + + def to_dict(self, serialize=False): + """Returns the model properties as a dict""" + result = {} + + def convert(x): + if hasattr(x, "to_dict"): + args = inspect.getargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr + if isinstance(value, list): + result[attr] = list(map( + lambda x: convert(x), + value + )) + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) + else: + result[attr] = convert(value) + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, PlaybackRestrictionResponse): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, PlaybackRestrictionResponse): + return True + + return self.to_dict() != other.to_dict() diff --git a/mux_python/models/referrer_domain_restriction.py b/mux_python/models/referrer_domain_restriction.py new file mode 100644 index 0000000..39a015a --- /dev/null +++ b/mux_python/models/referrer_domain_restriction.py @@ -0,0 +1,159 @@ +# coding: utf-8 + +""" + Mux API + + Mux is how developers build online video. This API encompasses both Mux Video and Mux Data functionality to help you build your video-related projects better and faster than ever before. # noqa: E501 + + The version of the OpenAPI document: v1 + Contact: devex@mux.com + Generated by: https://openapi-generator.tech +""" + + +import inspect +import pprint +import re # noqa: F401 +import six + +from mux_python.configuration import Configuration + + +class ReferrerDomainRestriction(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'allowed_domains': 'list[str]', + 'allow_no_referrer': 'bool' + } + + attribute_map = { + 'allowed_domains': 'allowed_domains', + 'allow_no_referrer': 'allow_no_referrer' + } + + def __init__(self, allowed_domains=None, allow_no_referrer=False, local_vars_configuration=None): # noqa: E501 + """ReferrerDomainRestriction - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration + + self._allowed_domains = None + self._allow_no_referrer = None + self.discriminator = None + + if allowed_domains is not None: + self.allowed_domains = allowed_domains + if allow_no_referrer is not None: + self.allow_no_referrer = allow_no_referrer + + @property + def allowed_domains(self): + """Gets the allowed_domains of this ReferrerDomainRestriction. # noqa: E501 + + List of domains allowed to play videos. Possible values are * `[]` Empty Array indicates deny video playback requests for all domains * `[\"*\"]` A Single Wildcard `*` entry means allow video playback requests from any domain * `[\"*.example.com\", \"foo.com\"]` A list of up to 10 domains or valid dns-style wildcards # noqa: E501 + + :return: The allowed_domains of this ReferrerDomainRestriction. # noqa: E501 + :rtype: list[str] + """ + return self._allowed_domains + + @allowed_domains.setter + def allowed_domains(self, allowed_domains): + """Sets the allowed_domains of this ReferrerDomainRestriction. + + List of domains allowed to play videos. Possible values are * `[]` Empty Array indicates deny video playback requests for all domains * `[\"*\"]` A Single Wildcard `*` entry means allow video playback requests from any domain * `[\"*.example.com\", \"foo.com\"]` A list of up to 10 domains or valid dns-style wildcards # noqa: E501 + + :param allowed_domains: The allowed_domains of this ReferrerDomainRestriction. # noqa: E501 + :type allowed_domains: list[str] + """ + + self._allowed_domains = allowed_domains + + @property + def allow_no_referrer(self): + """Gets the allow_no_referrer of this ReferrerDomainRestriction. # noqa: E501 + + A boolean to determine whether to allow or deny HTTP requests without `Referer` HTTP request header. Playback requests coming from non-web/native applications like iOS, Android or smart TVs will not have a `Referer` HTTP header. Set this value to `true` to allow these playback requests. # noqa: E501 + + :return: The allow_no_referrer of this ReferrerDomainRestriction. # noqa: E501 + :rtype: bool + """ + return self._allow_no_referrer + + @allow_no_referrer.setter + def allow_no_referrer(self, allow_no_referrer): + """Sets the allow_no_referrer of this ReferrerDomainRestriction. + + A boolean to determine whether to allow or deny HTTP requests without `Referer` HTTP request header. Playback requests coming from non-web/native applications like iOS, Android or smart TVs will not have a `Referer` HTTP header. Set this value to `true` to allow these playback requests. # noqa: E501 + + :param allow_no_referrer: The allow_no_referrer of this ReferrerDomainRestriction. # noqa: E501 + :type allow_no_referrer: bool + """ + + self._allow_no_referrer = allow_no_referrer + + def to_dict(self, serialize=False): + """Returns the model properties as a dict""" + result = {} + + def convert(x): + if hasattr(x, "to_dict"): + args = inspect.getargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr + if isinstance(value, list): + result[attr] = list(map( + lambda x: convert(x), + value + )) + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) + else: + result[attr] = convert(value) + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ReferrerDomainRestriction): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, ReferrerDomainRestriction): + return True + + return self.to_dict() != other.to_dict() diff --git a/mux_python/models/simulcast_target.py b/mux_python/models/simulcast_target.py index 7831783..cd5cbe1 100644 --- a/mux_python/models/simulcast_target.py +++ b/mux_python/models/simulcast_target.py @@ -100,7 +100,7 @@ def id(self, id): def passthrough(self): """Gets the passthrough of this SimulcastTarget. # noqa: E501 - Arbitrary Metadata set when creating a simulcast target. # noqa: E501 + Arbitrary user-supplied metadata set when creating a simulcast target. # noqa: E501 :return: The passthrough of this SimulcastTarget. # noqa: E501 :rtype: str @@ -111,7 +111,7 @@ def passthrough(self): def passthrough(self, passthrough): """Sets the passthrough of this SimulcastTarget. - Arbitrary Metadata set when creating a simulcast target. # noqa: E501 + Arbitrary user-supplied metadata set when creating a simulcast target. # noqa: E501 :param passthrough: The passthrough of this SimulcastTarget. # noqa: E501 :type passthrough: str diff --git a/mux_python/models/track.py b/mux_python/models/track.py index f196556..8d37e9f 100644 --- a/mux_python/models/track.py +++ b/mux_python/models/track.py @@ -405,7 +405,7 @@ def closed_captions(self, closed_captions): def passthrough(self): """Gets the passthrough of this Track. # noqa: E501 - Arbitrary metadata set for the track either when creating the asset or track. This parameter is set for `text` type and `subtitles` text type track. Max 255 characters. # noqa: E501 + Arbitrary user-supplied metadata set for the track either when creating the asset or track. This parameter is set for `text` type and `subtitles` text type track. Max 255 characters. # noqa: E501 :return: The passthrough of this Track. # noqa: E501 :rtype: str @@ -416,7 +416,7 @@ def passthrough(self): def passthrough(self, passthrough): """Sets the passthrough of this Track. - Arbitrary metadata set for the track either when creating the asset or track. This parameter is set for `text` type and `subtitles` text type track. Max 255 characters. # noqa: E501 + Arbitrary user-supplied metadata set for the track either when creating the asset or track. This parameter is set for `text` type and `subtitles` text type track. Max 255 characters. # noqa: E501 :param passthrough: The passthrough of this Track. # noqa: E501 :type passthrough: str diff --git a/mux_python/models/update_asset_request.py b/mux_python/models/update_asset_request.py new file mode 100644 index 0000000..f73477b --- /dev/null +++ b/mux_python/models/update_asset_request.py @@ -0,0 +1,131 @@ +# coding: utf-8 + +""" + Mux API + + Mux is how developers build online video. This API encompasses both Mux Video and Mux Data functionality to help you build your video-related projects better and faster than ever before. # noqa: E501 + + The version of the OpenAPI document: v1 + Contact: devex@mux.com + Generated by: https://openapi-generator.tech +""" + + +import inspect +import pprint +import re # noqa: F401 +import six + +from mux_python.configuration import Configuration + + +class UpdateAssetRequest(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'passthrough': 'str' + } + + attribute_map = { + 'passthrough': 'passthrough' + } + + def __init__(self, passthrough=None, local_vars_configuration=None): # noqa: E501 + """UpdateAssetRequest - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration + + self._passthrough = None + self.discriminator = None + + if passthrough is not None: + self.passthrough = passthrough + + @property + def passthrough(self): + """Gets the passthrough of this UpdateAssetRequest. # noqa: E501 + + Arbitrary metadata set for the Asset. Max 255 characters. In order to clear this value, the field should be included with an empty string value. # noqa: E501 + + :return: The passthrough of this UpdateAssetRequest. # noqa: E501 + :rtype: str + """ + return self._passthrough + + @passthrough.setter + def passthrough(self, passthrough): + """Sets the passthrough of this UpdateAssetRequest. + + Arbitrary metadata set for the Asset. Max 255 characters. In order to clear this value, the field should be included with an empty string value. # noqa: E501 + + :param passthrough: The passthrough of this UpdateAssetRequest. # noqa: E501 + :type passthrough: str + """ + + self._passthrough = passthrough + + def to_dict(self, serialize=False): + """Returns the model properties as a dict""" + result = {} + + def convert(x): + if hasattr(x, "to_dict"): + args = inspect.getargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr + if isinstance(value, list): + result[attr] = list(map( + lambda x: convert(x), + value + )) + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) + else: + result[attr] = convert(value) + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, UpdateAssetRequest): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, UpdateAssetRequest): + return True + + return self.to_dict() != other.to_dict() diff --git a/mux_python/models/update_live_stream_request.py b/mux_python/models/update_live_stream_request.py new file mode 100644 index 0000000..4d8c4cc --- /dev/null +++ b/mux_python/models/update_live_stream_request.py @@ -0,0 +1,199 @@ +# coding: utf-8 + +""" + Mux API + + Mux is how developers build online video. This API encompasses both Mux Video and Mux Data functionality to help you build your video-related projects better and faster than ever before. # noqa: E501 + + The version of the OpenAPI document: v1 + Contact: devex@mux.com + Generated by: https://openapi-generator.tech +""" + + +import inspect +import pprint +import re # noqa: F401 +import six + +from mux_python.configuration import Configuration + + +class UpdateLiveStreamRequest(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'passthrough': 'str', + 'latency_mode': 'str', + 'reconnect_window': 'float' + } + + attribute_map = { + 'passthrough': 'passthrough', + 'latency_mode': 'latency_mode', + 'reconnect_window': 'reconnect_window' + } + + def __init__(self, passthrough=None, latency_mode=None, reconnect_window=None, local_vars_configuration=None): # noqa: E501 + """UpdateLiveStreamRequest - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration + + self._passthrough = None + self._latency_mode = None + self._reconnect_window = None + self.discriminator = None + + if passthrough is not None: + self.passthrough = passthrough + if latency_mode is not None: + self.latency_mode = latency_mode + if reconnect_window is not None: + self.reconnect_window = reconnect_window + + @property + def passthrough(self): + """Gets the passthrough of this UpdateLiveStreamRequest. # noqa: E501 + + Arbitrary user-supplied metadata set for the live stream. Max 255 characters. In order to clear this value, the field should be included with an empty-string value. # noqa: E501 + + :return: The passthrough of this UpdateLiveStreamRequest. # noqa: E501 + :rtype: str + """ + return self._passthrough + + @passthrough.setter + def passthrough(self, passthrough): + """Sets the passthrough of this UpdateLiveStreamRequest. + + Arbitrary user-supplied metadata set for the live stream. Max 255 characters. In order to clear this value, the field should be included with an empty-string value. # noqa: E501 + + :param passthrough: The passthrough of this UpdateLiveStreamRequest. # noqa: E501 + :type passthrough: str + """ + + self._passthrough = passthrough + + @property + def latency_mode(self): + """Gets the latency_mode of this UpdateLiveStreamRequest. # noqa: E501 + + 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. The Low Latency value is a beta feature. Note: Reconnect windows are incompatible with Reduced Latency and Low Latency and will always be set to zero (0) seconds. Read more here: https://mux.com/blog/introducing-low-latency-live-streaming/ # noqa: E501 + + :return: The latency_mode of this UpdateLiveStreamRequest. # noqa: E501 + :rtype: str + """ + return self._latency_mode + + @latency_mode.setter + def latency_mode(self, latency_mode): + """Sets the latency_mode of this UpdateLiveStreamRequest. + + 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. The Low Latency value is a beta feature. Note: Reconnect windows are incompatible with Reduced Latency and Low Latency and will always be set to zero (0) seconds. Read more here: https://mux.com/blog/introducing-low-latency-live-streaming/ # noqa: E501 + + :param latency_mode: The latency_mode of this UpdateLiveStreamRequest. # noqa: E501 + :type latency_mode: str + """ + allowed_values = ["low", "reduced", "standard"] # noqa: E501 + if self.local_vars_configuration.client_side_validation and latency_mode not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `latency_mode` ({0}), must be one of {1}" # noqa: E501 + .format(latency_mode, allowed_values) + ) + + self._latency_mode = latency_mode + + @property + def reconnect_window(self): + """Gets the reconnect_window of this UpdateLiveStreamRequest. # noqa: E501 + + 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. # noqa: E501 + + :return: The reconnect_window of this UpdateLiveStreamRequest. # noqa: E501 + :rtype: float + """ + return self._reconnect_window + + @reconnect_window.setter + def reconnect_window(self, reconnect_window): + """Sets the reconnect_window of this UpdateLiveStreamRequest. + + 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. # noqa: E501 + + :param reconnect_window: The reconnect_window of this UpdateLiveStreamRequest. # noqa: E501 + :type reconnect_window: float + """ + if (self.local_vars_configuration.client_side_validation and + reconnect_window is not None and reconnect_window > 300): # noqa: E501 + raise ValueError("Invalid value for `reconnect_window`, must be a value less than or equal to `300`") # noqa: E501 + if (self.local_vars_configuration.client_side_validation and + reconnect_window is not None and reconnect_window < 0.1): # noqa: E501 + raise ValueError("Invalid value for `reconnect_window`, must be a value greater than or equal to `0.1`") # noqa: E501 + + self._reconnect_window = reconnect_window + + def to_dict(self, serialize=False): + """Returns the model properties as a dict""" + result = {} + + def convert(x): + if hasattr(x, "to_dict"): + args = inspect.getargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr + if isinstance(value, list): + result[attr] = list(map( + lambda x: convert(x), + value + )) + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) + else: + result[attr] = convert(value) + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, UpdateLiveStreamRequest): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, UpdateLiveStreamRequest): + return True + + return self.to_dict() != other.to_dict() diff --git a/mux_python/models/update_referrer_domain_restriction_request.py b/mux_python/models/update_referrer_domain_restriction_request.py new file mode 100644 index 0000000..c993021 --- /dev/null +++ b/mux_python/models/update_referrer_domain_restriction_request.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Mux API + + Mux is how developers build online video. This API encompasses both Mux Video and Mux Data functionality to help you build your video-related projects better and faster than ever before. # noqa: E501 + + The version of the OpenAPI document: v1 + Contact: devex@mux.com + Generated by: https://openapi-generator.tech +""" + + +import inspect +import pprint +import re # noqa: F401 +import six + +from mux_python.configuration import Configuration + + +class UpdateReferrerDomainRestrictionRequest(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + } + + attribute_map = { + } + + def __init__(self, local_vars_configuration=None): # noqa: E501 + """UpdateReferrerDomainRestrictionRequest - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration.get_default_copy() + self.local_vars_configuration = local_vars_configuration + self.discriminator = None + + def to_dict(self, serialize=False): + """Returns the model properties as a dict""" + result = {} + + def convert(x): + if hasattr(x, "to_dict"): + args = inspect.getargspec(x.to_dict).args + if len(args) == 1: + return x.to_dict() + else: + return x.to_dict(serialize) + else: + return x + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + attr = self.attribute_map.get(attr, attr) if serialize else attr + if isinstance(value, list): + result[attr] = list(map( + lambda x: convert(x), + value + )) + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], convert(item[1])), + value.items() + )) + else: + result[attr] = convert(value) + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, UpdateReferrerDomainRestrictionRequest): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, UpdateReferrerDomainRestrictionRequest): + return True + + return self.to_dict() != other.to_dict() diff --git a/setup.py b/setup.py index cd220af..ca39d46 100644 --- a/setup.py +++ b/setup.py @@ -14,7 +14,7 @@ from setuptools import setup, find_packages # noqa: H301 NAME = "mux_python" -VERSION = "3.0.0" +VERSION = "3.2.0" # To install the library, run the following # # python setup.py install diff --git a/test/test_create_playback_restriction_request.py b/test/test_create_playback_restriction_request.py new file mode 100644 index 0000000..4a58b17 --- /dev/null +++ b/test/test_create_playback_restriction_request.py @@ -0,0 +1,56 @@ +# coding: utf-8 + +""" + Mux API + + Mux is how developers build online video. This API encompasses both Mux Video and Mux Data functionality to help you build your video-related projects better and faster than ever before. # noqa: E501 + + The version of the OpenAPI document: v1 + Contact: devex@mux.com + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import mux_python +from mux_python.models.create_playback_restriction_request import CreatePlaybackRestrictionRequest # noqa: E501 +from mux_python.rest import ApiException + +class TestCreatePlaybackRestrictionRequest(unittest.TestCase): + """CreatePlaybackRestrictionRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test CreatePlaybackRestrictionRequest + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = mux_python.models.create_playback_restriction_request.CreatePlaybackRestrictionRequest() # noqa: E501 + if include_optional : + return CreatePlaybackRestrictionRequest( + referrer = mux_python.models.referrer_domain_restriction.ReferrerDomainRestriction( + allowed_domains = [ + '' + ], + allow_no_referrer = True, ) + ) + else : + return CreatePlaybackRestrictionRequest( + ) + + def testCreatePlaybackRestrictionRequest(self): + """Test CreatePlaybackRestrictionRequest""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_playback_restriction.py b/test/test_playback_restriction.py new file mode 100644 index 0000000..0482179 --- /dev/null +++ b/test/test_playback_restriction.py @@ -0,0 +1,59 @@ +# coding: utf-8 + +""" + Mux API + + Mux is how developers build online video. This API encompasses both Mux Video and Mux Data functionality to help you build your video-related projects better and faster than ever before. # noqa: E501 + + The version of the OpenAPI document: v1 + Contact: devex@mux.com + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import mux_python +from mux_python.models.playback_restriction import PlaybackRestriction # noqa: E501 +from mux_python.rest import ApiException + +class TestPlaybackRestriction(unittest.TestCase): + """PlaybackRestriction unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test PlaybackRestriction + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = mux_python.models.playback_restriction.PlaybackRestriction() # noqa: E501 + if include_optional : + return PlaybackRestriction( + id = '', + created_at = '', + updated_at = '', + referrer = mux_python.models.referrer_domain_restriction.ReferrerDomainRestriction( + allowed_domains = [ + '' + ], + allow_no_referrer = True, ) + ) + else : + return PlaybackRestriction( + ) + + def testPlaybackRestriction(self): + """Test PlaybackRestriction""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_playback_restriction_response.py b/test/test_playback_restriction_response.py new file mode 100644 index 0000000..e41aac2 --- /dev/null +++ b/test/test_playback_restriction_response.py @@ -0,0 +1,51 @@ +# coding: utf-8 + +""" + Mux API + + Mux is how developers build online video. This API encompasses both Mux Video and Mux Data functionality to help you build your video-related projects better and faster than ever before. # noqa: E501 + + The version of the OpenAPI document: v1 + Contact: devex@mux.com + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import mux_python +from mux_python.models.playback_restriction_response import PlaybackRestrictionResponse # noqa: E501 +from mux_python.rest import ApiException + +class TestPlaybackRestrictionResponse(unittest.TestCase): + """PlaybackRestrictionResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test PlaybackRestrictionResponse + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = mux_python.models.playback_restriction_response.PlaybackRestrictionResponse() # noqa: E501 + if include_optional : + return PlaybackRestrictionResponse( + ) + else : + return PlaybackRestrictionResponse( + ) + + def testPlaybackRestrictionResponse(self): + """Test PlaybackRestrictionResponse""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_playback_restrictions_api.py b/test/test_playback_restrictions_api.py new file mode 100644 index 0000000..3f8947d --- /dev/null +++ b/test/test_playback_restrictions_api.py @@ -0,0 +1,69 @@ +# coding: utf-8 + +""" + Mux API + + Mux is how developers build online video. This API encompasses both Mux Video and Mux Data functionality to help you build your video-related projects better and faster than ever before. # noqa: E501 + + The version of the OpenAPI document: v1 + Contact: devex@mux.com + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest + +import mux_python +from mux_python.api.playback_restrictions_api import PlaybackRestrictionsApi # noqa: E501 +from mux_python.rest import ApiException + + +class TestPlaybackRestrictionsApi(unittest.TestCase): + """PlaybackRestrictionsApi unit test stubs""" + + def setUp(self): + self.api = mux_python.api.playback_restrictions_api.PlaybackRestrictionsApi() # noqa: E501 + + def tearDown(self): + pass + + def test_create_playback_restriction(self): + """Test case for create_playback_restriction + + Create a Playback Restriction # noqa: E501 + """ + pass + + def test_delete_playback_restriction(self): + """Test case for delete_playback_restriction + + Delete a Playback Restriction # noqa: E501 + """ + pass + + def test_get_playback_restriction(self): + """Test case for get_playback_restriction + + Retrieve a Playback Restriction # noqa: E501 + """ + pass + + def test_list_playback_restrictions(self): + """Test case for list_playback_restrictions + + List Playback Restrictions # noqa: E501 + """ + pass + + def test_update_referrer_domain_restriction(self): + """Test case for update_referrer_domain_restriction + + Update the Referrer Playback Restriction # noqa: E501 + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_referrer_domain_restriction.py b/test/test_referrer_domain_restriction.py new file mode 100644 index 0000000..469fb61 --- /dev/null +++ b/test/test_referrer_domain_restriction.py @@ -0,0 +1,55 @@ +# coding: utf-8 + +""" + Mux API + + Mux is how developers build online video. This API encompasses both Mux Video and Mux Data functionality to help you build your video-related projects better and faster than ever before. # noqa: E501 + + The version of the OpenAPI document: v1 + Contact: devex@mux.com + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import mux_python +from mux_python.models.referrer_domain_restriction import ReferrerDomainRestriction # noqa: E501 +from mux_python.rest import ApiException + +class TestReferrerDomainRestriction(unittest.TestCase): + """ReferrerDomainRestriction unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test ReferrerDomainRestriction + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = mux_python.models.referrer_domain_restriction.ReferrerDomainRestriction() # noqa: E501 + if include_optional : + return ReferrerDomainRestriction( + allowed_domains = [ + '' + ], + allow_no_referrer = True + ) + else : + return ReferrerDomainRestriction( + ) + + def testReferrerDomainRestriction(self): + """Test ReferrerDomainRestriction""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_update_asset_request.py b/test/test_update_asset_request.py new file mode 100644 index 0000000..fb78fa0 --- /dev/null +++ b/test/test_update_asset_request.py @@ -0,0 +1,52 @@ +# coding: utf-8 + +""" + Mux API + + Mux is how developers build online video. This API encompasses both Mux Video and Mux Data functionality to help you build your video-related projects better and faster than ever before. # noqa: E501 + + The version of the OpenAPI document: v1 + Contact: devex@mux.com + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import mux_python +from mux_python.models.update_asset_request import UpdateAssetRequest # noqa: E501 +from mux_python.rest import ApiException + +class TestUpdateAssetRequest(unittest.TestCase): + """UpdateAssetRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test UpdateAssetRequest + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = mux_python.models.update_asset_request.UpdateAssetRequest() # noqa: E501 + if include_optional : + return UpdateAssetRequest( + passthrough = '' + ) + else : + return UpdateAssetRequest( + ) + + def testUpdateAssetRequest(self): + """Test UpdateAssetRequest""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_update_live_stream_request.py b/test/test_update_live_stream_request.py new file mode 100644 index 0000000..64110ca --- /dev/null +++ b/test/test_update_live_stream_request.py @@ -0,0 +1,54 @@ +# coding: utf-8 + +""" + Mux API + + Mux is how developers build online video. This API encompasses both Mux Video and Mux Data functionality to help you build your video-related projects better and faster than ever before. # noqa: E501 + + The version of the OpenAPI document: v1 + Contact: devex@mux.com + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import mux_python +from mux_python.models.update_live_stream_request import UpdateLiveStreamRequest # noqa: E501 +from mux_python.rest import ApiException + +class TestUpdateLiveStreamRequest(unittest.TestCase): + """UpdateLiveStreamRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test UpdateLiveStreamRequest + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = mux_python.models.update_live_stream_request.UpdateLiveStreamRequest() # noqa: E501 + if include_optional : + return UpdateLiveStreamRequest( + passthrough = '', + latency_mode = 'low', + reconnect_window = 0.1 + ) + else : + return UpdateLiveStreamRequest( + ) + + def testUpdateLiveStreamRequest(self): + """Test UpdateLiveStreamRequest""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_update_referrer_domain_restriction_request.py b/test/test_update_referrer_domain_restriction_request.py new file mode 100644 index 0000000..ab80177 --- /dev/null +++ b/test/test_update_referrer_domain_restriction_request.py @@ -0,0 +1,51 @@ +# coding: utf-8 + +""" + Mux API + + Mux is how developers build online video. This API encompasses both Mux Video and Mux Data functionality to help you build your video-related projects better and faster than ever before. # noqa: E501 + + The version of the OpenAPI document: v1 + Contact: devex@mux.com + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import mux_python +from mux_python.models.update_referrer_domain_restriction_request import UpdateReferrerDomainRestrictionRequest # noqa: E501 +from mux_python.rest import ApiException + +class TestUpdateReferrerDomainRestrictionRequest(unittest.TestCase): + """UpdateReferrerDomainRestrictionRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test UpdateReferrerDomainRestrictionRequest + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = mux_python.models.update_referrer_domain_restriction_request.UpdateReferrerDomainRestrictionRequest() # noqa: E501 + if include_optional : + return UpdateReferrerDomainRestrictionRequest( + ) + else : + return UpdateReferrerDomainRestrictionRequest( + ) + + def testUpdateReferrerDomainRestrictionRequest(self): + """Test UpdateReferrerDomainRestrictionRequest""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main()