Skip to content

Commit

Permalink
Regenerate to fix passthrough and reconnect_window on Live Stream. (#10)
Browse files Browse the repository at this point in the history
* Minor test updates

* Regenerate to fix passthrough and reconnect_window on Live Streams. A boatload of low-hanging /data type fixes. Cleanup in Examples.
  • Loading branch information
philcluff authored Jul 12, 2019
1 parent 0a4df3f commit bf90449
Show file tree
Hide file tree
Showing 35 changed files with 126 additions and 67 deletions.
2 changes: 2 additions & 0 deletions docs/CreateLiveStreamRequest.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**playback_policy** | [**list[PlaybackPolicy]**](PlaybackPolicy.md) | | [optional]
**new_asset_settings** | [**CreateAssetRequest**](CreateAssetRequest.md) | | [optional]
**reconnect_window** | **float** | When live streaming software disconnects from Mux, either intentionally or due to a drop in the network, the Reconnect Window is the time in seconds that Mux should wait for the streaming software to reconnect before considering the live stream finished and completing the recorded asset. Default: 60 seconds | [optional] [default to 60]
**passthrough** | **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)

Expand Down
2 changes: 1 addition & 1 deletion docs/GetMetricTimeseriesDataResponse.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**data** | **list[list[str]]** | | [optional]
**total_row_count** | **int** | | [optional]
**timeframe** | **list[str]** | | [optional]
**timeframe** | **list[int]** | | [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)

Expand Down
2 changes: 1 addition & 1 deletion docs/GetOverallValuesResponse.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**data** | [**OverallValues**](OverallValues.md) | | [optional]
**total_row_count** | **int** | | [optional]
**timeframe** | **list[str]** | | [optional]
**timeframe** | **list[int]** | | [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)

Expand Down
4 changes: 2 additions & 2 deletions docs/Insight.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**total_watch_time** | **int** | | [optional]
**total_views** | **int** | | [optional]
**negative_impact_score** | **int** | | [optional]
**metric** | **int** | | [optional]
**negative_impact_score** | **float** | | [optional]
**metric** | **float** | | [optional]
**filter_value** | **str** | | [optional]
**filter_column** | **str** | | [optional]

Expand Down
2 changes: 1 addition & 1 deletion docs/ListAllMetricValuesResponse.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**data** | [**list[Score]**](Score.md) | | [optional]
**total_row_count** | **int** | | [optional]
**timeframe** | **list[str]** | | [optional]
**timeframe** | **list[int]** | | [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)

Expand Down
2 changes: 1 addition & 1 deletion docs/ListBreakdownValuesResponse.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**data** | [**list[BreakdownValue]**](BreakdownValue.md) | | [optional]
**total_row_count** | **int** | | [optional]
**timeframe** | **list[str]** | | [optional]
**timeframe** | **list[int]** | | [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)

Expand Down
2 changes: 1 addition & 1 deletion docs/ListErrorsResponse.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**data** | [**list[Error]**](Error.md) | | [optional]
**total_row_count** | **int** | | [optional]
**timeframe** | **list[str]** | | [optional]
**timeframe** | **list[int]** | | [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)

Expand Down
2 changes: 1 addition & 1 deletion docs/ListExportsResponse.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**data** | **list[str]** | | [optional]
**total_row_count** | **int** | | [optional]
**timeframe** | **list[str]** | | [optional]
**timeframe** | **list[int]** | | [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)

Expand Down
2 changes: 1 addition & 1 deletion docs/ListFilterValuesResponse.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**data** | [**list[FilterValue]**](FilterValue.md) | | [optional]
**total_row_count** | **int** | | [optional]
**timeframe** | **list[str]** | | [optional]
**timeframe** | **list[int]** | | [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)

Expand Down
2 changes: 1 addition & 1 deletion docs/ListFiltersResponse.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**data** | [**ListFiltersResponseData**](ListFiltersResponseData.md) | | [optional]
**total_row_count** | **int** | | [optional]
**timeframe** | **list[str]** | | [optional]
**timeframe** | **list[int]** | | [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)

Expand Down
2 changes: 1 addition & 1 deletion docs/ListInsightsResponse.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**data** | [**list[Insight]**](Insight.md) | | [optional]
**total_row_count** | **int** | | [optional]
**timeframe** | **list[str]** | | [optional]
**timeframe** | **list[int]** | | [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)

Expand Down
2 changes: 1 addition & 1 deletion docs/ListVideoViewsResponse.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**data** | [**list[AbridgedVideoView]**](AbridgedVideoView.md) | | [optional]
**total_row_count** | **int** | | [optional]
**timeframe** | **list[str]** | | [optional]
**timeframe** | **list[int]** | | [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)

