Skip to content

Commit

Permalink
ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.459.2
Browse files Browse the repository at this point in the history
  • Loading branch information
speakeasybot committed Dec 21, 2024
1 parent d6ce868 commit e6c93bc
Show file tree
Hide file tree
Showing 92 changed files with 2,506 additions and 2,867 deletions.
44 changes: 19 additions & 25 deletions .speakeasy/gen.lock

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion .speakeasy/gen.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ generation:
oAuth2ClientCredentialsEnabled: true
oAuth2PasswordEnabled: false
python:
version: 0.19.1
version: 0.20.0
additionalDependencies:
dev: {}
main: {}
Expand Down
14 changes: 7 additions & 7 deletions .speakeasy/workflow.lock
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
speakeasyVersion: 1.438.3
speakeasyVersion: 1.459.2
sources:
my-source:
sourceNamespace: my-source
Expand All @@ -8,19 +8,19 @@ sources:
- latest
plexapi:
sourceNamespace: plexapi
sourceRevisionDigest: sha256:37c6bfb15f4154eb89b112465107f20757411f22bd1cc7d0a04335df7127fcb4
sourceBlobDigest: sha256:290473ebc909cada80ff428c685b897f4621cf121397e1417355e06d334e7206
sourceRevisionDigest: sha256:ccba0c42f1644923e2209e28da7a78195a843e48da1aeaaedbf8759f1a8a0fe0
sourceBlobDigest: sha256:b362c110ef633288220a55ab50627374b996c64f2d9b8e020944e84ea2840332
tags:
- latest
- main
- speakeasy-sdk-regen-1734739316
targets:
plexpy:
source: plexapi
sourceNamespace: plexapi
sourceRevisionDigest: sha256:37c6bfb15f4154eb89b112465107f20757411f22bd1cc7d0a04335df7127fcb4
sourceBlobDigest: sha256:290473ebc909cada80ff428c685b897f4621cf121397e1417355e06d334e7206
sourceRevisionDigest: sha256:ccba0c42f1644923e2209e28da7a78195a843e48da1aeaaedbf8759f1a8a0fe0
sourceBlobDigest: sha256:b362c110ef633288220a55ab50627374b996c64f2d9b8e020944e84ea2840332
codeSamplesNamespace: code-samples-python-plexpy
codeSamplesRevisionDigest: sha256:dc4d92eff976b4f84f5b407b04e8a1489653f8e0e8e4bd9743192583a360ca0d
codeSamplesRevisionDigest: sha256:6535e67dae5267bdd609e15a94155f8793e0e60698458cefbd49b01294bd0fca
workflow:
workflowVersion: 1.0.0
speakeasyVersion: latest
Expand Down
216 changes: 97 additions & 119 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,17 +40,25 @@ The following SDKs are generated from the OpenAPI Specification. They are automa

