Skip to content

Commit

Permalink
[release] 2.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
eropple committed Sep 17, 2021
1 parent 9edcbda commit 24e7ee9
Show file tree
Hide file tree
Showing 13 changed files with 423 additions and 5 deletions.
3 changes: 3 additions & 0 deletions .openapi-generator/FILES
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ docs/GetAssetOrLiveStreamIdResponse.md
docs/GetAssetOrLiveStreamIdResponseData.md
docs/GetAssetOrLiveStreamIdResponseDataObject.md
docs/GetAssetPlaybackIDResponse.md
docs/GetLiveStreamPlaybackIDResponse.md
docs/GetMetricTimeseriesDataResponse.md
docs/GetOverallValuesResponse.md
docs/GetRealTimeBreakdownResponse.md
Expand Down Expand Up @@ -163,6 +164,7 @@ mux_python/models/get_asset_or_live_stream_id_response.py
mux_python/models/get_asset_or_live_stream_id_response_data.py
mux_python/models/get_asset_or_live_stream_id_response_data_object.py
mux_python/models/get_asset_playback_id_response.py
mux_python/models/get_live_stream_playback_id_response.py
mux_python/models/get_metric_timeseries_data_response.py
mux_python/models/get_overall_values_response.py
mux_python/models/get_real_time_breakdown_response.py
Expand Down Expand Up @@ -235,4 +237,5 @@ setup.cfg
setup.py
test-requirements.txt
test/__init__.py
test/test_get_live_stream_playback_id_response.py
tox.ini
2 changes: 2 additions & 0 deletions .tool-versions
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
python 3.7.2
java zulu-16.32.15
yarn 1.22.10
nodejs 16.5.0
10 changes: 10 additions & 0 deletions docs/GetLiveStreamPlaybackIDResponse.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# GetLiveStreamPlaybackIDResponse

## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**data** | [**PlaybackID**](.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)


