Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .oas-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.10.4
1.13.0
2 changes: 1 addition & 1 deletion shotstack_sdk/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"""


__version__ = "1.10.4"
__version__ = "1.13.0"

# import ApiClient
from shotstack_sdk.api_client import ApiClient
Expand Down
2 changes: 1 addition & 1 deletion shotstack_sdk/api_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,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/1.10.4/python'
self.user_agent = 'OpenAPI-Generator/1.13.0/python'

def __enter__(self):
return self
Expand Down
2 changes: 1 addition & 1 deletion shotstack_sdk/configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -410,7 +410,7 @@ def to_debug_report(self):
"OS: {env}\n"\
"Python Version: {pyversion}\n"\
"Version of the API: v1\n"\
"SDK Package Version: 1.10.4".\
"SDK Package Version: 1.13.0".\
format(env=sys.platform, pyversion=sys.version)

def get_host_settings(self):
Expand Down
73 changes: 51 additions & 22 deletions shotstack_sdk/model/asset.py

Large diffs are not rendered by default.

37 changes: 29 additions & 8 deletions shotstack_sdk/model/audio_asset.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,9 @@ class AudioAsset(ModelNormal):
'pattern': r'', # noqa: E501
},
},
('prompt',): {
'max_length': 4000,
},
('speed',): {
'inclusive_maximum': 10,
'inclusive_minimum': 0,
Expand All @@ -101,6 +104,11 @@ def openapi_types():
return {
'type': (str,), # noqa: E501
'src': (str,), # noqa: E501
'prompt': (str,), # noqa: E501
'voice': (str,), # noqa: E501
'language': (str,), # noqa: E501
'newscaster': (bool,), # noqa: E501
'model': (str,), # noqa: E501
'trim': (float,), # noqa: E501
'volume': (AudioAssetVolume,), # noqa: E501
'speed': (float,), # noqa: E501
Expand All @@ -115,6 +123,11 @@ def discriminator():
attribute_map = {
'type': 'type', # noqa: E501
'src': 'src', # noqa: E501
'prompt': 'prompt', # noqa: E501
'voice': 'voice', # noqa: E501
'language': 'language', # noqa: E501
'newscaster': 'newscaster', # noqa: E501
'model': 'model', # noqa: E501
'trim': 'trim', # noqa: E501
'volume': 'volume', # noqa: E501
'speed': 'speed', # noqa: E501
Expand All @@ -128,11 +141,10 @@ def discriminator():

@classmethod
@convert_js_args_to_python_args
def _from_openapi_data(cls, src, *args, **kwargs): # noqa: E501
def _from_openapi_data(cls, *args, **kwargs): # noqa: E501
"""AudioAsset - a model defined in OpenAPI

Args:
src (str): The audio source URL. The URL must be publicly accessible or include credentials.