Expand Down
2 changes: 1 addition & 1 deletion docs/VideoViewResponse.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**data** | [**VideoView**](.md) | | [optional]
**timeframe** | **list[str]** | | [optional]
**timeframe** | **list[int]** | | [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)

Expand Down
5 changes: 2 additions & 3 deletions examples/data/exercise-errors.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,19 @@
from mux_python.rest import NotFoundException
import logger

# Exercises all asset operations:
# Exercises all error operations:
# list-errors

# Authentication Setup
configuration = mux_python.Configuration()
configuration.username = os.environ['MUX_TOKEN_ID']
configuration.password = os.environ['MUX_TOKEN_SECRET']
configuration.debug = True

# API Client Initialization
errors_api = mux_python.ErrorsApi(mux_python.ApiClient(configuration))

# ========== list-errors ==========
list_errors_response = errors_api.list_errors(filters=['browser:Firefox'], timeframe=['7:days'])
list_errors_response = errors_api.list_errors(filters=['browser:Chrome'], timeframe=['7:days'])
logger.print_debug('List Errors Response: ' + str(list_errors_response))
assert list_errors_response != None
assert list_errors_response.data != None
Expand Down
2 changes: 1 addition & 1 deletion examples/data/exercise-metrics.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
from mux_python.rest import NotFoundException
import logger

# Exercises all asset operations:
# Exercises all metrics operations:
# list-breakdown-values
# get-overall-values
# list-insights
Expand Down
4 changes: 2 additions & 2 deletions examples/data/exercise-video-views.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
video_views_api = mux_python.VideoViewsApi(mux_python.ApiClient(configuration))

# ========== list-video-views ==========
list_video_views_response = video_views_api.list_video_views(filters=['country:CH', 'browser:Chrome'], timeframe=['7:days'])
list_video_views_response = video_views_api.list_video_views(filters=['country:GB', 'browser:Chrome'], timeframe=['7:days'])
logger.print_debug('List Video Views Response ' + str(list_video_views_response))
assert list_video_views_response != None
assert list_video_views_response.data != None
Expand All @@ -32,4 +32,4 @@
video_view_response = video_views_api.get_video_view(list_video_views_response.data[0].id)
assert video_view_response != None
assert video_view_response.data != None
print("get-video-views OK ✅")
print("get-video-view OK ✅")
2 changes: 1 addition & 1 deletion examples/video/exercise-live-streams.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@
logger.print_debug("Deleted Live Stream (void response) ")
try:
deleted_live_stream_response = live_api.get_live_stream(create_live_stream_response.data.id)
print "Should have 404'd when getting deleted live stream ❌ "
print("Should have 404'd when getting deleted live stream ❌ ")
sys.exit(1)
except NotFoundException as e:
assert e != None
Expand Down
2 changes: 1 addition & 1 deletion examples/video/ingest.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

# Create an asset
input_settings = [mux_python.InputSettings(url='https://storage.googleapis.com/muxdemofiles/mux-video-intro.mp4')]
create_asset_request = mux_python.CreateAssetRequest(input=input_settings, playback_policy=[mux_python.PlaybackPolicy.PUBLIC])
create_asset_request = mux_python.CreateAssetRequest(input=input_settings, playback_policy=[mux_python.PlaybackPolicy.PUBLIC], mp4_support="standard")

create_asset_response = assets_api.create_asset(create_asset_request)
print("Created Asset ID: " + create_asset_response.data.id)
Expand Down
2 changes: 1 addition & 1 deletion mux_python/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

from __future__ import absolute_import

__version__ = "1.2.0"
__version__ = "1.2.1"

# import apis into sdk package
from mux_python.api.assets_api import AssetsApi
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 @@ -72,7 +72,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 | 1.2.0'
self.user_agent = 'Mux Python | 1.2.1'