74 changes: 74 additions & 0 deletions docs/LiveStreamsApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ Method | HTTP request | Description
[**disable_live_stream**](LiveStreamsApi.md#disable_live_stream) | **PUT** /video/v1/live-streams/{LIVE_STREAM_ID}/disable | Disable a live stream
[**enable_live_stream**](LiveStreamsApi.md#enable_live_stream) | **PUT** /video/v1/live-streams/{LIVE_STREAM_ID}/enable | Enable a live stream
[**get_live_stream**](LiveStreamsApi.md#get_live_stream) | **GET** /video/v1/live-streams/{LIVE_STREAM_ID} | Retrieve a live stream
[**get_live_stream_playback_id**](LiveStreamsApi.md#get_live_stream_playback_id) | **GET** /video/v1/live-streams/{LIVE_STREAM_ID}/playback-ids/{PLAYBACK_ID} | Retrieve a live stream playback ID
[**get_live_stream_simulcast_target**](LiveStreamsApi.md#get_live_stream_simulcast_target) | **GET** /video/v1/live-streams/{LIVE_STREAM_ID}/simulcast-targets/{SIMULCAST_TARGET_ID} | Retrieve a Live Stream Simulcast Target
[**list_live_streams**](LiveStreamsApi.md#list_live_streams) | **GET** /video/v1/live-streams | List live streams
[**reset_stream_key**](LiveStreamsApi.md#reset_stream_key) | **POST** /video/v1/live-streams/{LIVE_STREAM_ID}/reset-stream-key | Reset a live stream’s stream key
Expand Down Expand Up @@ -673,6 +674,79 @@ 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)

# **get_live_stream_playback_id**
> GetLiveStreamPlaybackIDResponse get_live_stream_playback_id(live_stream_id, playback_id)
Retrieve a live stream playback ID

### Example

* Basic Authentication (accessToken):
```python
from __future__ import print_function
import time
import mux_python
from mux_python.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.mux.com
# See configuration.py for a list of all supported configuration parameters.
configuration = mux_python.Configuration(
host = "https://api.mux.com"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure HTTP basic authorization: accessToken
configuration = mux_python.Configuration(
username = 'YOUR_USERNAME',
password = 'YOUR_PASSWORD'
)

# Enter a context with an instance of the API client
with mux_python.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = mux_python.LiveStreamsApi(api_client)
live_stream_id = 'live_stream_id_example' # str | The live stream ID
playback_id = 'playback_id_example' # str | The live stream's playback ID.

try:
# Retrieve a live stream playback ID
api_response = api_instance.get_live_stream_playback_id(live_stream_id, playback_id)
pprint(api_response)
except ApiException as e:
print("Exception when calling LiveStreamsApi->get_live_stream_playback_id: %s\n" % e)
```

### Parameters

Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**live_stream_id** | **str**| The live stream ID |
**playback_id** | **str**| The live stream's playback ID. |

### Return type

[**GetLiveStreamPlaybackIDResponse**](GetLiveStreamPlaybackIDResponse.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)

# **get_live_stream_simulcast_target**
> SimulcastTargetResponse get_live_stream_simulcast_target(live_stream_id, simulcast_target_id)
Expand Down
2 changes: 1 addition & 1 deletion gen/generator-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
"!!source": "https://github.com/OpenAPITools/openapi-generator/blob/master/docs/generators/python.md",
"packageName": "mux_python",
"projectName": "mux_python",
"packageVersion": "2.1.1"
"packageVersion": "2.2.0"
}
3 changes: 2 additions & 1 deletion mux_python/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

from __future__ import absolute_import

__version__ = "2.1.1"
__version__ = "2.2.0"

# import apis into sdk package
from mux_python.api.assets_api import AssetsApi
Expand Down Expand Up @@ -74,6 +74,7 @@
from mux_python.models.get_asset_or_live_stream_id_response_data import GetAssetOrLiveStreamIdResponseData
from mux_python.models.get_asset_or_live_stream_id_response_data_object import GetAssetOrLiveStreamIdResponseDataObject
from mux_python.models.get_asset_playback_id_response import GetAssetPlaybackIDResponse
from mux_python.models.get_live_stream_playback_id_response import GetLiveStreamPlaybackIDResponse
from mux_python.models.get_metric_timeseries_data_response import GetMetricTimeseriesDataResponse
from mux_python.models.get_overall_values_response import GetOverallValuesResponse
from mux_python.models.get_real_time_breakdown_response import GetRealTimeBreakdownResponse
Expand Down
144 changes: 144 additions & 0 deletions mux_python/api/live_streams_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -1282,6 +1282,150 @@ def get_live_stream_with_http_info(self, live_stream_id, **kwargs): # noqa: E50
collection_formats=collection_formats,
_request_auth=local_var_params.get('_request_auth'))

def get_live_stream_playback_id(self, live_stream_id, playback_id, **kwargs): # noqa: E501
"""Retrieve a live stream playback ID # 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_live_stream_playback_id(live_stream_id, playback_id, async_req=True)
>>> result = thread.get()
:param live_stream_id: The live stream ID (required)
:type live_stream_id: str
:param playback_id: The live stream's playback ID. (required)
:type playback_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: GetLiveStreamPlaybackIDResponse
"""
kwargs['_return_http_data_only'] = True
return self.get_live_stream_playback_id_with_http_info(live_stream_id, playback_id, **kwargs) # noqa: E501

def get_live_stream_playback_id_with_http_info(self, live_stream_id, playback_id, **kwargs): # noqa: E501
"""Retrieve a live stream playback ID # 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_live_stream_playback_id_with_http_info(live_stream_id, playback_id, async_req=True)
>>> result = thread.get()
:param live_stream_id: The live stream ID (required)
:type live_stream_id: str
:param playback_id: The live stream's playback ID. (required)
:type playback_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(GetLiveStreamPlaybackIDResponse, status_code(int), headers(HTTPHeaderDict))
"""

local_var_params = locals()

all_params = [
'live_stream_id',
'playback_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_live_stream_playback_id" % key
)
local_var_params[key] = val
del local_var_params['kwargs']
# verify the required parameter 'live_stream_id' is set
if self.api_client.client_side_validation and ('live_stream_id' not in local_var_params or # noqa: E501
local_var_params['live_stream_id'] is None): # noqa: E501
raise ApiValueError("Missing the required parameter `live_stream_id` when calling `get_live_stream_playback_id`") # noqa: E501
# verify the required parameter 'playback_id' is set
if self.api_client.client_side_validation and ('playback_id' not in local_var_params or # noqa: E501
local_var_params['playback_id'] is None): # noqa: E501
raise ApiValueError("Missing the required parameter `playback_id` when calling `get_live_stream_playback_id`") # noqa: E501

collection_formats = {}

path_params = {}
if 'live_stream_id' in local_var_params:
path_params['LIVE_STREAM_ID'] = local_var_params['live_stream_id'] # noqa: E501
if 'playback_id' in local_var_params:
path_params['PLAYBACK_ID'] = local_var_params['playback_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: "GetLiveStreamPlaybackIDResponse",
}

return self.api_client.call_api(
'/video/v1/live-streams/{LIVE_STREAM_ID}/playback-ids/{PLAYBACK_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 get_live_stream_simulcast_target(self, live_stream_id, simulcast_target_id, **kwargs): # noqa: E501
"""Retrieve a Live Stream Simulcast Target # noqa: E501
Expand Down
2 changes: 1 addition & 1 deletion mux_python/api_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ def __init__(self, configuration=None, header_name=None, header_value=None,
self.default_headers[header_name] = header_value
self.cookie = cookie
# Set default User-Agent.
self.user_agent = 'OpenAPI-Generator/2.1.1/python'
self.user_agent = 'OpenAPI-Generator/2.2.0/python'
self.client_side_validation = configuration.client_side_validation

def __enter__(self):
Expand Down
2 changes: 1 addition & 1 deletion mux_python/configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -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: 2.1.1".\
"SDK Package Version: 2.2.0".\
format(env=sys.platform, pyversion=sys.version)

def get_host_settings(self):
Expand Down
1 change: 1 addition & 0 deletions mux_python/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
from mux_python.models.get_asset_or_live_stream_id_response_data import GetAssetOrLiveStreamIdResponseData
from mux_python.models.get_asset_or_live_stream_id_response_data_object import GetAssetOrLiveStreamIdResponseDataObject
from mux_python.models.get_asset_playback_id_response import GetAssetPlaybackIDResponse
from mux_python.models.get_live_stream_playback_id_response import GetLiveStreamPlaybackIDResponse
from mux_python.models.get_metric_timeseries_data_response import GetMetricTimeseriesDataResponse
from mux_python.models.get_overall_values_response import GetOverallValuesResponse
from mux_python.models.get_real_time_breakdown_response import GetRealTimeBreakdownResponse
Expand Down

0 comments on commit 24e7ee9

Please sign in to comment.