From 221089857dbc99c0bb797ec35a70b97712154ecd Mon Sep 17 00:00:00 2001 From: speakeasybot Date: Wed, 13 Mar 2024 01:12:42 +0000 Subject: [PATCH] ci: regenerated with OpenAPI Doc 0.0.3, Speakeasy CLI 1.207.1 --- .speakeasy/gen.lock | 10 ++++----- RELEASES.md | 12 ++++++++++- gen.yaml | 2 +- setup.py | 2 +- src/plex_api/sdk.py | 35 +++++++++++++++++++------------- src/plex_api/sdkconfiguration.py | 6 +++--- 6 files changed, 42 insertions(+), 25 deletions(-) diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index cc476d5..62b3ceb 100755 --- a/.speakeasy/gen.lock +++ b/.speakeasy/gen.lock @@ -3,10 +3,10 @@ id: 3eeea668-4ef4-464e-a888-bdfa023bedf5 management: docChecksum: e34dac84738ebf2d447ea2b9055a6eeb docVersion: 0.0.3 - speakeasyVersion: 1.204.1 - generationVersion: 2.279.1 - releaseVersion: 0.4.0 - configChecksum: bd151d168c96896726f8c92a667d7abc + speakeasyVersion: 1.207.1 + generationVersion: 2.280.6 + releaseVersion: 0.4.1 + configChecksum: 0b2741b885d75fab8768ca79a3e7c8ac repoURL: https://github.com/LukeHagar/plexpy.git repoSubDirectory: . installationURL: https://github.com/LukeHagar/plexpy.git @@ -17,7 +17,7 @@ features: core: 4.5.1 flattening: 2.81.1 globalSecurity: 2.83.4 - globalServerURLs: 2.82.1 + globalServerURLs: 2.82.2 methodServerURLs: 2.82.1 nameOverrides: 2.81.1 responseFormat: 0.1.0 diff --git a/RELEASES.md b/RELEASES.md index 4cfab21..2aa0ab2 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -88,4 +88,14 @@ Based on: ### Generated - [python v0.4.0] . ### Releases -- [PyPI v0.4.0] https://pypi.org/project/plex-api-client/0.4.0 - . \ No newline at end of file +- [PyPI v0.4.0] https://pypi.org/project/plex-api-client/0.4.0 - . + +## 2024-03-13 01:12:28 +### Changes +Based on: +- OpenAPI Doc 0.0.3 +- Speakeasy CLI 1.207.1 (2.280.6) https://github.com/speakeasy-api/speakeasy +### Generated +- [python v0.4.1] . +### Releases +- [PyPI v0.4.1] https://pypi.org/project/plex-api-client/0.4.1 - . \ No newline at end of file diff --git a/gen.yaml b/gen.yaml index bc23c2d..7ef2bf6 100644 --- a/gen.yaml +++ b/gen.yaml @@ -12,7 +12,7 @@ generation: auth: oAuth2ClientCredentialsEnabled: false python: - version: 0.4.0 + version: 0.4.1 additionalDependencies: dependencies: {} extraDependencies: diff --git a/setup.py b/setup.py index 35d9aac..dbeade2 100644 --- a/setup.py +++ b/setup.py @@ -10,7 +10,7 @@ except FileNotFoundError: setuptools.setup( name="plex-api-client", - version="0.4.0", + version="0.4.1", author="LukeHagar", description="Python Client SDK Generated by Speakeasy", long_description=long_description, diff --git a/src/plex_api/sdk.py b/src/plex_api/sdk.py index b4f9133..642a71a 100644 --- a/src/plex_api/sdk.py +++ b/src/plex_api/sdk.py @@ -20,7 +20,7 @@ from .video import Video from plex_api import utils from plex_api._hooks import SDKHooks from plex_api.models import components -from typing import Callable, Dict, Union +from typing import Callable, Dict, Optional, Union class PlexAPI: r"""Plex-API: A Plex Media Server API Map @@ -77,14 +77,14 @@ class PlexAPI: protocol: ServerProtocol = None, ip: str = None, port: str = None, - server_idx: int = None, - server_url: str = None, - url_params: Dict[str, str] = None, - client: requests_http.Session = None, - retry_config: utils.RetryConfig = None + server_idx: Optional[int] = None, + server_url: Optional[str] = None, + url_params: Optional[Dict[str, str]] = None, + client: Optional[requests_http.Session] = None, + retry_config: Optional[utils.RetryConfig] = None ) -> None: """Instantiates the SDK configuring it with the provided parameters. - + :param access_token: The access_token required for authentication :type access_token: Union[str, Callable[[], str]] :param protocol: Allows setting the protocol variable for url substitution @@ -106,13 +106,13 @@ class PlexAPI: """ if client is None: client = requests_http.Session() - + if callable(access_token): def security(): return components.Security(access_token = access_token()) else: security = components.Security(access_token = access_token) - + if server_url is not None: if url_params is not None: server_url = utils.template_url(server_url, url_params) @@ -124,7 +124,14 @@ class PlexAPI: }, ] - self.sdk_configuration = SDKConfiguration(client, security, server_url, server_idx, server_defaults, retry_config=retry_config) + self.sdk_configuration = SDKConfiguration( + client, + security, + server_url, + server_idx, + server_defaults, + retry_config=retry_config + ) hooks = SDKHooks() @@ -134,10 +141,11 @@ class PlexAPI: self.sdk_configuration.server_url = server_url # pylint: disable=protected-access - self.sdk_configuration._hooks=hooks - + self.sdk_configuration._hooks = hooks + self._init_sdks() - + + def _init_sdks(self): self.server = Server(self.sdk_configuration) self.media = Media(self.sdk_configuration) @@ -154,4 +162,3 @@ class PlexAPI: self.statistics = Statistics(self.sdk_configuration) self.sessions = Sessions(self.sdk_configuration) self.updater = Updater(self.sdk_configuration) - \ No newline at end of file diff --git a/src/plex_api/sdkconfiguration.py b/src/plex_api/sdkconfiguration.py index 741cd5b..bfbca04 100644 --- a/src/plex_api/sdkconfiguration.py +++ b/src/plex_api/sdkconfiguration.py @@ -32,9 +32,9 @@ class SDKConfiguration: server_defaults: List[Dict[str, str]] = field(default_factory=List) language: str = 'python' openapi_doc_version: str = '0.0.3' - sdk_version: str = '0.4.0' - gen_version: str = '2.279.1' - user_agent: str = 'speakeasy-sdk/python 0.4.0 2.279.1 0.0.3 plex-api-client' + sdk_version: str = '0.4.1' + gen_version: str = '2.280.6' + user_agent: str = 'speakeasy-sdk/python 0.4.1 2.280.6 0.0.3 plex-api-client' retry_config: RetryConfig = None _hooks: SDKHooks = None