Skip to content

Commit 06a6f4f

Browse files
committed
[release] 3.3.0
1 parent 9458edf commit 06a6f4f

14 files changed

+197
-28
lines changed

.openapi-generator/FILES

+3-8
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ docs/ListVideoViewsResponse.md
8484
docs/LiveStream.md
8585
docs/LiveStreamEmbeddedSubtitleSettings.md
8686
docs/LiveStreamResponse.md
87+
docs/LiveStreamStatus.md
8788
docs/LiveStreamsApi.md
8889
docs/Metric.md
8990
docs/MetricsApi.md
@@ -219,6 +220,7 @@ mux_python/models/list_video_views_response.py
219220
mux_python/models/live_stream.py
220221
mux_python/models/live_stream_embedded_subtitle_settings.py
221222
mux_python/models/live_stream_response.py
223+
mux_python/models/live_stream_status.py
222224
mux_python/models/metric.py
223225
mux_python/models/notification_rule.py
224226
mux_python/models/overall_values.py
@@ -257,12 +259,5 @@ setup.cfg
257259
setup.py
258260
test-requirements.txt
259261
test/__init__.py
260-
test/test_create_playback_restriction_request.py
261-
test/test_playback_restriction.py
262-
test/test_playback_restriction_response.py
263-
test/test_playback_restrictions_api.py
264-
test/test_referrer_domain_restriction.py
265-
test/test_update_asset_request.py
266-
test/test_update_live_stream_request.py
267-
test/test_update_referrer_domain_restriction_request.py
262+
test/test_live_stream_status.py
268263
tox.ini