Keyword Args:
type (str): The type of asset - set to `audio` for audio assets.. defaults to 'audio', must be one of ['audio', ] # noqa: E501
Expand Down Expand Up @@ -166,9 +178,15 @@ def _from_openapi_data(cls, src, *args, **kwargs): # noqa: E501
Animal class but this time we won't travel
through its discriminator because we passed in
_visited_composed_classes = (Animal,)
src (str): The audio source URL. The URL must be publicly accessible or include credentials. Provide either `src` or `prompt`, not both.. [optional] # noqa: E501
prompt (str): A text prompt. When `voice` is set, the prompt is the spoken text (text-to-speech). Without `voice`, the prompt describes generated music or sound effects. The generated `src` is filled in automatically.. [optional] # noqa: E501
voice (str): Voice identifier for text-to-speech generation (e.g. `Matthew`, `Joanna`). Only meaningful when `prompt` is set.. [optional] # noqa: E501
language (str): Optional BCP-47 language code (e.g. `en-US`) for text-to-speech. Only meaningful when `prompt` and `voice` are set.. [optional] # noqa: E501
newscaster (bool): Set to `true` to use the voice's newscaster mode when supported. Only meaningful when `prompt` and `voice` are set.. [optional] if omitted the server will use the default value of False # noqa: E501
model (str): The generation model to use when `prompt` is set (e.g. `polly-neural`). Defaults to the platform's preferred generator if omitted.. [optional] # noqa: E501
trim (float): The start trim point of the audio clip, in seconds (defaults to 0). Audio will start from the in trim point. The audio will play until the file ends or the Clip length is reached.. [optional] # noqa: E501
volume (AudioAssetVolume): [optional] # noqa: E501
speed (float): Adjust the playback speed of the audio clip between 0 (paused) and 10 (10x normal speed), where 1 is normal speed (defaults to 1). Adjusting the speed will also adjust the duration of the clip and may require you to adjust the Clip length. For example, if you set speed to 0.5, the clip will need to be 2x as long to play the entire audio (i.e. original length / 0.5). If you set speed to 2, the clip will need to be half as long to play the entire audio (i.e. original length / 2).. [optional] # noqa: E501
speed (float): Adjust the playback speed of the audio clip between 0 (paused) and 10 (10x normal speed), where 1 is normal speed (defaults to 1). Adjusting the speed will also adjust the duration of the clip and may require you to adjust the Clip length. For example, if you set speed to 0.5, the clip will need to be 2x as long to play the entire audio (i.e. original length / 0.5). If you set speed to 2, the clip will need to be half as long to play the entire audio (i.e. original length / 2).. [optional] # noqa: E501
effect (str): The effect to apply to the audio asset <ul> <li>`fadeIn` - fade volume in only</li> <li>`fadeOut` - fade volume out only</li> <li>`fadeInFadeOut` - fade volume in and out</li> </ul>. [optional] # noqa: E501
"""

Expand Down Expand Up @@ -199,7 +217,6 @@ def _from_openapi_data(cls, src, *args, **kwargs): # noqa: E501
self._visited_composed_classes = _visited_composed_classes + (self.__class__,)

self.type = type
self.src = src
for var_name, var_value in kwargs.items():
if var_name not in self.attribute_map and \
self._configuration is not None and \
Expand All @@ -220,11 +237,10 @@ def _from_openapi_data(cls, src, *args, **kwargs): # noqa: E501
])

@convert_js_args_to_python_args
def __init__(self, src, *args, **kwargs): # noqa: E501
def __init__(self, *args, **kwargs): # noqa: E501
"""AudioAsset - a model defined in OpenAPI

Args:
src (str): The audio source URL. The URL must be publicly accessible or include credentials.