<!-- Start Table of Contents [toc] -->
## Table of Contents
<!-- $toc-max-depth=2 -->
* [plexpy](#plexpy)
* [Plex Media Server OpenAPI Specification](#plex-media-server-openapi-specification)
* [Documentation](#documentation)
* [SDKs](#sdks)
* [SDK Installation](#sdk-installation)
* [IDE Support](#ide-support)
* [SDK Example Usage](#sdk-example-usage)
* [Available Resources and Operations](#available-resources-and-operations)
* [Retries](#retries)
* [Error Handling](#error-handling)
* [Server Selection](#server-selection)
* [Custom HTTP Client](#custom-http-client)
* [Authentication](#authentication)
* [Debugging](#debugging)
* [Development](#development)
* [Maturity](#maturity)
* [Contributions](#contributions)

* [SDK Installation](#sdk-installation)
* [IDE Support](#ide-support)
* [SDK Example Usage](#sdk-example-usage)
* [Available Resources and Operations](#available-resources-and-operations)
* [Retries](#retries)
* [Error Handling](#error-handling)
* [Server Selection](#server-selection)
* [Custom HTTP Client](#custom-http-client)
* [Authentication](#authentication)
* [Debugging](#debugging)
<!-- End Table of Contents [toc] -->

<!-- Start SDK Installation [installation] -->
Expand Down Expand Up @@ -94,20 +102,16 @@ Generally, the SDK will work well with most IDEs out of the box. However, when u
# Synchronous Example
from plex_api_client import PlexAPI

s = PlexAPI(
with PlexAPI(
access_token="<YOUR_API_KEY_HERE>",
client_id="3381b62b-9ab7-4e37-827b-203e9809eb58",
client_name="Plex for Roku",
client_version="2.4.1",
platform="Roku",
device_nickname="Roku 3",
)

res = s.server.get_server_capabilities()

if res.object is not None:
# handle response
pass
) as plex_api:

res = plex_api.server.get_server_capabilities()

assert res.object is not None

# Handle response
print(res.object)
```

</br>
Expand All @@ -119,18 +123,16 @@ import asyncio
from plex_api_client import PlexAPI

async def main():
s = PlexAPI(
async with PlexAPI(
access_token="<YOUR_API_KEY_HERE>",
client_id="3381b62b-9ab7-4e37-827b-203e9809eb58",
client_name="Plex for Roku",
client_version="2.4.1",
platform="Roku",
device_nickname="Roku 3",
)
res = await s.server.get_server_capabilities_async()
if res.object is not None:
# handle response
pass
) as plex_api:

res = await plex_api.server.get_server_capabilities_async()

assert res.object is not None

# Handle response
print(res.object)

asyncio.run(main())
```
Expand Down Expand Up @@ -277,47 +279,39 @@ Some of the endpoints in this SDK support retries. If you use the SDK without an

To change the default retry strategy for a single API call, simply provide a `RetryConfig` object to the call:
```python
from plex_api.utils import BackoffStrategy, RetryConfig
from plex_api_client import PlexAPI
from plex_api_client.utils import BackoffStrategy, RetryConfig

s = PlexAPI(
with PlexAPI(
access_token="<YOUR_API_KEY_HERE>",
client_id="3381b62b-9ab7-4e37-827b-203e9809eb58",
client_name="Plex for Roku",
client_version="2.4.1",
platform="Roku",
device_nickname="Roku 3",
)
) as plex_api:

res = plex_api.server.get_server_capabilities(,
RetryConfig("backoff", BackoffStrategy(1, 50, 1.1, 100), False))

res = s.server.get_server_capabilities(,
RetryConfig("backoff", BackoffStrategy(1, 50, 1.1, 100), False))
assert res.object is not None

if res.object is not None:
# handle response
pass
# Handle response
print(res.object)

```

If you'd like to override the default retry strategy for all operations that support retries, you can use the `retry_config` optional parameter when initializing the SDK:
```python
from plex_api.utils import BackoffStrategy, RetryConfig
from plex_api_client import PlexAPI
from plex_api_client.utils import BackoffStrategy, RetryConfig

s = PlexAPI(
with PlexAPI(
retry_config=RetryConfig("backoff", BackoffStrategy(1, 50, 1.1, 100), False),
access_token="<YOUR_API_KEY_HERE>",
client_id="3381b62b-9ab7-4e37-827b-203e9809eb58",
client_name="Plex for Roku",
client_version="2.4.1",
platform="Roku",
device_nickname="Roku 3",
)
) as plex_api:

res = s.server.get_server_capabilities()
res = plex_api.server.get_server_capabilities()

if res.object is not None:
# handle response
pass
assert res.object is not None

# Handle response
print(res.object)

```
<!-- End Retries [retries] -->
Expand Down Expand Up @@ -350,32 +344,28 @@ When custom error responses are specified for an operation, the SDK may also rai
from plex_api_client import PlexAPI
from plex_api_client.models import errors

s = PlexAPI(
with PlexAPI(
access_token="<YOUR_API_KEY_HERE>",
client_id="3381b62b-9ab7-4e37-827b-203e9809eb58",
client_name="Plex for Roku",
client_version="2.4.1",
platform="Roku",
device_nickname="Roku 3",
)

res = None
try:
res = s.server.get_server_capabilities()

if res.object is not None:
# handle response
pass

except errors.GetServerCapabilitiesBadRequest as e:
# handle e.data: errors.GetServerCapabilitiesBadRequestData
raise(e)
except errors.GetServerCapabilitiesUnauthorized as e:
# handle e.data: errors.GetServerCapabilitiesUnauthorizedData
raise(e)
except errors.SDKError as e:
# handle exception
raise(e)
) as plex_api:
res = None
try:

res = plex_api.server.get_server_capabilities()

assert res.object is not None

# Handle response
print(res.object)

except errors.GetServerCapabilitiesBadRequest as e:
# handle e.data: errors.GetServerCapabilitiesBadRequestData
raise(e)
except errors.GetServerCapabilitiesUnauthorized as e:
# handle e.data: errors.GetServerCapabilitiesUnauthorizedData
raise(e)
except errors.SDKError as e:
# handle exception
raise(e)
```
<!-- End Error Handling [errors] -->

Expand All @@ -395,21 +385,17 @@ The default server can also be overridden globally by passing a URL to the `serv
```python
from plex_api_client import PlexAPI

s = PlexAPI(
with PlexAPI(
server_url="https://10.10.10.47:32400",
access_token="<YOUR_API_KEY_HERE>",
client_id="3381b62b-9ab7-4e37-827b-203e9809eb58",
client_name="Plex for Roku",
client_version="2.4.1",
platform="Roku",
device_nickname="Roku 3",
)
) as plex_api:

res = plex_api.server.get_server_capabilities()

res = s.server.get_server_capabilities()
assert res.object is not None

if res.object is not None:
# handle response
pass
# Handle response
print(res.object)

```

Expand All @@ -419,20 +405,16 @@ The server URL can also be overridden on a per-operation basis, provided a serve
```python
from plex_api_client import PlexAPI

s = PlexAPI(
with PlexAPI(
access_token="<YOUR_API_KEY_HERE>",
client_id="3381b62b-9ab7-4e37-827b-203e9809eb58",
client_name="Plex for Roku",
client_version="2.4.1",
platform="Roku",
device_nickname="Roku 3",
)
) as plex_api:

res = plex_api.plex.get_companions_data(server_url="https://plex.tv/api/v2")

res = s.plex.get_companions_data(server_url="https://plex.tv/api/v2")
assert res.response_bodies is not None

if res.response_bodies is not None:
# handle response
pass
# Handle response
print(res.response_bodies)

```
<!-- End Server Selection [server] -->
Expand Down Expand Up @@ -533,20 +515,16 @@ To authenticate with the API the `access_token` parameter must be set when initi
```python
from plex_api_client import PlexAPI

s = PlexAPI(
with PlexAPI(
access_token="<YOUR_API_KEY_HERE>",
client_id="3381b62b-9ab7-4e37-827b-203e9809eb58",
client_name="Plex for Roku",
client_version="2.4.1",
platform="Roku",
device_nickname="Roku 3",
)

res = s.server.get_server_capabilities()

if res.object is not None:
# handle response
pass
) as plex_api:

res = plex_api.server.get_server_capabilities()

assert res.object is not None

# Handle response
print(res.object)

```
<!-- End Authentication [security] -->
Expand Down
12 changes: 11 additions & 1 deletion RELEASES.md
Original file line number Diff line number Diff line change
Expand Up @@ -868,4 +868,14 @@ Based on:
### Generated
- [python v0.19.1] .
### Releases
- [PyPI v0.19.1] https://pypi.org/project/plex-api-client/0.19.1 - .
- [PyPI v0.19.1] https://pypi.org/project/plex-api-client/0.19.1 - .

## 2024-12-21 00:01:53
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.459.2 (2.483.1) https://github.com/speakeasy-api/speakeasy
### Generated
- [python v0.20.0] .
### Releases
- [PyPI v0.20.0] https://pypi.org/project/plex-api-client/0.20.0 - .
Loading

0 comments on commit e6c93bc

Please sign in to comment.