docs/LiveStream.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Name | Type | Description | Notes
88
**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]
99
**active_asset_id** | **str** | The Asset that is currently being created if there is an active broadcast. | [optional]
1010
**recent_asset_ids** | **list[str]** | An array of strings with the most recent Assets that were created from this live stream. | [optional]
11-
**status** | **str** | `idle` indicates that there is no active broadcast. `active` indicates that there is an active broadcast and `disabled` status indicates that no future RTMP streams can be published. | [optional]
11+
**status** | [**LiveStreamStatus**](LiveStreamStatus.md) | | [optional]
1212
**playback_ids** | [**list[PlaybackID]**](PlaybackID.md) | An array of Playback ID objects. Use these to create HLS playback URLs. See [Play your videos](https://docs.mux.com/guides/video/play-your-videos) for more details. | [optional]
1313
**new_asset_settings** | [**CreateAssetRequest**](CreateAssetRequest.md) | | [optional]
1414
**passthrough** | **str** | Arbitrary user-supplied metadata set for the asset. Max 255 characters. | [optional]

docs/LiveStreamStatus.md

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# LiveStreamStatus
2+
3+
`idle` indicates that there is no active broadcast. `active` indicates that there is an active broadcast and `disabled` status indicates that no future RTMP streams can be published.
4+
## Properties
5+
Name | Type | Description | Notes
6+
------------ | ------------- | ------------- | -------------
7+
8+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
9+
10+

docs/LiveStreamsApi.md

+4-2
Original file line numberDiff line numberDiff line change
@@ -825,7 +825,7 @@ Name | Type | Description | Notes
825825
[[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)
826826

827827
# **list_live_streams**
828-
> ListLiveStreamsResponse list_live_streams(limit=limit, page=page, stream_key=stream_key)
828+
> ListLiveStreamsResponse list_live_streams(limit=limit, page=page, stream_key=stream_key, status=status)
829829
830830
List live streams
831831

@@ -862,10 +862,11 @@ with mux_python.ApiClient(configuration) as api_client:
862862
limit = 25 # int | Number of items to include in the response (optional) (default to 25)
863863
page = 1 # int | Offset by this many pages, of the size of `limit` (optional) (default to 1)
864864
stream_key = 'stream_key_example' # str | Filter response to return live stream for this stream key only (optional)
865+
status = mux_python.LiveStreamStatus() # LiveStreamStatus | Filter response to return live streams with the specified status only (optional)
865866

866867
try:
867868
# List live streams
868-
api_response = api_instance.list_live_streams(limit=limit, page=page, stream_key=stream_key)
869+
api_response = api_instance.list_live_streams(limit=limit, page=page, stream_key=stream_key, status=status)
869870
pprint(api_response)
870871
except ApiException as e:
871872
print("Exception when calling LiveStreamsApi->list_live_streams: %s\n" % e)
@@ -878,6 +879,7 @@ Name | Type | Description | Notes
878879
**limit** | **int**| Number of items to include in the response | [optional] [default to 25]
879880
**page** | **int**| Offset by this many pages, of the size of `limit` | [optional] [default to 1]
880881
**stream_key** | **str**| Filter response to return live stream for this stream key only | [optional]
882+
**status** | [**LiveStreamStatus**](.md)| Filter response to return live streams with the specified status only | [optional]
881883

882884
### Return type
883885

gen/generator-config.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22
"!!source": "https://github.com/OpenAPITools/openapi-generator/blob/master/docs/generators/python.md",
33
"packageName": "mux_python",
44
"projectName": "mux_python",
5-
"packageVersion": "3.2.0"
5+
"packageVersion": "3.3.0"
66
}

mux_python/__init__.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515

1616
from __future__ import absolute_import
1717

18-
__version__ = "3.2.0"
18+
__version__ = "3.3.0"
1919

2020
# import apis into sdk package
2121
from mux_python.api.assets_api import AssetsApi
@@ -119,6 +119,7 @@
119119
from mux_python.models.live_stream import LiveStream
120120
from mux_python.models.live_stream_embedded_subtitle_settings import LiveStreamEmbeddedSubtitleSettings
121121
from mux_python.models.live_stream_response import LiveStreamResponse
122+
from mux_python.models.live_stream_status import LiveStreamStatus
122123
from mux_python.models.metric import Metric
123124
from mux_python.models.notification_rule import NotificationRule
124125
from mux_python.models.overall_values import OverallValues

mux_python/api/live_streams_api.py

+8-1
Original file line numberDiff line numberDiff line change
@@ -1587,6 +1587,8 @@ def list_live_streams(self, **kwargs): # noqa: E501
15871587
:type page: int
15881588
:param stream_key: Filter response to return live stream for this stream key only
15891589
:type stream_key: str
1590+
:param status: Filter response to return live streams with the specified status only
1591+
:type status: LiveStreamStatus
15901592
:param async_req: Whether to execute the request asynchronously.
15911593
:type async_req: bool, optional
15921594
:param _preload_content: if False, the urllib3.HTTPResponse object will
@@ -1620,6 +1622,8 @@ def list_live_streams_with_http_info(self, **kwargs): # noqa: E501
16201622
:type page: int
16211623
:param stream_key: Filter response to return live stream for this stream key only
16221624
:type stream_key: str
1625+
:param status: Filter response to return live streams with the specified status only
1626+
:type status: LiveStreamStatus
16231627
:param async_req: Whether to execute the request asynchronously.
16241628
:type async_req: bool, optional
16251629
:param _return_http_data_only: response data without head status code
@@ -1648,7 +1652,8 @@ def list_live_streams_with_http_info(self, **kwargs): # noqa: E501
16481652
all_params = [
16491653
'limit',
16501654
'page',
1651-
'stream_key'
1655+
'stream_key',
1656+
'status'
16521657
]
16531658
all_params.extend(
16541659
[
@@ -1680,6 +1685,8 @@ def list_live_streams_with_http_info(self, **kwargs): # noqa: E501
16801685
query_params.append(('page', local_var_params['page'])) # noqa: E501
16811686
if 'stream_key' in local_var_params and local_var_params['stream_key'] is not None: # noqa: E501
16821687
query_params.append(('stream_key', local_var_params['stream_key'])) # noqa: E501
1688+
if 'status' in local_var_params and local_var_params['status'] is not None: # noqa: E501
1689+
query_params.append(('status', local_var_params['status'])) # noqa: E501
16831690

16841691
header_params = {}
16851692

mux_python/api_client.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ def __init__(self, configuration=None, header_name=None, header_value=None,
7979
self.default_headers[header_name] = header_value
8080
self.cookie = cookie
8181
# Set default User-Agent.
82-
self.user_agent = 'OpenAPI-Generator/3.2.0/python'
82+
self.user_agent = 'OpenAPI-Generator/3.3.0/python'
8383
self.client_side_validation = configuration.client_side_validation
8484

8585
def __enter__(self):

mux_python/configuration.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -406,7 +406,7 @@ def to_debug_report(self):
406406
"OS: {env}\n"\
407407
"Python Version: {pyversion}\n"\
408408
"Version of the API: v1\n"\
409-
"SDK Package Version: 3.2.0".\
409+
"SDK Package Version: 3.3.0".\
410410
format(env=sys.platform, pyversion=sys.version)
411411

412412
def get_host_settings(self):

mux_python/models/__init__.py

+1
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@
9090
from mux_python.models.live_stream import LiveStream
9191
from mux_python.models.live_stream_embedded_subtitle_settings import LiveStreamEmbeddedSubtitleSettings
9292
from mux_python.models.live_stream_response import LiveStreamResponse
93+
from mux_python.models.live_stream_status import LiveStreamStatus
9394
from mux_python.models.metric import Metric
9495
from mux_python.models.notification_rule import NotificationRule
9596
from mux_python.models.overall_values import OverallValues

mux_python/models/live_stream.py

+3-11
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ class LiveStream(object):
3939
'stream_key': 'str',
4040
'active_asset_id': 'str',
4141
'recent_asset_ids': 'list[str]',
42-
'status': 'str',
42+
'status': 'LiveStreamStatus',
4343
'playback_ids': 'list[PlaybackID]',
4444
'new_asset_settings': 'CreateAssetRequest',
4545
'passthrough': 'str',
@@ -252,28 +252,20 @@ def recent_asset_ids(self, recent_asset_ids):
252252
def status(self):
253253
"""Gets the status of this LiveStream. # noqa: E501
254254
255-
`idle` indicates that there is no active broadcast. `active` indicates that there is an active broadcast and `disabled` status indicates that no future RTMP streams can be published. # noqa: E501
256255
257256
:return: The status of this LiveStream. # noqa: E501
258-
:rtype: str
257+
:rtype: LiveStreamStatus
259258
"""
260259
return self._status
261260

262261
@status.setter
263262
def status(self, status):
264263
"""Sets the status of this LiveStream.
265264
266-
`idle` indicates that there is no active broadcast. `active` indicates that there is an active broadcast and `disabled` status indicates that no future RTMP streams can be published. # noqa: E501
267265
268266
:param status: The status of this LiveStream. # noqa: E501
269-
:type status: str
267+
:type status: LiveStreamStatus
270268
"""
271-
allowed_values = ["active", "idle", "disabled"] # noqa: E501
272-
if self.local_vars_configuration.client_side_validation and status not in allowed_values: # noqa: E501
273-
raise ValueError(
274-
"Invalid value for `status` ({0}), must be one of {1}" # noqa: E501
275-
.format(status, allowed_values)
276-
)
277269

278270
self._status = status
279271

+110
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,110 @@
1+
# coding: utf-8
2+
3+
"""
4+
Mux API
5+
6+
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
7+
8+
The version of the OpenAPI document: v1
9+
10+
Generated by: https://openapi-generator.tech
11+
"""
12+
13+
14+
import inspect
15+
import pprint
16+
import re # noqa: F401
17+
import six
18+
19+
from mux_python.configuration import Configuration
20+
21+
22+
class LiveStreamStatus(object):
23+
"""NOTE: This class is auto generated by OpenAPI Generator.
24+
Ref: https://openapi-generator.tech
25+
26+
Do not edit the class manually.
27+
"""
28+
29+
"""
30+
allowed enum values
31+
"""
32+
ACTIVE = "active"
33+
IDLE = "idle"
34+
DISABLED = "disabled"
35+
36+
allowable_values = [ACTIVE, IDLE, DISABLED] # noqa: E501
37+
38+
"""
39+
Attributes:
40+
openapi_types (dict): The key is attribute name
41+
and the value is attribute type.
42+
attribute_map (dict): The key is attribute name
43+
and the value is json key in definition.
44+
"""
45+
openapi_types = {
46+
}
47+
48+
attribute_map = {
49+
}
50+
51+
def __init__(self, local_vars_configuration=None): # noqa: E501
52+
"""LiveStreamStatus - a model defined in OpenAPI""" # noqa: E501
53+
if local_vars_configuration is None:
54+
local_vars_configuration = Configuration.get_default_copy()
55+
self.local_vars_configuration = local_vars_configuration
56+
self.discriminator = None
57+
58+
def to_dict(self, serialize=False):
59+
"""Returns the model properties as a dict"""
60+
result = {}
61+
62+
def convert(x):
63+
if hasattr(x, "to_dict"):
64+
args = inspect.getargspec(x.to_dict).args
65+
if len(args) == 1:
66+
return x.to_dict()
67+
else:
68+
return x.to_dict(serialize)
69+
else:
70+
return x
71+
72+
for attr, _ in six.iteritems(self.openapi_types):
73+
value = getattr(self, attr)
74+
attr = self.attribute_map.get(attr, attr) if serialize else attr
75+
if isinstance(value, list):
76+
result[attr] = list(map(
77+
lambda x: convert(x),
78+
value
79+
))
80+
elif isinstance(value, dict):
81+
result[attr] = dict(map(
82+
lambda item: (item[0], convert(item[1])),
83+
value.items()
84+
))
85+
else:
86+
result[attr] = convert(value)
87+
88+
return result
89+
90+
def to_str(self):
91+
"""Returns the string representation of the model"""
92+
return pprint.pformat(self.to_dict())
93+
94+
def __repr__(self):
95+
"""For `print` and `pprint`"""
96+
return self.to_str()
97+
98+
def __eq__(self, other):
99+
"""Returns true if both objects are equal"""
100+
if not isinstance(other, LiveStreamStatus):
101+
return False
102+
103+
return self.to_dict() == other.to_dict()
104+
105+
def __ne__(self, other):
106+
"""Returns true if both objects are not equal"""
107+
if not isinstance(other, LiveStreamStatus):
108+
return True
109+
110+
return self.to_dict() != other.to_dict()

setup.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
from setuptools import setup, find_packages # noqa: H301
1515

1616
NAME = "mux_python"
17-
VERSION = "3.2.0"
17+
VERSION = "3.3.0"
1818
# To install the library, run the following
1919
#
2020
# python setup.py install

test/test_live_stream_status.py

+51
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
# coding: utf-8
2+
3+
"""
4+
Mux API
5+
6+
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
7+
8+
The version of the OpenAPI document: v1
9+
10+
Generated by: https://openapi-generator.tech
11+
"""
12+
13+
14+
from __future__ import absolute_import
15+
16+
import unittest
17+
import datetime
18+
19+
import mux_python
20+
from mux_python.models.live_stream_status import LiveStreamStatus # noqa: E501
21+
from mux_python.rest import ApiException
22+
23+
class TestLiveStreamStatus(unittest.TestCase):
24+
"""LiveStreamStatus unit test stubs"""
25+
26+
def setUp(self):
27+
pass
28+
29+
def tearDown(self):
30+
pass
31+
32+
def make_instance(self, include_optional):
33+
"""Test LiveStreamStatus
34+
include_option is a boolean, when False only required
35+
params are included, when True both required and
36+
optional params are included """
37+
# model = mux_python.models.live_stream_status.LiveStreamStatus() # noqa: E501
38+
if include_optional :
39+
return LiveStreamStatus(
40+
)
41+
else :
42+
return LiveStreamStatus(
43+
)
44+
45+
def testLiveStreamStatus(self):
46+
"""Test LiveStreamStatus"""
47+
inst_req_only = self.make_instance(include_optional=False)
48+
inst_req_and_optional = self.make_instance(include_optional=True)
49+
50+
if __name__ == '__main__':
51+
unittest.main()

0 commit comments

Comments
 (0)