Keyword Args:
type (str): The type of asset - set to `audio` for audio assets.. defaults to 'audio', must be one of ['audio', ] # noqa: E501
Expand Down Expand Up @@ -258,9 +274,15 @@ def __init__(self, src, *args, **kwargs): # noqa: E501
Animal class but this time we won't travel
through its discriminator because we passed in
_visited_composed_classes = (Animal,)
src (str): The audio source URL. The URL must be publicly accessible or include credentials. Provide either `src` or `prompt`, not both.. [optional] # noqa: E501
prompt (str): A text prompt. When `voice` is set, the prompt is the spoken text (text-to-speech). Without `voice`, the prompt describes generated music or sound effects. The generated `src` is filled in automatically.. [optional] # noqa: E501
voice (str): Voice identifier for text-to-speech generation (e.g. `Matthew`, `Joanna`). Only meaningful when `prompt` is set.. [optional] # noqa: E501
language (str): Optional BCP-47 language code (e.g. `en-US`) for text-to-speech. Only meaningful when `prompt` and `voice` are set.. [optional] # noqa: E501
newscaster (bool): Set to `true` to use the voice's newscaster mode when supported. Only meaningful when `prompt` and `voice` are set.. [optional] if omitted the server will use the default value of False # noqa: E501
model (str): The generation model to use when `prompt` is set (e.g. `polly-neural`). Defaults to the platform's preferred generator if omitted.. [optional] # noqa: E501
trim (float): The start trim point of the audio clip, in seconds (defaults to 0). Audio will start from the in trim point. The audio will play until the file ends or the Clip length is reached.. [optional] # noqa: E501
volume (AudioAssetVolume): [optional] # noqa: E501
speed (float): Adjust the playback speed of the audio clip between 0 (paused) and 10 (10x normal speed), where 1 is normal speed (defaults to 1). Adjusting the speed will also adjust the duration of the clip and may require you to adjust the Clip length. For example, if you set speed to 0.5, the clip will need to be 2x as long to play the entire audio (i.e. original length / 0.5). If you set speed to 2, the clip will need to be half as long to play the entire audio (i.e. original length / 2).. [optional] # noqa: E501
speed (float): Adjust the playback speed of the audio clip between 0 (paused) and 10 (10x normal speed), where 1 is normal speed (defaults to 1). Adjusting the speed will also adjust the duration of the clip and may require you to adjust the Clip length. For example, if you set speed to 0.5, the clip will need to be 2x as long to play the entire audio (i.e. original length / 0.5). If you set speed to 2, the clip will need to be half as long to play the entire audio (i.e. original length / 2).. [optional] # noqa: E501
effect (str): The effect to apply to the audio asset <ul> <li>`fadeIn` - fade volume in only</li> <li>`fadeOut` - fade volume out only</li> <li>`fadeInFadeOut` - fade volume in and out</li> </ul>. [optional] # noqa: E501
"""

Expand Down Expand Up @@ -289,7 +311,6 @@ def __init__(self, src, *args, **kwargs): # noqa: E501
self._visited_composed_classes = _visited_composed_classes + (self.__class__,)

self.type = type
self.src = src
for var_name, var_value in kwargs.items():
if var_name not in self.attribute_map and \
self._configuration is not None and \
Expand Down
4 changes: 4 additions & 0 deletions shotstack_sdk/model/clip.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,7 @@ def openapi_types():
'asset': (Asset,), # noqa: E501
'start': (ClipStart,), # noqa: E501
'length': (ClipLength,), # noqa: E501
'id': (str,), # noqa: E501
'fit': (str,), # noqa: E501
'scale': (ClipScale,), # noqa: E501
'width': (float,), # noqa: E501
Expand All @@ -174,6 +175,7 @@ def discriminator():
'asset': 'asset', # noqa: E501
'start': 'start', # noqa: E501
'length': 'length', # noqa: E501
'id': 'id', # noqa: E501
'fit': 'fit', # noqa: E501
'scale': 'scale', # noqa: E501
'width': 'width', # noqa: E501
Expand Down Expand Up @@ -234,6 +236,7 @@ def _from_openapi_data(cls, asset, start, length, *args, **kwargs): # noqa: E50
Animal class but this time we won't travel
through its discriminator because we passed in
_visited_composed_classes = (Animal,)
id (str): Optional client-generated identifier. Used by client SDKs (e.g. the Shotstack Studio SDK) to reference a clip across edits without relying on its position in the timeline. The render API does not use this field and it does not appear in render output.. [optional] # noqa: E501
fit (str): Set how the asset should be scaled to fit the viewport using one of the following options: <ul> <li>`crop` <b>(default)</b> - scale the asset to fill the viewport while maintaining the aspect ratio. The asset will be cropped if it exceeds the bounds of the viewport.</li> <li>`cover` - stretch the asset to fill the viewport without maintaining the aspect ratio.</li> <li>`contain` - fit the entire asset within the viewport while maintaining the original aspect ratio.</li> <li>`none` - preserves the original asset dimensions and does not apply any scaling.</li> </ul>. [optional] # noqa: E501
scale (ClipScale): [optional] # noqa: E501
width (float): Set the width of the clip bounding box in pixels. This constrains the width of the clip, overriding the default behavior where clips fill the viewport width.. [optional] # noqa: E501
Expand Down Expand Up @@ -335,6 +338,7 @@ def __init__(self, asset, start, length, *args, **kwargs): # noqa: E501
Animal class but this time we won't travel
through its discriminator because we passed in
_visited_composed_classes = (Animal,)
id (str): Optional client-generated identifier. Used by client SDKs (e.g. the Shotstack Studio SDK) to reference a clip across edits without relying on its position in the timeline. The render API does not use this field and it does not appear in render output.. [optional] # noqa: E501
fit (str): Set how the asset should be scaled to fit the viewport using one of the following options: <ul> <li>`crop` <b>(default)</b> - scale the asset to fill the viewport while maintaining the aspect ratio. The asset will be cropped if it exceeds the bounds of the viewport.</li> <li>`cover` - stretch the asset to fill the viewport without maintaining the aspect ratio.</li> <li>`contain` - fit the entire asset within the viewport while maintaining the original aspect ratio.</li> <li>`none` - preserves the original asset dimensions and does not apply any scaling.</li> </ul>. [optional] # noqa: E501
scale (ClipScale): [optional] # noqa: E501
width (float): Set the width of the clip bounding box in pixels. This constrains the width of the clip, overriding the default behavior where clips fill the viewport width.. [optional] # noqa: E501
Expand Down
Loading