def __del__(self):
if self._pool:
Expand Down
2 changes: 1 addition & 1 deletion mux_python/configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -228,5 +228,5 @@ def to_debug_report(self):
"OS: {env}\n"\
"Python Version: {pyversion}\n"\
"Version of the API: v1\n"\
"SDK Package Version: 1.2.0".\
"SDK Package Version: 1.2.1".\
format(env=sys.platform, pyversion=sys.version)
64 changes: 61 additions & 3 deletions mux_python/models/create_live_stream_request.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,25 +23,35 @@ class CreateLiveStreamRequest(object):
"""
openapi_types = {
'playback_policy': 'list[PlaybackPolicy]',
'new_asset_settings': 'CreateAssetRequest'
'new_asset_settings': 'CreateAssetRequest',
'reconnect_window': 'float',
'passthrough': 'str'
}

attribute_map = {
'playback_policy': 'playback_policy',
'new_asset_settings': 'new_asset_settings'
'new_asset_settings': 'new_asset_settings',
'reconnect_window': 'reconnect_window',
'passthrough': 'passthrough'
}

def __init__(self, playback_policy=None, new_asset_settings=None): # noqa: E501
def __init__(self, playback_policy=None, new_asset_settings=None, reconnect_window=60, passthrough=None): # noqa: E501
"""CreateLiveStreamRequest - a model defined in OpenAPI""" # noqa: E501

self._playback_policy = None
self._new_asset_settings = None
self._reconnect_window = None
self._passthrough = None
self.discriminator = None

if playback_policy is not None:
self.playback_policy = playback_policy
if new_asset_settings is not None:
self.new_asset_settings = new_asset_settings
if reconnect_window is not None:
self.reconnect_window = reconnect_window
if passthrough is not None:
self.passthrough = passthrough

@property
def playback_policy(self):
Expand Down Expand Up @@ -85,6 +95,54 @@ def new_asset_settings(self, new_asset_settings):

self._new_asset_settings = new_asset_settings

@property
def reconnect_window(self):
"""Gets the reconnect_window of this CreateLiveStreamRequest. # noqa: E501
When live streaming software disconnects from Mux, either intentionally or due to a drop in the network, the Reconnect Window is the time in seconds that Mux should wait for the streaming software to reconnect before considering the live stream finished and completing the recorded asset. Default: 60 seconds # noqa: E501
:return: The reconnect_window of this CreateLiveStreamRequest. # noqa: E501
:rtype: float
"""
return self._reconnect_window

@reconnect_window.setter
def reconnect_window(self, reconnect_window):
"""Sets the reconnect_window of this CreateLiveStreamRequest.
When live streaming software disconnects from Mux, either intentionally or due to a drop in the network, the Reconnect Window is the time in seconds that Mux should wait for the streaming software to reconnect before considering the live stream finished and completing the recorded asset. Default: 60 seconds # noqa: E501
:param reconnect_window: The reconnect_window of this CreateLiveStreamRequest. # noqa: E501
:type: float
"""
if reconnect_window is not None and reconnect_window > 300: # noqa: E501
raise ValueError("Invalid value for `reconnect_window`, must be a value less than or equal to `300`") # noqa: E501
if reconnect_window is not None and reconnect_window < 0.1: # noqa: E501
raise ValueError("Invalid value for `reconnect_window`, must be a value greater than or equal to `0.1`") # noqa: E501

self._reconnect_window = reconnect_window

@property
def passthrough(self):
"""Gets the passthrough of this CreateLiveStreamRequest. # noqa: E501
:return: The passthrough of this CreateLiveStreamRequest. # noqa: E501
:rtype: str
"""
return self._passthrough

@passthrough.setter
def passthrough(self, passthrough):
"""Sets the passthrough of this CreateLiveStreamRequest.
:param passthrough: The passthrough of this CreateLiveStreamRequest. # noqa: E501
:type: str
"""

self._passthrough = passthrough

def to_dict(self):
"""Returns the model properties as a dict"""
result = {}
Expand Down
6 changes: 3 additions & 3 deletions mux_python/models/get_metric_timeseries_data_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class GetMetricTimeseriesDataResponse(object):
openapi_types = {
'data': 'list[list[str]]',
'total_row_count': 'int',
'timeframe': 'list[str]'
'timeframe': 'list[int]'
}

attribute_map = {
Expand Down Expand Up @@ -96,7 +96,7 @@ def timeframe(self):
:return: The timeframe of this GetMetricTimeseriesDataResponse. # noqa: E501
:rtype: list[str]
:rtype: list[int]
"""
return self._timeframe

Expand All @@ -106,7 +106,7 @@ def timeframe(self, timeframe):
:param timeframe: The timeframe of this GetMetricTimeseriesDataResponse. # noqa: E501
:type: list[str]
:type: list[int]
"""

self._timeframe = timeframe
Expand Down
6 changes: 3 additions & 3 deletions mux_python/models/get_overall_values_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class GetOverallValuesResponse(object):
openapi_types = {
'data': 'OverallValues',
'total_row_count': 'int',
'timeframe': 'list[str]'
'timeframe': 'list[int]'
}

attribute_map = {
Expand Down Expand Up @@ -96,7 +96,7 @@ def timeframe(self):
:return: The timeframe of this GetOverallValuesResponse. # noqa: E501
:rtype: list[str]
:rtype: list[int]
"""
return self._timeframe

Expand All @@ -106,7 +106,7 @@ def timeframe(self, timeframe):
:param timeframe: The timeframe of this GetOverallValuesResponse. # noqa: E501
:type: list[str]
:type: list[int]
"""

self._timeframe = timeframe
Expand Down
Loading

0 comments on commit bf90449

Please sign in to comment.