From 86a1de40b1cc3214f1c81a33d0350bbd4f5ab543 Mon Sep 17 00:00:00 2001 From: Justin Sanford Date: Wed, 13 Aug 2025 16:00:19 -0700 Subject: [PATCH 1/3] 5.1.0 --- .openapi-generator/FILES | 14 +++++++ docs/Asset.md | 1 + docs/AssetsApi.md | 8 ++-- docs/CreateAssetRequest.md | 1 + docs/CreateLiveStreamRequest.md | 1 + docs/ListAssetsResponse.md | 1 + docs/LiveStream.md | 5 ++- docs/UpdateLiveStreamRequest.md | 1 + gen/generator-config.json | 2 +- mux_python/__init__.py | 9 ++++- mux_python/api/__init__.py | 1 + mux_python/api/assets_api.py | 11 ++++- mux_python/api_client.py | 2 +- mux_python/configuration.py | 2 +- mux_python/models/__init__.py | 6 +++ mux_python/models/asset.py | 32 +++++++++++++-- mux_python/models/create_asset_request.py | 34 ++++++++++++++-- .../models/create_live_stream_request.py | 32 +++++++++++++-- mux_python/models/list_assets_response.py | 29 +++++++++++++- mux_python/models/live_stream.py | 40 +++++++++++++++---- ...live_stream_generated_subtitle_settings.py | 2 +- .../models/update_live_stream_request.py | 32 +++++++++++++-- setup.py | 2 +- 23 files changed, 235 insertions(+), 33 deletions(-) diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES index a68d8ca..0466499 100644 --- a/.openapi-generator/FILES +++ b/.openapi-generator/FILES @@ -2,12 +2,17 @@ .gitlab-ci.yml README.md docs/AbridgedVideoView.md +docs/Annotation.md +docs/AnnotationInput.md +docs/AnnotationResponse.md +docs/AnnotationsApi.md docs/Asset.md docs/AssetErrors.md docs/AssetGeneratedSubtitleSettings.md docs/AssetMaster.md docs/AssetMetadata.md docs/AssetNonStandardInputReasons.md +docs/AssetProgress.md docs/AssetRecordingTimes.md docs/AssetResponse.md docs/AssetStaticRenditions.md @@ -77,6 +82,7 @@ docs/InputTrack.md docs/Insight.md docs/LaunchWebInputResponse.md docs/ListAllMetricValuesResponse.md +docs/ListAnnotationsResponse.md docs/ListAssetsResponse.md docs/ListBreakdownValuesResponse.md docs/ListBreakdownValuesResponseMeta.md @@ -108,6 +114,7 @@ docs/ListWebInputsResponse.md docs/LiveStream.md docs/LiveStreamEmbeddedSubtitleSettings.md docs/LiveStreamGeneratedSubtitleSettings.md +docs/LiveStreamMetadata.md docs/LiveStreamResponse.md docs/LiveStreamStatus.md docs/LiveStreamsApi.md @@ -177,6 +184,7 @@ docs/WebInputResponse.md docs/WebInputsApi.md mux_python/__init__.py mux_python/api/__init__.py +mux_python/api/annotations_api.py mux_python/api/assets_api.py mux_python/api/delivery_usage_api.py mux_python/api/dimensions_api.py @@ -202,12 +210,16 @@ mux_python/configuration.py mux_python/exceptions.py mux_python/models/__init__.py mux_python/models/abridged_video_view.py +mux_python/models/annotation.py +mux_python/models/annotation_input.py +mux_python/models/annotation_response.py mux_python/models/asset.py mux_python/models/asset_errors.py mux_python/models/asset_generated_subtitle_settings.py mux_python/models/asset_master.py mux_python/models/asset_metadata.py mux_python/models/asset_non_standard_input_reasons.py +mux_python/models/asset_progress.py mux_python/models/asset_recording_times.py mux_python/models/asset_response.py mux_python/models/asset_static_renditions.py @@ -268,6 +280,7 @@ mux_python/models/input_track.py mux_python/models/insight.py mux_python/models/launch_web_input_response.py mux_python/models/list_all_metric_values_response.py +mux_python/models/list_annotations_response.py mux_python/models/list_assets_response.py mux_python/models/list_breakdown_values_response.py mux_python/models/list_breakdown_values_response_meta.py @@ -299,6 +312,7 @@ mux_python/models/list_web_inputs_response.py mux_python/models/live_stream.py mux_python/models/live_stream_embedded_subtitle_settings.py mux_python/models/live_stream_generated_subtitle_settings.py +mux_python/models/live_stream_metadata.py mux_python/models/live_stream_response.py mux_python/models/live_stream_status.py mux_python/models/metric.py diff --git a/docs/Asset.md b/docs/Asset.md index 3c4a371..94c4c1e 100644 --- a/docs/Asset.md +++ b/docs/Asset.md @@ -33,6 +33,7 @@ Name | Type | Description | Notes **test** | **bool** | True means this live stream is a test asset. A test asset can help evaluate the Mux Video APIs without incurring any cost. There is no limit on number of test assets created. Test assets are watermarked with the Mux logo, limited to 10 seconds, and deleted after 24 hrs. | [optional] **ingest_type** | **str** | The type of ingest used to create the asset. | [optional] **meta** | [**AssetMetadata**](AssetMetadata.md) | | [optional] +**progress** | [**AssetProgress**](AssetProgress.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/AssetsApi.md b/docs/AssetsApi.md index ac05557..837f6c3 100644 --- a/docs/AssetsApi.md +++ b/docs/AssetsApi.md @@ -545,7 +545,7 @@ void (empty response body) Delete an asset track -Removes a text track from an asset. Audio and video tracks on assets cannot be removed. +Removes a text or additional audio track from an asset. Neither video nor the primary audio track can be removed. ### Example @@ -913,7 +913,7 @@ 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) # **list_assets** -> ListAssetsResponse list_assets(limit=limit, page=page, live_stream_id=live_stream_id, upload_id=upload_id) +> ListAssetsResponse list_assets(limit=limit, page=page, cursor=cursor, live_stream_id=live_stream_id, upload_id=upload_id) List assets @@ -951,12 +951,13 @@ with mux_python.ApiClient(configuration) as api_client: api_instance = mux_python.AssetsApi(api_client) 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) +cursor = 'cursor_example' # str | This parameter is used to request pages beyond the first. You can find the cursor value in the `next_cursor` field of paginated responses. (optional) live_stream_id = 'live_stream_id_example' # str | Filter response to return all the assets for this live stream only (optional) upload_id = 'upload_id_example' # str | Filter response to return an asset created from this direct upload only (optional) try: # List assets - api_response = api_instance.list_assets(limit=limit, page=page, live_stream_id=live_stream_id, upload_id=upload_id) + api_response = api_instance.list_assets(limit=limit, page=page, cursor=cursor, live_stream_id=live_stream_id, upload_id=upload_id) pprint(api_response) except ApiException as e: print("Exception when calling AssetsApi->list_assets: %s\n" % e) @@ -968,6 +969,7 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **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] + **cursor** | **str**| This parameter is used to request pages beyond the first. You can find the cursor value in the `next_cursor` field of paginated responses. | [optional] **live_stream_id** | **str**| Filter response to return all the assets for this live stream only | [optional] **upload_id** | **str**| Filter response to return an asset created from this direct upload only | [optional] diff --git a/docs/CreateAssetRequest.md b/docs/CreateAssetRequest.md index 8f24f9a..1b18565 100644 --- a/docs/CreateAssetRequest.md +++ b/docs/CreateAssetRequest.md @@ -19,6 +19,7 @@ Name | Type | Description | Notes **video_quality** | **str** | The video quality controls the cost, quality, and available platform features for the asset. The default video quality for an account can be set in the Mux Dashboard. This field replaces the deprecated `encoding_tier` value. [See the video quality guide for more details.](https://docs.mux.com/guides/use-video-quality-levels) | [optional] **static_renditions** | [**list[CreateStaticRenditionRequest]**](CreateStaticRenditionRequest.md) | An array of static renditions to create for this asset. You may not enable both `static_renditions` and `mp4_support (the latter being deprecated)` | [optional] **meta** | [**AssetMetadata**](AssetMetadata.md) | | [optional] +**copy_overlays** | **bool** | If the created asset is a clip, this controls whether overlays are copied from the source asset. | [optional] [default to True] [[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/CreateLiveStreamRequest.md b/docs/CreateLiveStreamRequest.md index e2bbfe7..8d3ae1b 100644 --- a/docs/CreateLiveStreamRequest.md +++ b/docs/CreateLiveStreamRequest.md @@ -20,6 +20,7 @@ Name | Type | Description | Notes **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] **max_continuous_duration** | **int** | The time in seconds a live stream may be continuously active before being disconnected. Defaults to 12 hours. | [optional] [default to 43200] +**meta** | [**LiveStreamMetadata**](LiveStreamMetadata.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/ListAssetsResponse.md b/docs/ListAssetsResponse.md index 60e3607..ab1bb8e 100644 --- a/docs/ListAssetsResponse.md +++ b/docs/ListAssetsResponse.md @@ -3,6 +3,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- +**next_cursor** | **str** | If there are more pages of data, this field will contain a string that can be used with the `cursor` querystring parameter to fetch the next page of data. | [optional] **data** | [**list[Asset]**](Asset.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/LiveStream.md b/docs/LiveStream.md index 9c0d806..9657b53 100644 --- a/docs/LiveStream.md +++ b/docs/LiveStream.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **id** | **str** | Unique identifier for the Live Stream. Max 255 characters. | [optional] **created_at** | **str** | Time the Live Stream was created, defined as a Unix timestamp (seconds since epoch). | [optional] -**stream_key** | **str** | Unique key used for streaming to a Mux RTMP endpoint. This should be considered as sensitive as credentials, anyone with this stream key can begin streaming. | [optional] +**stream_key** | **str** | Unique key used for streaming to a Mux RTMP endpoint. This should be considered as sensitive as credentials, anyone with this stream key can begin streaming. Max 64 characters. | [optional] **active_asset_id** | **str** | The Asset that is currently being created if there is an active broadcast. | [optional] **recent_asset_ids** | **list[str]** | An array of strings with the most recent Asset IDs that were created from this Live Stream. The most recently generated Asset ID is the last entry in the list. | [optional] **status** | [**LiveStreamStatus**](LiveStreamStatus.md) | | [optional] @@ -24,8 +24,9 @@ Name | Type | Description | Notes **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. | [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] **max_continuous_duration** | **int** | The time in seconds a live stream may be continuously active before being disconnected. Defaults to 12 hours. | [optional] [default to 43200] -**srt_passphrase** | **str** | Unique key used for encrypting a stream to a Mux SRT endpoint. | [optional] +**srt_passphrase** | **str** | Unique key used for encrypting a stream to a Mux SRT endpoint. Max 64 characters. | [optional] **active_ingest_protocol** | **str** | The protocol used for the active ingest stream. This is only set when the live stream is active. | [optional] +**meta** | [**LiveStreamMetadata**](LiveStreamMetadata.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/UpdateLiveStreamRequest.md b/docs/UpdateLiveStreamRequest.md index 888230a..86ed0cb 100644 --- a/docs/UpdateLiveStreamRequest.md +++ b/docs/UpdateLiveStreamRequest.md @@ -10,6 +10,7 @@ Name | Type | Description | Notes **reconnect_slate_url** | **str** | The URL of the image file that Mux should download and use as slate media during interruptions of the live stream media. This file will be downloaded each time a new recorded asset is created from the live stream. Set this to a blank string to clear the value so that the default slate media will be used. | [optional] **max_continuous_duration** | **int** | The time in seconds a live stream may be continuously active before being disconnected. Defaults to 12 hours. | [optional] [default to 43200] **new_asset_settings** | [**UpdateLiveStreamNewAssetSettings**](UpdateLiveStreamNewAssetSettings.md) | | [optional] +**meta** | [**LiveStreamMetadata**](LiveStreamMetadata.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/gen/generator-config.json b/gen/generator-config.json index 8e2f882..cfb1d9b 100644 --- a/gen/generator-config.json +++ b/gen/generator-config.json @@ -3,5 +3,5 @@ "packageName": "mux_python", "projectName": "mux_python", "licenseInfo" : "MIT", - "packageVersion": "5.0.1" + "packageVersion": "5.1.0" } diff --git a/mux_python/__init__.py b/mux_python/__init__.py index 793caaf..3ecab10 100644 --- a/mux_python/__init__.py +++ b/mux_python/__init__.py @@ -15,9 +15,10 @@ from __future__ import absolute_import -__version__ = "5.0.1" +__version__ = "5.1.0" # import apis into sdk package +from mux_python.api.annotations_api import AnnotationsApi from mux_python.api.assets_api import AssetsApi from mux_python.api.drm_configurations_api import DRMConfigurationsApi from mux_python.api.delivery_usage_api import DeliveryUsageApi @@ -50,12 +51,16 @@ from mux_python.exceptions import ApiException # import models into sdk package from mux_python.models.abridged_video_view import AbridgedVideoView +from mux_python.models.annotation import Annotation +from mux_python.models.annotation_input import AnnotationInput +from mux_python.models.annotation_response import AnnotationResponse from mux_python.models.asset import Asset from mux_python.models.asset_errors import AssetErrors from mux_python.models.asset_generated_subtitle_settings import AssetGeneratedSubtitleSettings from mux_python.models.asset_master import AssetMaster from mux_python.models.asset_metadata import AssetMetadata from mux_python.models.asset_non_standard_input_reasons import AssetNonStandardInputReasons +from mux_python.models.asset_progress import AssetProgress from mux_python.models.asset_recording_times import AssetRecordingTimes from mux_python.models.asset_response import AssetResponse from mux_python.models.asset_static_renditions import AssetStaticRenditions @@ -116,6 +121,7 @@ from mux_python.models.insight import Insight from mux_python.models.launch_web_input_response import LaunchWebInputResponse from mux_python.models.list_all_metric_values_response import ListAllMetricValuesResponse +from mux_python.models.list_annotations_response import ListAnnotationsResponse from mux_python.models.list_assets_response import ListAssetsResponse from mux_python.models.list_breakdown_values_response import ListBreakdownValuesResponse from mux_python.models.list_breakdown_values_response_meta import ListBreakdownValuesResponseMeta @@ -147,6 +153,7 @@ from mux_python.models.live_stream import LiveStream from mux_python.models.live_stream_embedded_subtitle_settings import LiveStreamEmbeddedSubtitleSettings from mux_python.models.live_stream_generated_subtitle_settings import LiveStreamGeneratedSubtitleSettings +from mux_python.models.live_stream_metadata import LiveStreamMetadata from mux_python.models.live_stream_response import LiveStreamResponse from mux_python.models.live_stream_status import LiveStreamStatus from mux_python.models.metric import Metric diff --git a/mux_python/api/__init__.py b/mux_python/api/__init__.py index 339fabd..b7a02de 100644 --- a/mux_python/api/__init__.py +++ b/mux_python/api/__init__.py @@ -3,6 +3,7 @@ # flake8: noqa # import apis into api package +from mux_python.api.annotations_api import AnnotationsApi from mux_python.api.assets_api import AssetsApi from mux_python.api.drm_configurations_api import DRMConfigurationsApi from mux_python.api.delivery_usage_api import DeliveryUsageApi diff --git a/mux_python/api/assets_api.py b/mux_python/api/assets_api.py index 05d39c6..8a8be23 100644 --- a/mux_python/api/assets_api.py +++ b/mux_python/api/assets_api.py @@ -1038,7 +1038,7 @@ def delete_asset_static_rendition_with_http_info(self, asset_id, static_renditio def delete_asset_track(self, asset_id, track_id, **kwargs): # noqa: E501 """Delete an asset track # noqa: E501 - Removes a text track from an asset. Audio and video tracks on assets cannot be removed. # noqa: E501 + Removes a text or additional audio track from an asset. Neither video nor the primary audio track can be removed. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -1070,7 +1070,7 @@ def delete_asset_track(self, asset_id, track_id, **kwargs): # noqa: E501 def delete_asset_track_with_http_info(self, asset_id, track_id, **kwargs): # noqa: E501 """Delete an asset track # noqa: E501 - Removes a text track from an asset. Audio and video tracks on assets cannot be removed. # noqa: E501 + Removes a text or additional audio track from an asset. Neither video nor the primary audio track can be removed. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -1766,6 +1766,8 @@ def list_assets(self, **kwargs): # noqa: E501 :type limit: int :param page: Offset by this many pages, of the size of `limit` :type page: int + :param cursor: This parameter is used to request pages beyond the first. You can find the cursor value in the `next_cursor` field of paginated responses. + :type cursor: str :param live_stream_id: Filter response to return all the assets for this live stream only :type live_stream_id: str :param upload_id: Filter response to return an asset created from this direct upload only @@ -1802,6 +1804,8 @@ def list_assets_with_http_info(self, **kwargs): # noqa: E501 :type limit: int :param page: Offset by this many pages, of the size of `limit` :type page: int + :param cursor: This parameter is used to request pages beyond the first. You can find the cursor value in the `next_cursor` field of paginated responses. + :type cursor: str :param live_stream_id: Filter response to return all the assets for this live stream only :type live_stream_id: str :param upload_id: Filter response to return an asset created from this direct upload only @@ -1834,6 +1838,7 @@ def list_assets_with_http_info(self, **kwargs): # noqa: E501 all_params = [ 'limit', 'page', + 'cursor', 'live_stream_id', 'upload_id' ] @@ -1865,6 +1870,8 @@ def list_assets_with_http_info(self, **kwargs): # noqa: E501 query_params.append(('limit', local_var_params['limit'])) # noqa: E501 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 'cursor' in local_var_params and local_var_params['cursor'] is not None: # noqa: E501 + query_params.append(('cursor', local_var_params['cursor'])) # 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 'upload_id' in local_var_params and local_var_params['upload_id'] is not None: # noqa: E501 diff --git a/mux_python/api_client.py b/mux_python/api_client.py index 6cc3460..158ce54 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 = 'Mux Python | 5.0.1' + self.user_agent = 'Mux Python | 5.1.0' self.client_side_validation = configuration.client_side_validation def __enter__(self): diff --git a/mux_python/configuration.py b/mux_python/configuration.py index 3f39012..e21e31e 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: 5.0.1".\ + "SDK Package Version: 5.1.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 751065f..3b5e4d9 100644 --- a/mux_python/models/__init__.py +++ b/mux_python/models/__init__.py @@ -16,12 +16,16 @@ # import models into model package from mux_python.models.abridged_video_view import AbridgedVideoView +from mux_python.models.annotation import Annotation +from mux_python.models.annotation_input import AnnotationInput +from mux_python.models.annotation_response import AnnotationResponse from mux_python.models.asset import Asset from mux_python.models.asset_errors import AssetErrors from mux_python.models.asset_generated_subtitle_settings import AssetGeneratedSubtitleSettings from mux_python.models.asset_master import AssetMaster from mux_python.models.asset_metadata import AssetMetadata from mux_python.models.asset_non_standard_input_reasons import AssetNonStandardInputReasons +from mux_python.models.asset_progress import AssetProgress from mux_python.models.asset_recording_times import AssetRecordingTimes from mux_python.models.asset_response import AssetResponse from mux_python.models.asset_static_renditions import AssetStaticRenditions @@ -82,6 +86,7 @@ from mux_python.models.insight import Insight from mux_python.models.launch_web_input_response import LaunchWebInputResponse from mux_python.models.list_all_metric_values_response import ListAllMetricValuesResponse +from mux_python.models.list_annotations_response import ListAnnotationsResponse from mux_python.models.list_assets_response import ListAssetsResponse from mux_python.models.list_breakdown_values_response import ListBreakdownValuesResponse from mux_python.models.list_breakdown_values_response_meta import ListBreakdownValuesResponseMeta @@ -113,6 +118,7 @@ from mux_python.models.live_stream import LiveStream from mux_python.models.live_stream_embedded_subtitle_settings import LiveStreamEmbeddedSubtitleSettings from mux_python.models.live_stream_generated_subtitle_settings import LiveStreamGeneratedSubtitleSettings +from mux_python.models.live_stream_metadata import LiveStreamMetadata from mux_python.models.live_stream_response import LiveStreamResponse from mux_python.models.live_stream_status import LiveStreamStatus from mux_python.models.metric import Metric diff --git a/mux_python/models/asset.py b/mux_python/models/asset.py index 8010b93..f32ef80 100644 --- a/mux_python/models/asset.py +++ b/mux_python/models/asset.py @@ -66,7 +66,8 @@ class Asset(object): 'non_standard_input_reasons': 'AssetNonStandardInputReasons', 'test': 'bool', 'ingest_type': 'str', - 'meta': 'AssetMetadata' + 'meta': 'AssetMetadata', + 'progress': 'AssetProgress' } attribute_map = { @@ -99,10 +100,11 @@ class Asset(object): 'non_standard_input_reasons': 'non_standard_input_reasons', 'test': 'test', 'ingest_type': 'ingest_type', - 'meta': 'meta' + 'meta': 'meta', + 'progress': 'progress' } - def __init__(self, id=None, created_at=None, status=None, duration=None, max_stored_resolution=None, resolution_tier=None, max_resolution_tier=None, encoding_tier=None, video_quality=None, max_stored_frame_rate=None, aspect_ratio=None, playback_ids=None, tracks=None, errors=None, per_title_encode=None, upload_id=None, is_live=None, passthrough=None, live_stream_id=None, master=None, master_access='none', mp4_support='none', source_asset_id=None, normalize_audio=False, static_renditions=None, recording_times=None, non_standard_input_reasons=None, test=None, ingest_type=None, meta=None, local_vars_configuration=None): # noqa: E501 + def __init__(self, id=None, created_at=None, status=None, duration=None, max_stored_resolution=None, resolution_tier=None, max_resolution_tier=None, encoding_tier=None, video_quality=None, max_stored_frame_rate=None, aspect_ratio=None, playback_ids=None, tracks=None, errors=None, per_title_encode=None, upload_id=None, is_live=None, passthrough=None, live_stream_id=None, master=None, master_access='none', mp4_support='none', source_asset_id=None, normalize_audio=False, static_renditions=None, recording_times=None, non_standard_input_reasons=None, test=None, ingest_type=None, meta=None, progress=None, local_vars_configuration=None): # noqa: E501 """Asset - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration.get_default_copy() @@ -138,6 +140,7 @@ def __init__(self, id=None, created_at=None, status=None, duration=None, max_sto self._test = None self._ingest_type = None self._meta = None + self._progress = None self.discriminator = None if id is not None: @@ -200,6 +203,8 @@ def __init__(self, id=None, created_at=None, status=None, duration=None, max_sto self.ingest_type = ingest_type if meta is not None: self.meta = meta + if progress is not None: + self.progress = progress @property def id(self): @@ -929,6 +934,27 @@ def meta(self, meta): self._meta = meta + @property + def progress(self): + """Gets the progress of this Asset. # noqa: E501 + + + :return: The progress of this Asset. # noqa: E501 + :rtype: AssetProgress + """ + return self._progress + + @progress.setter + def progress(self, progress): + """Sets the progress of this Asset. + + + :param progress: The progress of this Asset. # noqa: E501 + :type progress: AssetProgress + """ + + self._progress = progress + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} diff --git a/mux_python/models/create_asset_request.py b/mux_python/models/create_asset_request.py index 4a4fe31..5b9641d 100644 --- a/mux_python/models/create_asset_request.py +++ b/mux_python/models/create_asset_request.py @@ -52,7 +52,8 @@ class CreateAssetRequest(object): 'encoding_tier': 'str', 'video_quality': 'str', 'static_renditions': 'list[CreateStaticRenditionRequest]', - 'meta': 'AssetMetadata' + 'meta': 'AssetMetadata', + 'copy_overlays': 'bool' } attribute_map = { @@ -71,10 +72,11 @@ class CreateAssetRequest(object): 'encoding_tier': 'encoding_tier', 'video_quality': 'video_quality', 'static_renditions': 'static_renditions', - 'meta': 'meta' + 'meta': 'meta', + 'copy_overlays': 'copy_overlays' } - def __init__(self, input=None, inputs=None, playback_policy=None, playback_policies=None, advanced_playback_policies=None, per_title_encode=None, passthrough=None, mp4_support=None, normalize_audio=False, master_access=None, test=None, max_resolution_tier=None, encoding_tier=None, video_quality=None, static_renditions=None, meta=None, local_vars_configuration=None): # noqa: E501 + def __init__(self, input=None, inputs=None, playback_policy=None, playback_policies=None, advanced_playback_policies=None, per_title_encode=None, passthrough=None, mp4_support=None, normalize_audio=False, master_access=None, test=None, max_resolution_tier=None, encoding_tier=None, video_quality=None, static_renditions=None, meta=None, copy_overlays=True, local_vars_configuration=None): # noqa: E501 """CreateAssetRequest - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration.get_default_copy() @@ -96,6 +98,7 @@ def __init__(self, input=None, inputs=None, playback_policy=None, playback_polic self._video_quality = None self._static_renditions = None self._meta = None + self._copy_overlays = None self.discriminator = None if input is not None: @@ -130,6 +133,8 @@ def __init__(self, input=None, inputs=None, playback_policy=None, playback_polic self.static_renditions = static_renditions if meta is not None: self.meta = meta + if copy_overlays is not None: + self.copy_overlays = copy_overlays @property def input(self): @@ -525,6 +530,29 @@ def meta(self, meta): self._meta = meta + @property + def copy_overlays(self): + """Gets the copy_overlays of this CreateAssetRequest. # noqa: E501 + + If the created asset is a clip, this controls whether overlays are copied from the source asset. # noqa: E501 + + :return: The copy_overlays of this CreateAssetRequest. # noqa: E501 + :rtype: bool + """ + return self._copy_overlays + + @copy_overlays.setter + def copy_overlays(self, copy_overlays): + """Sets the copy_overlays of this CreateAssetRequest. + + If the created asset is a clip, this controls whether overlays are copied from the source asset. # noqa: E501 + + :param copy_overlays: The copy_overlays of this CreateAssetRequest. # noqa: E501 + :type copy_overlays: bool + """ + + self._copy_overlays = copy_overlays + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} diff --git a/mux_python/models/create_live_stream_request.py b/mux_python/models/create_live_stream_request.py index 5797a6b..356572e 100644 --- a/mux_python/models/create_live_stream_request.py +++ b/mux_python/models/create_live_stream_request.py @@ -53,7 +53,8 @@ class CreateLiveStreamRequest(object): 'latency_mode': 'str', 'test': 'bool', 'simulcast_targets': 'list[CreateSimulcastTargetRequest]', - 'max_continuous_duration': 'int' + 'max_continuous_duration': 'int', + 'meta': 'LiveStreamMetadata' } attribute_map = { @@ -73,10 +74,11 @@ class CreateLiveStreamRequest(object): 'latency_mode': 'latency_mode', 'test': 'test', 'simulcast_targets': 'simulcast_targets', - 'max_continuous_duration': 'max_continuous_duration' + 'max_continuous_duration': 'max_continuous_duration', + 'meta': 'meta' } - def __init__(self, playback_policy=None, playback_policies=None, advanced_playback_policies=None, new_asset_settings=None, reconnect_window=60, use_slate_for_standard_latency=False, reconnect_slate_url=None, passthrough=None, audio_only=None, embedded_subtitles=None, generated_subtitles=None, reduced_latency=None, low_latency=None, latency_mode=None, test=None, simulcast_targets=None, max_continuous_duration=43200, local_vars_configuration=None): # noqa: E501 + def __init__(self, playback_policy=None, playback_policies=None, advanced_playback_policies=None, new_asset_settings=None, reconnect_window=60, use_slate_for_standard_latency=False, reconnect_slate_url=None, passthrough=None, audio_only=None, embedded_subtitles=None, generated_subtitles=None, reduced_latency=None, low_latency=None, latency_mode=None, test=None, simulcast_targets=None, max_continuous_duration=43200, meta=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() @@ -99,6 +101,7 @@ def __init__(self, playback_policy=None, playback_policies=None, advanced_playba self._test = None self._simulcast_targets = None self._max_continuous_duration = None + self._meta = None self.discriminator = None if playback_policy is not None: @@ -135,6 +138,8 @@ def __init__(self, playback_policy=None, playback_policies=None, advanced_playba self.simulcast_targets = simulcast_targets if max_continuous_duration is not None: self.max_continuous_duration = max_continuous_duration + if meta is not None: + self.meta = meta @property def playback_policy(self): @@ -539,6 +544,27 @@ def max_continuous_duration(self, max_continuous_duration): self._max_continuous_duration = max_continuous_duration + @property + def meta(self): + """Gets the meta of this CreateLiveStreamRequest. # noqa: E501 + + + :return: The meta of this CreateLiveStreamRequest. # noqa: E501 + :rtype: LiveStreamMetadata + """ + return self._meta + + @meta.setter + def meta(self, meta): + """Sets the meta of this CreateLiveStreamRequest. + + + :param meta: The meta of this CreateLiveStreamRequest. # noqa: E501 + :type meta: LiveStreamMetadata + """ + + self._meta = meta + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} diff --git a/mux_python/models/list_assets_response.py b/mux_python/models/list_assets_response.py index 21caae6..3cb541f 100644 --- a/mux_python/models/list_assets_response.py +++ b/mux_python/models/list_assets_response.py @@ -37,25 +37,52 @@ class ListAssetsResponse(object): and the value is json key in definition. """ openapi_types = { + 'next_cursor': 'str', 'data': 'list[Asset]' } attribute_map = { + 'next_cursor': 'next_cursor', 'data': 'data' } - def __init__(self, data=None, local_vars_configuration=None): # noqa: E501 + def __init__(self, next_cursor=None, data=None, local_vars_configuration=None): # noqa: E501 """ListAssetsResponse - 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._next_cursor = None self._data = None self.discriminator = None + self.next_cursor = next_cursor if data is not None: self.data = data + @property + def next_cursor(self): + """Gets the next_cursor of this ListAssetsResponse. # noqa: E501 + + If there are more pages of data, this field will contain a string that can be used with the `cursor` querystring parameter to fetch the next page of data. # noqa: E501 + + :return: The next_cursor of this ListAssetsResponse. # noqa: E501 + :rtype: str + """ + return self._next_cursor + + @next_cursor.setter + def next_cursor(self, next_cursor): + """Sets the next_cursor of this ListAssetsResponse. + + If there are more pages of data, this field will contain a string that can be used with the `cursor` querystring parameter to fetch the next page of data. # noqa: E501 + + :param next_cursor: The next_cursor of this ListAssetsResponse. # noqa: E501 + :type next_cursor: str + """ + + self._next_cursor = next_cursor + @property def data(self): """Gets the data of this ListAssetsResponse. # noqa: E501 diff --git a/mux_python/models/live_stream.py b/mux_python/models/live_stream.py index 33bfe78..56c62e0 100644 --- a/mux_python/models/live_stream.py +++ b/mux_python/models/live_stream.py @@ -59,7 +59,8 @@ class LiveStream(object): 'test': 'bool', 'max_continuous_duration': 'int', 'srt_passphrase': 'str', - 'active_ingest_protocol': 'str' + 'active_ingest_protocol': 'str', + 'meta': 'LiveStreamMetadata' } attribute_map = { @@ -85,10 +86,11 @@ class LiveStream(object): 'test': 'test', 'max_continuous_duration': 'max_continuous_duration', 'srt_passphrase': 'srt_passphrase', - 'active_ingest_protocol': 'active_ingest_protocol' + 'active_ingest_protocol': 'active_ingest_protocol', + 'meta': 'meta' } - 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, generated_subtitles=None, reconnect_window=60, use_slate_for_standard_latency=False, reconnect_slate_url=None, reduced_latency=None, low_latency=None, simulcast_targets=None, latency_mode=None, test=None, max_continuous_duration=43200, srt_passphrase=None, active_ingest_protocol=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, generated_subtitles=None, reconnect_window=60, use_slate_for_standard_latency=False, reconnect_slate_url=None, reduced_latency=None, low_latency=None, simulcast_targets=None, latency_mode=None, test=None, max_continuous_duration=43200, srt_passphrase=None, active_ingest_protocol=None, meta=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() @@ -117,6 +119,7 @@ def __init__(self, id=None, created_at=None, stream_key=None, active_asset_id=No self._max_continuous_duration = None self._srt_passphrase = None self._active_ingest_protocol = None + self._meta = None self.discriminator = None if id is not None: @@ -165,6 +168,8 @@ def __init__(self, id=None, created_at=None, stream_key=None, active_asset_id=No self.srt_passphrase = srt_passphrase if active_ingest_protocol is not None: self.active_ingest_protocol = active_ingest_protocol + if meta is not None: + self.meta = meta @property def id(self): @@ -216,7 +221,7 @@ def created_at(self, created_at): def stream_key(self): """Gets the stream_key of this LiveStream. # noqa: E501 - Unique key used for streaming to a Mux RTMP endpoint. This should be considered as sensitive as credentials, anyone with this stream key can begin streaming. # noqa: E501 + Unique key used for streaming to a Mux RTMP endpoint. This should be considered as sensitive as credentials, anyone with this stream key can begin streaming. Max 64 characters. # noqa: E501 :return: The stream_key of this LiveStream. # noqa: E501 :rtype: str @@ -227,7 +232,7 @@ def stream_key(self): def stream_key(self, stream_key): """Sets the stream_key of this LiveStream. - Unique key used for streaming to a Mux RTMP endpoint. This should be considered as sensitive as credentials, anyone with this stream key can begin streaming. # noqa: E501 + Unique key used for streaming to a Mux RTMP endpoint. This should be considered as sensitive as credentials, anyone with this stream key can begin streaming. Max 64 characters. # noqa: E501 :param stream_key: The stream_key of this LiveStream. # noqa: E501 :type stream_key: str @@ -667,7 +672,7 @@ def max_continuous_duration(self, max_continuous_duration): def srt_passphrase(self): """Gets the srt_passphrase of this LiveStream. # noqa: E501 - Unique key used for encrypting a stream to a Mux SRT endpoint. # noqa: E501 + Unique key used for encrypting a stream to a Mux SRT endpoint. Max 64 characters. # noqa: E501 :return: The srt_passphrase of this LiveStream. # noqa: E501 :rtype: str @@ -678,7 +683,7 @@ def srt_passphrase(self): def srt_passphrase(self, srt_passphrase): """Sets the srt_passphrase of this LiveStream. - Unique key used for encrypting a stream to a Mux SRT endpoint. # noqa: E501 + Unique key used for encrypting a stream to a Mux SRT endpoint. Max 64 characters. # noqa: E501 :param srt_passphrase: The srt_passphrase of this LiveStream. # noqa: E501 :type srt_passphrase: str @@ -715,6 +720,27 @@ def active_ingest_protocol(self, active_ingest_protocol): self._active_ingest_protocol = active_ingest_protocol + @property + def meta(self): + """Gets the meta of this LiveStream. # noqa: E501 + + + :return: The meta of this LiveStream. # noqa: E501 + :rtype: LiveStreamMetadata + """ + return self._meta + + @meta.setter + def meta(self, meta): + """Sets the meta of this LiveStream. + + + :param meta: The meta of this LiveStream. # noqa: E501 + :type meta: LiveStreamMetadata + """ + + self._meta = meta + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} diff --git a/mux_python/models/live_stream_generated_subtitle_settings.py b/mux_python/models/live_stream_generated_subtitle_settings.py index 910c20b..d36f999 100644 --- a/mux_python/models/live_stream_generated_subtitle_settings.py +++ b/mux_python/models/live_stream_generated_subtitle_settings.py @@ -137,7 +137,7 @@ def language_code(self, language_code): :param language_code: The language_code of this LiveStreamGeneratedSubtitleSettings. # noqa: E501 :type language_code: str """ - allowed_values = ["en", "en-US"] # noqa: E501 + allowed_values = ["en", "en-US", "es", "fr", "de", "pt", "it"] # noqa: E501 if self.local_vars_configuration.client_side_validation and language_code not in allowed_values: # noqa: E501 raise ValueError( "Invalid value for `language_code` ({0}), must be one of {1}" # noqa: E501 diff --git a/mux_python/models/update_live_stream_request.py b/mux_python/models/update_live_stream_request.py index 6662dd7..cbacec8 100644 --- a/mux_python/models/update_live_stream_request.py +++ b/mux_python/models/update_live_stream_request.py @@ -43,7 +43,8 @@ class UpdateLiveStreamRequest(object): 'use_slate_for_standard_latency': 'bool', 'reconnect_slate_url': 'str', 'max_continuous_duration': 'int', - 'new_asset_settings': 'UpdateLiveStreamNewAssetSettings' + 'new_asset_settings': 'UpdateLiveStreamNewAssetSettings', + 'meta': 'LiveStreamMetadata' } attribute_map = { @@ -53,10 +54,11 @@ class UpdateLiveStreamRequest(object): 'use_slate_for_standard_latency': 'use_slate_for_standard_latency', 'reconnect_slate_url': 'reconnect_slate_url', 'max_continuous_duration': 'max_continuous_duration', - 'new_asset_settings': 'new_asset_settings' + 'new_asset_settings': 'new_asset_settings', + 'meta': 'meta' } - def __init__(self, passthrough=None, latency_mode=None, reconnect_window=60, use_slate_for_standard_latency=False, reconnect_slate_url=None, max_continuous_duration=43200, new_asset_settings=None, local_vars_configuration=None): # noqa: E501 + def __init__(self, passthrough=None, latency_mode=None, reconnect_window=60, use_slate_for_standard_latency=False, reconnect_slate_url=None, max_continuous_duration=43200, new_asset_settings=None, meta=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() @@ -69,6 +71,7 @@ def __init__(self, passthrough=None, latency_mode=None, reconnect_window=60, use self._reconnect_slate_url = None self._max_continuous_duration = None self._new_asset_settings = None + self._meta = None self.discriminator = None if passthrough is not None: @@ -85,6 +88,8 @@ def __init__(self, passthrough=None, latency_mode=None, reconnect_window=60, use self.max_continuous_duration = max_continuous_duration if new_asset_settings is not None: self.new_asset_settings = new_asset_settings + if meta is not None: + self.meta = meta @property def passthrough(self): @@ -263,6 +268,27 @@ def new_asset_settings(self, new_asset_settings): self._new_asset_settings = new_asset_settings + @property + def meta(self): + """Gets the meta of this UpdateLiveStreamRequest. # noqa: E501 + + + :return: The meta of this UpdateLiveStreamRequest. # noqa: E501 + :rtype: LiveStreamMetadata + """ + return self._meta + + @meta.setter + def meta(self, meta): + """Sets the meta of this UpdateLiveStreamRequest. + + + :param meta: The meta of this UpdateLiveStreamRequest. # noqa: E501 + :type meta: LiveStreamMetadata + """ + + self._meta = meta + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} diff --git a/setup.py b/setup.py index c3dcf80..99c7348 100644 --- a/setup.py +++ b/setup.py @@ -15,7 +15,7 @@ from setuptools import setup, find_packages # noqa: H301 NAME = "mux_python" -VERSION = "5.0.1" +VERSION = "5.1.0" # To install the library, run the following # # python setup.py install From 23ea3b3a2515a1cfc23e476be14ccc93229f24be Mon Sep 17 00:00:00 2001 From: Justin Sanford Date: Wed, 13 Aug 2025 16:06:26 -0700 Subject: [PATCH 2/3] the rest of the files --- docs/Annotation.md | 13 + docs/AnnotationInput.md | 12 + docs/AnnotationResponse.md | 10 + docs/AnnotationsApi.md | 385 +++++++++ docs/AssetProgress.md | 12 + docs/ListAnnotationsResponse.md | 12 + docs/LiveStreamMetadata.md | 11 + mux_python/api/annotations_api.py | 744 ++++++++++++++++++ mux_python/models/annotation.py | 217 +++++ mux_python/models/annotation_input.py | 190 +++++ mux_python/models/annotation_response.py | 132 ++++ mux_python/models/asset_progress.py | 174 ++++ .../models/list_annotations_response.py | 194 +++++ mux_python/models/live_stream_metadata.py | 137 ++++ test/test_annotation.py | 55 ++ test/test_annotation_input.py | 54 ++ test/test_annotation_response.py | 56 ++ test/test_annotations_api.py | 69 ++ test/test_asset_progress.py | 53 ++ test/test_list_annotations_response.py | 62 ++ test/test_live_stream_metadata.py | 52 ++ 21 files changed, 2644 insertions(+) create mode 100644 docs/Annotation.md create mode 100644 docs/AnnotationInput.md create mode 100644 docs/AnnotationResponse.md create mode 100644 docs/AnnotationsApi.md create mode 100644 docs/AssetProgress.md create mode 100644 docs/ListAnnotationsResponse.md create mode 100644 docs/LiveStreamMetadata.md create mode 100644 mux_python/api/annotations_api.py create mode 100644 mux_python/models/annotation.py create mode 100644 mux_python/models/annotation_input.py create mode 100644 mux_python/models/annotation_response.py create mode 100644 mux_python/models/asset_progress.py create mode 100644 mux_python/models/list_annotations_response.py create mode 100644 mux_python/models/live_stream_metadata.py create mode 100644 test/test_annotation.py create mode 100644 test/test_annotation_input.py create mode 100644 test/test_annotation_response.py create mode 100644 test/test_annotations_api.py create mode 100644 test/test_asset_progress.py create mode 100644 test/test_list_annotations_response.py create mode 100644 test/test_live_stream_metadata.py diff --git a/docs/Annotation.md b/docs/Annotation.md new file mode 100644 index 0000000..b0e82da --- /dev/null +++ b/docs/Annotation.md @@ -0,0 +1,13 @@ +# Annotation + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | Unique identifier for the annotation | [optional] +**note** | **str** | The annotation note content | [optional] +**date** | **datetime** | Datetime when the annotation applies | [optional] +**sub_property_id** | **str** | Customer-defined sub-property identifier | [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/AnnotationInput.md b/docs/AnnotationInput.md new file mode 100644 index 0000000..5a5fbe5 --- /dev/null +++ b/docs/AnnotationInput.md @@ -0,0 +1,12 @@ +# AnnotationInput + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**note** | **str** | The annotation note content | [optional] +**date** | **int** | Datetime when the annotation applies (Unix timestamp) | [optional] +**sub_property_id** | **str** | Customer-defined sub-property identifier | [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/AnnotationResponse.md b/docs/AnnotationResponse.md new file mode 100644 index 0000000..0765048 --- /dev/null +++ b/docs/AnnotationResponse.md @@ -0,0 +1,10 @@ +# AnnotationResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**Annotation**](Annotation.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/AnnotationsApi.md b/docs/AnnotationsApi.md new file mode 100644 index 0000000..a5a0a72 --- /dev/null +++ b/docs/AnnotationsApi.md @@ -0,0 +1,385 @@ +# mux_python.AnnotationsApi + +All URIs are relative to *https://api.mux.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**create_annotation**](AnnotationsApi.md#create_annotation) | **POST** /data/v1/annotations | Create Annotation +[**delete_annotation**](AnnotationsApi.md#delete_annotation) | **DELETE** /data/v1/annotations/{ANNOTATION_ID} | Delete Annotation +[**get_annotation**](AnnotationsApi.md#get_annotation) | **GET** /data/v1/annotations/{ANNOTATION_ID} | Get Annotation +[**list_annotations**](AnnotationsApi.md#list_annotations) | **GET** /data/v1/annotations | List Annotations +[**update_annotation**](AnnotationsApi.md#update_annotation) | **PATCH** /data/v1/annotations/{ANNOTATION_ID} | Update Annotation + + +# **create_annotation** +> AnnotationResponse create_annotation(annotation_input) + +Create Annotation + +Creates a new annotation. + +### 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.AnnotationsApi(api_client) + annotation_input = {"note":"This is a note","date":1745438400,"sub_property_id":"123456"} # AnnotationInput | + + try: + # Create Annotation + api_response = api_instance.create_annotation(annotation_input) + pprint(api_response) + except ApiException as e: + print("Exception when calling AnnotationsApi->create_annotation: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **annotation_input** | [**AnnotationInput**](AnnotationInput.md)| | + +### Return type + +[**AnnotationResponse**](AnnotationResponse.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_annotation** +> delete_annotation(annotation_id) + +Delete Annotation + +Deletes an annotation. + +### 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.AnnotationsApi(api_client) + annotation_id = 'annotation_id_example' # str | The annotation ID + + try: + # Delete Annotation + api_instance.delete_annotation(annotation_id) + except ApiException as e: + print("Exception when calling AnnotationsApi->delete_annotation: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **annotation_id** | [**str**](.md)| The annotation ID | + +### 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_annotation** +> AnnotationResponse get_annotation(annotation_id) + +Get Annotation + +Returns the details of a specific annotation. + +### 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.AnnotationsApi(api_client) + annotation_id = 'annotation_id_example' # str | The annotation ID + + try: + # Get Annotation + api_response = api_instance.get_annotation(annotation_id) + pprint(api_response) + except ApiException as e: + print("Exception when calling AnnotationsApi->get_annotation: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **annotation_id** | [**str**](.md)| The annotation ID | + +### Return type + +[**AnnotationResponse**](AnnotationResponse.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_annotations** +> ListAnnotationsResponse list_annotations(limit=limit, page=page, order_direction=order_direction, timeframe=timeframe) + +List Annotations + +Returns a list of annotations. + +### 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.AnnotationsApi(api_client) + 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_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) + + try: + # List Annotations + api_response = api_instance.list_annotations(limit=limit, page=page, order_direction=order_direction, timeframe=timeframe) + pprint(api_response) + except ApiException as e: + print("Exception when calling AnnotationsApi->list_annotations: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **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_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] + +### Return type + +[**ListAnnotationsResponse**](ListAnnotationsResponse.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_annotation** +> AnnotationResponse update_annotation(annotation_id, annotation_input) + +Update Annotation + +Updates an existing annotation. + +### 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.AnnotationsApi(api_client) + annotation_id = 'annotation_id_example' # str | The annotation ID +annotation_input = {"note":"This is a note","date":1745438400,"sub_property_id":"123456"} # AnnotationInput | + + try: + # Update Annotation + api_response = api_instance.update_annotation(annotation_id, annotation_input) + pprint(api_response) + except ApiException as e: + print("Exception when calling AnnotationsApi->update_annotation: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **annotation_id** | [**str**](.md)| The annotation ID | + **annotation_input** | [**AnnotationInput**](AnnotationInput.md)| | + +### Return type + +[**AnnotationResponse**](AnnotationResponse.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/AssetProgress.md b/docs/AssetProgress.md new file mode 100644 index 0000000..5ade0ff --- /dev/null +++ b/docs/AssetProgress.md @@ -0,0 +1,12 @@ +# AssetProgress + +Detailed state information about the asset ingest process. +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**state** | **str** | The detailed state of the asset ingest process. This field is useful for relaying more granular processing information to end users when a [non-standard input is encountered](https://www.mux.com/docs/guides/minimize-processing-time#non-standard-input). - `ingesting`: Asset is being ingested (initial processing before or after transcoding). While in this state, the `progress` percentage will be 0. - `transcoding`: Asset is undergoing non-standard transcoding. - `completed`: Asset processing is complete (`status` is `ready`). While in this state, the `progress` percentage will be 100. - `live`: Asset is a live stream currently in progress. While in this state, the `progress` percentage will be -1. - `errored`: Asset has encountered an error (`status` is `errored`). While in this state, the `progress` percentage will be -1. | [optional] +**progress** | **float** | Represents the estimated completion percentage. Returns `0 - 100` when in `ingesting`, `transcoding`, or `completed` state, and `-1` when in `live` or `errored` state. | [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/ListAnnotationsResponse.md b/docs/ListAnnotationsResponse.md new file mode 100644 index 0000000..5e444c1 --- /dev/null +++ b/docs/ListAnnotationsResponse.md @@ -0,0 +1,12 @@ +# ListAnnotationsResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**list[Annotation]**](Annotation.md) | | [optional] +**total_row_count** | **int** | Total number of annotations available | [optional] +**timeframe** | **list[int]** | Start and end unix timestamps for the data range | [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/LiveStreamMetadata.md b/docs/LiveStreamMetadata.md new file mode 100644 index 0000000..52acc5c --- /dev/null +++ b/docs/LiveStreamMetadata.md @@ -0,0 +1,11 @@ +# LiveStreamMetadata + +Customer provided metadata about this live stream. Note: This metadata may be publicly available via the video player. Do not include PII or sensitive information. +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**title** | **str** | The live stream title. Max 512 code points. | [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/mux_python/api/annotations_api.py b/mux_python/api/annotations_api.py new file mode 100644 index 0000000..3f8b1ee --- /dev/null +++ b/mux_python/api/annotations_api.py @@ -0,0 +1,744 @@ +# 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 AnnotationsApi(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_annotation(self, annotation_input, **kwargs): # noqa: E501 + """Create Annotation # noqa: E501 + + Creates a new annotation. # 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_annotation(annotation_input, async_req=True) + >>> result = thread.get() + + :param annotation_input: (required) + :type annotation_input: AnnotationInput + :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: AnnotationResponse + """ + kwargs['_return_http_data_only'] = True + return self.create_annotation_with_http_info(annotation_input, **kwargs) # noqa: E501 + + def create_annotation_with_http_info(self, annotation_input, **kwargs): # noqa: E501 + """Create Annotation # noqa: E501 + + Creates a new annotation. # 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_annotation_with_http_info(annotation_input, async_req=True) + >>> result = thread.get() + + :param annotation_input: (required) + :type annotation_input: AnnotationInput + :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(AnnotationResponse, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'annotation_input' + ] + 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_annotation" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'annotation_input' is set + if self.api_client.client_side_validation and ('annotation_input' not in local_var_params or # noqa: E501 + local_var_params['annotation_input'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `annotation_input` when calling `create_annotation`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'annotation_input' in local_var_params: + body_params = local_var_params['annotation_input'] + # 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: "AnnotationResponse", + } + + return self.api_client.call_api( + '/data/v1/annotations', '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_annotation(self, annotation_id, **kwargs): # noqa: E501 + """Delete Annotation # noqa: E501 + + Deletes an annotation. # 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_annotation(annotation_id, async_req=True) + >>> result = thread.get() + + :param annotation_id: The annotation ID (required) + :type annotation_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_annotation_with_http_info(annotation_id, **kwargs) # noqa: E501 + + def delete_annotation_with_http_info(self, annotation_id, **kwargs): # noqa: E501 + """Delete Annotation # noqa: E501 + + Deletes an annotation. # 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_annotation_with_http_info(annotation_id, async_req=True) + >>> result = thread.get() + + :param annotation_id: The annotation ID (required) + :type annotation_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 = [ + 'annotation_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_annotation" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'annotation_id' is set + if self.api_client.client_side_validation and ('annotation_id' not in local_var_params or # noqa: E501 + local_var_params['annotation_id'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `annotation_id` when calling `delete_annotation`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'annotation_id' in local_var_params: + path_params['ANNOTATION_ID'] = local_var_params['annotation_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( + '/data/v1/annotations/{ANNOTATION_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_annotation(self, annotation_id, **kwargs): # noqa: E501 + """Get Annotation # noqa: E501 + + Returns the details of a specific annotation. # 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_annotation(annotation_id, async_req=True) + >>> result = thread.get() + + :param annotation_id: The annotation ID (required) + :type annotation_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: AnnotationResponse + """ + kwargs['_return_http_data_only'] = True + return self.get_annotation_with_http_info(annotation_id, **kwargs) # noqa: E501 + + def get_annotation_with_http_info(self, annotation_id, **kwargs): # noqa: E501 + """Get Annotation # noqa: E501 + + Returns the details of a specific annotation. # 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_annotation_with_http_info(annotation_id, async_req=True) + >>> result = thread.get() + + :param annotation_id: The annotation ID (required) + :type annotation_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(AnnotationResponse, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'annotation_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_annotation" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'annotation_id' is set + if self.api_client.client_side_validation and ('annotation_id' not in local_var_params or # noqa: E501 + local_var_params['annotation_id'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `annotation_id` when calling `get_annotation`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'annotation_id' in local_var_params: + path_params['ANNOTATION_ID'] = local_var_params['annotation_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: "AnnotationResponse", + } + + return self.api_client.call_api( + '/data/v1/annotations/{ANNOTATION_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_annotations(self, **kwargs): # noqa: E501 + """List Annotations # noqa: E501 + + Returns a list of annotations. # 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_annotations(async_req=True) + >>> result = thread.get() + + :param limit: Number of items to include in the response + :type limit: int + :param page: Offset by this many pages, of the size of `limit` + :type page: int + :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` + :type timeframe: list[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: ListAnnotationsResponse + """ + kwargs['_return_http_data_only'] = True + return self.list_annotations_with_http_info(**kwargs) # noqa: E501 + + def list_annotations_with_http_info(self, **kwargs): # noqa: E501 + """List Annotations # noqa: E501 + + Returns a list of annotations. # 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_annotations_with_http_info(async_req=True) + >>> result = thread.get() + + :param limit: Number of items to include in the response + :type limit: int + :param page: Offset by this many pages, of the size of `limit` + :type page: int + :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` + :type timeframe: list[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(ListAnnotationsResponse, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'limit', + 'page', + 'order_direction', + 'timeframe' + ] + 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_annotations" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + 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 + 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 'order_direction' in local_var_params and local_var_params['order_direction'] is not None: # noqa: E501 + query_params.append(('order_direction', local_var_params['order_direction'])) # 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 + + 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: "ListAnnotationsResponse", + } + + return self.api_client.call_api( + '/data/v1/annotations', '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_annotation(self, annotation_id, annotation_input, **kwargs): # noqa: E501 + """Update Annotation # noqa: E501 + + Updates an existing annotation. # 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_annotation(annotation_id, annotation_input, async_req=True) + >>> result = thread.get() + + :param annotation_id: The annotation ID (required) + :type annotation_id: str + :param annotation_input: (required) + :type annotation_input: AnnotationInput + :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: AnnotationResponse + """ + kwargs['_return_http_data_only'] = True + return self.update_annotation_with_http_info(annotation_id, annotation_input, **kwargs) # noqa: E501 + + def update_annotation_with_http_info(self, annotation_id, annotation_input, **kwargs): # noqa: E501 + """Update Annotation # noqa: E501 + + Updates an existing annotation. # 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_annotation_with_http_info(annotation_id, annotation_input, async_req=True) + >>> result = thread.get() + + :param annotation_id: The annotation ID (required) + :type annotation_id: str + :param annotation_input: (required) + :type annotation_input: AnnotationInput + :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(AnnotationResponse, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_params = locals() + + all_params = [ + 'annotation_id', + 'annotation_input' + ] + 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_annotation" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'annotation_id' is set + if self.api_client.client_side_validation and ('annotation_id' not in local_var_params or # noqa: E501 + local_var_params['annotation_id'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `annotation_id` when calling `update_annotation`") # noqa: E501 + # verify the required parameter 'annotation_input' is set + if self.api_client.client_side_validation and ('annotation_input' not in local_var_params or # noqa: E501 + local_var_params['annotation_input'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `annotation_input` when calling `update_annotation`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'annotation_id' in local_var_params: + path_params['ANNOTATION_ID'] = local_var_params['annotation_id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'annotation_input' in local_var_params: + body_params = local_var_params['annotation_input'] + # 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: "AnnotationResponse", + } + + return self.api_client.call_api( + '/data/v1/annotations/{ANNOTATION_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')) diff --git a/mux_python/models/annotation.py b/mux_python/models/annotation.py new file mode 100644 index 0000000..8f48813 --- /dev/null +++ b/mux_python/models/annotation.py @@ -0,0 +1,217 @@ +# 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 +""" + + +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec +import pprint +import re # noqa: F401 +import six + +from mux_python.configuration import Configuration + + +class Annotation(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', + 'note': 'str', + 'date': 'datetime', + 'sub_property_id': 'str' + } + + attribute_map = { + 'id': 'id', + 'note': 'note', + 'date': 'date', + 'sub_property_id': 'sub_property_id' + } + + def __init__(self, id=None, note=None, date=None, sub_property_id=None, local_vars_configuration=None): # noqa: E501 + """Annotation - 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._note = None + self._date = None + self._sub_property_id = None + self.discriminator = None + + if id is not None: + self.id = id + if note is not None: + self.note = note + if date is not None: + self.date = date + self.sub_property_id = sub_property_id + + @property + def id(self): + """Gets the id of this Annotation. # noqa: E501 + + Unique identifier for the annotation # noqa: E501 + + :return: The id of this Annotation. # noqa: E501 + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this Annotation. + + Unique identifier for the annotation # noqa: E501 + + :param id: The id of this Annotation. # noqa: E501 + :type id: str + """ + + self._id = id + + @property + def note(self): + """Gets the note of this Annotation. # noqa: E501 + + The annotation note content # noqa: E501 + + :return: The note of this Annotation. # noqa: E501 + :rtype: str + """ + return self._note + + @note.setter + def note(self, note): + """Sets the note of this Annotation. + + The annotation note content # noqa: E501 + + :param note: The note of this Annotation. # noqa: E501 + :type note: str + """ + + self._note = note + + @property + def date(self): + """Gets the date of this Annotation. # noqa: E501 + + Datetime when the annotation applies # noqa: E501 + + :return: The date of this Annotation. # noqa: E501 + :rtype: datetime + """ + return self._date + + @date.setter + def date(self, date): + """Sets the date of this Annotation. + + Datetime when the annotation applies # noqa: E501 + + :param date: The date of this Annotation. # noqa: E501 + :type date: datetime + """ + + self._date = date + + @property + def sub_property_id(self): + """Gets the sub_property_id of this Annotation. # noqa: E501 + + Customer-defined sub-property identifier # noqa: E501 + + :return: The sub_property_id of this Annotation. # noqa: E501 + :rtype: str + """ + return self._sub_property_id + + @sub_property_id.setter + def sub_property_id(self, sub_property_id): + """Sets the sub_property_id of this Annotation. + + Customer-defined sub-property identifier # noqa: E501 + + :param sub_property_id: The sub_property_id of this Annotation. # noqa: E501 + :type sub_property_id: str + """ + + self._sub_property_id = sub_property_id + + def to_dict(self, serialize=False): + """Returns the model properties as a dict""" + result = {} + + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(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, Annotation): + 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, Annotation): + return True + + return self.to_dict() != other.to_dict() diff --git a/mux_python/models/annotation_input.py b/mux_python/models/annotation_input.py new file mode 100644 index 0000000..a924a4e --- /dev/null +++ b/mux_python/models/annotation_input.py @@ -0,0 +1,190 @@ +# 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 +""" + + +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec +import pprint +import re # noqa: F401 +import six + +from mux_python.configuration import Configuration + + +class AnnotationInput(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 = { + 'note': 'str', + 'date': 'int', + 'sub_property_id': 'str' + } + + attribute_map = { + 'note': 'note', + 'date': 'date', + 'sub_property_id': 'sub_property_id' + } + + def __init__(self, note=None, date=None, sub_property_id=None, local_vars_configuration=None): # noqa: E501 + """AnnotationInput - 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._note = None + self._date = None + self._sub_property_id = None + self.discriminator = None + + if note is not None: + self.note = note + if date is not None: + self.date = date + if sub_property_id is not None: + self.sub_property_id = sub_property_id + + @property + def note(self): + """Gets the note of this AnnotationInput. # noqa: E501 + + The annotation note content # noqa: E501 + + :return: The note of this AnnotationInput. # noqa: E501 + :rtype: str + """ + return self._note + + @note.setter + def note(self, note): + """Sets the note of this AnnotationInput. + + The annotation note content # noqa: E501 + + :param note: The note of this AnnotationInput. # noqa: E501 + :type note: str + """ + + self._note = note + + @property + def date(self): + """Gets the date of this AnnotationInput. # noqa: E501 + + Datetime when the annotation applies (Unix timestamp) # noqa: E501 + + :return: The date of this AnnotationInput. # noqa: E501 + :rtype: int + """ + return self._date + + @date.setter + def date(self, date): + """Sets the date of this AnnotationInput. + + Datetime when the annotation applies (Unix timestamp) # noqa: E501 + + :param date: The date of this AnnotationInput. # noqa: E501 + :type date: int + """ + + self._date = date + + @property + def sub_property_id(self): + """Gets the sub_property_id of this AnnotationInput. # noqa: E501 + + Customer-defined sub-property identifier # noqa: E501 + + :return: The sub_property_id of this AnnotationInput. # noqa: E501 + :rtype: str + """ + return self._sub_property_id + + @sub_property_id.setter + def sub_property_id(self, sub_property_id): + """Sets the sub_property_id of this AnnotationInput. + + Customer-defined sub-property identifier # noqa: E501 + + :param sub_property_id: The sub_property_id of this AnnotationInput. # noqa: E501 + :type sub_property_id: str + """ + + self._sub_property_id = sub_property_id + + def to_dict(self, serialize=False): + """Returns the model properties as a dict""" + result = {} + + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(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, AnnotationInput): + 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, AnnotationInput): + return True + + return self.to_dict() != other.to_dict() diff --git a/mux_python/models/annotation_response.py b/mux_python/models/annotation_response.py new file mode 100644 index 0000000..f2be9f3 --- /dev/null +++ b/mux_python/models/annotation_response.py @@ -0,0 +1,132 @@ +# 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 +""" + + +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec +import pprint +import re # noqa: F401 +import six + +from mux_python.configuration import Configuration + + +class AnnotationResponse(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 = { + 'data': 'Annotation' + } + + attribute_map = { + 'data': 'data' + } + + def __init__(self, data=None, local_vars_configuration=None): # noqa: E501 + """AnnotationResponse - 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._data = None + self.discriminator = None + + if data is not None: + self.data = data + + @property + def data(self): + """Gets the data of this AnnotationResponse. # noqa: E501 + + + :return: The data of this AnnotationResponse. # noqa: E501 + :rtype: Annotation + """ + return self._data + + @data.setter + def data(self, data): + """Sets the data of this AnnotationResponse. + + + :param data: The data of this AnnotationResponse. # noqa: E501 + :type data: Annotation + """ + + self._data = data + + def to_dict(self, serialize=False): + """Returns the model properties as a dict""" + result = {} + + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(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, AnnotationResponse): + 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, AnnotationResponse): + return True + + return self.to_dict() != other.to_dict() diff --git a/mux_python/models/asset_progress.py b/mux_python/models/asset_progress.py new file mode 100644 index 0000000..36517fc --- /dev/null +++ b/mux_python/models/asset_progress.py @@ -0,0 +1,174 @@ +# 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 +""" + + +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec +import pprint +import re # noqa: F401 +import six + +from mux_python.configuration import Configuration + + +class AssetProgress(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 = { + 'state': 'str', + 'progress': 'float' + } + + attribute_map = { + 'state': 'state', + 'progress': 'progress' + } + + def __init__(self, state=None, progress=None, local_vars_configuration=None): # noqa: E501 + """AssetProgress - 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._state = None + self._progress = None + self.discriminator = None + + if state is not None: + self.state = state + if progress is not None: + self.progress = progress + + @property + def state(self): + """Gets the state of this AssetProgress. # noqa: E501 + + The detailed state of the asset ingest process. This field is useful for relaying more granular processing information to end users when a [non-standard input is encountered](https://www.mux.com/docs/guides/minimize-processing-time#non-standard-input). - `ingesting`: Asset is being ingested (initial processing before or after transcoding). While in this state, the `progress` percentage will be 0. - `transcoding`: Asset is undergoing non-standard transcoding. - `completed`: Asset processing is complete (`status` is `ready`). While in this state, the `progress` percentage will be 100. - `live`: Asset is a live stream currently in progress. While in this state, the `progress` percentage will be -1. - `errored`: Asset has encountered an error (`status` is `errored`). While in this state, the `progress` percentage will be -1. # noqa: E501 + + :return: The state of this AssetProgress. # noqa: E501 + :rtype: str + """ + return self._state + + @state.setter + def state(self, state): + """Sets the state of this AssetProgress. + + The detailed state of the asset ingest process. This field is useful for relaying more granular processing information to end users when a [non-standard input is encountered](https://www.mux.com/docs/guides/minimize-processing-time#non-standard-input). - `ingesting`: Asset is being ingested (initial processing before or after transcoding). While in this state, the `progress` percentage will be 0. - `transcoding`: Asset is undergoing non-standard transcoding. - `completed`: Asset processing is complete (`status` is `ready`). While in this state, the `progress` percentage will be 100. - `live`: Asset is a live stream currently in progress. While in this state, the `progress` percentage will be -1. - `errored`: Asset has encountered an error (`status` is `errored`). While in this state, the `progress` percentage will be -1. # noqa: E501 + + :param state: The state of this AssetProgress. # noqa: E501 + :type state: str + """ + allowed_values = ["ingesting", "transcoding", "completed", "live", "errored"] # noqa: E501 + if self.local_vars_configuration.client_side_validation and state not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `state` ({0}), must be one of {1}" # noqa: E501 + .format(state, allowed_values) + ) + + self._state = state + + @property + def progress(self): + """Gets the progress of this AssetProgress. # noqa: E501 + + Represents the estimated completion percentage. Returns `0 - 100` when in `ingesting`, `transcoding`, or `completed` state, and `-1` when in `live` or `errored` state. # noqa: E501 + + :return: The progress of this AssetProgress. # noqa: E501 + :rtype: float + """ + return self._progress + + @progress.setter + def progress(self, progress): + """Sets the progress of this AssetProgress. + + Represents the estimated completion percentage. Returns `0 - 100` when in `ingesting`, `transcoding`, or `completed` state, and `-1` when in `live` or `errored` state. # noqa: E501 + + :param progress: The progress of this AssetProgress. # noqa: E501 + :type progress: float + """ + if (self.local_vars_configuration.client_side_validation and + progress is not None and progress > 100): # noqa: E501 + raise ValueError("Invalid value for `progress`, must be a value less than or equal to `100`") # noqa: E501 + if (self.local_vars_configuration.client_side_validation and + progress is not None and progress < -1): # noqa: E501 + raise ValueError("Invalid value for `progress`, must be a value greater than or equal to `-1`") # noqa: E501 + + self._progress = progress + + def to_dict(self, serialize=False): + """Returns the model properties as a dict""" + result = {} + + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(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, AssetProgress): + 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, AssetProgress): + return True + + return self.to_dict() != other.to_dict() diff --git a/mux_python/models/list_annotations_response.py b/mux_python/models/list_annotations_response.py new file mode 100644 index 0000000..4116e17 --- /dev/null +++ b/mux_python/models/list_annotations_response.py @@ -0,0 +1,194 @@ +# 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 +""" + + +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec +import pprint +import re # noqa: F401 +import six + +from mux_python.configuration import Configuration + + +class ListAnnotationsResponse(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 = { + 'data': 'list[Annotation]', + 'total_row_count': 'int', + 'timeframe': 'list[int]' + } + + attribute_map = { + 'data': 'data', + 'total_row_count': 'total_row_count', + 'timeframe': 'timeframe' + } + + def __init__(self, data=None, total_row_count=None, timeframe=None, local_vars_configuration=None): # noqa: E501 + """ListAnnotationsResponse - 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._data = None + self._total_row_count = None + self._timeframe = None + self.discriminator = None + + if data is not None: + self.data = data + if total_row_count is not None: + self.total_row_count = total_row_count + if timeframe is not None: + self.timeframe = timeframe + + @property + def data(self): + """Gets the data of this ListAnnotationsResponse. # noqa: E501 + + + :return: The data of this ListAnnotationsResponse. # noqa: E501 + :rtype: list[Annotation] + """ + return self._data + + @data.setter + def data(self, data): + """Sets the data of this ListAnnotationsResponse. + + + :param data: The data of this ListAnnotationsResponse. # noqa: E501 + :type data: list[Annotation] + """ + + self._data = data + + @property + def total_row_count(self): + """Gets the total_row_count of this ListAnnotationsResponse. # noqa: E501 + + Total number of annotations available # noqa: E501 + + :return: The total_row_count of this ListAnnotationsResponse. # noqa: E501 + :rtype: int + """ + return self._total_row_count + + @total_row_count.setter + def total_row_count(self, total_row_count): + """Sets the total_row_count of this ListAnnotationsResponse. + + Total number of annotations available # noqa: E501 + + :param total_row_count: The total_row_count of this ListAnnotationsResponse. # noqa: E501 + :type total_row_count: int + """ + + self._total_row_count = total_row_count + + @property + def timeframe(self): + """Gets the timeframe of this ListAnnotationsResponse. # noqa: E501 + + Start and end unix timestamps for the data range # noqa: E501 + + :return: The timeframe of this ListAnnotationsResponse. # noqa: E501 + :rtype: list[int] + """ + return self._timeframe + + @timeframe.setter + def timeframe(self, timeframe): + """Sets the timeframe of this ListAnnotationsResponse. + + Start and end unix timestamps for the data range # noqa: E501 + + :param timeframe: The timeframe of this ListAnnotationsResponse. # noqa: E501 + :type timeframe: list[int] + """ + if (self.local_vars_configuration.client_side_validation and + timeframe is not None and len(timeframe) > 2): + raise ValueError("Invalid value for `timeframe`, number of items must be less than or equal to `2`") # noqa: E501 + if (self.local_vars_configuration.client_side_validation and + timeframe is not None and len(timeframe) < 2): + raise ValueError("Invalid value for `timeframe`, number of items must be greater than or equal to `2`") # noqa: E501 + + self._timeframe = timeframe + + def to_dict(self, serialize=False): + """Returns the model properties as a dict""" + result = {} + + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(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, ListAnnotationsResponse): + 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, ListAnnotationsResponse): + return True + + return self.to_dict() != other.to_dict() diff --git a/mux_python/models/live_stream_metadata.py b/mux_python/models/live_stream_metadata.py new file mode 100644 index 0000000..c7a04c8 --- /dev/null +++ b/mux_python/models/live_stream_metadata.py @@ -0,0 +1,137 @@ +# 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 +""" + + +try: + from inspect import getfullargspec +except ImportError: + from inspect import getargspec as getfullargspec +import pprint +import re # noqa: F401 +import six + +from mux_python.configuration import Configuration + + +class LiveStreamMetadata(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 = { + 'title': 'str' + } + + attribute_map = { + 'title': 'title' + } + + def __init__(self, title=None, local_vars_configuration=None): # noqa: E501 + """LiveStreamMetadata - 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._title = None + self.discriminator = None + + if title is not None: + self.title = title + + @property + def title(self): + """Gets the title of this LiveStreamMetadata. # noqa: E501 + + The live stream title. Max 512 code points. # noqa: E501 + + :return: The title of this LiveStreamMetadata. # noqa: E501 + :rtype: str + """ + return self._title + + @title.setter + def title(self, title): + """Sets the title of this LiveStreamMetadata. + + The live stream title. Max 512 code points. # noqa: E501 + + :param title: The title of this LiveStreamMetadata. # noqa: E501 + :type title: str + """ + if (self.local_vars_configuration.client_side_validation and + title is not None and len(title) > 512): + raise ValueError("Invalid value for `title`, length must be less than or equal to `512`") # noqa: E501 + + self._title = title + + def to_dict(self, serialize=False): + """Returns the model properties as a dict""" + result = {} + + def convert(x): + if hasattr(x, "to_dict"): + args = getfullargspec(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, LiveStreamMetadata): + 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, LiveStreamMetadata): + return True + + return self.to_dict() != other.to_dict() diff --git a/test/test_annotation.py b/test/test_annotation.py new file mode 100644 index 0000000..041ff1f --- /dev/null +++ b/test/test_annotation.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.annotation import Annotation # noqa: E501 +from mux_python.rest import ApiException + +class TestAnnotation(unittest.TestCase): + """Annotation unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test Annotation + 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.annotation.Annotation() # noqa: E501 + if include_optional : + return Annotation( + id = '', + note = '', + date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + sub_property_id = '' + ) + else : + return Annotation( + ) + + def testAnnotation(self): + """Test Annotation""" + 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_annotation_input.py b/test/test_annotation_input.py new file mode 100644 index 0000000..edbeea6 --- /dev/null +++ b/test/test_annotation_input.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.annotation_input import AnnotationInput # noqa: E501 +from mux_python.rest import ApiException + +class TestAnnotationInput(unittest.TestCase): + """AnnotationInput unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test AnnotationInput + 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.annotation_input.AnnotationInput() # noqa: E501 + if include_optional : + return AnnotationInput( + note = '', + date = 56, + sub_property_id = '' + ) + else : + return AnnotationInput( + ) + + def testAnnotationInput(self): + """Test AnnotationInput""" + 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_annotation_response.py b/test/test_annotation_response.py new file mode 100644 index 0000000..d03a48e --- /dev/null +++ b/test/test_annotation_response.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.annotation_response import AnnotationResponse # noqa: E501 +from mux_python.rest import ApiException + +class TestAnnotationResponse(unittest.TestCase): + """AnnotationResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test AnnotationResponse + 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.annotation_response.AnnotationResponse() # noqa: E501 + if include_optional : + return AnnotationResponse( + data = mux_python.models.annotation.Annotation( + id = '', + note = '', + date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + sub_property_id = '', ) + ) + else : + return AnnotationResponse( + ) + + def testAnnotationResponse(self): + """Test AnnotationResponse""" + 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_annotations_api.py b/test/test_annotations_api.py new file mode 100644 index 0000000..88844a2 --- /dev/null +++ b/test/test_annotations_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.annotations_api import AnnotationsApi # noqa: E501 +from mux_python.rest import ApiException + + +class TestAnnotationsApi(unittest.TestCase): + """AnnotationsApi unit test stubs""" + + def setUp(self): + self.api = mux_python.api.annotations_api.AnnotationsApi() # noqa: E501 + + def tearDown(self): + pass + + def test_create_annotation(self): + """Test case for create_annotation + + Create Annotation # noqa: E501 + """ + pass + + def test_delete_annotation(self): + """Test case for delete_annotation + + Delete Annotation # noqa: E501 + """ + pass + + def test_get_annotation(self): + """Test case for get_annotation + + Get Annotation # noqa: E501 + """ + pass + + def test_list_annotations(self): + """Test case for list_annotations + + List Annotations # noqa: E501 + """ + pass + + def test_update_annotation(self): + """Test case for update_annotation + + Update Annotation # noqa: E501 + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_asset_progress.py b/test/test_asset_progress.py new file mode 100644 index 0000000..a6396b3 --- /dev/null +++ b/test/test_asset_progress.py @@ -0,0 +1,53 @@ +# 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.asset_progress import AssetProgress # noqa: E501 +from mux_python.rest import ApiException + +class TestAssetProgress(unittest.TestCase): + """AssetProgress unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test AssetProgress + 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.asset_progress.AssetProgress() # noqa: E501 + if include_optional : + return AssetProgress( + state = 'ingesting', + progress = -1 + ) + else : + return AssetProgress( + ) + + def testAssetProgress(self): + """Test AssetProgress""" + 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_list_annotations_response.py b/test/test_list_annotations_response.py new file mode 100644 index 0000000..3064b15 --- /dev/null +++ b/test/test_list_annotations_response.py @@ -0,0 +1,62 @@ +# 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.list_annotations_response import ListAnnotationsResponse # noqa: E501 +from mux_python.rest import ApiException + +class TestListAnnotationsResponse(unittest.TestCase): + """ListAnnotationsResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test ListAnnotationsResponse + 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.list_annotations_response.ListAnnotationsResponse() # noqa: E501 + if include_optional : + return ListAnnotationsResponse( + data = [ + mux_python.models.annotation.Annotation( + id = '', + note = '', + date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + sub_property_id = '', ) + ], + total_row_count = 56, + timeframe = [ + 56 + ] + ) + else : + return ListAnnotationsResponse( + ) + + def testListAnnotationsResponse(self): + """Test ListAnnotationsResponse""" + 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_live_stream_metadata.py b/test/test_live_stream_metadata.py new file mode 100644 index 0000000..8918e0c --- /dev/null +++ b/test/test_live_stream_metadata.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.live_stream_metadata import LiveStreamMetadata # noqa: E501 +from mux_python.rest import ApiException + +class TestLiveStreamMetadata(unittest.TestCase): + """LiveStreamMetadata unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test LiveStreamMetadata + 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.live_stream_metadata.LiveStreamMetadata() # noqa: E501 + if include_optional : + return LiveStreamMetadata( + title = '' + ) + else : + return LiveStreamMetadata( + ) + + def testLiveStreamMetadata(self): + """Test LiveStreamMetadata""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() From 4ed3dae5d4687bac68052ff14604e708a9c44579 Mon Sep 17 00:00:00 2001 From: Justin Sanford Date: Fri, 15 Aug 2025 08:24:59 -0700 Subject: [PATCH 3/3] update --- docs/DimensionsApi.md | 90 +++++++++++++- docs/ErrorsApi.md | 4 +- docs/FiltersApi.md | 4 +- docs/MetricsApi.md | 20 +-- docs/VideoView.md | 1 + docs/VideoViewsApi.md | 4 +- mux_python/api/dimensions_api.py | 197 +++++++++++++++++++++++++++++- mux_python/api/errors_api.py | 4 +- mux_python/api/filters_api.py | 4 +- mux_python/api/metrics_api.py | 20 +-- mux_python/api/video_views_api.py | 4 +- mux_python/models/video_view.py | 32 ++++- 12 files changed, 345 insertions(+), 39 deletions(-) diff --git a/docs/DimensionsApi.md b/docs/DimensionsApi.md index d65d016..72f759f 100644 --- a/docs/DimensionsApi.md +++ b/docs/DimensionsApi.md @@ -4,10 +4,96 @@ All URIs are relative to *https://api.mux.com* Method | HTTP request | Description ------------- | ------------- | ------------- +[**list_dimension_elements**](DimensionsApi.md#list_dimension_elements) | **GET** /data/v1/dimensions/{DIMENSION_ID}/elements | Lists elements for a trace dimension [**list_dimension_values**](DimensionsApi.md#list_dimension_values) | **GET** /data/v1/dimensions/{DIMENSION_ID} | Lists the values for a specific dimension [**list_dimensions**](DimensionsApi.md#list_dimensions) | **GET** /data/v1/dimensions | List Dimensions +# **list_dimension_elements** +> ListDimensionValuesResponse list_dimension_elements(dimension_id, limit=limit, filters=filters, metric_filters=metric_filters, timeframe=timeframe, order_by=order_by, order_direction=order_direction) + +Lists elements for a trace dimension + +Lists the elements (values) for a trace dimension along with their total counts. This endpoint is specifically designed for trace dimensions like video_cdn_trace that contain arrays of values. + +### 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.DimensionsApi(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) +filters = ['filters_example'] # list[str] | Filter results using key:value pairs. Must be provided as an array query string parameter. **Basic filtering:** * `filters[]=dimension:value` - Include rows where dimension equals value * `filters[]=!dimension:value` - Exclude rows where dimension equals value **For trace dimensions (like video_cdn_trace):** * `filters[]=+dimension:value` - Include rows where trace contains value * `filters[]=-dimension:value` - Exclude rows where trace contains value * `filters[]=dimension:[value1,value2]` - Exact trace match **Examples:** * `filters[]=country:US` - US views only * `filters[]=+video_cdn_trace:fastly` - Views using Fastly CDN (optional) +metric_filters = ['metric_filters_example'] # list[str] | Limit the results to rows that match inequality conditions from provided metric comparison clauses. Must be provided as an array query string parameter. Possible filterable metrics are the same as the set of metric ids, with the exceptions of `exits_before_video_start`, `unique_viewers`, `video_startup_failure_percentage`, `view_dropped_percentage`, and `views`. Example: * `metric_filters[]=aggregate_startup_time>=1000` (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) +order_by = 'order_by_example' # str | Value to order the results by (optional) +order_direction = 'order_direction_example' # str | Sort order. (optional) + + try: + # Lists elements for a trace dimension + api_response = api_instance.list_dimension_elements(dimension_id, limit=limit, filters=filters, metric_filters=metric_filters, timeframe=timeframe, order_by=order_by, order_direction=order_direction) + pprint(api_response) + except ApiException as e: + print("Exception when calling DimensionsApi->list_dimension_elements: %s\n" % e) +``` + +### Parameters + +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] + **filters** | [**list[str]**](str.md)| Filter results using key:value pairs. Must be provided as an array query string parameter. **Basic filtering:** * `filters[]=dimension:value` - Include rows where dimension equals value * `filters[]=!dimension:value` - Exclude rows where dimension equals value **For trace dimensions (like video_cdn_trace):** * `filters[]=+dimension:value` - Include rows where trace contains value * `filters[]=-dimension:value` - Exclude rows where trace contains value * `filters[]=dimension:[value1,value2]` - Exact trace match **Examples:** * `filters[]=country:US` - US views only * `filters[]=+video_cdn_trace:fastly` - Views using Fastly CDN | [optional] + **metric_filters** | [**list[str]**](str.md)| Limit the results to rows that match inequality conditions from provided metric comparison clauses. Must be provided as an array query string parameter. Possible filterable metrics are the same as the set of metric ids, with the exceptions of `exits_before_video_start`, `unique_viewers`, `video_startup_failure_percentage`, `view_dropped_percentage`, and `views`. Example: * `metric_filters[]=aggregate_startup_time>=1000` | [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] + **order_by** | **str**| Value to order the results by | [optional] + **order_direction** | **str**| Sort order. | [optional] + +### Return type + +[**ListDimensionValuesResponse**](ListDimensionValuesResponse.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_dimension_values** > ListDimensionValuesResponse list_dimension_values(dimension_id, limit=limit, page=page, filters=filters, metric_filters=metric_filters, timeframe=timeframe) @@ -48,7 +134,7 @@ 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] | 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) +filters = ['filters_example'] # list[str] | Filter results using key:value pairs. Must be provided as an array query string parameter. **Basic filtering:** * `filters[]=dimension:value` - Include rows where dimension equals value * `filters[]=!dimension:value` - Exclude rows where dimension equals value **For trace dimensions (like video_cdn_trace):** * `filters[]=+dimension:value` - Include rows where trace contains value * `filters[]=-dimension:value` - Exclude rows where trace contains value * `filters[]=dimension:[value1,value2]` - Exact trace match **Examples:** * `filters[]=country:US` - US views only * `filters[]=+video_cdn_trace:fastly` - Views using Fastly CDN (optional) metric_filters = ['metric_filters_example'] # list[str] | Limit the results to rows that match inequality conditions from provided metric comparison clauses. Must be provided as an array query string parameter. Possible filterable metrics are the same as the set of metric ids, with the exceptions of `exits_before_video_start`, `unique_viewers`, `video_startup_failure_percentage`, `view_dropped_percentage`, and `views`. Example: * `metric_filters[]=aggregate_startup_time>=1000` (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) @@ -67,7 +153,7 @@ 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)| 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] + **filters** | [**list[str]**](str.md)| Filter results using key:value pairs. Must be provided as an array query string parameter. **Basic filtering:** * `filters[]=dimension:value` - Include rows where dimension equals value * `filters[]=!dimension:value` - Exclude rows where dimension equals value **For trace dimensions (like video_cdn_trace):** * `filters[]=+dimension:value` - Include rows where trace contains value * `filters[]=-dimension:value` - Exclude rows where trace contains value * `filters[]=dimension:[value1,value2]` - Exact trace match **Examples:** * `filters[]=country:US` - US views only * `filters[]=+video_cdn_trace:fastly` - Views using Fastly CDN | [optional] **metric_filters** | [**list[str]**](str.md)| Limit the results to rows that match inequality conditions from provided metric comparison clauses. Must be provided as an array query string parameter. Possible filterable metrics are the same as the set of metric ids, with the exceptions of `exits_before_video_start`, `unique_viewers`, `video_startup_failure_percentage`, `view_dropped_percentage`, and `views`. Example: * `metric_filters[]=aggregate_startup_time>=1000` | [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] diff --git a/docs/ErrorsApi.md b/docs/ErrorsApi.md index bb589c2..9725c67 100644 --- a/docs/ErrorsApi.md +++ b/docs/ErrorsApi.md @@ -44,7 +44,7 @@ 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] | 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) + filters = ['filters_example'] # list[str] | Filter results using key:value pairs. Must be provided as an array query string parameter. **Basic filtering:** * `filters[]=dimension:value` - Include rows where dimension equals value * `filters[]=!dimension:value` - Exclude rows where dimension equals value **For trace dimensions (like video_cdn_trace):** * `filters[]=+dimension:value` - Include rows where trace contains value * `filters[]=-dimension:value` - Exclude rows where trace contains value * `filters[]=dimension:[value1,value2]` - Exact trace match **Examples:** * `filters[]=country:US` - US views only * `filters[]=+video_cdn_trace:fastly` - Views using Fastly CDN (optional) metric_filters = ['metric_filters_example'] # list[str] | Limit the results to rows that match inequality conditions from provided metric comparison clauses. Must be provided as an array query string parameter. Possible filterable metrics are the same as the set of metric ids, with the exceptions of `exits_before_video_start`, `unique_viewers`, `video_startup_failure_percentage`, `view_dropped_percentage`, and `views`. Example: * `metric_filters[]=aggregate_startup_time>=1000` (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) @@ -60,7 +60,7 @@ timeframe = ['timeframe_example'] # list[str] | Timeframe window to limit result Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **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] + **filters** | [**list[str]**](str.md)| Filter results using key:value pairs. Must be provided as an array query string parameter. **Basic filtering:** * `filters[]=dimension:value` - Include rows where dimension equals value * `filters[]=!dimension:value` - Exclude rows where dimension equals value **For trace dimensions (like video_cdn_trace):** * `filters[]=+dimension:value` - Include rows where trace contains value * `filters[]=-dimension:value` - Exclude rows where trace contains value * `filters[]=dimension:[value1,value2]` - Exact trace match **Examples:** * `filters[]=country:US` - US views only * `filters[]=+video_cdn_trace:fastly` - Views using Fastly CDN | [optional] **metric_filters** | [**list[str]**](str.md)| Limit the results to rows that match inequality conditions from provided metric comparison clauses. Must be provided as an array query string parameter. Possible filterable metrics are the same as the set of metric ids, with the exceptions of `exits_before_video_start`, `unique_viewers`, `video_startup_failure_percentage`, `view_dropped_percentage`, and `views`. Example: * `metric_filters[]=aggregate_startup_time>=1000` | [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] diff --git a/docs/FiltersApi.md b/docs/FiltersApi.md index c5bc95c..57af236 100644 --- a/docs/FiltersApi.md +++ b/docs/FiltersApi.md @@ -48,7 +48,7 @@ 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] | 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) +filters = ['filters_example'] # list[str] | Filter results using key:value pairs. Must be provided as an array query string parameter. **Basic filtering:** * `filters[]=dimension:value` - Include rows where dimension equals value * `filters[]=!dimension:value` - Exclude rows where dimension equals value **For trace dimensions (like video_cdn_trace):** * `filters[]=+dimension:value` - Include rows where trace contains value * `filters[]=-dimension:value` - Exclude rows where trace contains value * `filters[]=dimension:[value1,value2]` - Exact trace match **Examples:** * `filters[]=country:US` - US views only * `filters[]=+video_cdn_trace:fastly` - Views using Fastly CDN (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: @@ -66,7 +66,7 @@ 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)| 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] + **filters** | [**list[str]**](str.md)| Filter results using key:value pairs. Must be provided as an array query string parameter. **Basic filtering:** * `filters[]=dimension:value` - Include rows where dimension equals value * `filters[]=!dimension:value` - Exclude rows where dimension equals value **For trace dimensions (like video_cdn_trace):** * `filters[]=+dimension:value` - Include rows where trace contains value * `filters[]=-dimension:value` - Exclude rows where trace contains value * `filters[]=dimension:[value1,value2]` - Exact trace match **Examples:** * `filters[]=country:US` - US views only * `filters[]=+video_cdn_trace:fastly` - Views using Fastly CDN | [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/MetricsApi.md b/docs/MetricsApi.md index 1078025..11137d9 100644 --- a/docs/MetricsApi.md +++ b/docs/MetricsApi.md @@ -50,7 +50,7 @@ with mux_python.ApiClient(configuration) as api_client: 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] | 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) +filters = ['filters_example'] # list[str] | Filter results using key:value pairs. Must be provided as an array query string parameter. **Basic filtering:** * `filters[]=dimension:value` - Include rows where dimension equals value * `filters[]=!dimension:value` - Exclude rows where dimension equals value **For trace dimensions (like video_cdn_trace):** * `filters[]=+dimension:value` - Include rows where trace contains value * `filters[]=-dimension:value` - Exclude rows where trace contains value * `filters[]=dimension:[value1,value2]` - Exact trace match **Examples:** * `filters[]=country:US` - US views only * `filters[]=+video_cdn_trace:fastly` - Views using Fastly CDN (optional) metric_filters = ['metric_filters_example'] # list[str] | Limit the results to rows that match inequality conditions from provided metric comparison clauses. Must be provided as an array query string parameter. Possible filterable metrics are the same as the set of metric ids, with the exceptions of `exits_before_video_start`, `unique_viewers`, `video_startup_failure_percentage`, `view_dropped_percentage`, and `views`. Example: * `metric_filters[]=aggregate_startup_time>=1000` (optional) measurement = 'measurement_example' # str | Measurement for the provided metric. If omitted, the default for the metric will be used. The default measurement for each metric is: \"sum\" : `ad_attempt_count`, `ad_break_count`, `ad_break_error_count`, `ad_error_count`, `ad_impression_count`, `playing_time` \"median\" : `ad_preroll_startup_time`, `aggregate_startup_time`, `content_startup_time`, `max_downscale_percentage`, `max_upscale_percentage`, `page_load_time`, `player_average_live_latency`, `player_startup_time`, `rebuffer_count`, `rebuffer_duration`, `requests_for_first_preroll`, `video_startup_preroll_load_time`, `video_startup_preroll_request_time`, `video_startup_time`, `view_average_request_latency`, `view_average_request_throughput`, `view_max_request_latency`, `weighted_average_bitrate` \"avg\" : `ad_break_error_percentage`, `ad_error_percentage`, `ad_exit_before_start_count`, `ad_exit_before_start_percentage`, `ad_playback_failure_percentage`, `ad_startup_error_count`, `ad_startup_error_percentage`, `content_playback_failure_percentage`, `downscale_percentage`, `exits_before_video_start`, `playback_business_exception_percentage`, `playback_failure_percentage`, `playback_success_score`, `rebuffer_frequency`, `rebuffer_percentage`, `seek_latency`, `smoothness_score`, `startup_time_score`, `upscale_percentage`, `video_quality_score`, `video_startup_business_exception_percentage`, `video_startup_failure_percentage`, `view_dropped_percentage`, `viewer_experience_score` \"count\" : `started_views`, `unique_viewers` (optional) order_direction = 'order_direction_example' # str | Sort order. (optional) @@ -70,7 +70,7 @@ 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)| 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] + **filters** | [**list[str]**](str.md)| Filter results using key:value pairs. Must be provided as an array query string parameter. **Basic filtering:** * `filters[]=dimension:value` - Include rows where dimension equals value * `filters[]=!dimension:value` - Exclude rows where dimension equals value **For trace dimensions (like video_cdn_trace):** * `filters[]=+dimension:value` - Include rows where trace contains value * `filters[]=-dimension:value` - Exclude rows where trace contains value * `filters[]=dimension:[value1,value2]` - Exact trace match **Examples:** * `filters[]=country:US` - US views only * `filters[]=+video_cdn_trace:fastly` - Views using Fastly CDN | [optional] **metric_filters** | [**list[str]**](str.md)| Limit the results to rows that match inequality conditions from provided metric comparison clauses. Must be provided as an array query string parameter. Possible filterable metrics are the same as the set of metric ids, with the exceptions of `exits_before_video_start`, `unique_viewers`, `video_startup_failure_percentage`, `view_dropped_percentage`, and `views`. Example: * `metric_filters[]=aggregate_startup_time>=1000` | [optional] **measurement** | **str**| Measurement for the provided metric. If omitted, the default for the metric will be used. The default measurement for each metric is: \"sum\" : `ad_attempt_count`, `ad_break_count`, `ad_break_error_count`, `ad_error_count`, `ad_impression_count`, `playing_time` \"median\" : `ad_preroll_startup_time`, `aggregate_startup_time`, `content_startup_time`, `max_downscale_percentage`, `max_upscale_percentage`, `page_load_time`, `player_average_live_latency`, `player_startup_time`, `rebuffer_count`, `rebuffer_duration`, `requests_for_first_preroll`, `video_startup_preroll_load_time`, `video_startup_preroll_request_time`, `video_startup_time`, `view_average_request_latency`, `view_average_request_throughput`, `view_max_request_latency`, `weighted_average_bitrate` \"avg\" : `ad_break_error_percentage`, `ad_error_percentage`, `ad_exit_before_start_count`, `ad_exit_before_start_percentage`, `ad_playback_failure_percentage`, `ad_startup_error_count`, `ad_startup_error_percentage`, `content_playback_failure_percentage`, `downscale_percentage`, `exits_before_video_start`, `playback_business_exception_percentage`, `playback_failure_percentage`, `playback_success_score`, `rebuffer_frequency`, `rebuffer_percentage`, `seek_latency`, `smoothness_score`, `startup_time_score`, `upscale_percentage`, `video_quality_score`, `video_startup_business_exception_percentage`, `video_startup_failure_percentage`, `view_dropped_percentage`, `viewer_experience_score` \"count\" : `started_views`, `unique_viewers` | [optional] **order_direction** | **str**| Sort order. | [optional] @@ -135,7 +135,7 @@ with mux_python.ApiClient(configuration) as api_client: 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] | 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) +filters = ['filters_example'] # list[str] | Filter results using key:value pairs. Must be provided as an array query string parameter. **Basic filtering:** * `filters[]=dimension:value` - Include rows where dimension equals value * `filters[]=!dimension:value` - Exclude rows where dimension equals value **For trace dimensions (like video_cdn_trace):** * `filters[]=+dimension:value` - Include rows where trace contains value * `filters[]=-dimension:value` - Exclude rows where trace contains value * `filters[]=dimension:[value1,value2]` - Exact trace match **Examples:** * `filters[]=country:US` - US views only * `filters[]=+video_cdn_trace:fastly` - Views using Fastly CDN (optional) metric_filters = ['metric_filters_example'] # list[str] | Limit the results to rows that match inequality conditions from provided metric comparison clauses. Must be provided as an array query string parameter. Possible filterable metrics are the same as the set of metric ids, with the exceptions of `exits_before_video_start`, `unique_viewers`, `video_startup_failure_percentage`, `view_dropped_percentage`, and `views`. Example: * `metric_filters[]=aggregate_startup_time>=1000` (optional) measurement = 'measurement_example' # str | Measurement for the provided metric. If omitted, the default for the metric will be used. The default measurement for each metric is: \"sum\" : `ad_attempt_count`, `ad_break_count`, `ad_break_error_count`, `ad_error_count`, `ad_impression_count`, `playing_time` \"median\" : `ad_preroll_startup_time`, `aggregate_startup_time`, `content_startup_time`, `max_downscale_percentage`, `max_upscale_percentage`, `page_load_time`, `player_average_live_latency`, `player_startup_time`, `rebuffer_count`, `rebuffer_duration`, `requests_for_first_preroll`, `video_startup_preroll_load_time`, `video_startup_preroll_request_time`, `video_startup_time`, `view_average_request_latency`, `view_average_request_throughput`, `view_max_request_latency`, `weighted_average_bitrate` \"avg\" : `ad_break_error_percentage`, `ad_error_percentage`, `ad_exit_before_start_count`, `ad_exit_before_start_percentage`, `ad_playback_failure_percentage`, `ad_startup_error_count`, `ad_startup_error_percentage`, `content_playback_failure_percentage`, `downscale_percentage`, `exits_before_video_start`, `playback_business_exception_percentage`, `playback_failure_percentage`, `playback_success_score`, `rebuffer_frequency`, `rebuffer_percentage`, `seek_latency`, `smoothness_score`, `startup_time_score`, `upscale_percentage`, `video_quality_score`, `video_startup_business_exception_percentage`, `video_startup_failure_percentage`, `view_dropped_percentage`, `viewer_experience_score` \"count\" : `started_views`, `unique_viewers` (optional) @@ -153,7 +153,7 @@ 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)| 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] + **filters** | [**list[str]**](str.md)| Filter results using key:value pairs. Must be provided as an array query string parameter. **Basic filtering:** * `filters[]=dimension:value` - Include rows where dimension equals value * `filters[]=!dimension:value` - Exclude rows where dimension equals value **For trace dimensions (like video_cdn_trace):** * `filters[]=+dimension:value` - Include rows where trace contains value * `filters[]=-dimension:value` - Exclude rows where trace contains value * `filters[]=dimension:[value1,value2]` - Exact trace match **Examples:** * `filters[]=country:US` - US views only * `filters[]=+video_cdn_trace:fastly` - Views using Fastly CDN | [optional] **metric_filters** | [**list[str]**](str.md)| Limit the results to rows that match inequality conditions from provided metric comparison clauses. Must be provided as an array query string parameter. Possible filterable metrics are the same as the set of metric ids, with the exceptions of `exits_before_video_start`, `unique_viewers`, `video_startup_failure_percentage`, `view_dropped_percentage`, and `views`. Example: * `metric_filters[]=aggregate_startup_time>=1000` | [optional] **measurement** | **str**| Measurement for the provided metric. If omitted, the default for the metric will be used. The default measurement for each metric is: \"sum\" : `ad_attempt_count`, `ad_break_count`, `ad_break_error_count`, `ad_error_count`, `ad_impression_count`, `playing_time` \"median\" : `ad_preroll_startup_time`, `aggregate_startup_time`, `content_startup_time`, `max_downscale_percentage`, `max_upscale_percentage`, `page_load_time`, `player_average_live_latency`, `player_startup_time`, `rebuffer_count`, `rebuffer_duration`, `requests_for_first_preroll`, `video_startup_preroll_load_time`, `video_startup_preroll_request_time`, `video_startup_time`, `view_average_request_latency`, `view_average_request_throughput`, `view_max_request_latency`, `weighted_average_bitrate` \"avg\" : `ad_break_error_percentage`, `ad_error_percentage`, `ad_exit_before_start_count`, `ad_exit_before_start_percentage`, `ad_playback_failure_percentage`, `ad_startup_error_count`, `ad_startup_error_percentage`, `content_playback_failure_percentage`, `downscale_percentage`, `exits_before_video_start`, `playback_business_exception_percentage`, `playback_failure_percentage`, `playback_success_score`, `rebuffer_frequency`, `rebuffer_percentage`, `seek_latency`, `smoothness_score`, `startup_time_score`, `upscale_percentage`, `video_quality_score`, `video_startup_business_exception_percentage`, `video_startup_failure_percentage`, `view_dropped_percentage`, `viewer_experience_score` \"count\" : `started_views`, `unique_viewers` | [optional] @@ -215,7 +215,7 @@ 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] | 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) +filters = ['filters_example'] # list[str] | Filter results using key:value pairs. Must be provided as an array query string parameter. **Basic filtering:** * `filters[]=dimension:value` - Include rows where dimension equals value * `filters[]=!dimension:value` - Exclude rows where dimension equals value **For trace dimensions (like video_cdn_trace):** * `filters[]=+dimension:value` - Include rows where trace contains value * `filters[]=-dimension:value` - Exclude rows where trace contains value * `filters[]=dimension:[value1,value2]` - Exact trace match **Examples:** * `filters[]=country:US` - US views only * `filters[]=+video_cdn_trace:fastly` - Views using Fastly CDN (optional) metric_filters = ['metric_filters_example'] # list[str] | Limit the results to rows that match inequality conditions from provided metric comparison clauses. Must be provided as an array query string parameter. Possible filterable metrics are the same as the set of metric ids, with the exceptions of `exits_before_video_start`, `unique_viewers`, `video_startup_failure_percentage`, `view_dropped_percentage`, and `views`. Example: * `metric_filters[]=aggregate_startup_time>=1000` (optional) dimension = 'dimension_example' # str | Dimension the specified value belongs to (optional) value = 'value_example' # str | Value to show all available metrics for (optional) @@ -233,7 +233,7 @@ 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)| 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] + **filters** | [**list[str]**](str.md)| Filter results using key:value pairs. Must be provided as an array query string parameter. **Basic filtering:** * `filters[]=dimension:value` - Include rows where dimension equals value * `filters[]=!dimension:value` - Exclude rows where dimension equals value **For trace dimensions (like video_cdn_trace):** * `filters[]=+dimension:value` - Include rows where trace contains value * `filters[]=-dimension:value` - Exclude rows where trace contains value * `filters[]=dimension:[value1,value2]` - Exact trace match **Examples:** * `filters[]=country:US` - US views only * `filters[]=+video_cdn_trace:fastly` - Views using Fastly CDN | [optional] **metric_filters** | [**list[str]**](str.md)| Limit the results to rows that match inequality conditions from provided metric comparison clauses. Must be provided as an array query string parameter. Possible filterable metrics are the same as the set of metric ids, with the exceptions of `exits_before_video_start`, `unique_viewers`, `video_startup_failure_percentage`, `view_dropped_percentage`, and `views`. Example: * `metric_filters[]=aggregate_startup_time>=1000` | [optional] **dimension** | **str**| Dimension the specified value belongs to | [optional] **value** | **str**| Value to show all available metrics for | [optional] @@ -298,7 +298,7 @@ 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. The default measurement for each metric is: \"sum\" : `ad_attempt_count`, `ad_break_count`, `ad_break_error_count`, `ad_error_count`, `ad_impression_count`, `playing_time` \"median\" : `ad_preroll_startup_time`, `aggregate_startup_time`, `content_startup_time`, `max_downscale_percentage`, `max_upscale_percentage`, `page_load_time`, `player_average_live_latency`, `player_startup_time`, `rebuffer_count`, `rebuffer_duration`, `requests_for_first_preroll`, `video_startup_preroll_load_time`, `video_startup_preroll_request_time`, `video_startup_time`, `view_average_request_latency`, `view_average_request_throughput`, `view_max_request_latency`, `weighted_average_bitrate` \"avg\" : `ad_break_error_percentage`, `ad_error_percentage`, `ad_exit_before_start_count`, `ad_exit_before_start_percentage`, `ad_playback_failure_percentage`, `ad_startup_error_count`, `ad_startup_error_percentage`, `content_playback_failure_percentage`, `downscale_percentage`, `exits_before_video_start`, `playback_business_exception_percentage`, `playback_failure_percentage`, `playback_success_score`, `rebuffer_frequency`, `rebuffer_percentage`, `seek_latency`, `smoothness_score`, `startup_time_score`, `upscale_percentage`, `video_quality_score`, `video_startup_business_exception_percentage`, `video_startup_failure_percentage`, `view_dropped_percentage`, `viewer_experience_score` \"count\" : `started_views`, `unique_viewers` (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) +filters = ['filters_example'] # list[str] | Filter results using key:value pairs. Must be provided as an array query string parameter. **Basic filtering:** * `filters[]=dimension:value` - Include rows where dimension equals value * `filters[]=!dimension:value` - Exclude rows where dimension equals value **For trace dimensions (like video_cdn_trace):** * `filters[]=+dimension:value` - Include rows where trace contains value * `filters[]=-dimension:value` - Exclude rows where trace contains value * `filters[]=dimension:[value1,value2]` - Exact trace match **Examples:** * `filters[]=country:US` - US views only * `filters[]=+video_cdn_trace:fastly` - Views using Fastly CDN (optional) metric_filters = ['metric_filters_example'] # list[str] | Limit the results to rows that match inequality conditions from provided metric comparison clauses. Must be provided as an array query string parameter. Possible filterable metrics are the same as the set of metric ids, with the exceptions of `exits_before_video_start`, `unique_viewers`, `video_startup_failure_percentage`, `view_dropped_percentage`, and `views`. Example: * `metric_filters[]=aggregate_startup_time>=1000` (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) @@ -321,7 +321,7 @@ 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. The default measurement for each metric is: \"sum\" : `ad_attempt_count`, `ad_break_count`, `ad_break_error_count`, `ad_error_count`, `ad_impression_count`, `playing_time` \"median\" : `ad_preroll_startup_time`, `aggregate_startup_time`, `content_startup_time`, `max_downscale_percentage`, `max_upscale_percentage`, `page_load_time`, `player_average_live_latency`, `player_startup_time`, `rebuffer_count`, `rebuffer_duration`, `requests_for_first_preroll`, `video_startup_preroll_load_time`, `video_startup_preroll_request_time`, `video_startup_time`, `view_average_request_latency`, `view_average_request_throughput`, `view_max_request_latency`, `weighted_average_bitrate` \"avg\" : `ad_break_error_percentage`, `ad_error_percentage`, `ad_exit_before_start_count`, `ad_exit_before_start_percentage`, `ad_playback_failure_percentage`, `ad_startup_error_count`, `ad_startup_error_percentage`, `content_playback_failure_percentage`, `downscale_percentage`, `exits_before_video_start`, `playback_business_exception_percentage`, `playback_failure_percentage`, `playback_success_score`, `rebuffer_frequency`, `rebuffer_percentage`, `seek_latency`, `smoothness_score`, `startup_time_score`, `upscale_percentage`, `video_quality_score`, `video_startup_business_exception_percentage`, `video_startup_failure_percentage`, `view_dropped_percentage`, `viewer_experience_score` \"count\" : `started_views`, `unique_viewers` | [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] + **filters** | [**list[str]**](str.md)| Filter results using key:value pairs. Must be provided as an array query string parameter. **Basic filtering:** * `filters[]=dimension:value` - Include rows where dimension equals value * `filters[]=!dimension:value` - Exclude rows where dimension equals value **For trace dimensions (like video_cdn_trace):** * `filters[]=+dimension:value` - Include rows where trace contains value * `filters[]=-dimension:value` - Exclude rows where trace contains value * `filters[]=dimension:[value1,value2]` - Exact trace match **Examples:** * `filters[]=country:US` - US views only * `filters[]=+video_cdn_trace:fastly` - Views using Fastly CDN | [optional] **metric_filters** | [**list[str]**](str.md)| Limit the results to rows that match inequality conditions from provided metric comparison clauses. Must be provided as an array query string parameter. Possible filterable metrics are the same as the set of metric ids, with the exceptions of `exits_before_video_start`, `unique_viewers`, `video_startup_failure_percentage`, `view_dropped_percentage`, and `views`. Example: * `metric_filters[]=aggregate_startup_time>=1000` | [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] @@ -390,7 +390,7 @@ with mux_python.ApiClient(configuration) as api_client: measurement = 'measurement_example' # str | Measurement for the provided metric. If omitted, the default for the metric will be used. The default measurement for each metric is: \"sum\" : `ad_attempt_count`, `ad_break_count`, `ad_break_error_count`, `ad_error_count`, `ad_impression_count`, `playing_time` \"median\" : `ad_preroll_startup_time`, `aggregate_startup_time`, `content_startup_time`, `max_downscale_percentage`, `max_upscale_percentage`, `page_load_time`, `player_average_live_latency`, `player_startup_time`, `rebuffer_count`, `rebuffer_duration`, `requests_for_first_preroll`, `video_startup_preroll_load_time`, `video_startup_preroll_request_time`, `video_startup_time`, `view_average_request_latency`, `view_average_request_throughput`, `view_max_request_latency`, `weighted_average_bitrate` \"avg\" : `ad_break_error_percentage`, `ad_error_percentage`, `ad_exit_before_start_count`, `ad_exit_before_start_percentage`, `ad_playback_failure_percentage`, `ad_startup_error_count`, `ad_startup_error_percentage`, `content_playback_failure_percentage`, `downscale_percentage`, `exits_before_video_start`, `playback_business_exception_percentage`, `playback_failure_percentage`, `playback_success_score`, `rebuffer_frequency`, `rebuffer_percentage`, `seek_latency`, `smoothness_score`, `startup_time_score`, `upscale_percentage`, `video_quality_score`, `video_startup_business_exception_percentage`, `video_startup_failure_percentage`, `view_dropped_percentage`, `viewer_experience_score` \"count\" : `started_views`, `unique_viewers` (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) -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) +filters = ['filters_example'] # list[str] | Filter results using key:value pairs. Must be provided as an array query string parameter. **Basic filtering:** * `filters[]=dimension:value` - Include rows where dimension equals value * `filters[]=!dimension:value` - Exclude rows where dimension equals value **For trace dimensions (like video_cdn_trace):** * `filters[]=+dimension:value` - Include rows where trace contains value * `filters[]=-dimension:value` - Exclude rows where trace contains value * `filters[]=dimension:[value1,value2]` - Exact trace match **Examples:** * `filters[]=country:US` - US views only * `filters[]=+video_cdn_trace:fastly` - Views using Fastly CDN (optional) metric_filters = ['metric_filters_example'] # list[str] | Limit the results to rows that match inequality conditions from provided metric comparison clauses. Must be provided as an array query string parameter. Possible filterable metrics are the same as the set of metric ids, with the exceptions of `exits_before_video_start`, `unique_viewers`, `video_startup_failure_percentage`, `view_dropped_percentage`, and `views`. Example: * `metric_filters[]=aggregate_startup_time>=1000` (optional) try: @@ -409,7 +409,7 @@ Name | Type | Description | Notes **measurement** | **str**| Measurement for the provided metric. If omitted, the default for the metric will be used. The default measurement for each metric is: \"sum\" : `ad_attempt_count`, `ad_break_count`, `ad_break_error_count`, `ad_error_count`, `ad_impression_count`, `playing_time` \"median\" : `ad_preroll_startup_time`, `aggregate_startup_time`, `content_startup_time`, `max_downscale_percentage`, `max_upscale_percentage`, `page_load_time`, `player_average_live_latency`, `player_startup_time`, `rebuffer_count`, `rebuffer_duration`, `requests_for_first_preroll`, `video_startup_preroll_load_time`, `video_startup_preroll_request_time`, `video_startup_time`, `view_average_request_latency`, `view_average_request_throughput`, `view_max_request_latency`, `weighted_average_bitrate` \"avg\" : `ad_break_error_percentage`, `ad_error_percentage`, `ad_exit_before_start_count`, `ad_exit_before_start_percentage`, `ad_playback_failure_percentage`, `ad_startup_error_count`, `ad_startup_error_percentage`, `content_playback_failure_percentage`, `downscale_percentage`, `exits_before_video_start`, `playback_business_exception_percentage`, `playback_failure_percentage`, `playback_success_score`, `rebuffer_frequency`, `rebuffer_percentage`, `seek_latency`, `smoothness_score`, `startup_time_score`, `upscale_percentage`, `video_quality_score`, `video_startup_business_exception_percentage`, `video_startup_failure_percentage`, `view_dropped_percentage`, `viewer_experience_score` \"count\" : `started_views`, `unique_viewers` | [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] - **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] + **filters** | [**list[str]**](str.md)| Filter results using key:value pairs. Must be provided as an array query string parameter. **Basic filtering:** * `filters[]=dimension:value` - Include rows where dimension equals value * `filters[]=!dimension:value` - Exclude rows where dimension equals value **For trace dimensions (like video_cdn_trace):** * `filters[]=+dimension:value` - Include rows where trace contains value * `filters[]=-dimension:value` - Exclude rows where trace contains value * `filters[]=dimension:[value1,value2]` - Exact trace match **Examples:** * `filters[]=country:US` - US views only * `filters[]=+video_cdn_trace:fastly` - Views using Fastly CDN | [optional] **metric_filters** | [**list[str]**](str.md)| Limit the results to rows that match inequality conditions from provided metric comparison clauses. Must be provided as an array query string parameter. Possible filterable metrics are the same as the set of metric ids, with the exceptions of `exits_before_video_start`, `unique_viewers`, `video_startup_failure_percentage`, `view_dropped_percentage`, and `views`. Example: * `metric_filters[]=aggregate_startup_time>=1000` | [optional] ### Return type diff --git a/docs/VideoView.md b/docs/VideoView.md index 759934e..512bbbf 100644 --- a/docs/VideoView.md +++ b/docs/VideoView.md @@ -182,6 +182,7 @@ Name | Type | Description | Notes **view_cdn_edge_pop** | **str** | | [optional] **view_cdn_origin** | **str** | | [optional] **video_creator_id** | **str** | | [optional] +**video_cdn_trace** | **list[str]** | | [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/VideoViewsApi.md b/docs/VideoViewsApi.md index 2fcaff6..7851b0a 100644 --- a/docs/VideoViewsApi.md +++ b/docs/VideoViewsApi.md @@ -123,7 +123,7 @@ 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] | 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) +filters = ['filters_example'] # list[str] | Filter results using key:value pairs. Must be provided as an array query string parameter. **Basic filtering:** * `filters[]=dimension:value` - Include rows where dimension equals value * `filters[]=!dimension:value` - Exclude rows where dimension equals value **For trace dimensions (like video_cdn_trace):** * `filters[]=+dimension:value` - Include rows where trace contains value * `filters[]=-dimension:value` - Exclude rows where trace contains value * `filters[]=dimension:[value1,value2]` - Exact trace match **Examples:** * `filters[]=country:US` - US views only * `filters[]=+video_cdn_trace:fastly` - Views using Fastly CDN (optional) metric_filters = ['metric_filters_example'] # list[str] | Limit the results to rows that match inequality conditions from provided metric comparison clauses. Must be provided as an array query string parameter. Possible filterable metrics are the same as the set of metric ids, with the exceptions of `exits_before_video_start`, `unique_viewers`, `video_startup_failure_percentage`, `view_dropped_percentage`, and `views`. Example: * `metric_filters[]=aggregate_startup_time>=1000` (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) @@ -144,7 +144,7 @@ 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)| 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] + **filters** | [**list[str]**](str.md)| Filter results using key:value pairs. Must be provided as an array query string parameter. **Basic filtering:** * `filters[]=dimension:value` - Include rows where dimension equals value * `filters[]=!dimension:value` - Exclude rows where dimension equals value **For trace dimensions (like video_cdn_trace):** * `filters[]=+dimension:value` - Include rows where trace contains value * `filters[]=-dimension:value` - Exclude rows where trace contains value * `filters[]=dimension:[value1,value2]` - Exact trace match **Examples:** * `filters[]=country:US` - US views only * `filters[]=+video_cdn_trace:fastly` - Views using Fastly CDN | [optional] **metric_filters** | [**list[str]**](str.md)| Limit the results to rows that match inequality conditions from provided metric comparison clauses. Must be provided as an array query string parameter. Possible filterable metrics are the same as the set of metric ids, with the exceptions of `exits_before_video_start`, `unique_viewers`, `video_startup_failure_percentage`, `view_dropped_percentage`, and `views`. Example: * `metric_filters[]=aggregate_startup_time>=1000` | [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] diff --git a/mux_python/api/dimensions_api.py b/mux_python/api/dimensions_api.py index 331ef07..a314cf6 100644 --- a/mux_python/api/dimensions_api.py +++ b/mux_python/api/dimensions_api.py @@ -37,6 +37,199 @@ def __init__(self, api_client=None): api_client = ApiClient() self.api_client = api_client + def list_dimension_elements(self, dimension_id, **kwargs): # noqa: E501 + """Lists elements for a trace dimension # noqa: E501 + + Lists the elements (values) for a trace dimension along with their total counts. This endpoint is specifically designed for trace dimensions like video_cdn_trace that contain arrays of values. # 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_dimension_elements(dimension_id, async_req=True) + >>> result = thread.get() + + :param dimension_id: ID of the Dimension (required) + :type dimension_id: str + :param limit: Number of items to include in the response + :type limit: int + :param filters: Filter results using key:value pairs. Must be provided as an array query string parameter. **Basic filtering:** * `filters[]=dimension:value` - Include rows where dimension equals value * `filters[]=!dimension:value` - Exclude rows where dimension equals value **For trace dimensions (like video_cdn_trace):** * `filters[]=+dimension:value` - Include rows where trace contains value * `filters[]=-dimension:value` - Exclude rows where trace contains value * `filters[]=dimension:[value1,value2]` - Exact trace match **Examples:** * `filters[]=country:US` - US views only * `filters[]=+video_cdn_trace:fastly` - Views using Fastly CDN + :type filters: list[str] + :param metric_filters: Limit the results to rows that match inequality conditions from provided metric comparison clauses. Must be provided as an array query string parameter. Possible filterable metrics are the same as the set of metric ids, with the exceptions of `exits_before_video_start`, `unique_viewers`, `video_startup_failure_percentage`, `view_dropped_percentage`, and `views`. Example: * `metric_filters[]=aggregate_startup_time>=1000` + :type metric_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` + :type timeframe: list[str] + :param order_by: Value to order the results by + :type order_by: str + :param order_direction: Sort order. + :type order_direction: 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: ListDimensionValuesResponse + """ + kwargs['_return_http_data_only'] = True + return self.list_dimension_elements_with_http_info(dimension_id, **kwargs) # noqa: E501 + + def list_dimension_elements_with_http_info(self, dimension_id, **kwargs): # noqa: E501 + """Lists elements for a trace dimension # noqa: E501 + + Lists the elements (values) for a trace dimension along with their total counts. This endpoint is specifically designed for trace dimensions like video_cdn_trace that contain arrays of values. # 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_dimension_elements_with_http_info(dimension_id, async_req=True) + >>> result = thread.get() + + :param dimension_id: ID of the Dimension (required) + :type dimension_id: str + :param limit: Number of items to include in the response + :type limit: int + :param filters: Filter results using key:value pairs. Must be provided as an array query string parameter. **Basic filtering:** * `filters[]=dimension:value` - Include rows where dimension equals value * `filters[]=!dimension:value` - Exclude rows where dimension equals value **For trace dimensions (like video_cdn_trace):** * `filters[]=+dimension:value` - Include rows where trace contains value * `filters[]=-dimension:value` - Exclude rows where trace contains value * `filters[]=dimension:[value1,value2]` - Exact trace match **Examples:** * `filters[]=country:US` - US views only * `filters[]=+video_cdn_trace:fastly` - Views using Fastly CDN + :type filters: list[str] + :param metric_filters: Limit the results to rows that match inequality conditions from provided metric comparison clauses. Must be provided as an array query string parameter. Possible filterable metrics are the same as the set of metric ids, with the exceptions of `exits_before_video_start`, `unique_viewers`, `video_startup_failure_percentage`, `view_dropped_percentage`, and `views`. Example: * `metric_filters[]=aggregate_startup_time>=1000` + :type metric_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` + :type timeframe: list[str] + :param order_by: Value to order the results by + :type order_by: str + :param order_direction: Sort order. + :type order_direction: 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(ListDimensionValuesResponse, status_code(int), headers(HTTPHeaderDict)) + """ + + local_var_hosts = [ + 'https://api.mux.com' + ] + local_var_host = local_var_hosts[0] + if kwargs.get('_host_index'): + _host_index = int(kwargs.get('_host_index')) + if _host_index < 0 or _host_index >= len(local_var_hosts): + raise ApiValueError( + "Invalid host index. Must be 0 <= index < %s" + % len(local_var_host) + ) + local_var_host = local_var_hosts[_host_index] + local_var_params = locals() + + all_params = [ + 'dimension_id', + 'limit', + 'filters', + 'metric_filters', + 'timeframe', + 'order_by', + 'order_direction' + ] + 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 and key != "_host_index": + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method list_dimension_elements" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'dimension_id' is set + if self.api_client.client_side_validation and ('dimension_id' not in local_var_params or # noqa: E501 + local_var_params['dimension_id'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `dimension_id` when calling `list_dimension_elements`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'dimension_id' in local_var_params: + path_params['DIMENSION_ID'] = local_var_params['dimension_id'] # noqa: E501 + + query_params = [] + 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 + if 'filters' in local_var_params and local_var_params['filters'] is not None: # noqa: E501 + query_params.append(('filters[]', local_var_params['filters'])) # noqa: E501 + collection_formats['filters[]'] = 'multi' # noqa: E501 + if 'metric_filters' in local_var_params and local_var_params['metric_filters'] is not None: # noqa: E501 + query_params.append(('metric_filters[]', local_var_params['metric_filters'])) # noqa: E501 + collection_formats['metric_filters[]'] = 'multi' # 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 + if 'order_by' in local_var_params and local_var_params['order_by'] is not None: # noqa: E501 + query_params.append(('order_by', local_var_params['order_by'])) # noqa: E501 + if 'order_direction' in local_var_params and local_var_params['order_direction'] is not None: # noqa: E501 + query_params.append(('order_direction', local_var_params['order_direction'])) # 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: "ListDimensionValuesResponse", + } + + return self.api_client.call_api( + '/data/v1/dimensions/{DIMENSION_ID}/elements', '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'), + _host=local_var_host, + collection_formats=collection_formats, + _request_auth=local_var_params.get('_request_auth')) + def list_dimension_values(self, dimension_id, **kwargs): # noqa: E501 """Lists the values for a specific dimension # noqa: E501 @@ -53,7 +246,7 @@ 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: 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` + :param filters: Filter results using key:value pairs. Must be provided as an array query string parameter. **Basic filtering:** * `filters[]=dimension:value` - Include rows where dimension equals value * `filters[]=!dimension:value` - Exclude rows where dimension equals value **For trace dimensions (like video_cdn_trace):** * `filters[]=+dimension:value` - Include rows where trace contains value * `filters[]=-dimension:value` - Exclude rows where trace contains value * `filters[]=dimension:[value1,value2]` - Exact trace match **Examples:** * `filters[]=country:US` - US views only * `filters[]=+video_cdn_trace:fastly` - Views using Fastly CDN :type filters: list[str] :param metric_filters: Limit the results to rows that match inequality conditions from provided metric comparison clauses. Must be provided as an array query string parameter. Possible filterable metrics are the same as the set of metric ids, with the exceptions of `exits_before_video_start`, `unique_viewers`, `video_startup_failure_percentage`, `view_dropped_percentage`, and `views`. Example: * `metric_filters[]=aggregate_startup_time>=1000` :type metric_filters: list[str] @@ -93,7 +286,7 @@ 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: 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` + :param filters: Filter results using key:value pairs. Must be provided as an array query string parameter. **Basic filtering:** * `filters[]=dimension:value` - Include rows where dimension equals value * `filters[]=!dimension:value` - Exclude rows where dimension equals value **For trace dimensions (like video_cdn_trace):** * `filters[]=+dimension:value` - Include rows where trace contains value * `filters[]=-dimension:value` - Exclude rows where trace contains value * `filters[]=dimension:[value1,value2]` - Exact trace match **Examples:** * `filters[]=country:US` - US views only * `filters[]=+video_cdn_trace:fastly` - Views using Fastly CDN :type filters: list[str] :param metric_filters: Limit the results to rows that match inequality conditions from provided metric comparison clauses. Must be provided as an array query string parameter. Possible filterable metrics are the same as the set of metric ids, with the exceptions of `exits_before_video_start`, `unique_viewers`, `video_startup_failure_percentage`, `view_dropped_percentage`, and `views`. Example: * `metric_filters[]=aggregate_startup_time>=1000` :type metric_filters: list[str] diff --git a/mux_python/api/errors_api.py b/mux_python/api/errors_api.py index 02708f4..9ec1923 100644 --- a/mux_python/api/errors_api.py +++ b/mux_python/api/errors_api.py @@ -47,7 +47,7 @@ def list_errors(self, **kwargs): # noqa: E501 >>> thread = api.list_errors(async_req=True) >>> result = thread.get() - :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` + :param filters: Filter results using key:value pairs. Must be provided as an array query string parameter. **Basic filtering:** * `filters[]=dimension:value` - Include rows where dimension equals value * `filters[]=!dimension:value` - Exclude rows where dimension equals value **For trace dimensions (like video_cdn_trace):** * `filters[]=+dimension:value` - Include rows where trace contains value * `filters[]=-dimension:value` - Exclude rows where trace contains value * `filters[]=dimension:[value1,value2]` - Exact trace match **Examples:** * `filters[]=country:US` - US views only * `filters[]=+video_cdn_trace:fastly` - Views using Fastly CDN :type filters: list[str] :param metric_filters: Limit the results to rows that match inequality conditions from provided metric comparison clauses. Must be provided as an array query string parameter. Possible filterable metrics are the same as the set of metric ids, with the exceptions of `exits_before_video_start`, `unique_viewers`, `video_startup_failure_percentage`, `view_dropped_percentage`, and `views`. Example: * `metric_filters[]=aggregate_startup_time>=1000` :type metric_filters: list[str] @@ -81,7 +81,7 @@ 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: 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` + :param filters: Filter results using key:value pairs. Must be provided as an array query string parameter. **Basic filtering:** * `filters[]=dimension:value` - Include rows where dimension equals value * `filters[]=!dimension:value` - Exclude rows where dimension equals value **For trace dimensions (like video_cdn_trace):** * `filters[]=+dimension:value` - Include rows where trace contains value * `filters[]=-dimension:value` - Exclude rows where trace contains value * `filters[]=dimension:[value1,value2]` - Exact trace match **Examples:** * `filters[]=country:US` - US views only * `filters[]=+video_cdn_trace:fastly` - Views using Fastly CDN :type filters: list[str] :param metric_filters: Limit the results to rows that match inequality conditions from provided metric comparison clauses. Must be provided as an array query string parameter. Possible filterable metrics are the same as the set of metric ids, with the exceptions of `exits_before_video_start`, `unique_viewers`, `video_startup_failure_percentage`, `view_dropped_percentage`, and `views`. Example: * `metric_filters[]=aggregate_startup_time>=1000` :type metric_filters: list[str] diff --git a/mux_python/api/filters_api.py b/mux_python/api/filters_api.py index abab22a..aa185ed 100644 --- a/mux_python/api/filters_api.py +++ b/mux_python/api/filters_api.py @@ -53,7 +53,7 @@ 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: 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` + :param filters: Filter results using key:value pairs. Must be provided as an array query string parameter. **Basic filtering:** * `filters[]=dimension:value` - Include rows where dimension equals value * `filters[]=!dimension:value` - Exclude rows where dimension equals value **For trace dimensions (like video_cdn_trace):** * `filters[]=+dimension:value` - Include rows where trace contains value * `filters[]=-dimension:value` - Exclude rows where trace contains value * `filters[]=dimension:[value1,value2]` - Exact trace match **Examples:** * `filters[]=country:US` - US views only * `filters[]=+video_cdn_trace:fastly` - Views using Fastly CDN :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` :type timeframe: list[str] @@ -91,7 +91,7 @@ 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: 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` + :param filters: Filter results using key:value pairs. Must be provided as an array query string parameter. **Basic filtering:** * `filters[]=dimension:value` - Include rows where dimension equals value * `filters[]=!dimension:value` - Exclude rows where dimension equals value **For trace dimensions (like video_cdn_trace):** * `filters[]=+dimension:value` - Include rows where trace contains value * `filters[]=-dimension:value` - Exclude rows where trace contains value * `filters[]=dimension:[value1,value2]` - Exact trace match **Examples:** * `filters[]=country:US` - US views only * `filters[]=+video_cdn_trace:fastly` - Views using Fastly CDN :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` :type timeframe: list[str] diff --git a/mux_python/api/metrics_api.py b/mux_python/api/metrics_api.py index 9250141..22e02f6 100644 --- a/mux_python/api/metrics_api.py +++ b/mux_python/api/metrics_api.py @@ -51,7 +51,7 @@ def get_metric_timeseries_data(self, metric_id, **kwargs): # noqa: E501 :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` :type timeframe: list[str] - :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` + :param filters: Filter results using key:value pairs. Must be provided as an array query string parameter. **Basic filtering:** * `filters[]=dimension:value` - Include rows where dimension equals value * `filters[]=!dimension:value` - Exclude rows where dimension equals value **For trace dimensions (like video_cdn_trace):** * `filters[]=+dimension:value` - Include rows where trace contains value * `filters[]=-dimension:value` - Exclude rows where trace contains value * `filters[]=dimension:[value1,value2]` - Exact trace match **Examples:** * `filters[]=country:US` - US views only * `filters[]=+video_cdn_trace:fastly` - Views using Fastly CDN :type filters: list[str] :param metric_filters: Limit the results to rows that match inequality conditions from provided metric comparison clauses. Must be provided as an array query string parameter. Possible filterable metrics are the same as the set of metric ids, with the exceptions of `exits_before_video_start`, `unique_viewers`, `video_startup_failure_percentage`, `view_dropped_percentage`, and `views`. Example: * `metric_filters[]=aggregate_startup_time>=1000` :type metric_filters: list[str] @@ -93,7 +93,7 @@ def get_metric_timeseries_data_with_http_info(self, metric_id, **kwargs): # noq :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` :type timeframe: list[str] - :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` + :param filters: Filter results using key:value pairs. Must be provided as an array query string parameter. **Basic filtering:** * `filters[]=dimension:value` - Include rows where dimension equals value * `filters[]=!dimension:value` - Exclude rows where dimension equals value **For trace dimensions (like video_cdn_trace):** * `filters[]=+dimension:value` - Include rows where trace contains value * `filters[]=-dimension:value` - Exclude rows where trace contains value * `filters[]=dimension:[value1,value2]` - Exact trace match **Examples:** * `filters[]=country:US` - US views only * `filters[]=+video_cdn_trace:fastly` - Views using Fastly CDN :type filters: list[str] :param metric_filters: Limit the results to rows that match inequality conditions from provided metric comparison clauses. Must be provided as an array query string parameter. Possible filterable metrics are the same as the set of metric ids, with the exceptions of `exits_before_video_start`, `unique_viewers`, `video_startup_failure_percentage`, `view_dropped_percentage`, and `views`. Example: * `metric_filters[]=aggregate_startup_time>=1000` :type metric_filters: list[str] @@ -231,7 +231,7 @@ def get_overall_values(self, metric_id, **kwargs): # noqa: E501 :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` :type timeframe: list[str] - :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` + :param filters: Filter results using key:value pairs. Must be provided as an array query string parameter. **Basic filtering:** * `filters[]=dimension:value` - Include rows where dimension equals value * `filters[]=!dimension:value` - Exclude rows where dimension equals value **For trace dimensions (like video_cdn_trace):** * `filters[]=+dimension:value` - Include rows where trace contains value * `filters[]=-dimension:value` - Exclude rows where trace contains value * `filters[]=dimension:[value1,value2]` - Exact trace match **Examples:** * `filters[]=country:US` - US views only * `filters[]=+video_cdn_trace:fastly` - Views using Fastly CDN :type filters: list[str] :param metric_filters: Limit the results to rows that match inequality conditions from provided metric comparison clauses. Must be provided as an array query string parameter. Possible filterable metrics are the same as the set of metric ids, with the exceptions of `exits_before_video_start`, `unique_viewers`, `video_startup_failure_percentage`, `view_dropped_percentage`, and `views`. Example: * `metric_filters[]=aggregate_startup_time>=1000` :type metric_filters: list[str] @@ -269,7 +269,7 @@ def get_overall_values_with_http_info(self, metric_id, **kwargs): # noqa: E501 :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` :type timeframe: list[str] - :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` + :param filters: Filter results using key:value pairs. Must be provided as an array query string parameter. **Basic filtering:** * `filters[]=dimension:value` - Include rows where dimension equals value * `filters[]=!dimension:value` - Exclude rows where dimension equals value **For trace dimensions (like video_cdn_trace):** * `filters[]=+dimension:value` - Include rows where trace contains value * `filters[]=-dimension:value` - Exclude rows where trace contains value * `filters[]=dimension:[value1,value2]` - Exact trace match **Examples:** * `filters[]=country:US` - US views only * `filters[]=+video_cdn_trace:fastly` - Views using Fastly CDN :type filters: list[str] :param metric_filters: Limit the results to rows that match inequality conditions from provided metric comparison clauses. Must be provided as an array query string parameter. Possible filterable metrics are the same as the set of metric ids, with the exceptions of `exits_before_video_start`, `unique_viewers`, `video_startup_failure_percentage`, `view_dropped_percentage`, and `views`. Example: * `metric_filters[]=aggregate_startup_time>=1000` :type metric_filters: list[str] @@ -395,7 +395,7 @@ def list_all_metric_values(self, **kwargs): # noqa: E501 :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: 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` + :param filters: Filter results using key:value pairs. Must be provided as an array query string parameter. **Basic filtering:** * `filters[]=dimension:value` - Include rows where dimension equals value * `filters[]=!dimension:value` - Exclude rows where dimension equals value **For trace dimensions (like video_cdn_trace):** * `filters[]=+dimension:value` - Include rows where trace contains value * `filters[]=-dimension:value` - Exclude rows where trace contains value * `filters[]=dimension:[value1,value2]` - Exact trace match **Examples:** * `filters[]=country:US` - US views only * `filters[]=+video_cdn_trace:fastly` - Views using Fastly CDN :type filters: list[str] :param metric_filters: Limit the results to rows that match inequality conditions from provided metric comparison clauses. Must be provided as an array query string parameter. Possible filterable metrics are the same as the set of metric ids, with the exceptions of `exits_before_video_start`, `unique_viewers`, `video_startup_failure_percentage`, `view_dropped_percentage`, and `views`. Example: * `metric_filters[]=aggregate_startup_time>=1000` :type metric_filters: list[str] @@ -433,7 +433,7 @@ def list_all_metric_values_with_http_info(self, **kwargs): # noqa: E501 :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: 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` + :param filters: Filter results using key:value pairs. Must be provided as an array query string parameter. **Basic filtering:** * `filters[]=dimension:value` - Include rows where dimension equals value * `filters[]=!dimension:value` - Exclude rows where dimension equals value **For trace dimensions (like video_cdn_trace):** * `filters[]=+dimension:value` - Include rows where trace contains value * `filters[]=-dimension:value` - Exclude rows where trace contains value * `filters[]=dimension:[value1,value2]` - Exact trace match **Examples:** * `filters[]=country:US` - US views only * `filters[]=+video_cdn_trace:fastly` - Views using Fastly CDN :type filters: list[str] :param metric_filters: Limit the results to rows that match inequality conditions from provided metric comparison clauses. Must be provided as an array query string parameter. Possible filterable metrics are the same as the set of metric ids, with the exceptions of `exits_before_video_start`, `unique_viewers`, `video_startup_failure_percentage`, `view_dropped_percentage`, and `views`. Example: * `metric_filters[]=aggregate_startup_time>=1000` :type metric_filters: list[str] @@ -561,7 +561,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. The default measurement for each metric is: \"sum\" : `ad_attempt_count`, `ad_break_count`, `ad_break_error_count`, `ad_error_count`, `ad_impression_count`, `playing_time` \"median\" : `ad_preroll_startup_time`, `aggregate_startup_time`, `content_startup_time`, `max_downscale_percentage`, `max_upscale_percentage`, `page_load_time`, `player_average_live_latency`, `player_startup_time`, `rebuffer_count`, `rebuffer_duration`, `requests_for_first_preroll`, `video_startup_preroll_load_time`, `video_startup_preroll_request_time`, `video_startup_time`, `view_average_request_latency`, `view_average_request_throughput`, `view_max_request_latency`, `weighted_average_bitrate` \"avg\" : `ad_break_error_percentage`, `ad_error_percentage`, `ad_exit_before_start_count`, `ad_exit_before_start_percentage`, `ad_playback_failure_percentage`, `ad_startup_error_count`, `ad_startup_error_percentage`, `content_playback_failure_percentage`, `downscale_percentage`, `exits_before_video_start`, `playback_business_exception_percentage`, `playback_failure_percentage`, `playback_success_score`, `rebuffer_frequency`, `rebuffer_percentage`, `seek_latency`, `smoothness_score`, `startup_time_score`, `upscale_percentage`, `video_quality_score`, `video_startup_business_exception_percentage`, `video_startup_failure_percentage`, `view_dropped_percentage`, `viewer_experience_score` \"count\" : `started_views`, `unique_viewers` :type measurement: str - :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` + :param filters: Filter results using key:value pairs. Must be provided as an array query string parameter. **Basic filtering:** * `filters[]=dimension:value` - Include rows where dimension equals value * `filters[]=!dimension:value` - Exclude rows where dimension equals value **For trace dimensions (like video_cdn_trace):** * `filters[]=+dimension:value` - Include rows where trace contains value * `filters[]=-dimension:value` - Exclude rows where trace contains value * `filters[]=dimension:[value1,value2]` - Exact trace match **Examples:** * `filters[]=country:US` - US views only * `filters[]=+video_cdn_trace:fastly` - Views using Fastly CDN :type filters: list[str] :param metric_filters: Limit the results to rows that match inequality conditions from provided metric comparison clauses. Must be provided as an array query string parameter. Possible filterable metrics are the same as the set of metric ids, with the exceptions of `exits_before_video_start`, `unique_viewers`, `video_startup_failure_percentage`, `view_dropped_percentage`, and `views`. Example: * `metric_filters[]=aggregate_startup_time>=1000` :type metric_filters: list[str] @@ -609,7 +609,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. The default measurement for each metric is: \"sum\" : `ad_attempt_count`, `ad_break_count`, `ad_break_error_count`, `ad_error_count`, `ad_impression_count`, `playing_time` \"median\" : `ad_preroll_startup_time`, `aggregate_startup_time`, `content_startup_time`, `max_downscale_percentage`, `max_upscale_percentage`, `page_load_time`, `player_average_live_latency`, `player_startup_time`, `rebuffer_count`, `rebuffer_duration`, `requests_for_first_preroll`, `video_startup_preroll_load_time`, `video_startup_preroll_request_time`, `video_startup_time`, `view_average_request_latency`, `view_average_request_throughput`, `view_max_request_latency`, `weighted_average_bitrate` \"avg\" : `ad_break_error_percentage`, `ad_error_percentage`, `ad_exit_before_start_count`, `ad_exit_before_start_percentage`, `ad_playback_failure_percentage`, `ad_startup_error_count`, `ad_startup_error_percentage`, `content_playback_failure_percentage`, `downscale_percentage`, `exits_before_video_start`, `playback_business_exception_percentage`, `playback_failure_percentage`, `playback_success_score`, `rebuffer_frequency`, `rebuffer_percentage`, `seek_latency`, `smoothness_score`, `startup_time_score`, `upscale_percentage`, `video_quality_score`, `video_startup_business_exception_percentage`, `video_startup_failure_percentage`, `view_dropped_percentage`, `viewer_experience_score` \"count\" : `started_views`, `unique_viewers` :type measurement: str - :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` + :param filters: Filter results using key:value pairs. Must be provided as an array query string parameter. **Basic filtering:** * `filters[]=dimension:value` - Include rows where dimension equals value * `filters[]=!dimension:value` - Exclude rows where dimension equals value **For trace dimensions (like video_cdn_trace):** * `filters[]=+dimension:value` - Include rows where trace contains value * `filters[]=-dimension:value` - Exclude rows where trace contains value * `filters[]=dimension:[value1,value2]` - Exact trace match **Examples:** * `filters[]=country:US` - US views only * `filters[]=+video_cdn_trace:fastly` - Views using Fastly CDN :type filters: list[str] :param metric_filters: Limit the results to rows that match inequality conditions from provided metric comparison clauses. Must be provided as an array query string parameter. Possible filterable metrics are the same as the set of metric ids, with the exceptions of `exits_before_video_start`, `unique_viewers`, `video_startup_failure_percentage`, `view_dropped_percentage`, and `views`. Example: * `metric_filters[]=aggregate_startup_time>=1000` :type metric_filters: list[str] @@ -764,7 +764,7 @@ def list_insights(self, metric_id, **kwargs): # noqa: E501 :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` :type timeframe: list[str] - :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` + :param filters: Filter results using key:value pairs. Must be provided as an array query string parameter. **Basic filtering:** * `filters[]=dimension:value` - Include rows where dimension equals value * `filters[]=!dimension:value` - Exclude rows where dimension equals value **For trace dimensions (like video_cdn_trace):** * `filters[]=+dimension:value` - Include rows where trace contains value * `filters[]=-dimension:value` - Exclude rows where trace contains value * `filters[]=dimension:[value1,value2]` - Exact trace match **Examples:** * `filters[]=country:US` - US views only * `filters[]=+video_cdn_trace:fastly` - Views using Fastly CDN :type filters: list[str] :param metric_filters: Limit the results to rows that match inequality conditions from provided metric comparison clauses. Must be provided as an array query string parameter. Possible filterable metrics are the same as the set of metric ids, with the exceptions of `exits_before_video_start`, `unique_viewers`, `video_startup_failure_percentage`, `view_dropped_percentage`, and `views`. Example: * `metric_filters[]=aggregate_startup_time>=1000` :type metric_filters: list[str] @@ -804,7 +804,7 @@ def list_insights_with_http_info(self, metric_id, **kwargs): # noqa: E501 :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` :type timeframe: list[str] - :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` + :param filters: Filter results using key:value pairs. Must be provided as an array query string parameter. **Basic filtering:** * `filters[]=dimension:value` - Include rows where dimension equals value * `filters[]=!dimension:value` - Exclude rows where dimension equals value **For trace dimensions (like video_cdn_trace):** * `filters[]=+dimension:value` - Include rows where trace contains value * `filters[]=-dimension:value` - Exclude rows where trace contains value * `filters[]=dimension:[value1,value2]` - Exact trace match **Examples:** * `filters[]=country:US` - US views only * `filters[]=+video_cdn_trace:fastly` - Views using Fastly CDN :type filters: list[str] :param metric_filters: Limit the results to rows that match inequality conditions from provided metric comparison clauses. Must be provided as an array query string parameter. Possible filterable metrics are the same as the set of metric ids, with the exceptions of `exits_before_video_start`, `unique_viewers`, `video_startup_failure_percentage`, `view_dropped_percentage`, and `views`. Example: * `metric_filters[]=aggregate_startup_time>=1000` :type metric_filters: list[str] diff --git a/mux_python/api/video_views_api.py b/mux_python/api/video_views_api.py index f8f3192..171282f 100644 --- a/mux_python/api/video_views_api.py +++ b/mux_python/api/video_views_api.py @@ -192,7 +192,7 @@ def list_video_views(self, **kwargs): # noqa: E501 :type error_id: int :param order_direction: Sort order. :type order_direction: str - :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` + :param filters: Filter results using key:value pairs. Must be provided as an array query string parameter. **Basic filtering:** * `filters[]=dimension:value` - Include rows where dimension equals value * `filters[]=!dimension:value` - Exclude rows where dimension equals value **For trace dimensions (like video_cdn_trace):** * `filters[]=+dimension:value` - Include rows where trace contains value * `filters[]=-dimension:value` - Exclude rows where trace contains value * `filters[]=dimension:[value1,value2]` - Exact trace match **Examples:** * `filters[]=country:US` - US views only * `filters[]=+video_cdn_trace:fastly` - Views using Fastly CDN :type filters: list[str] :param metric_filters: Limit the results to rows that match inequality conditions from provided metric comparison clauses. Must be provided as an array query string parameter. Possible filterable metrics are the same as the set of metric ids, with the exceptions of `exits_before_video_start`, `unique_viewers`, `video_startup_failure_percentage`, `view_dropped_percentage`, and `views`. Example: * `metric_filters[]=aggregate_startup_time>=1000` :type metric_filters: list[str] @@ -236,7 +236,7 @@ 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: 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` + :param filters: Filter results using key:value pairs. Must be provided as an array query string parameter. **Basic filtering:** * `filters[]=dimension:value` - Include rows where dimension equals value * `filters[]=!dimension:value` - Exclude rows where dimension equals value **For trace dimensions (like video_cdn_trace):** * `filters[]=+dimension:value` - Include rows where trace contains value * `filters[]=-dimension:value` - Exclude rows where trace contains value * `filters[]=dimension:[value1,value2]` - Exact trace match **Examples:** * `filters[]=country:US` - US views only * `filters[]=+video_cdn_trace:fastly` - Views using Fastly CDN :type filters: list[str] :param metric_filters: Limit the results to rows that match inequality conditions from provided metric comparison clauses. Must be provided as an array query string parameter. Possible filterable metrics are the same as the set of metric ids, with the exceptions of `exits_before_video_start`, `unique_viewers`, `video_startup_failure_percentage`, `view_dropped_percentage`, and `views`. Example: * `metric_filters[]=aggregate_startup_time>=1000` :type metric_filters: list[str] diff --git a/mux_python/models/video_view.py b/mux_python/models/video_view.py index 15de451..f6a0617 100644 --- a/mux_python/models/video_view.py +++ b/mux_python/models/video_view.py @@ -215,7 +215,8 @@ class VideoView(object): 'video_dynamic_range_type': 'str', 'view_cdn_edge_pop': 'str', 'view_cdn_origin': 'str', - 'video_creator_id': 'str' + 'video_creator_id': 'str', + 'video_cdn_trace': 'list[str]' } attribute_map = { @@ -397,10 +398,11 @@ class VideoView(object): 'video_dynamic_range_type': 'video_dynamic_range_type', 'view_cdn_edge_pop': 'view_cdn_edge_pop', 'view_cdn_origin': 'view_cdn_origin', - 'video_creator_id': 'video_creator_id' + 'video_creator_id': 'video_creator_id', + 'video_cdn_trace': 'video_cdn_trace' } - def __init__(self, view_total_upscaling=None, preroll_ad_asset_hostname=None, player_source_domain=None, region=None, viewer_user_agent=None, preroll_requested=None, page_type=None, startup_score=None, view_seek_duration=None, country_name=None, player_source_height=None, longitude=None, buffering_count=None, video_duration=None, player_source_type=None, city=None, view_id=None, platform_description=None, video_startup_preroll_request_time=None, viewer_device_name=None, video_series=None, viewer_application_name=None, updated_at=None, view_total_content_playback_time=None, cdn=None, player_instance_id=None, video_language=None, player_source_width=None, player_error_message=None, player_mux_plugin_version=None, watched=None, playback_score=None, page_url=None, metro=None, view_max_request_latency=None, requests_for_first_preroll=None, view_total_downscaling=None, latitude=None, player_source_host_name=None, inserted_at=None, view_end=None, mux_embed_version=None, player_language=None, page_load_time=None, viewer_device_category=None, video_startup_preroll_load_time=None, player_version=None, watch_time=None, player_source_stream_type=None, preroll_ad_tag_hostname=None, viewer_device_manufacturer=None, rebuffering_score=None, experiment_name=None, viewer_os_version=None, player_preload=None, buffering_duration=None, player_view_count=None, player_software=None, player_load_time=None, platform_summary=None, video_encoding_variant=None, player_width=None, view_seek_count=None, viewer_experience_score=None, view_error_id=None, video_variant_name=None, preroll_played=None, viewer_application_engine=None, viewer_os_architecture=None, player_error_code=None, buffering_rate=None, events=None, player_name=None, view_start=None, view_average_request_throughput=None, video_producer=None, error_type_id=None, mux_viewer_id=None, video_id=None, continent_code=None, session_id=None, exit_before_video_start=None, video_content_type=None, viewer_os_family=None, player_poster=None, view_average_request_latency=None, video_variant_id=None, player_source_duration=None, player_source_url=None, mux_api_version=None, video_title=None, id=None, short_time=None, rebuffer_percentage=None, time_to_first_frame=None, viewer_user_id=None, video_stream_type=None, player_startup_time=None, viewer_application_version=None, view_max_downscale_percentage=None, view_max_upscale_percentage=None, country_code=None, used_fullscreen=None, isp=None, property_id=None, player_autoplay=None, player_height=None, asn=None, asn_name=None, quality_score=None, player_software_version=None, player_mux_plugin_name=None, sub_property_id=None, player_remote_played=None, view_max_playhead_position=None, view_playing_time=None, view_session_id=None, viewer_connection_type=None, viewer_device_model=None, weighted_average_bitrate=None, custom_1=None, custom_2=None, custom_3=None, custom_4=None, custom_5=None, custom_6=None, custom_7=None, custom_8=None, custom_9=None, custom_10=None, live_stream_latency=None, asset_id=None, environment_id=None, live_stream_id=None, mux_embed=None, playback_id=None, player_error_context=None, view_drm_type=None, view_dropped_frame_count=None, view_has_ad=None, video_startup_failure=None, ad_attempt_count=None, ad_break_count=None, ad_break_error_count=None, ad_break_error_percentage=None, ad_error_count=None, ad_error_percentage=None, ad_impression_count=None, ad_startup_error_count=None, ad_startup_error_percentage=None, ad_exit_before_start_count=None, ad_exit_before_start_percentage=None, long_resume=None, long_rebuffering=None, playback_failure_error_type_id=None, playback_business_exception_error_type_id=None, video_startup_business_exception_error_type_id=None, playback_failure=None, ad_playback_failure_error_type_id=None, view_content_startup_time=None, ad_preroll_startup_time=None, view_dropped=None, client_application_name=None, client_application_version=None, video_affiliate=None, viewer_plan=None, viewer_plan_status=None, viewer_plan_category=None, view_drm_level=None, video_brand=None, used_pip=None, time_shift_enabled=None, used_captions=None, video_codec=None, audio_codec=None, video_dynamic_range_type=None, view_cdn_edge_pop=None, view_cdn_origin=None, video_creator_id=None, local_vars_configuration=None): # noqa: E501 + def __init__(self, view_total_upscaling=None, preroll_ad_asset_hostname=None, player_source_domain=None, region=None, viewer_user_agent=None, preroll_requested=None, page_type=None, startup_score=None, view_seek_duration=None, country_name=None, player_source_height=None, longitude=None, buffering_count=None, video_duration=None, player_source_type=None, city=None, view_id=None, platform_description=None, video_startup_preroll_request_time=None, viewer_device_name=None, video_series=None, viewer_application_name=None, updated_at=None, view_total_content_playback_time=None, cdn=None, player_instance_id=None, video_language=None, player_source_width=None, player_error_message=None, player_mux_plugin_version=None, watched=None, playback_score=None, page_url=None, metro=None, view_max_request_latency=None, requests_for_first_preroll=None, view_total_downscaling=None, latitude=None, player_source_host_name=None, inserted_at=None, view_end=None, mux_embed_version=None, player_language=None, page_load_time=None, viewer_device_category=None, video_startup_preroll_load_time=None, player_version=None, watch_time=None, player_source_stream_type=None, preroll_ad_tag_hostname=None, viewer_device_manufacturer=None, rebuffering_score=None, experiment_name=None, viewer_os_version=None, player_preload=None, buffering_duration=None, player_view_count=None, player_software=None, player_load_time=None, platform_summary=None, video_encoding_variant=None, player_width=None, view_seek_count=None, viewer_experience_score=None, view_error_id=None, video_variant_name=None, preroll_played=None, viewer_application_engine=None, viewer_os_architecture=None, player_error_code=None, buffering_rate=None, events=None, player_name=None, view_start=None, view_average_request_throughput=None, video_producer=None, error_type_id=None, mux_viewer_id=None, video_id=None, continent_code=None, session_id=None, exit_before_video_start=None, video_content_type=None, viewer_os_family=None, player_poster=None, view_average_request_latency=None, video_variant_id=None, player_source_duration=None, player_source_url=None, mux_api_version=None, video_title=None, id=None, short_time=None, rebuffer_percentage=None, time_to_first_frame=None, viewer_user_id=None, video_stream_type=None, player_startup_time=None, viewer_application_version=None, view_max_downscale_percentage=None, view_max_upscale_percentage=None, country_code=None, used_fullscreen=None, isp=None, property_id=None, player_autoplay=None, player_height=None, asn=None, asn_name=None, quality_score=None, player_software_version=None, player_mux_plugin_name=None, sub_property_id=None, player_remote_played=None, view_max_playhead_position=None, view_playing_time=None, view_session_id=None, viewer_connection_type=None, viewer_device_model=None, weighted_average_bitrate=None, custom_1=None, custom_2=None, custom_3=None, custom_4=None, custom_5=None, custom_6=None, custom_7=None, custom_8=None, custom_9=None, custom_10=None, live_stream_latency=None, asset_id=None, environment_id=None, live_stream_id=None, mux_embed=None, playback_id=None, player_error_context=None, view_drm_type=None, view_dropped_frame_count=None, view_has_ad=None, video_startup_failure=None, ad_attempt_count=None, ad_break_count=None, ad_break_error_count=None, ad_break_error_percentage=None, ad_error_count=None, ad_error_percentage=None, ad_impression_count=None, ad_startup_error_count=None, ad_startup_error_percentage=None, ad_exit_before_start_count=None, ad_exit_before_start_percentage=None, long_resume=None, long_rebuffering=None, playback_failure_error_type_id=None, playback_business_exception_error_type_id=None, video_startup_business_exception_error_type_id=None, playback_failure=None, ad_playback_failure_error_type_id=None, view_content_startup_time=None, ad_preroll_startup_time=None, view_dropped=None, client_application_name=None, client_application_version=None, video_affiliate=None, viewer_plan=None, viewer_plan_status=None, viewer_plan_category=None, view_drm_level=None, video_brand=None, used_pip=None, time_shift_enabled=None, used_captions=None, video_codec=None, audio_codec=None, video_dynamic_range_type=None, view_cdn_edge_pop=None, view_cdn_origin=None, video_creator_id=None, video_cdn_trace=None, local_vars_configuration=None): # noqa: E501 """VideoView - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration.get_default_copy() @@ -585,6 +587,7 @@ def __init__(self, view_total_upscaling=None, preroll_ad_asset_hostname=None, pl self._view_cdn_edge_pop = None self._view_cdn_origin = None self._video_creator_id = None + self._video_cdn_trace = None self.discriminator = None self.view_total_upscaling = view_total_upscaling @@ -793,6 +796,8 @@ def __init__(self, view_total_upscaling=None, preroll_ad_asset_hostname=None, pl self.view_cdn_edge_pop = view_cdn_edge_pop self.view_cdn_origin = view_cdn_origin self.video_creator_id = video_creator_id + if video_cdn_trace is not None: + self.video_cdn_trace = video_cdn_trace @property def view_total_upscaling(self): @@ -4553,6 +4558,27 @@ def video_creator_id(self, video_creator_id): self._video_creator_id = video_creator_id + @property + def video_cdn_trace(self): + """Gets the video_cdn_trace of this VideoView. # noqa: E501 + + + :return: The video_cdn_trace of this VideoView. # noqa: E501 + :rtype: list[str] + """ + return self._video_cdn_trace + + @video_cdn_trace.setter + def video_cdn_trace(self, video_cdn_trace): + """Sets the video_cdn_trace of this VideoView. + + + :param video_cdn_trace: The video_cdn_trace of this VideoView. # noqa: E501 + :type video_cdn_trace: list[str] + """ + + self._video_cdn_trace = video_cdn_trace + def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {}