diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index ea1b0a9..c3e6e0c 100755 --- a/.speakeasy/gen.lock +++ b/.speakeasy/gen.lock @@ -1,12 +1,12 @@ lockVersion: 2.0.0 id: 3eeea668-4ef4-464e-a888-bdfa023bedf5 management: - docChecksum: 9f62ea35c6168986c8e3557d5df50b99 + docChecksum: f387ae03f10decba230886eaab322b20 docVersion: 0.0.3 speakeasyVersion: 1.404.5 generationVersion: 2.426.2 - releaseVersion: 0.15.1 - configChecksum: b2cbdd18b10b3e21e2f755c06d172b90 + releaseVersion: 0.16.0 + configChecksum: 4fb92df989ba28339c266ea7e0e3b960 repoURL: https://github.com/LukeHagar/plexpy.git repoSubDirectory: . installationURL: https://github.com/LukeHagar/plexpy.git @@ -32,6 +32,7 @@ features: methodServerURLs: 3.0.0 nameOverrides: 3.0.0 nullables: 1.0.0 + openEnums: 1.0.0 responseFormat: 1.0.1 retries: 3.0.2 sdkHooks: 1.0.0 @@ -618,6 +619,7 @@ generatedFiles: - docs/models/operations/getserverpreferencesmediacontainer.md - docs/models/operations/getserverpreferencesresponse.md - docs/models/operations/getserverpreferencesresponsebody.md + - docs/models/operations/getserverresourcesglobals.md - docs/models/operations/getserverresourcesrequest.md - docs/models/operations/getserverresourcesresponse.md - docs/models/operations/getsessionhistorymediacontainer.md @@ -1351,6 +1353,7 @@ examples: includeHttps: 1 includeRelay: 1 includeIPv6: 1 + X-Plex-Client-Identifier: "gcgzw5rz2xovp84b4vha3a40" responses: "200": application/json: [] diff --git a/.speakeasy/gen.yaml b/.speakeasy/gen.yaml index eeb0437..b5ee584 100644 --- a/.speakeasy/gen.yaml +++ b/.speakeasy/gen.yaml @@ -12,7 +12,7 @@ generation: auth: oAuth2ClientCredentialsEnabled: true python: - version: 0.15.1 + version: 0.16.0 additionalDependencies: dev: {} main: {} diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock index 12d5437..7d04a97 100644 --- a/.speakeasy/workflow.lock +++ b/.speakeasy/workflow.lock @@ -8,8 +8,8 @@ sources: - latest plexapi: sourceNamespace: plexapi - sourceRevisionDigest: sha256:ed1af8e79d553cc0bf2f8f7975f445d80cb8bd58390bca18d1352577da5ec5ed - sourceBlobDigest: sha256:157db2a169209c18fdca786b671c5da8d2b14dc3005574d08c9d667320869093 + sourceRevisionDigest: sha256:a9bd67eaa35b8311162ae769209f725cc5da16e57976b4928c54594c02cd451c + sourceBlobDigest: sha256:43ddffba137c37d2f64f8db185179a273bcc5ca7242594c932da99d1eb7f3e98 tags: - latest - main @@ -17,10 +17,10 @@ targets: plexpy: source: plexapi sourceNamespace: plexapi - sourceRevisionDigest: sha256:ed1af8e79d553cc0bf2f8f7975f445d80cb8bd58390bca18d1352577da5ec5ed - sourceBlobDigest: sha256:157db2a169209c18fdca786b671c5da8d2b14dc3005574d08c9d667320869093 + sourceRevisionDigest: sha256:a9bd67eaa35b8311162ae769209f725cc5da16e57976b4928c54594c02cd451c + sourceBlobDigest: sha256:43ddffba137c37d2f64f8db185179a273bcc5ca7242594c932da99d1eb7f3e98 codeSamplesNamespace: code-samples-python-plexpy - codeSamplesRevisionDigest: sha256:782c089812c393c0cc078fe6083deb38fb97c1f5bdc8856e983cb825d1ac6e2b + codeSamplesRevisionDigest: sha256:cb858e69b89f682d47639b76ea131528778854c4b0b5a071e7d6759a6b0fa1bd workflow: workflowVersion: 1.0.0 speakeasyVersion: latest diff --git a/README.md b/README.md index d732e09..601292e 100644 --- a/README.md +++ b/README.md @@ -576,7 +576,7 @@ if res.object is not None: Certain parameters are configured globally. These parameters may be set on the SDK client instance itself during initialization. When configured as an option during SDK initialization, These global values will be used as defaults on the operations that use them. When such operations are called, there is a place in each to override the global value, if needed. -For example, you can set `ClientID` to `"gcgzw5rz2xovp84b4vha3a40"` at SDK initialization and then you do not have to pass the same value on calls to operations like `get_pin`. But if you want to do so you may, which will locally override the global setting. See the example code below for a demonstration. +For example, you can set `ClientID` to `"gcgzw5rz2xovp84b4vha3a40"` at SDK initialization and then you do not have to pass the same value on calls to operations like `get_server_resources`. But if you want to do so you may, which will locally override the global setting. See the example code below for a demonstration. ### Available Globals @@ -599,8 +599,10 @@ This is used to track the client application and its usage ```python from plex_api_client import PlexAPI +from plex_api_client.models import operations s = PlexAPI( + access_token="", client_id="gcgzw5rz2xovp84b4vha3a40", client_name="Plex Web", client_version="4.133.0", @@ -608,9 +610,9 @@ s = PlexAPI( device_name="Linux", ) -res = s.plex.get_pin(request={}) +res = s.plex.get_server_resources(include_https=operations.IncludeHTTPS.ENABLE, include_relay=operations.IncludeRelay.ENABLE, include_i_pv6=operations.IncludeIPv6.ENABLE, client_id="gcgzw5rz2xovp84b4vha3a40") -if res.auth_pin_container is not None: +if res.plex_devices is not None: # handle response pass diff --git a/RELEASES.md b/RELEASES.md index ddee09d..5b11dcb 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -798,4 +798,14 @@ Based on: ### Generated - [python v0.15.1] . ### Releases -- [PyPI v0.15.1] https://pypi.org/project/plex-api-client/0.15.1 - . \ No newline at end of file +- [PyPI v0.15.1] https://pypi.org/project/plex-api-client/0.15.1 - . + +## 2024-09-30 00:01:11 +### Changes +Based on: +- OpenAPI Doc +- Speakeasy CLI 1.404.5 (2.426.2) https://github.com/speakeasy-api/speakeasy +### Generated +- [python v0.16.0] . +### Releases +- [PyPI v0.16.0] https://pypi.org/project/plex-api-client/0.16.0 - . \ No newline at end of file diff --git a/codeSamples.yaml b/codeSamples.yaml index 3efa58b..bdac6a0 100644 --- a/codeSamples.yaml +++ b/codeSamples.yaml @@ -1369,7 +1369,7 @@ actions: device_name="Linux", ) - res = s.plex.get_server_resources(include_https=operations.IncludeHTTPS.ENABLE, include_relay=operations.IncludeRelay.ENABLE, include_i_pv6=operations.IncludeIPv6.ENABLE) + res = s.plex.get_server_resources(include_https=operations.IncludeHTTPS.ENABLE, include_relay=operations.IncludeRelay.ENABLE, include_i_pv6=operations.IncludeIPv6.ENABLE, client_id="gcgzw5rz2xovp84b4vha3a40") if res.plex_devices is not None: # handle response diff --git a/docs/models/operations/features.md b/docs/models/operations/features.md index 057a174..08ed7b2 100644 --- a/docs/models/operations/features.md +++ b/docs/models/operations/features.md @@ -12,28 +12,43 @@ | `TREBLE_SHOW_FEATURES` | TREBLE-show-features | | `AD_COUNTDOWN_TIMER` | ad-countdown-timer | | `ADAPTIVE_BITRATE` | adaptive_bitrate | +| `ALBUM_TYPES` | album-types | +| `ALLOW_DVR` | allow_dvr | | `AMAZON_LOOP_DEBUG` | amazon-loop-debug | | `AVOD_AD_ANALYSIS` | avod-ad-analysis | | `AVOD_NEW_MEDIA` | avod-new-media | | `BLACKLIST_GET_SIGNIN` | blacklist_get_signin | +| `BOOST_VOICES` | boost-voices | +| `CAMERA_UPLOAD` | camera_upload | | `CLIENT_RADIO_STATIONS` | client-radio-stations | | `CLOUDFLARE_TURNSTILE_REQUIRED` | cloudflare-turnstile-required | +| `CLOUDSYNC` | cloudsync | | `COLLECTIONS` | collections | | `COMMENTS_AND_REPLIES_PUSH_NOTIFICATIONS` | comments_and_replies_push_notifications | | `COMMUNITY_ACCESS_PLEX_TV` | community_access_plex_tv | | `COMPANIONS_SONOS` | companions_sonos | +| `CONTENT_FILTER` | content_filter | | `CUSTOM_HOME_REMOVAL` | custom-home-removal | | `DISABLE_HOME_USER_FRIENDSHIPS` | disable_home_user_friendships | | `DISABLE_SHARING_FRIENDSHIPS` | disable_sharing_friendships | +| `DOWNLOADS_GATING` | downloads-gating | | `DRM_SUPPORT` | drm_support | +| `DVR` | dvr | +| `DVR_BLOCK_UNSUPPORTED_COUNTRIES` | dvr-block-unsupported-countries | +| `EPG_RECENT_CHANNELS` | epg-recent-channels | | `EXCLUDE_RESTRICTIONS` | exclude restrictions | | `FEDERATED_AUTH` | federated-auth | | `FRIEND_REQUEST_PUSH_NOTIFICATIONS` | friend_request_push_notifications | +| `GRANDFATHER_SYNC` | grandfather-sync | | `GUIDED_UPGRADE` | guided-upgrade | +| `HARDWARE_TRANSCODING` | hardware_transcoding | | `HOME` | home | +| `HWTRANSCODE` | hwtranscode | +| `IMAGGA_V2` | imagga-v2 | | `INCREASE_PASSWORD_COMPLEXITY` | increase-password-complexity | | `IOS14_PRIVACY_BANNER` | ios14-privacy-banner | | `ITERABLE_NOTIFICATION_TOKENS` | iterable-notification-tokens | +| `ITEM_CLUSTERS` | item_clusters | | `KEEP_PAYMENT_METHOD` | keep-payment-method | | `KEVIN_BACON` | kevin-bacon | | `KOREA_CONSENT` | korea-consent | @@ -42,25 +57,46 @@ | `LIGHTNING_DVR_PIVOT` | lightning-dvr-pivot | | `LIVE_TV_SUPPORT_INCOMPLETE_SEGMENTS` | live-tv-support-incomplete-segments | | `LIVETV` | livetv | +| `LYRICS` | lyrics | | `METADATA_SEARCH` | metadata_search | +| `MUSIC_ANALYSIS` | music-analysis | +| `MUSIC_VIDEOS` | music_videos | | `NEW_PLEX_PASS_PRICES` | new_plex_pass_prices | | `NEWS_PROVIDER_SUNSET_MODAL` | news-provider-sunset-modal | +| `NOMINATIM` | nominatim | +| `PASS` | pass | | `PHOTOS_FAVORITES` | photos-favorites | | `PHOTOS_METADATA_EDITION` | photos-metadata-edition | +| `PHOTOS_V6_EDIT` | photosV6-edit | +| `PHOTOS_V6_TV_ALBUMS` | photosV6-tv-albums | | `PMS_HEALTH` | pms_health | +| `PREMIUM_DASHBOARD` | premium-dashboard | +| `PREMIUM_MUSIC_METADATA` | premium_music_metadata | | `RADIO` | radio | | `RATE_LIMIT_CLIENT_TOKEN` | rate-limit-client-token | | `SCROBBLING_SERVICE_PLEX_TV` | scrobbling-service-plex-tv | +| `SESSION_BANDWIDTH_RESTRICTIONS` | session_bandwidth_restrictions | +| `SESSION_KICK` | session_kick | | `SHARED_SERVER_NOTIFICATION` | shared_server_notification | | `SHARED_SOURCE_NOTIFICATION` | shared_source_notification | +| `SIGNIN_NOTIFICATION` | signin_notification | | `SIGNIN_WITH_APPLE` | signin_with_apple | +| `SILENCE_REMOVAL` | silence-removal | +| `SLEEP_TIMER` | sleep-timer | | `SPRING_SERVE_AD_PROVIDER` | spring_serve_ad_provider | +| `SYNC` | sync | +| `SWEET_FADES` | sweet-fades | | `TRANSCODER_CACHE` | transcoder_cache | +| `TRAILERS` | trailers | | `TUNER_SHARING` | tuner-sharing | | `TWO_FACTOR_AUTHENTICATION` | two-factor-authentication | | `UNSUPPORTEDTUNERS` | unsupportedtuners | | `UPGRADE_3DS2` | upgrade-3ds2 | +| `VISUALIZERS` | visualizers | | `VOD_SCHEMA` | vod-schema | | `VOD_CLOUDFLARE` | vod_cloudflare | +| `VOLUME_LEVELING` | volume-leveling | | `WATCH_TOGETHER_INVITE` | watch-together-invite | -| `WEB_SERVER_DASHBOARD` | web_server_dashboard | \ No newline at end of file +| `WATCHLIST_RSS` | watchlist-rss | +| `WEB_SERVER_DASHBOARD` | web_server_dashboard | +| `WEBHOOKS` | webhooks | \ No newline at end of file diff --git a/docs/models/operations/getserverresourcesglobals.md b/docs/models/operations/getserverresourcesglobals.md new file mode 100644 index 0000000..10585ba --- /dev/null +++ b/docs/models/operations/getserverresourcesglobals.md @@ -0,0 +1,8 @@ +# GetServerResourcesGlobals + + +## Fields + +| Field | Type | Required | Description | Example | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `client_id` | *Optional[str]* | :heavy_minus_sign: | The unique identifier for the client application
This is used to track the client application and its usage
(UUID, serial number, or other number unique per device)
| gcgzw5rz2xovp84b4vha3a40 | \ No newline at end of file diff --git a/docs/models/operations/getserverresourcesrequest.md b/docs/models/operations/getserverresourcesrequest.md index fe0397a..9ca7d8d 100644 --- a/docs/models/operations/getserverresourcesrequest.md +++ b/docs/models/operations/getserverresourcesrequest.md @@ -3,8 +3,9 @@ ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | -| `include_https` | [Optional[operations.IncludeHTTPS]](../../models/operations/includehttps.md) | :heavy_minus_sign: | Include Https entries in the results | 1 | -| `include_relay` | [Optional[operations.IncludeRelay]](../../models/operations/includerelay.md) | :heavy_minus_sign: | Include Relay addresses in the results
E.g: https://10-0-0-25.bbf8e10c7fa20447cacee74cd9914cde.plex.direct:32400
| 1 | -| `include_i_pv6` | [Optional[operations.IncludeIPv6]](../../models/operations/includeipv6.md) | :heavy_minus_sign: | Include IPv6 entries in the results | 1 | \ No newline at end of file +| Field | Type | Required | Description | Example | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `include_https` | [Optional[operations.IncludeHTTPS]](../../models/operations/includehttps.md) | :heavy_minus_sign: | Include Https entries in the results | 1 | +| `include_relay` | [Optional[operations.IncludeRelay]](../../models/operations/includerelay.md) | :heavy_minus_sign: | Include Relay addresses in the results
E.g: https://10-0-0-25.bbf8e10c7fa20447cacee74cd9914cde.plex.direct:32400
| 1 | +| `include_i_pv6` | [Optional[operations.IncludeIPv6]](../../models/operations/includeipv6.md) | :heavy_minus_sign: | Include IPv6 entries in the results | 1 | +| `client_id` | *Optional[str]* | :heavy_minus_sign: | The unique identifier for the client application
This is used to track the client application and its usage
(UUID, serial number, or other number unique per device)
| gcgzw5rz2xovp84b4vha3a40 | \ No newline at end of file diff --git a/docs/models/operations/gettokendetailsfeatures.md b/docs/models/operations/gettokendetailsfeatures.md index dd9651c..6b7e750 100644 --- a/docs/models/operations/gettokendetailsfeatures.md +++ b/docs/models/operations/gettokendetailsfeatures.md @@ -12,28 +12,43 @@ | `TREBLE_SHOW_FEATURES` | TREBLE-show-features | | `AD_COUNTDOWN_TIMER` | ad-countdown-timer | | `ADAPTIVE_BITRATE` | adaptive_bitrate | +| `ALBUM_TYPES` | album-types | +| `ALLOW_DVR` | allow_dvr | | `AMAZON_LOOP_DEBUG` | amazon-loop-debug | | `AVOD_AD_ANALYSIS` | avod-ad-analysis | | `AVOD_NEW_MEDIA` | avod-new-media | | `BLACKLIST_GET_SIGNIN` | blacklist_get_signin | +| `BOOST_VOICES` | boost-voices | +| `CAMERA_UPLOAD` | camera_upload | | `CLIENT_RADIO_STATIONS` | client-radio-stations | | `CLOUDFLARE_TURNSTILE_REQUIRED` | cloudflare-turnstile-required | +| `CLOUDSYNC` | cloudsync | | `COLLECTIONS` | collections | | `COMMENTS_AND_REPLIES_PUSH_NOTIFICATIONS` | comments_and_replies_push_notifications | | `COMMUNITY_ACCESS_PLEX_TV` | community_access_plex_tv | | `COMPANIONS_SONOS` | companions_sonos | +| `CONTENT_FILTER` | content_filter | | `CUSTOM_HOME_REMOVAL` | custom-home-removal | | `DISABLE_HOME_USER_FRIENDSHIPS` | disable_home_user_friendships | | `DISABLE_SHARING_FRIENDSHIPS` | disable_sharing_friendships | +| `DOWNLOADS_GATING` | downloads-gating | | `DRM_SUPPORT` | drm_support | +| `DVR` | dvr | +| `DVR_BLOCK_UNSUPPORTED_COUNTRIES` | dvr-block-unsupported-countries | +| `EPG_RECENT_CHANNELS` | epg-recent-channels | | `EXCLUDE_RESTRICTIONS` | exclude restrictions | | `FEDERATED_AUTH` | federated-auth | | `FRIEND_REQUEST_PUSH_NOTIFICATIONS` | friend_request_push_notifications | +| `GRANDFATHER_SYNC` | grandfather-sync | | `GUIDED_UPGRADE` | guided-upgrade | +| `HARDWARE_TRANSCODING` | hardware_transcoding | | `HOME` | home | +| `HWTRANSCODE` | hwtranscode | +| `IMAGGA_V2` | imagga-v2 | | `INCREASE_PASSWORD_COMPLEXITY` | increase-password-complexity | | `IOS14_PRIVACY_BANNER` | ios14-privacy-banner | | `ITERABLE_NOTIFICATION_TOKENS` | iterable-notification-tokens | +| `ITEM_CLUSTERS` | item_clusters | | `KEEP_PAYMENT_METHOD` | keep-payment-method | | `KEVIN_BACON` | kevin-bacon | | `KOREA_CONSENT` | korea-consent | @@ -42,25 +57,46 @@ | `LIGHTNING_DVR_PIVOT` | lightning-dvr-pivot | | `LIVE_TV_SUPPORT_INCOMPLETE_SEGMENTS` | live-tv-support-incomplete-segments | | `LIVETV` | livetv | +| `LYRICS` | lyrics | | `METADATA_SEARCH` | metadata_search | +| `MUSIC_ANALYSIS` | music-analysis | +| `MUSIC_VIDEOS` | music_videos | | `NEW_PLEX_PASS_PRICES` | new_plex_pass_prices | | `NEWS_PROVIDER_SUNSET_MODAL` | news-provider-sunset-modal | +| `NOMINATIM` | nominatim | +| `PASS` | pass | | `PHOTOS_FAVORITES` | photos-favorites | | `PHOTOS_METADATA_EDITION` | photos-metadata-edition | +| `PHOTOS_V6_EDIT` | photosV6-edit | +| `PHOTOS_V6_TV_ALBUMS` | photosV6-tv-albums | | `PMS_HEALTH` | pms_health | +| `PREMIUM_DASHBOARD` | premium-dashboard | +| `PREMIUM_MUSIC_METADATA` | premium_music_metadata | | `RADIO` | radio | | `RATE_LIMIT_CLIENT_TOKEN` | rate-limit-client-token | | `SCROBBLING_SERVICE_PLEX_TV` | scrobbling-service-plex-tv | +| `SESSION_BANDWIDTH_RESTRICTIONS` | session_bandwidth_restrictions | +| `SESSION_KICK` | session_kick | | `SHARED_SERVER_NOTIFICATION` | shared_server_notification | | `SHARED_SOURCE_NOTIFICATION` | shared_source_notification | +| `SIGNIN_NOTIFICATION` | signin_notification | | `SIGNIN_WITH_APPLE` | signin_with_apple | +| `SILENCE_REMOVAL` | silence-removal | +| `SLEEP_TIMER` | sleep-timer | | `SPRING_SERVE_AD_PROVIDER` | spring_serve_ad_provider | +| `SYNC` | sync | +| `SWEET_FADES` | sweet-fades | | `TRANSCODER_CACHE` | transcoder_cache | +| `TRAILERS` | trailers | | `TUNER_SHARING` | tuner-sharing | | `TWO_FACTOR_AUTHENTICATION` | two-factor-authentication | | `UNSUPPORTEDTUNERS` | unsupportedtuners | | `UPGRADE_3DS2` | upgrade-3ds2 | +| `VISUALIZERS` | visualizers | | `VOD_SCHEMA` | vod-schema | | `VOD_CLOUDFLARE` | vod_cloudflare | +| `VOLUME_LEVELING` | volume-leveling | | `WATCH_TOGETHER_INVITE` | watch-together-invite | -| `WEB_SERVER_DASHBOARD` | web_server_dashboard | \ No newline at end of file +| `WATCHLIST_RSS` | watchlist-rss | +| `WEB_SERVER_DASHBOARD` | web_server_dashboard | +| `WEBHOOKS` | webhooks | \ No newline at end of file diff --git a/docs/models/operations/postuserssignindataauthenticationfeatures.md b/docs/models/operations/postuserssignindataauthenticationfeatures.md index 48b4a79..39572d6 100644 --- a/docs/models/operations/postuserssignindataauthenticationfeatures.md +++ b/docs/models/operations/postuserssignindataauthenticationfeatures.md @@ -12,28 +12,43 @@ | `TREBLE_SHOW_FEATURES` | TREBLE-show-features | | `AD_COUNTDOWN_TIMER` | ad-countdown-timer | | `ADAPTIVE_BITRATE` | adaptive_bitrate | +| `ALBUM_TYPES` | album-types | +| `ALLOW_DVR` | allow_dvr | | `AMAZON_LOOP_DEBUG` | amazon-loop-debug | | `AVOD_AD_ANALYSIS` | avod-ad-analysis | | `AVOD_NEW_MEDIA` | avod-new-media | | `BLACKLIST_GET_SIGNIN` | blacklist_get_signin | +| `BOOST_VOICES` | boost-voices | +| `CAMERA_UPLOAD` | camera_upload | | `CLIENT_RADIO_STATIONS` | client-radio-stations | | `CLOUDFLARE_TURNSTILE_REQUIRED` | cloudflare-turnstile-required | +| `CLOUDSYNC` | cloudsync | | `COLLECTIONS` | collections | | `COMMENTS_AND_REPLIES_PUSH_NOTIFICATIONS` | comments_and_replies_push_notifications | | `COMMUNITY_ACCESS_PLEX_TV` | community_access_plex_tv | | `COMPANIONS_SONOS` | companions_sonos | +| `CONTENT_FILTER` | content_filter | | `CUSTOM_HOME_REMOVAL` | custom-home-removal | | `DISABLE_HOME_USER_FRIENDSHIPS` | disable_home_user_friendships | | `DISABLE_SHARING_FRIENDSHIPS` | disable_sharing_friendships | +| `DOWNLOADS_GATING` | downloads-gating | | `DRM_SUPPORT` | drm_support | +| `DVR` | dvr | +| `DVR_BLOCK_UNSUPPORTED_COUNTRIES` | dvr-block-unsupported-countries | +| `EPG_RECENT_CHANNELS` | epg-recent-channels | | `EXCLUDE_RESTRICTIONS` | exclude restrictions | | `FEDERATED_AUTH` | federated-auth | | `FRIEND_REQUEST_PUSH_NOTIFICATIONS` | friend_request_push_notifications | +| `GRANDFATHER_SYNC` | grandfather-sync | | `GUIDED_UPGRADE` | guided-upgrade | +| `HARDWARE_TRANSCODING` | hardware_transcoding | | `HOME` | home | +| `HWTRANSCODE` | hwtranscode | +| `IMAGGA_V2` | imagga-v2 | | `INCREASE_PASSWORD_COMPLEXITY` | increase-password-complexity | | `IOS14_PRIVACY_BANNER` | ios14-privacy-banner | | `ITERABLE_NOTIFICATION_TOKENS` | iterable-notification-tokens | +| `ITEM_CLUSTERS` | item_clusters | | `KEEP_PAYMENT_METHOD` | keep-payment-method | | `KEVIN_BACON` | kevin-bacon | | `KOREA_CONSENT` | korea-consent | @@ -42,25 +57,46 @@ | `LIGHTNING_DVR_PIVOT` | lightning-dvr-pivot | | `LIVE_TV_SUPPORT_INCOMPLETE_SEGMENTS` | live-tv-support-incomplete-segments | | `LIVETV` | livetv | +| `LYRICS` | lyrics | | `METADATA_SEARCH` | metadata_search | +| `MUSIC_ANALYSIS` | music-analysis | +| `MUSIC_VIDEOS` | music_videos | | `NEW_PLEX_PASS_PRICES` | new_plex_pass_prices | | `NEWS_PROVIDER_SUNSET_MODAL` | news-provider-sunset-modal | +| `NOMINATIM` | nominatim | +| `PASS` | pass | | `PHOTOS_FAVORITES` | photos-favorites | | `PHOTOS_METADATA_EDITION` | photos-metadata-edition | +| `PHOTOS_V6_EDIT` | photosV6-edit | +| `PHOTOS_V6_TV_ALBUMS` | photosV6-tv-albums | | `PMS_HEALTH` | pms_health | +| `PREMIUM_DASHBOARD` | premium-dashboard | +| `PREMIUM_MUSIC_METADATA` | premium_music_metadata | | `RADIO` | radio | | `RATE_LIMIT_CLIENT_TOKEN` | rate-limit-client-token | | `SCROBBLING_SERVICE_PLEX_TV` | scrobbling-service-plex-tv | +| `SESSION_BANDWIDTH_RESTRICTIONS` | session_bandwidth_restrictions | +| `SESSION_KICK` | session_kick | | `SHARED_SERVER_NOTIFICATION` | shared_server_notification | | `SHARED_SOURCE_NOTIFICATION` | shared_source_notification | +| `SIGNIN_NOTIFICATION` | signin_notification | | `SIGNIN_WITH_APPLE` | signin_with_apple | +| `SILENCE_REMOVAL` | silence-removal | +| `SLEEP_TIMER` | sleep-timer | | `SPRING_SERVE_AD_PROVIDER` | spring_serve_ad_provider | +| `SYNC` | sync | +| `SWEET_FADES` | sweet-fades | | `TRANSCODER_CACHE` | transcoder_cache | +| `TRAILERS` | trailers | | `TUNER_SHARING` | tuner-sharing | | `TWO_FACTOR_AUTHENTICATION` | two-factor-authentication | | `UNSUPPORTEDTUNERS` | unsupportedtuners | | `UPGRADE_3DS2` | upgrade-3ds2 | +| `VISUALIZERS` | visualizers | | `VOD_SCHEMA` | vod-schema | | `VOD_CLOUDFLARE` | vod_cloudflare | +| `VOLUME_LEVELING` | volume-leveling | | `WATCH_TOGETHER_INVITE` | watch-together-invite | -| `WEB_SERVER_DASHBOARD` | web_server_dashboard | \ No newline at end of file +| `WATCHLIST_RSS` | watchlist-rss | +| `WEB_SERVER_DASHBOARD` | web_server_dashboard | +| `WEBHOOKS` | webhooks | \ No newline at end of file diff --git a/docs/models/operations/postuserssignindatafeatures.md b/docs/models/operations/postuserssignindatafeatures.md index 9f4209b..08a5646 100644 --- a/docs/models/operations/postuserssignindatafeatures.md +++ b/docs/models/operations/postuserssignindatafeatures.md @@ -12,28 +12,43 @@ | `TREBLE_SHOW_FEATURES` | TREBLE-show-features | | `AD_COUNTDOWN_TIMER` | ad-countdown-timer | | `ADAPTIVE_BITRATE` | adaptive_bitrate | +| `ALBUM_TYPES` | album-types | +| `ALLOW_DVR` | allow_dvr | | `AMAZON_LOOP_DEBUG` | amazon-loop-debug | | `AVOD_AD_ANALYSIS` | avod-ad-analysis | | `AVOD_NEW_MEDIA` | avod-new-media | | `BLACKLIST_GET_SIGNIN` | blacklist_get_signin | +| `BOOST_VOICES` | boost-voices | +| `CAMERA_UPLOAD` | camera_upload | | `CLIENT_RADIO_STATIONS` | client-radio-stations | | `CLOUDFLARE_TURNSTILE_REQUIRED` | cloudflare-turnstile-required | +| `CLOUDSYNC` | cloudsync | | `COLLECTIONS` | collections | | `COMMENTS_AND_REPLIES_PUSH_NOTIFICATIONS` | comments_and_replies_push_notifications | | `COMMUNITY_ACCESS_PLEX_TV` | community_access_plex_tv | | `COMPANIONS_SONOS` | companions_sonos | +| `CONTENT_FILTER` | content_filter | | `CUSTOM_HOME_REMOVAL` | custom-home-removal | | `DISABLE_HOME_USER_FRIENDSHIPS` | disable_home_user_friendships | | `DISABLE_SHARING_FRIENDSHIPS` | disable_sharing_friendships | +| `DOWNLOADS_GATING` | downloads-gating | | `DRM_SUPPORT` | drm_support | +| `DVR` | dvr | +| `DVR_BLOCK_UNSUPPORTED_COUNTRIES` | dvr-block-unsupported-countries | +| `EPG_RECENT_CHANNELS` | epg-recent-channels | | `EXCLUDE_RESTRICTIONS` | exclude restrictions | | `FEDERATED_AUTH` | federated-auth | | `FRIEND_REQUEST_PUSH_NOTIFICATIONS` | friend_request_push_notifications | +| `GRANDFATHER_SYNC` | grandfather-sync | | `GUIDED_UPGRADE` | guided-upgrade | +| `HARDWARE_TRANSCODING` | hardware_transcoding | | `HOME` | home | +| `HWTRANSCODE` | hwtranscode | +| `IMAGGA_V2` | imagga-v2 | | `INCREASE_PASSWORD_COMPLEXITY` | increase-password-complexity | | `IOS14_PRIVACY_BANNER` | ios14-privacy-banner | | `ITERABLE_NOTIFICATION_TOKENS` | iterable-notification-tokens | +| `ITEM_CLUSTERS` | item_clusters | | `KEEP_PAYMENT_METHOD` | keep-payment-method | | `KEVIN_BACON` | kevin-bacon | | `KOREA_CONSENT` | korea-consent | @@ -42,25 +57,46 @@ | `LIGHTNING_DVR_PIVOT` | lightning-dvr-pivot | | `LIVE_TV_SUPPORT_INCOMPLETE_SEGMENTS` | live-tv-support-incomplete-segments | | `LIVETV` | livetv | +| `LYRICS` | lyrics | | `METADATA_SEARCH` | metadata_search | +| `MUSIC_ANALYSIS` | music-analysis | +| `MUSIC_VIDEOS` | music_videos | | `NEW_PLEX_PASS_PRICES` | new_plex_pass_prices | | `NEWS_PROVIDER_SUNSET_MODAL` | news-provider-sunset-modal | +| `NOMINATIM` | nominatim | +| `PASS` | pass | | `PHOTOS_FAVORITES` | photos-favorites | | `PHOTOS_METADATA_EDITION` | photos-metadata-edition | +| `PHOTOS_V6_EDIT` | photosV6-edit | +| `PHOTOS_V6_TV_ALBUMS` | photosV6-tv-albums | | `PMS_HEALTH` | pms_health | +| `PREMIUM_DASHBOARD` | premium-dashboard | +| `PREMIUM_MUSIC_METADATA` | premium_music_metadata | | `RADIO` | radio | | `RATE_LIMIT_CLIENT_TOKEN` | rate-limit-client-token | | `SCROBBLING_SERVICE_PLEX_TV` | scrobbling-service-plex-tv | +| `SESSION_BANDWIDTH_RESTRICTIONS` | session_bandwidth_restrictions | +| `SESSION_KICK` | session_kick | | `SHARED_SERVER_NOTIFICATION` | shared_server_notification | | `SHARED_SOURCE_NOTIFICATION` | shared_source_notification | +| `SIGNIN_NOTIFICATION` | signin_notification | | `SIGNIN_WITH_APPLE` | signin_with_apple | +| `SILENCE_REMOVAL` | silence-removal | +| `SLEEP_TIMER` | sleep-timer | | `SPRING_SERVE_AD_PROVIDER` | spring_serve_ad_provider | +| `SYNC` | sync | +| `SWEET_FADES` | sweet-fades | | `TRANSCODER_CACHE` | transcoder_cache | +| `TRAILERS` | trailers | | `TUNER_SHARING` | tuner-sharing | | `TWO_FACTOR_AUTHENTICATION` | two-factor-authentication | | `UNSUPPORTEDTUNERS` | unsupportedtuners | | `UPGRADE_3DS2` | upgrade-3ds2 | +| `VISUALIZERS` | visualizers | | `VOD_SCHEMA` | vod-schema | | `VOD_CLOUDFLARE` | vod_cloudflare | +| `VOLUME_LEVELING` | volume-leveling | | `WATCH_TOGETHER_INVITE` | watch-together-invite | -| `WEB_SERVER_DASHBOARD` | web_server_dashboard | \ No newline at end of file +| `WATCHLIST_RSS` | watchlist-rss | +| `WEB_SERVER_DASHBOARD` | web_server_dashboard | +| `WEBHOOKS` | webhooks | \ No newline at end of file diff --git a/docs/sdks/plex/README.md b/docs/sdks/plex/README.md index 7860181..2f75d58 100644 --- a/docs/sdks/plex/README.md +++ b/docs/sdks/plex/README.md @@ -217,7 +217,7 @@ s = PlexAPI( device_name="Linux", ) -res = s.plex.get_server_resources(include_https=operations.IncludeHTTPS.ENABLE, include_relay=operations.IncludeRelay.ENABLE, include_i_pv6=operations.IncludeIPv6.ENABLE) +res = s.plex.get_server_resources(include_https=operations.IncludeHTTPS.ENABLE, include_relay=operations.IncludeRelay.ENABLE, include_i_pv6=operations.IncludeIPv6.ENABLE, client_id="gcgzw5rz2xovp84b4vha3a40") if res.plex_devices is not None: # handle response @@ -227,13 +227,14 @@ if res.plex_devices is not None: ### Parameters -| Parameter | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | -| `include_https` | [Optional[operations.IncludeHTTPS]](../../models/operations/includehttps.md) | :heavy_minus_sign: | Include Https entries in the results | 1 | -| `include_relay` | [Optional[operations.IncludeRelay]](../../models/operations/includerelay.md) | :heavy_minus_sign: | Include Relay addresses in the results
E.g: https://10-0-0-25.bbf8e10c7fa20447cacee74cd9914cde.plex.direct:32400
| 1 | -| `include_i_pv6` | [Optional[operations.IncludeIPv6]](../../models/operations/includeipv6.md) | :heavy_minus_sign: | Include IPv6 entries in the results | 1 | -| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | | -| `server_url` | *Optional[str]* | :heavy_minus_sign: | An optional server URL to use. | http://localhost:8080 | +| Parameter | Type | Required | Description | Example | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `include_https` | [Optional[operations.IncludeHTTPS]](../../models/operations/includehttps.md) | :heavy_minus_sign: | Include Https entries in the results | 1 | +| `include_relay` | [Optional[operations.IncludeRelay]](../../models/operations/includerelay.md) | :heavy_minus_sign: | Include Relay addresses in the results
E.g: https://10-0-0-25.bbf8e10c7fa20447cacee74cd9914cde.plex.direct:32400
| 1 | +| `include_i_pv6` | [Optional[operations.IncludeIPv6]](../../models/operations/includeipv6.md) | :heavy_minus_sign: | Include IPv6 entries in the results | 1 | +| `client_id` | *Optional[str]* | :heavy_minus_sign: | The unique identifier for the client application
This is used to track the client application and its usage
(UUID, serial number, or other number unique per device)
| gcgzw5rz2xovp84b4vha3a40 | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | | +| `server_url` | *Optional[str]* | :heavy_minus_sign: | An optional server URL to use. | http://localhost:8080 | ### Response diff --git a/pyproject.toml b/pyproject.toml index f202315..ff9d7e5 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "plex-api-client" -version = "0.15.1" +version = "0.16.0" description = "Python Client SDK Generated by Speakeasy" authors = ["Speakeasy",] readme = "README-PYPI.md" diff --git a/src/plex_api_client/models/operations/__init__.py b/src/plex_api_client/models/operations/__init__.py index c96b677..753fd00 100644 --- a/src/plex_api_client/models/operations/__init__.py +++ b/src/plex_api_client/models/operations/__init__.py @@ -380,6 +380,8 @@ from .get_server_resources import ( Connections, ConnectionsTypedDict, GET_SERVER_RESOURCES_SERVERS, + GetServerResourcesGlobals, + GetServerResourcesGlobalsTypedDict, GetServerResourcesRequest, GetServerResourcesRequestTypedDict, GetServerResourcesResponse, @@ -1562,6 +1564,8 @@ __all__ = [ "GetServerPreferencesResponseBody", "GetServerPreferencesResponseBodyTypedDict", "GetServerPreferencesResponseTypedDict", + "GetServerResourcesGlobals", + "GetServerResourcesGlobalsTypedDict", "GetServerResourcesRequest", "GetServerResourcesRequestTypedDict", "GetServerResourcesResponse", diff --git a/src/plex_api_client/models/operations/get_server_resources.py b/src/plex_api_client/models/operations/get_server_resources.py index ec8f1b4..dec3bff 100644 --- a/src/plex_api_client/models/operations/get_server_resources.py +++ b/src/plex_api_client/models/operations/get_server_resources.py @@ -16,6 +16,28 @@ GET_SERVER_RESOURCES_SERVERS = [ ] +class GetServerResourcesGlobalsTypedDict(TypedDict): + client_id: NotRequired[str] + r"""The unique identifier for the client application + This is used to track the client application and its usage + (UUID, serial number, or other number unique per device) + + """ + + +class GetServerResourcesGlobals(BaseModel): + client_id: Annotated[ + Optional[str], + pydantic.Field(alias="X-Plex-Client-Identifier"), + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = None + r"""The unique identifier for the client application + This is used to track the client application and its usage + (UUID, serial number, or other number unique per device) + + """ + + class IncludeHTTPS(int, Enum): r"""Include Https entries in the results""" @@ -50,6 +72,12 @@ class GetServerResourcesRequestTypedDict(TypedDict): """ include_i_pv6: NotRequired[IncludeIPv6] r"""Include IPv6 entries in the results""" + client_id: NotRequired[str] + r"""The unique identifier for the client application + This is used to track the client application and its usage + (UUID, serial number, or other number unique per device) + + """ class GetServerResourcesRequest(BaseModel): @@ -77,6 +105,17 @@ class GetServerResourcesRequest(BaseModel): ] = IncludeIPv6.DISABLE r"""Include IPv6 entries in the results""" + client_id: Annotated[ + Optional[str], + pydantic.Field(alias="X-Plex-Client-Identifier"), + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = None + r"""The unique identifier for the client application + This is used to track the client application and its usage + (UUID, serial number, or other number unique per device) + + """ + class Protocol(str, Enum): r"""The protocol used for the connection (http, https, etc)""" diff --git a/src/plex_api_client/models/operations/gettokendetails.py b/src/plex_api_client/models/operations/gettokendetails.py index 457141c..4f570d1 100644 --- a/src/plex_api_client/models/operations/gettokendetails.py +++ b/src/plex_api_client/models/operations/gettokendetails.py @@ -4,6 +4,7 @@ from __future__ import annotations from datetime import datetime from enum import Enum import httpx +from plex_api_client import utils from plex_api_client.types import ( BaseModel, Nullable, @@ -11,8 +12,10 @@ from plex_api_client.types import ( UNSET, UNSET_SENTINEL, ) +from plex_api_client.utils import validate_open_enum import pydantic from pydantic import model_serializer +from pydantic.functional_validators import PlainValidator from typing import List, Optional, TypedDict from typing_extensions import Annotated, NotRequired @@ -207,7 +210,7 @@ class Services(BaseModel): return m -class Features(str, Enum): +class Features(str, Enum, metaclass=utils.OpenEnumMeta): ANDROID_DOLBY_VISION = "Android - Dolby Vision" ANDROID_PI_P = "Android - PiP" CU_SUNSET = "CU Sunset" @@ -215,28 +218,43 @@ class Features(str, Enum): TREBLE_SHOW_FEATURES = "TREBLE-show-features" AD_COUNTDOWN_TIMER = "ad-countdown-timer" ADAPTIVE_BITRATE = "adaptive_bitrate" + ALBUM_TYPES = "album-types" + ALLOW_DVR = "allow_dvr" AMAZON_LOOP_DEBUG = "amazon-loop-debug" AVOD_AD_ANALYSIS = "avod-ad-analysis" AVOD_NEW_MEDIA = "avod-new-media" BLACKLIST_GET_SIGNIN = "blacklist_get_signin" + BOOST_VOICES = "boost-voices" + CAMERA_UPLOAD = "camera_upload" CLIENT_RADIO_STATIONS = "client-radio-stations" CLOUDFLARE_TURNSTILE_REQUIRED = "cloudflare-turnstile-required" + CLOUDSYNC = "cloudsync" COLLECTIONS = "collections" COMMENTS_AND_REPLIES_PUSH_NOTIFICATIONS = "comments_and_replies_push_notifications" COMMUNITY_ACCESS_PLEX_TV = "community_access_plex_tv" COMPANIONS_SONOS = "companions_sonos" + CONTENT_FILTER = "content_filter" CUSTOM_HOME_REMOVAL = "custom-home-removal" DISABLE_HOME_USER_FRIENDSHIPS = "disable_home_user_friendships" DISABLE_SHARING_FRIENDSHIPS = "disable_sharing_friendships" + DOWNLOADS_GATING = "downloads-gating" DRM_SUPPORT = "drm_support" + DVR = "dvr" + DVR_BLOCK_UNSUPPORTED_COUNTRIES = "dvr-block-unsupported-countries" + EPG_RECENT_CHANNELS = "epg-recent-channels" EXCLUDE_RESTRICTIONS = "exclude restrictions" FEDERATED_AUTH = "federated-auth" FRIEND_REQUEST_PUSH_NOTIFICATIONS = "friend_request_push_notifications" + GRANDFATHER_SYNC = "grandfather-sync" GUIDED_UPGRADE = "guided-upgrade" + HARDWARE_TRANSCODING = "hardware_transcoding" HOME = "home" + HWTRANSCODE = "hwtranscode" + IMAGGA_V2 = "imagga-v2" INCREASE_PASSWORD_COMPLEXITY = "increase-password-complexity" IOS14_PRIVACY_BANNER = "ios14-privacy-banner" ITERABLE_NOTIFICATION_TOKENS = "iterable-notification-tokens" + ITEM_CLUSTERS = "item_clusters" KEEP_PAYMENT_METHOD = "keep-payment-method" KEVIN_BACON = "kevin-bacon" KOREA_CONSENT = "korea-consent" @@ -245,28 +263,49 @@ class Features(str, Enum): LIGHTNING_DVR_PIVOT = "lightning-dvr-pivot" LIVE_TV_SUPPORT_INCOMPLETE_SEGMENTS = "live-tv-support-incomplete-segments" LIVETV = "livetv" + LYRICS = "lyrics" METADATA_SEARCH = "metadata_search" + MUSIC_ANALYSIS = "music-analysis" + MUSIC_VIDEOS = "music_videos" NEW_PLEX_PASS_PRICES = "new_plex_pass_prices" NEWS_PROVIDER_SUNSET_MODAL = "news-provider-sunset-modal" + NOMINATIM = "nominatim" + PASS = "pass" PHOTOS_FAVORITES = "photos-favorites" PHOTOS_METADATA_EDITION = "photos-metadata-edition" + PHOTOS_V6_EDIT = "photosV6-edit" + PHOTOS_V6_TV_ALBUMS = "photosV6-tv-albums" PMS_HEALTH = "pms_health" + PREMIUM_DASHBOARD = "premium-dashboard" + PREMIUM_MUSIC_METADATA = "premium_music_metadata" RADIO = "radio" RATE_LIMIT_CLIENT_TOKEN = "rate-limit-client-token" SCROBBLING_SERVICE_PLEX_TV = "scrobbling-service-plex-tv" + SESSION_BANDWIDTH_RESTRICTIONS = "session_bandwidth_restrictions" + SESSION_KICK = "session_kick" SHARED_SERVER_NOTIFICATION = "shared_server_notification" SHARED_SOURCE_NOTIFICATION = "shared_source_notification" + SIGNIN_NOTIFICATION = "signin_notification" SIGNIN_WITH_APPLE = "signin_with_apple" + SILENCE_REMOVAL = "silence-removal" + SLEEP_TIMER = "sleep-timer" SPRING_SERVE_AD_PROVIDER = "spring_serve_ad_provider" + SYNC = "sync" + SWEET_FADES = "sweet-fades" TRANSCODER_CACHE = "transcoder_cache" + TRAILERS = "trailers" TUNER_SHARING = "tuner-sharing" TWO_FACTOR_AUTHENTICATION = "two-factor-authentication" UNSUPPORTEDTUNERS = "unsupportedtuners" UPGRADE_3DS2 = "upgrade-3ds2" + VISUALIZERS = "visualizers" VOD_SCHEMA = "vod-schema" VOD_CLOUDFLARE = "vod_cloudflare" + VOLUME_LEVELING = "volume-leveling" WATCH_TOGETHER_INVITE = "watch-together-invite" + WATCHLIST_RSS = "watchlist-rss" WEB_SERVER_DASHBOARD = "web_server_dashboard" + WEBHOOKS = "webhooks" class GetTokenDetailsAuthenticationStatus(str, Enum): @@ -296,7 +335,9 @@ class SubscriptionTypedDict(TypedDict): class Subscription(BaseModel): r"""If the account’s Plex Pass subscription is active""" - features: Optional[List[Features]] = None + features: Optional[ + List[Annotated[Features, PlainValidator(validate_open_enum(False))]] + ] = None r"""List of features allowed on your Plex Pass subscription""" active: Optional[bool] = None @@ -356,7 +397,7 @@ class Subscription(BaseModel): return m -class GetTokenDetailsFeatures(str, Enum): +class GetTokenDetailsFeatures(str, Enum, metaclass=utils.OpenEnumMeta): ANDROID_DOLBY_VISION = "Android - Dolby Vision" ANDROID_PI_P = "Android - PiP" CU_SUNSET = "CU Sunset" @@ -364,28 +405,43 @@ class GetTokenDetailsFeatures(str, Enum): TREBLE_SHOW_FEATURES = "TREBLE-show-features" AD_COUNTDOWN_TIMER = "ad-countdown-timer" ADAPTIVE_BITRATE = "adaptive_bitrate" + ALBUM_TYPES = "album-types" + ALLOW_DVR = "allow_dvr" AMAZON_LOOP_DEBUG = "amazon-loop-debug" AVOD_AD_ANALYSIS = "avod-ad-analysis" AVOD_NEW_MEDIA = "avod-new-media" BLACKLIST_GET_SIGNIN = "blacklist_get_signin" + BOOST_VOICES = "boost-voices" + CAMERA_UPLOAD = "camera_upload" CLIENT_RADIO_STATIONS = "client-radio-stations" CLOUDFLARE_TURNSTILE_REQUIRED = "cloudflare-turnstile-required" + CLOUDSYNC = "cloudsync" COLLECTIONS = "collections" COMMENTS_AND_REPLIES_PUSH_NOTIFICATIONS = "comments_and_replies_push_notifications" COMMUNITY_ACCESS_PLEX_TV = "community_access_plex_tv" COMPANIONS_SONOS = "companions_sonos" + CONTENT_FILTER = "content_filter" CUSTOM_HOME_REMOVAL = "custom-home-removal" DISABLE_HOME_USER_FRIENDSHIPS = "disable_home_user_friendships" DISABLE_SHARING_FRIENDSHIPS = "disable_sharing_friendships" + DOWNLOADS_GATING = "downloads-gating" DRM_SUPPORT = "drm_support" + DVR = "dvr" + DVR_BLOCK_UNSUPPORTED_COUNTRIES = "dvr-block-unsupported-countries" + EPG_RECENT_CHANNELS = "epg-recent-channels" EXCLUDE_RESTRICTIONS = "exclude restrictions" FEDERATED_AUTH = "federated-auth" FRIEND_REQUEST_PUSH_NOTIFICATIONS = "friend_request_push_notifications" + GRANDFATHER_SYNC = "grandfather-sync" GUIDED_UPGRADE = "guided-upgrade" + HARDWARE_TRANSCODING = "hardware_transcoding" HOME = "home" + HWTRANSCODE = "hwtranscode" + IMAGGA_V2 = "imagga-v2" INCREASE_PASSWORD_COMPLEXITY = "increase-password-complexity" IOS14_PRIVACY_BANNER = "ios14-privacy-banner" ITERABLE_NOTIFICATION_TOKENS = "iterable-notification-tokens" + ITEM_CLUSTERS = "item_clusters" KEEP_PAYMENT_METHOD = "keep-payment-method" KEVIN_BACON = "kevin-bacon" KOREA_CONSENT = "korea-consent" @@ -394,28 +450,49 @@ class GetTokenDetailsFeatures(str, Enum): LIGHTNING_DVR_PIVOT = "lightning-dvr-pivot" LIVE_TV_SUPPORT_INCOMPLETE_SEGMENTS = "live-tv-support-incomplete-segments" LIVETV = "livetv" + LYRICS = "lyrics" METADATA_SEARCH = "metadata_search" + MUSIC_ANALYSIS = "music-analysis" + MUSIC_VIDEOS = "music_videos" NEW_PLEX_PASS_PRICES = "new_plex_pass_prices" NEWS_PROVIDER_SUNSET_MODAL = "news-provider-sunset-modal" + NOMINATIM = "nominatim" + PASS = "pass" PHOTOS_FAVORITES = "photos-favorites" PHOTOS_METADATA_EDITION = "photos-metadata-edition" + PHOTOS_V6_EDIT = "photosV6-edit" + PHOTOS_V6_TV_ALBUMS = "photosV6-tv-albums" PMS_HEALTH = "pms_health" + PREMIUM_DASHBOARD = "premium-dashboard" + PREMIUM_MUSIC_METADATA = "premium_music_metadata" RADIO = "radio" RATE_LIMIT_CLIENT_TOKEN = "rate-limit-client-token" SCROBBLING_SERVICE_PLEX_TV = "scrobbling-service-plex-tv" + SESSION_BANDWIDTH_RESTRICTIONS = "session_bandwidth_restrictions" + SESSION_KICK = "session_kick" SHARED_SERVER_NOTIFICATION = "shared_server_notification" SHARED_SOURCE_NOTIFICATION = "shared_source_notification" + SIGNIN_NOTIFICATION = "signin_notification" SIGNIN_WITH_APPLE = "signin_with_apple" + SILENCE_REMOVAL = "silence-removal" + SLEEP_TIMER = "sleep-timer" SPRING_SERVE_AD_PROVIDER = "spring_serve_ad_provider" + SYNC = "sync" + SWEET_FADES = "sweet-fades" TRANSCODER_CACHE = "transcoder_cache" + TRAILERS = "trailers" TUNER_SHARING = "tuner-sharing" TWO_FACTOR_AUTHENTICATION = "two-factor-authentication" UNSUPPORTEDTUNERS = "unsupportedtuners" UPGRADE_3DS2 = "upgrade-3ds2" + VISUALIZERS = "visualizers" VOD_SCHEMA = "vod-schema" VOD_CLOUDFLARE = "vod_cloudflare" + VOLUME_LEVELING = "volume-leveling" WATCH_TOGETHER_INVITE = "watch-together-invite" + WATCHLIST_RSS = "watchlist-rss" WEB_SERVER_DASHBOARD = "web_server_dashboard" + WEBHOOKS = "webhooks" class GetTokenDetailsAuthenticationResponseStatus(str, Enum): @@ -441,7 +518,13 @@ class GetTokenDetailsSubscriptionTypedDict(TypedDict): class GetTokenDetailsSubscription(BaseModel): - features: Optional[List[GetTokenDetailsFeatures]] = None + features: Optional[ + List[ + Annotated[ + GetTokenDetailsFeatures, PlainValidator(validate_open_enum(False)) + ] + ] + ] = None r"""List of features allowed on your Plex Pass subscription""" active: Optional[bool] = None diff --git a/src/plex_api_client/models/operations/post_users_sign_in_data.py b/src/plex_api_client/models/operations/post_users_sign_in_data.py index 7323866..cdc55bd 100644 --- a/src/plex_api_client/models/operations/post_users_sign_in_data.py +++ b/src/plex_api_client/models/operations/post_users_sign_in_data.py @@ -4,6 +4,7 @@ from __future__ import annotations from datetime import datetime from enum import Enum import httpx +from plex_api_client import utils from plex_api_client.types import ( BaseModel, Nullable, @@ -11,9 +12,15 @@ from plex_api_client.types import ( UNSET, UNSET_SENTINEL, ) -from plex_api_client.utils import FieldMetadata, QueryParamMetadata, RequestMetadata +from plex_api_client.utils import ( + FieldMetadata, + QueryParamMetadata, + RequestMetadata, + validate_open_enum, +) import pydantic from pydantic import model_serializer +from pydantic.functional_validators import PlainValidator from typing import List, Optional, TypedDict from typing_extensions import Annotated, NotRequired @@ -351,7 +358,7 @@ class PostUsersSignInDataServices(BaseModel): return m -class PostUsersSignInDataFeatures(str, Enum): +class PostUsersSignInDataFeatures(str, Enum, metaclass=utils.OpenEnumMeta): ANDROID_DOLBY_VISION = "Android - Dolby Vision" ANDROID_PI_P = "Android - PiP" CU_SUNSET = "CU Sunset" @@ -359,28 +366,43 @@ class PostUsersSignInDataFeatures(str, Enum): TREBLE_SHOW_FEATURES = "TREBLE-show-features" AD_COUNTDOWN_TIMER = "ad-countdown-timer" ADAPTIVE_BITRATE = "adaptive_bitrate" + ALBUM_TYPES = "album-types" + ALLOW_DVR = "allow_dvr" AMAZON_LOOP_DEBUG = "amazon-loop-debug" AVOD_AD_ANALYSIS = "avod-ad-analysis" AVOD_NEW_MEDIA = "avod-new-media" BLACKLIST_GET_SIGNIN = "blacklist_get_signin" + BOOST_VOICES = "boost-voices" + CAMERA_UPLOAD = "camera_upload" CLIENT_RADIO_STATIONS = "client-radio-stations" CLOUDFLARE_TURNSTILE_REQUIRED = "cloudflare-turnstile-required" + CLOUDSYNC = "cloudsync" COLLECTIONS = "collections" COMMENTS_AND_REPLIES_PUSH_NOTIFICATIONS = "comments_and_replies_push_notifications" COMMUNITY_ACCESS_PLEX_TV = "community_access_plex_tv" COMPANIONS_SONOS = "companions_sonos" + CONTENT_FILTER = "content_filter" CUSTOM_HOME_REMOVAL = "custom-home-removal" DISABLE_HOME_USER_FRIENDSHIPS = "disable_home_user_friendships" DISABLE_SHARING_FRIENDSHIPS = "disable_sharing_friendships" + DOWNLOADS_GATING = "downloads-gating" DRM_SUPPORT = "drm_support" + DVR = "dvr" + DVR_BLOCK_UNSUPPORTED_COUNTRIES = "dvr-block-unsupported-countries" + EPG_RECENT_CHANNELS = "epg-recent-channels" EXCLUDE_RESTRICTIONS = "exclude restrictions" FEDERATED_AUTH = "federated-auth" FRIEND_REQUEST_PUSH_NOTIFICATIONS = "friend_request_push_notifications" + GRANDFATHER_SYNC = "grandfather-sync" GUIDED_UPGRADE = "guided-upgrade" + HARDWARE_TRANSCODING = "hardware_transcoding" HOME = "home" + HWTRANSCODE = "hwtranscode" + IMAGGA_V2 = "imagga-v2" INCREASE_PASSWORD_COMPLEXITY = "increase-password-complexity" IOS14_PRIVACY_BANNER = "ios14-privacy-banner" ITERABLE_NOTIFICATION_TOKENS = "iterable-notification-tokens" + ITEM_CLUSTERS = "item_clusters" KEEP_PAYMENT_METHOD = "keep-payment-method" KEVIN_BACON = "kevin-bacon" KOREA_CONSENT = "korea-consent" @@ -389,28 +411,49 @@ class PostUsersSignInDataFeatures(str, Enum): LIGHTNING_DVR_PIVOT = "lightning-dvr-pivot" LIVE_TV_SUPPORT_INCOMPLETE_SEGMENTS = "live-tv-support-incomplete-segments" LIVETV = "livetv" + LYRICS = "lyrics" METADATA_SEARCH = "metadata_search" + MUSIC_ANALYSIS = "music-analysis" + MUSIC_VIDEOS = "music_videos" NEW_PLEX_PASS_PRICES = "new_plex_pass_prices" NEWS_PROVIDER_SUNSET_MODAL = "news-provider-sunset-modal" + NOMINATIM = "nominatim" + PASS = "pass" PHOTOS_FAVORITES = "photos-favorites" PHOTOS_METADATA_EDITION = "photos-metadata-edition" + PHOTOS_V6_EDIT = "photosV6-edit" + PHOTOS_V6_TV_ALBUMS = "photosV6-tv-albums" PMS_HEALTH = "pms_health" + PREMIUM_DASHBOARD = "premium-dashboard" + PREMIUM_MUSIC_METADATA = "premium_music_metadata" RADIO = "radio" RATE_LIMIT_CLIENT_TOKEN = "rate-limit-client-token" SCROBBLING_SERVICE_PLEX_TV = "scrobbling-service-plex-tv" + SESSION_BANDWIDTH_RESTRICTIONS = "session_bandwidth_restrictions" + SESSION_KICK = "session_kick" SHARED_SERVER_NOTIFICATION = "shared_server_notification" SHARED_SOURCE_NOTIFICATION = "shared_source_notification" + SIGNIN_NOTIFICATION = "signin_notification" SIGNIN_WITH_APPLE = "signin_with_apple" + SILENCE_REMOVAL = "silence-removal" + SLEEP_TIMER = "sleep-timer" SPRING_SERVE_AD_PROVIDER = "spring_serve_ad_provider" + SYNC = "sync" + SWEET_FADES = "sweet-fades" TRANSCODER_CACHE = "transcoder_cache" + TRAILERS = "trailers" TUNER_SHARING = "tuner-sharing" TWO_FACTOR_AUTHENTICATION = "two-factor-authentication" UNSUPPORTEDTUNERS = "unsupportedtuners" UPGRADE_3DS2 = "upgrade-3ds2" + VISUALIZERS = "visualizers" VOD_SCHEMA = "vod-schema" VOD_CLOUDFLARE = "vod_cloudflare" + VOLUME_LEVELING = "volume-leveling" WATCH_TOGETHER_INVITE = "watch-together-invite" + WATCHLIST_RSS = "watchlist-rss" WEB_SERVER_DASHBOARD = "web_server_dashboard" + WEBHOOKS = "webhooks" class PostUsersSignInDataAuthenticationStatus(str, Enum): @@ -440,7 +483,13 @@ class PostUsersSignInDataSubscriptionTypedDict(TypedDict): class PostUsersSignInDataSubscription(BaseModel): r"""If the account’s Plex Pass subscription is active""" - features: Optional[List[PostUsersSignInDataFeatures]] = None + features: Optional[ + List[ + Annotated[ + PostUsersSignInDataFeatures, PlainValidator(validate_open_enum(False)) + ] + ] + ] = None r"""List of features allowed on your Plex Pass subscription""" active: Optional[bool] = None @@ -500,7 +549,9 @@ class PostUsersSignInDataSubscription(BaseModel): return m -class PostUsersSignInDataAuthenticationFeatures(str, Enum): +class PostUsersSignInDataAuthenticationFeatures( + str, Enum, metaclass=utils.OpenEnumMeta +): ANDROID_DOLBY_VISION = "Android - Dolby Vision" ANDROID_PI_P = "Android - PiP" CU_SUNSET = "CU Sunset" @@ -508,28 +559,43 @@ class PostUsersSignInDataAuthenticationFeatures(str, Enum): TREBLE_SHOW_FEATURES = "TREBLE-show-features" AD_COUNTDOWN_TIMER = "ad-countdown-timer" ADAPTIVE_BITRATE = "adaptive_bitrate" + ALBUM_TYPES = "album-types" + ALLOW_DVR = "allow_dvr" AMAZON_LOOP_DEBUG = "amazon-loop-debug" AVOD_AD_ANALYSIS = "avod-ad-analysis" AVOD_NEW_MEDIA = "avod-new-media" BLACKLIST_GET_SIGNIN = "blacklist_get_signin" + BOOST_VOICES = "boost-voices" + CAMERA_UPLOAD = "camera_upload" CLIENT_RADIO_STATIONS = "client-radio-stations" CLOUDFLARE_TURNSTILE_REQUIRED = "cloudflare-turnstile-required" + CLOUDSYNC = "cloudsync" COLLECTIONS = "collections" COMMENTS_AND_REPLIES_PUSH_NOTIFICATIONS = "comments_and_replies_push_notifications" COMMUNITY_ACCESS_PLEX_TV = "community_access_plex_tv" COMPANIONS_SONOS = "companions_sonos" + CONTENT_FILTER = "content_filter" CUSTOM_HOME_REMOVAL = "custom-home-removal" DISABLE_HOME_USER_FRIENDSHIPS = "disable_home_user_friendships" DISABLE_SHARING_FRIENDSHIPS = "disable_sharing_friendships" + DOWNLOADS_GATING = "downloads-gating" DRM_SUPPORT = "drm_support" + DVR = "dvr" + DVR_BLOCK_UNSUPPORTED_COUNTRIES = "dvr-block-unsupported-countries" + EPG_RECENT_CHANNELS = "epg-recent-channels" EXCLUDE_RESTRICTIONS = "exclude restrictions" FEDERATED_AUTH = "federated-auth" FRIEND_REQUEST_PUSH_NOTIFICATIONS = "friend_request_push_notifications" + GRANDFATHER_SYNC = "grandfather-sync" GUIDED_UPGRADE = "guided-upgrade" + HARDWARE_TRANSCODING = "hardware_transcoding" HOME = "home" + HWTRANSCODE = "hwtranscode" + IMAGGA_V2 = "imagga-v2" INCREASE_PASSWORD_COMPLEXITY = "increase-password-complexity" IOS14_PRIVACY_BANNER = "ios14-privacy-banner" ITERABLE_NOTIFICATION_TOKENS = "iterable-notification-tokens" + ITEM_CLUSTERS = "item_clusters" KEEP_PAYMENT_METHOD = "keep-payment-method" KEVIN_BACON = "kevin-bacon" KOREA_CONSENT = "korea-consent" @@ -538,28 +604,49 @@ class PostUsersSignInDataAuthenticationFeatures(str, Enum): LIGHTNING_DVR_PIVOT = "lightning-dvr-pivot" LIVE_TV_SUPPORT_INCOMPLETE_SEGMENTS = "live-tv-support-incomplete-segments" LIVETV = "livetv" + LYRICS = "lyrics" METADATA_SEARCH = "metadata_search" + MUSIC_ANALYSIS = "music-analysis" + MUSIC_VIDEOS = "music_videos" NEW_PLEX_PASS_PRICES = "new_plex_pass_prices" NEWS_PROVIDER_SUNSET_MODAL = "news-provider-sunset-modal" + NOMINATIM = "nominatim" + PASS = "pass" PHOTOS_FAVORITES = "photos-favorites" PHOTOS_METADATA_EDITION = "photos-metadata-edition" + PHOTOS_V6_EDIT = "photosV6-edit" + PHOTOS_V6_TV_ALBUMS = "photosV6-tv-albums" PMS_HEALTH = "pms_health" + PREMIUM_DASHBOARD = "premium-dashboard" + PREMIUM_MUSIC_METADATA = "premium_music_metadata" RADIO = "radio" RATE_LIMIT_CLIENT_TOKEN = "rate-limit-client-token" SCROBBLING_SERVICE_PLEX_TV = "scrobbling-service-plex-tv" + SESSION_BANDWIDTH_RESTRICTIONS = "session_bandwidth_restrictions" + SESSION_KICK = "session_kick" SHARED_SERVER_NOTIFICATION = "shared_server_notification" SHARED_SOURCE_NOTIFICATION = "shared_source_notification" + SIGNIN_NOTIFICATION = "signin_notification" SIGNIN_WITH_APPLE = "signin_with_apple" + SILENCE_REMOVAL = "silence-removal" + SLEEP_TIMER = "sleep-timer" SPRING_SERVE_AD_PROVIDER = "spring_serve_ad_provider" + SYNC = "sync" + SWEET_FADES = "sweet-fades" TRANSCODER_CACHE = "transcoder_cache" + TRAILERS = "trailers" TUNER_SHARING = "tuner-sharing" TWO_FACTOR_AUTHENTICATION = "two-factor-authentication" UNSUPPORTEDTUNERS = "unsupportedtuners" UPGRADE_3DS2 = "upgrade-3ds2" + VISUALIZERS = "visualizers" VOD_SCHEMA = "vod-schema" VOD_CLOUDFLARE = "vod_cloudflare" + VOLUME_LEVELING = "volume-leveling" WATCH_TOGETHER_INVITE = "watch-together-invite" + WATCHLIST_RSS = "watchlist-rss" WEB_SERVER_DASHBOARD = "web_server_dashboard" + WEBHOOKS = "webhooks" class PostUsersSignInDataAuthenticationResponseStatus(str, Enum): @@ -585,7 +672,14 @@ class PostUsersSignInDataAuthenticationSubscriptionTypedDict(TypedDict): class PostUsersSignInDataAuthenticationSubscription(BaseModel): - features: Optional[List[PostUsersSignInDataAuthenticationFeatures]] = None + features: Optional[ + List[ + Annotated[ + PostUsersSignInDataAuthenticationFeatures, + PlainValidator(validate_open_enum(False)), + ] + ] + ] = None r"""List of features allowed on your Plex Pass subscription""" active: Optional[bool] = None diff --git a/src/plex_api_client/plex.py b/src/plex_api_client/plex.py index 7009068..17ff8cd 100644 --- a/src/plex_api_client/plex.py +++ b/src/plex_api_client/plex.py @@ -749,6 +749,7 @@ class Plex(BaseSDK): include_i_pv6: Optional[ operations.IncludeIPv6 ] = operations.IncludeIPv6.DISABLE, + client_id: Optional[str] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, @@ -760,6 +761,7 @@ class Plex(BaseSDK): :param include_https: Include Https entries in the results :param include_relay: Include Relay addresses in the results E.g: https://10-0-0-25.bbf8e10c7fa20447cacee74cd9914cde.plex.direct:32400 :param include_i_pv6: Include IPv6 entries in the results + :param client_id: The unique identifier for the client application This is used to track the client application and its usage (UUID, serial number, or other number unique per device) :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds @@ -778,6 +780,7 @@ class Plex(BaseSDK): include_https=include_https, include_relay=include_relay, include_i_pv6=include_i_pv6, + client_id=client_id, ) req = self.build_request( @@ -791,6 +794,9 @@ class Plex(BaseSDK): request_has_query_params=True, user_agent_header="user-agent", accept_header_value="application/json", + _globals=operations.GetServerResourcesGlobals( + client_id=self.sdk_configuration.globals.client_id, + ), security=self.sdk_configuration.security, timeout_ms=timeout_ms, ) @@ -861,6 +867,7 @@ class Plex(BaseSDK): include_i_pv6: Optional[ operations.IncludeIPv6 ] = operations.IncludeIPv6.DISABLE, + client_id: Optional[str] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, @@ -872,6 +879,7 @@ class Plex(BaseSDK): :param include_https: Include Https entries in the results :param include_relay: Include Relay addresses in the results E.g: https://10-0-0-25.bbf8e10c7fa20447cacee74cd9914cde.plex.direct:32400 :param include_i_pv6: Include IPv6 entries in the results + :param client_id: The unique identifier for the client application This is used to track the client application and its usage (UUID, serial number, or other number unique per device) :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds @@ -890,6 +898,7 @@ class Plex(BaseSDK): include_https=include_https, include_relay=include_relay, include_i_pv6=include_i_pv6, + client_id=client_id, ) req = self.build_request_async( @@ -903,6 +912,9 @@ class Plex(BaseSDK): request_has_query_params=True, user_agent_header="user-agent", accept_header_value="application/json", + _globals=operations.GetServerResourcesGlobals( + client_id=self.sdk_configuration.globals.client_id, + ), security=self.sdk_configuration.security, timeout_ms=timeout_ms, ) diff --git a/src/plex_api_client/sdkconfiguration.py b/src/plex_api_client/sdkconfiguration.py index 0920855..daf2a3e 100644 --- a/src/plex_api_client/sdkconfiguration.py +++ b/src/plex_api_client/sdkconfiguration.py @@ -39,9 +39,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.15.1" + sdk_version: str = "0.16.0" gen_version: str = "2.426.2" - user_agent: str = "speakeasy-sdk/python 0.15.1 2.426.2 0.0.3 plex-api-client" + user_agent: str = "speakeasy-sdk/python 0.16.0 2.426.2 0.0.3 plex-api-client" retry_config: OptionalNullable[RetryConfig] = Field(default_factory=lambda: UNSET) timeout_ms: Optional[int] = None diff --git a/tests/test_plex.py b/tests/test_plex.py index 637925d..9c2bd51 100644 --- a/tests/test_plex.py +++ b/tests/test_plex.py @@ -111,6 +111,7 @@ def test_plex_get_server_resources(): include_https=operations.IncludeHTTPS.ENABLE, include_relay=operations.IncludeRelay.ENABLE, include_i_pv6=operations.IncludeIPv6.ENABLE, + client_id="gcgzw5rz2xovp84b4vha3a40", ) assert res.status_code == 200 assert res.plex_devices is not None